korganizer

koprefs.h
1/*
2 This file is part of KOrganizer.
3
4 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
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 KOPREFS_H
25#define KOPREFS_H
26
27#include <tqdict.h>
28
29#include <tdemacros.h>
30
31#include "koprefs_base.h"
32
33class TDEConfig;
34class TQFont;
35class TQColor;
36class TQStringList;
37
38TQColor getTextColor(const TQColor &c);
39
40
41class TDE_EXPORT KOPrefs : public KOPrefsBase
42{
43 public:
44 virtual ~KOPrefs();
45
48 static KOPrefs *instance();
49
51 void usrSetDefaults();
52
54 void usrReadConfig();
55
57 void usrWriteConfig();
58
59 protected:
60 void setCategoryDefaults();
61 void setTimeZoneIdDefault();
62
64 void fillMailDefaults();
65
66 private:
69 KOPrefs();
70
71 static KOPrefs *mInstance;
72
73 public:
74 // preferences data
75 void setFullName( const TQString & );
76 TQString fullName();
77 void setEmail( const TQString & );
78 TQString email();
80 TQStringList allEmails();
82 TQStringList fullEmails();
84 bool thatIsMe( const TQString& email );
85
86 void setCategoryColor( const TQString &cat, const TQColor &color );
87 TQColor *categoryColor( const TQString &cat );
88 bool hasCategoryColor( const TQString &cat ) const;
89
90 void setResourceColor ( const TQString &, const TQColor & );
91 TQColor* resourceColor( const TQString & );
92
93 TQString mHtmlExportFile;
94
95 // Groupware passwords
96 TQString mPublishPassword;
97 TQString mRetrievePassword;
98
99 private:
100 TQDict<TQColor> mCategoryColors;
101 TQColor mDefaultCategoryColor;
102
103 TQDict<TQColor> mResourceColors;
104 TQColor mDefaultResourceColor;
105
106 TQFont mDefaultTimeBarFont;
107 TQFont mDefaultMonthViewFont;
108
109 TQStringList mMyAddrBookMails;
110
111 public: // Do not use - except in KOPrefsDialogMain
112 TQString mName;
113 TQString mEmail;
114};
115
116#endif