koprefs.h
00001 /* 00002 This file is part of KOrganizer. 00003 00004 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 00020 As a special exception, permission is given to link this program 00021 with any edition of TQt, and distribute the resulting executable, 00022 without including the source code for TQt in the source distribution. 00023 */ 00024 #ifndef KOPREFS_H 00025 #define KOPREFS_H 00026 00027 #include <tqdict.h> 00028 00029 #include <tdepimmacros.h> 00030 00031 #include "koprefs_base.h" 00032 00033 class TDEConfig; 00034 class TQFont; 00035 class TQColor; 00036 class TQStringList; 00037 00038 TQColor getTextColor(const TQColor &c); 00039 00040 00041 class KDE_EXPORT KOPrefs : public KOPrefsBase 00042 { 00043 public: 00044 virtual ~KOPrefs(); 00045 00048 static KOPrefs *instance(); 00049 00051 void usrSetDefaults(); 00052 00054 void usrReadConfig(); 00055 00057 void usrWriteConfig(); 00058 00059 protected: 00060 void setCategoryDefaults(); 00061 void setTimeZoneIdDefault(); 00062 00064 void fillMailDefaults(); 00065 00066 private: 00069 KOPrefs(); 00070 00071 static KOPrefs *mInstance; 00072 00073 public: 00074 // preferences data 00075 void setFullName( const TQString & ); 00076 TQString fullName(); 00077 void setEmail( const TQString & ); 00078 TQString email(); 00080 TQStringList allEmails(); 00082 TQStringList fullEmails(); 00084 bool thatIsMe( const TQString& email ); 00085 00086 void setCategoryColor( const TQString &cat, const TQColor &color ); 00087 TQColor *categoryColor( const TQString &cat ); 00088 bool hasCategoryColor( const TQString &cat ) const; 00089 00090 void setResourceColor ( const TQString &, const TQColor & ); 00091 TQColor* resourceColor( const TQString & ); 00092 00093 TQString mHtmlExportFile; 00094 00095 // Groupware passwords 00096 TQString mPublishPassword; 00097 TQString mRetrievePassword; 00098 00099 private: 00100 TQDict<TQColor> mCategoryColors; 00101 TQColor mDefaultCategoryColor; 00102 00103 TQDict<TQColor> mResourceColors; 00104 TQColor mDefaultResourceColor; 00105 00106 TQFont mDefaultTimeBarFont; 00107 TQFont mDefaultMonthViewFont; 00108 00109 TQStringList mMyAddrBookMails; 00110 00111 public: // Do not use - except in KOPrefsDialogMain 00112 TQString mName; 00113 TQString mEmail; 00114 }; 00115 00116 #endif