LCOV - code coverage report
Current view: top level - padmin/source - prtsetup.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 6 0.0 %
Date: 2012-08-25 Functions: 0 4 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*
       3                 :            :  * This file is part of the LibreOffice project.
       4                 :            :  *
       5                 :            :  * This Source Code Form is subject to the terms of the Mozilla Public
       6                 :            :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7                 :            :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8                 :            :  *
       9                 :            :  * This file incorporates work covered by the following license notice:
      10                 :            :  *
      11                 :            :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12                 :            :  *   contributor license agreements. See the NOTICE file distributed
      13                 :            :  *   with this work for additional information regarding copyright
      14                 :            :  *   ownership. The ASF licenses this file to you under the Apache
      15                 :            :  *   License, Version 2.0 (the "License"); you may not use this file
      16                 :            :  *   except in compliance with the License. You may obtain a copy of
      17                 :            :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18                 :            :  */
      19                 :            : 
      20                 :            : #ifndef _PAD_PRTSETUP_HXX_
      21                 :            : #define _PAD_PRTSETUP_HXX_
      22                 :            : 
      23                 :            : #include "helper.hxx"
      24                 :            : 
      25                 :            : #include "tools/link.hxx"
      26                 :            : 
      27                 :            : #include "vcl/tabdlg.hxx"
      28                 :            : #include "vcl/tabpage.hxx"
      29                 :            : #include "vcl/tabctrl.hxx"
      30                 :            : #include "vcl/button.hxx"
      31                 :            : #include "vcl/fixed.hxx"
      32                 :            : #include "vcl/lstbox.hxx"
      33                 :            : #include "vcl/field.hxx"
      34                 :            : #include "vcl/combobox.hxx"
      35                 :            : #include "vcl/ppdparser.hxx"
      36                 :            : #include "vcl/printerinfomanager.hxx"
      37                 :            : 
      38                 :            : namespace padmin {
      39                 :            : 
      40                 :            : class RTSPaperPage;
      41                 :            : class RTSDevicePage;
      42                 :            : class RTSOtherPage;
      43                 :            : class RTSFontSubstPage;
      44                 :            : class RTSCommandPage;
      45                 :            : 
      46                 :            : class RTSDialog : public TabDialog
      47                 :            : {
      48                 :            :     friend class RTSPaperPage;
      49                 :            :     friend class RTSDevicePage;
      50                 :            :     friend class RTSOtherPage;
      51                 :            :     friend class RTSFontSubstPage;
      52                 :            :     friend class RTSCommandPage;
      53                 :            : 
      54                 :            :     ::psp::PrinterInfo      m_aJobData;
      55                 :            :     String                  m_aPrinter;
      56                 :            : 
      57                 :            :     // controls
      58                 :            :     TabControl              m_aTabControl;
      59                 :            :     OKButton                m_aOKButton;
      60                 :            :     CancelButton            m_aCancelButton;
      61                 :            : 
      62                 :            :     // pages
      63                 :            :     RTSPaperPage*           m_pPaperPage;
      64                 :            :     RTSDevicePage*          m_pDevicePage;
      65                 :            :     RTSOtherPage*           m_pOtherPage;
      66                 :            :     RTSFontSubstPage*       m_pFontSubstPage;
      67                 :            :     RTSCommandPage*         m_pCommandPage;
      68                 :            : 
      69                 :            :     // some resources
      70                 :            :     String                  m_aInvalidString;
      71                 :            :     String                  m_aFromDriverString;
      72                 :            : 
      73                 :            :     DECL_LINK( ActivatePage, TabControl* );
      74                 :            :     DECL_LINK( ClickButton, Button* );
      75                 :            : 
      76                 :            :     // helper functions
      77                 :            :     void insertAllPPDValues( ListBox&, const psp::PPDParser*, const psp::PPDKey* );
      78                 :            : public:
      79                 :            :     RTSDialog( const ::psp::PrinterInfo& rJobData, const String& rPrinter, bool bAllPages, Window* pParent = NULL );
      80                 :            :     ~RTSDialog();
      81                 :            : 
      82                 :          0 :     const ::psp::PrinterInfo& getSetup() const { return m_aJobData; }
      83                 :            : };
      84                 :            : 
      85                 :            : class RTSPaperPage : public TabPage
      86                 :            : {
      87                 :            :     RTSDialog*          m_pParent;
      88                 :            : 
      89                 :            :     FixedText           m_aPaperText;
      90                 :            :     ListBox             m_aPaperBox;
      91                 :            : 
      92                 :            :     FixedText           m_aOrientText;
      93                 :            :     ListBox             m_aOrientBox;
      94                 :            : 
      95                 :            :     FixedText           m_aDuplexText;
      96                 :            :     ListBox             m_aDuplexBox;
      97                 :            : 
      98                 :            :     FixedText           m_aSlotText;
      99                 :            :     ListBox             m_aSlotBox;
     100                 :            : 
     101                 :            :     DECL_LINK( SelectHdl, ListBox* );
     102                 :            : public:
     103                 :            :     RTSPaperPage( RTSDialog* );
     104                 :            :     ~RTSPaperPage();
     105                 :            : 
     106                 :            :     void update();
     107                 :            : 
     108                 :          0 :     String getOrientation() { return m_aOrientBox.GetSelectEntry(); }
     109                 :            : };
     110                 :            : 
     111                 :            : class RTSDevicePage : public TabPage
     112                 :            : {
     113                 :            :     RTSDialog*          m_pParent;
     114                 :            : 
     115                 :            :     String              m_aSpaceColor;
     116                 :            :     String              m_aSpaceGray;
     117                 :            : 
     118                 :            :     FixedText           m_aPPDKeyText;
     119                 :            :     ListBox             m_aPPDKeyBox;
     120                 :            : 
     121                 :            :     FixedText           m_aPPDValueText;
     122                 :            :     ListBox             m_aPPDValueBox;
     123                 :            : 
     124                 :            :     FixedText           m_aLevelText;
     125                 :            :     ListBox             m_aLevelBox;
     126                 :            : 
     127                 :            :     FixedText           m_aSpaceText;
     128                 :            :     ListBox             m_aSpaceBox;
     129                 :            : 
     130                 :            :     FixedText           m_aDepthText;
     131                 :            :     ListBox             m_aDepthBox;
     132                 :            : 
     133                 :            :     void FillValueBox( const ::psp::PPDKey* );
     134                 :            : 
     135                 :            :     DECL_LINK( SelectHdl, ListBox* );
     136                 :            : public:
     137                 :            :     RTSDevicePage( RTSDialog* );
     138                 :            :     ~RTSDevicePage();
     139                 :            : 
     140                 :            :     void update();
     141                 :            : 
     142                 :            :     sal_uLong getLevel();
     143                 :            :     sal_uLong getPDFDevice();
     144                 :          0 :     sal_uLong getDepth() { return m_aDepthBox.GetSelectEntry().ToInt32(); }
     145                 :          0 :     sal_uLong getColorDevice()
     146                 :            :     {
     147                 :          0 :         String aSpace( m_aSpaceBox.GetSelectEntry() );
     148                 :          0 :         return aSpace == m_aSpaceColor ? 1 : ( aSpace == m_aSpaceGray ? -1 : 0 );
     149                 :            :     }
     150                 :            : };
     151                 :            : 
     152                 :            : class RTSOtherPage : public TabPage
     153                 :            : {
     154                 :            :     RTSDialog*          m_pParent;
     155                 :            : 
     156                 :            :     FixedText           m_aLeftTxt;
     157                 :            :     MetricField         m_aLeftLB;
     158                 :            :     FixedText           m_aTopTxt;
     159                 :            :     MetricField         m_aTopLB;
     160                 :            :     FixedText           m_aRightTxt;
     161                 :            :     MetricField         m_aRightLB;
     162                 :            :     FixedText           m_aBottomTxt;
     163                 :            :     MetricField         m_aBottomLB;
     164                 :            :     FixedText           m_aCommentTxt;
     165                 :            :     Edit                m_aCommentEdt;
     166                 :            :     PushButton          m_aDefaultBtn;
     167                 :            : 
     168                 :            :     void initValues();
     169                 :            : 
     170                 :            :     DECL_LINK( ClickBtnHdl, Button *);
     171                 :            : 
     172                 :            : public:
     173                 :            :     RTSOtherPage( RTSDialog* );
     174                 :            :     ~RTSOtherPage();
     175                 :            : 
     176                 :            :     void save();
     177                 :            : };
     178                 :            : 
     179                 :            : class RTSFontSubstPage : public TabPage
     180                 :            : {
     181                 :            :     RTSDialog*          m_pParent;
     182                 :            : 
     183                 :            :     FixedText           m_aSubstitutionsText;
     184                 :            :     DelMultiListBox     m_aSubstitutionsBox;
     185                 :            :     FixedText           m_aFromFontText;
     186                 :            :     ComboBox            m_aFromFontBox;
     187                 :            :     FixedText           m_aToFontText;
     188                 :            :     ListBox             m_aToFontBox;
     189                 :            : 
     190                 :            :     PushButton          m_aAddButton;
     191                 :            :     PushButton          m_aRemoveButton;
     192                 :            :     CheckBox            m_aEnableBox;
     193                 :            : 
     194                 :            :     DECL_LINK( ClickBtnHdl, Button* );
     195                 :            :     DECL_LINK( SelectHdl, ListBox* );
     196                 :            :     DECL_LINK( DelPressedHdl, ListBox* );
     197                 :            : 
     198                 :            :     void update();
     199                 :            : public:
     200                 :            :     RTSFontSubstPage( RTSDialog* );
     201                 :            :     ~RTSFontSubstPage();
     202                 :            : };
     203                 :            : 
     204                 :            : } // namespace
     205                 :            : 
     206                 :            : #endif // _PAD_PRTSETUP_HXX
     207                 :            : 
     208                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10