korganizer

koprefsdialog.h
1 /*
2  This file is part of KOrganizer.
3  Copyright (c) 2000,2001,2002,2003 Cornelius Schumacher <schumacher@kde.org>
4  Copyright (c) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 
20  As a special exception, permission is given to link this program
21  with any edition of TQt, and distribute the resulting executable,
22  without including the source code for TQt in the source distribution.
23 */
24 #ifndef KOPREFSDIALOG_H
25 #define KOPREFSDIALOG_H
26 
27 #include <libtdepim/kprefsdialog.h>
28 #include <libtdepim/kcmdesignerfields.h>
29 
30 #include <tqdict.h>
31 
32 class TQLineEdit;
33 class TQLabel;
34 class TQSpinBox;
35 class TQComboBox;
36 class KColorButton;
37 class KPushButton;
38 class TQColor;
39 class TQListView;
40 
41 class TDE_EXPORT KOPrefsDialogMain : public KPrefsModule
42 {
43  TQ_OBJECT
44 
45  public:
46  KOPrefsDialogMain( TQWidget *parent, const char *name );
47 
48  protected slots:
49  void toggleEmailSettings( bool on );
50  private:
51  TQWidget *mUserEmailSettings;
52 };
53 
54 class TDE_EXPORT KOPrefsDialogColors : public KPrefsModule
55 {
56  TQ_OBJECT
57 
58  public:
59  KOPrefsDialogColors( TQWidget *parent, const char *name );
60 
61  protected:
62  void usrWriteConfig();
63  void usrReadConfig();
64 
65  protected slots:
66  void updateCategories();
67  void setCategoryColor();
68  void updateCategoryColor();
69 
70  void updateResources();
71  void setResourceColor();
72  void updateResourceColor();
73  private:
74  TQComboBox *mCategoryCombo;
75  KColorButton *mCategoryButton;
76  TQDict<TQColor> mCategoryDict;
77 
78  TQComboBox *mResourceCombo;
79  KColorButton *mResourceButton;
80  TQDict<TQColor> mResourceDict;
81  //For translation Identifier <->idx in Combo
82  TQStringList mResourceIdentifier;
83 };
84 
85 class TDE_EXPORT KOPrefsDialogGroupScheduling : public KPrefsModule
86 {
87  TQ_OBJECT
88 
89  public:
90  KOPrefsDialogGroupScheduling( TQWidget *parent, const char *name );
91 
92  protected:
93  void usrReadConfig();
94  void usrWriteConfig();
95 
96  protected slots:
97  void addItem();
98  void removeItem();
99  void updateItem();
100  void updateInput();
101 
102  private:
103  TQListView *mAMails;
104  TQLineEdit *aEmailsEdit;
105 };
106 
107 class KOGroupwarePrefsPage;
108 
109 class TDE_EXPORT KOPrefsDialogGroupwareScheduling : public KPrefsModule
110 {
111  TQ_OBJECT
112 
113  public:
114  KOPrefsDialogGroupwareScheduling( TQWidget *parent, const char *name );
115 
116  protected:
117  void usrReadConfig();
118  void usrWriteConfig();
119 
120  private:
121  KOGroupwarePrefsPage* mGroupwarePage;
122 };
123 
124 class TDE_EXPORT KOPrefsDialogPlugins : public KPrefsModule
125 {
126  TQ_OBJECT
127 
128  public:
129  KOPrefsDialogPlugins( TQWidget *parent, const char *name );
130 
131  protected slots:
132  void usrReadConfig();
133  void usrWriteConfig();
134  void configure();
135  void selectionChanged( TQListViewItem* );
136 
137  private:
138  void buildList();
139  TQListView *mListView;
140  TQLabel *mDescription;
141  KPushButton *mConfigureButton;
142 };
143 
144 class TDE_EXPORT KOPrefsDesignerFields : public KPIM::KCMDesignerFields
145 {
146  public:
147  KOPrefsDesignerFields( TQWidget *parent = 0, const char *name = 0 );
148 
149  protected:
150  TQString localUiDir();
151  TQString uiPath();
152  void writeActivePages( const TQStringList & );
153  TQStringList readActivePages();
154  TQString applicationName();
155 };
156 
157 #endif