kaddressbook

configurecardviewdialog.h
1 /*
2  This file is part of KAddressBook.
3  Copyright (c) 2002 Mike Pilone <mpilone@slac.com>
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 
19  As a special exception, permission is given to link this program
20  with any edition of TQt, and distribute the resulting executable,
21  without including the source code for TQt in the source distribution.
22 */
23 
24 #ifndef CONFIGURECARDVIEWDIALOG_H
25 #define CONFIGURECARDVIEWDIALOG_H
26 
27 #include "viewconfigurewidget.h"
28 
29 #include <tqvbox.h>
30 #include <tqwidget.h>
31 #include <tqfont.h>
32 
33 class TQString;
34 class TQWidget;
35 class TQCheckBox;
36 class TQLabel;
37 class TDEConfig;
38 
39 namespace TDEABC { class AddressBook; }
40 
41 class CardViewLookAndFeelPage;
42 
49 {
50  public:
51  ConfigureCardViewWidget( TDEABC::AddressBook *ab, TQWidget *parent, const char *name );
52  virtual ~ConfigureCardViewWidget();
53 
54  virtual void restoreSettings( TDEConfig* );
55  virtual void saveSettings( TDEConfig* );
56 
57  private:
58  class CardViewLookNFeelPage *mAdvancedPage;
59 };
60 
80 class CardViewLookNFeelPage : public TQVBox {
81 
82  TQ_OBJECT
83 
84 
85  public:
86  CardViewLookNFeelPage( TQWidget *parent=0, const char *name=0 );
88 
89  void restoreSettings( TDEConfig* );
90  void saveSettings( TDEConfig* );
91 
92  private slots:
93  void setTextFont();
94  void setHeaderFont();
95  void enableFonts();
96  void enableColors();
97 
98  private:
99  void initGUI();
100  void updateFontLabel( TQFont, TQLabel * );
101 
102  TQCheckBox *cbEnableCustomFonts,
103  *cbEnableCustomColors,
104  *cbDrawSeps, *cbDrawBorders,
105  *cbShowFieldLabels, *cbShowEmptyFields;
106  class ColorListBox *lbColors;
107  TQLabel *lTextFont, *lHeaderFont;
108  class KPushButton *btnFont, *btnHeaderFont;
109  class TQSpinBox *sbMargin, *sbSpacing, *sbSepWidth;
110 
111  class TQWidget *vbFonts;
112 };
113 
114 #endif
Card View Advanced LookNFeel settings widget: this is a tabbed widget with 3 tabs: Fonts text font he...
Configure dialog for the card view.
virtual void saveSettings(TDEConfig *)
Writes the configuration from the GUI to the config object.
virtual void restoreSettings(TDEConfig *)
Reads the configuration from the config object and sets the values in the GUI.
This widget is the base class for all view configuration widgets.