author | zautrix <zautrix> | 2004-06-26 19:01:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-06-26 19:01:18 (UTC) |
commit | b9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (unidiff) | |
tree | 2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /kaddressbook/views/configurecardviewdialog.h | |
download | kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2 |
Initial revision
Diffstat (limited to 'kaddressbook/views/configurecardviewdialog.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/views/configurecardviewdialog.h | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/kaddressbook/views/configurecardviewdialog.h b/kaddressbook/views/configurecardviewdialog.h new file mode 100644 index 0000000..7a62226 --- a/dev/null +++ b/kaddressbook/views/configurecardviewdialog.h | |||
@@ -0,0 +1,117 @@ | |||
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | |||
19 | As a special exception, permission is given to link this program | ||
20 | with any edition of Qt, and distribute the resulting executable, | ||
21 | without including the source code for Qt in the source distribution. | ||
22 | */ | ||
23 | |||
24 | #ifndef CONFIGURECARDVIEWDIALOG_H | ||
25 | #define CONFIGURECARDVIEWDIALOG_H | ||
26 | |||
27 | #include "viewconfigurewidget.h" | ||
28 | |||
29 | #include <qvbox.h> | ||
30 | #include <qwidget.h> | ||
31 | #include <qfont.h> | ||
32 | |||
33 | class QString; | ||
34 | class QWidget; | ||
35 | class QCheckBox; | ||
36 | class QLabel; | ||
37 | class KConfig; | ||
38 | |||
39 | namespace KABC { class AddressBook; } | ||
40 | |||
41 | class CardViewLookAndFeelPage; | ||
42 | |||
43 | /** | ||
44 | Configure dialog for the card view. This dialog inherits from the | ||
45 | standard view dialog in order to add a custom page for the card | ||
46 | view. | ||
47 | */ | ||
48 | class ConfigureCardViewWidget : public ViewConfigureWidget | ||
49 | { | ||
50 | public: | ||
51 | ConfigureCardViewWidget( KABC::AddressBook *ab, QWidget *parent, const char *name ); | ||
52 | virtual ~ConfigureCardViewWidget(); | ||
53 | |||
54 | virtual void restoreSettings( KConfig* ); | ||
55 | virtual void saveSettings( KConfig* ); | ||
56 | |||
57 | private: | ||
58 | class CardViewLookNFeelPage *mAdvancedPage; | ||
59 | }; | ||
60 | |||
61 | /** | ||
62 | Card View Advanced LookNFeel settings widget: | ||
63 | this is a tabbed widget with 3 tabs: | ||
64 | Fonts | ||
65 | * text font | ||
66 | * header font | ||
67 | |||
68 | Colors | ||
69 | * background color | ||
70 | * text color | ||
71 | * highlight color | ||
72 | * title/sep text color | ||
73 | * title/sep bg color | ||
74 | |||
75 | Layout | ||
76 | * item margin | ||
77 | * item spacing | ||
78 | */ | ||
79 | |||
80 | class CardViewLookNFeelPage : public QVBox { | ||
81 | |||
82 | Q_OBJECT | ||
83 | |||
84 | public: | ||
85 | CardViewLookNFeelPage( QWidget *parent=0, const char *name=0 ); | ||
86 | ~CardViewLookNFeelPage(); | ||
87 | |||
88 | void restoreSettings( KConfig* ); | ||
89 | void saveSettings( KConfig* ); | ||
90 | |||
91 | private slots: | ||
92 | void setTextFont(); | ||
93 | void setHeaderFont(); | ||
94 | void enableFonts(); | ||
95 | void enableColors(); | ||
96 | |||
97 | private: | ||
98 | void initGUI(); | ||
99 | void updateFontLabel( QFont, QLabel * ); | ||
100 | |||
101 | QCheckBox *cbEnableCustomFonts, | ||
102 | *cbEnableCustomColors, | ||
103 | *cbDrawSeps, *cbDrawBorders, | ||
104 | *cbShowFieldLabels, *cbShowEmptyFields; | ||
105 | class ColorListBox *lbColors; | ||
106 | QLabel *lTextFont, *lHeaderFont; | ||
107 | #ifndef KAB_EMBEDDED | ||
108 | class KPushButton *btnFont, *btnHeaderFont; | ||
109 | #else //KAB_EMBEDDED | ||
110 | class QPushButton *btnFont, *btnHeaderFont; | ||
111 | #endif //KAB_EMBEDDED | ||
112 | class QSpinBox *sbMargin, *sbSpacing, *sbSepWidth; | ||
113 | |||
114 | class QWidget *vbFonts; | ||
115 | }; | ||
116 | |||
117 | #endif | ||