LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/padmin/source - prtsetup.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 2 0.0 %
Date: 2013-07-09 Functions: 0 2 0.0 %
Legend: Lines: hit not hit

          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_pTabControl;
      59             :     OKButton*               m_pOKButton;
      60             :     CancelButton*           m_pCancelButton;
      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             :     OUString                m_aInvalidString;
      71             : 
      72             :     DECL_LINK( ActivatePage, TabControl* );
      73             :     DECL_LINK( ClickButton, Button* );
      74             : 
      75             :     // helper functions
      76             :     void insertAllPPDValues( ListBox&, const psp::PPDParser*, const psp::PPDKey* );
      77             : public:
      78             :     RTSDialog( const ::psp::PrinterInfo& rJobData, const String& rPrinter, bool bAllPages, Window* pParent = NULL );
      79             :     ~RTSDialog();
      80             : 
      81           0 :     const ::psp::PrinterInfo& getSetup() const { return m_aJobData; }
      82             : };
      83             : 
      84             : class RTSPaperPage : public TabPage
      85             : {
      86             :     RTSDialog*          m_pParent;
      87             : 
      88             :     FixedText*          m_pPaperText;
      89             :     ListBox*            m_pPaperBox;
      90             : 
      91             :     ListBox*            m_pOrientBox;
      92             : 
      93             :     FixedText*          m_pDuplexText;
      94             :     ListBox*            m_pDuplexBox;
      95             : 
      96             :     FixedText*          m_pSlotText;
      97             :     ListBox*            m_pSlotBox;
      98             : 
      99             :     DECL_LINK( SelectHdl, ListBox* );
     100             : public:
     101             :     RTSPaperPage( RTSDialog* );
     102             :     ~RTSPaperPage();
     103             : 
     104             :     void update();
     105             : 
     106           0 :     sal_uInt16 getOrientation() { return m_pOrientBox->GetSelectEntryPos(); }
     107             : };
     108             : 
     109             : class RTSDevicePage : public TabPage
     110             : {
     111             :     RTSDialog*          m_pParent;
     112             : 
     113             :     String              m_aSpaceColor;
     114             :     String              m_aSpaceGray;
     115             : 
     116             :     ListBox*            m_pPPDKeyBox;
     117             :     ListBox*            m_pPPDValueBox;
     118             : 
     119             :     ListBox*            m_pLevelBox;
     120             :     ListBox*            m_pSpaceBox;
     121             :     ListBox*            m_pDepthBox;
     122             : 
     123             :     void FillValueBox( const ::psp::PPDKey* );
     124             : 
     125             :     DECL_LINK( SelectHdl, ListBox* );
     126             : public:
     127             :     RTSDevicePage( RTSDialog* );
     128             :     ~RTSDevicePage();
     129             : 
     130             :     void update();
     131             : 
     132             :     sal_uLong getLevel();
     133             :     sal_uLong getPDFDevice();
     134             :     sal_uLong getDepth();
     135             :     sal_uLong getColorDevice();
     136             : };
     137             : 
     138             : class RTSOtherPage : public TabPage
     139             : {
     140             :     RTSDialog*          m_pParent;
     141             : 
     142             :     FixedText           m_aLeftTxt;
     143             :     MetricField         m_aLeftLB;
     144             :     FixedText           m_aTopTxt;
     145             :     MetricField         m_aTopLB;
     146             :     FixedText           m_aRightTxt;
     147             :     MetricField         m_aRightLB;
     148             :     FixedText           m_aBottomTxt;
     149             :     MetricField         m_aBottomLB;
     150             :     FixedText           m_aCommentTxt;
     151             :     Edit                m_aCommentEdt;
     152             :     PushButton          m_aDefaultBtn;
     153             : 
     154             :     void initValues();
     155             : 
     156             :     DECL_LINK( ClickBtnHdl, Button *);
     157             : 
     158             : public:
     159             :     RTSOtherPage( RTSDialog* );
     160             :     ~RTSOtherPage();
     161             : 
     162             :     void save();
     163             : };
     164             : 
     165             : class RTSFontSubstPage : public TabPage
     166             : {
     167             :     RTSDialog*          m_pParent;
     168             : 
     169             :     FixedText           m_aSubstitutionsText;
     170             :     DelMultiListBox     m_aSubstitutionsBox;
     171             :     FixedText           m_aFromFontText;
     172             :     ComboBox            m_aFromFontBox;
     173             :     FixedText           m_aToFontText;
     174             :     ListBox             m_aToFontBox;
     175             : 
     176             :     PushButton          m_aAddButton;
     177             :     PushButton          m_aRemoveButton;
     178             :     CheckBox            m_aEnableBox;
     179             : 
     180             :     DECL_LINK( ClickBtnHdl, Button* );
     181             :     DECL_LINK( SelectHdl, ListBox* );
     182             :     DECL_LINK( DelPressedHdl, ListBox* );
     183             : 
     184             :     void update();
     185             : public:
     186             :     RTSFontSubstPage( RTSDialog* );
     187             :     ~RTSFontSubstPage();
     188             : };
     189             : 
     190             : } // namespace
     191             : 
     192             : #endif // _PAD_PRTSETUP_HXX
     193             : 
     194             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10