korganizer

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 Qt, and distribute the resulting executable,
00022     without including the source code for Qt in the source distribution.
00023 */
00024 #ifndef KOPREFS_H
00025 #define KOPREFS_H
00026 
00027 #include <qdict.h>
00028 
00029 #include <kdepimmacros.h>
00030 
00031 #include "koprefs_base.h"
00032 
00033 class KConfig;
00034 class QFont;
00035 class QColor;
00036 class QStringList;
00037 
00038 QColor getTextColor(const QColor &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 QString & );
00076     QString fullName();
00077     void setEmail( const QString & );
00078     QString email();
00080     QStringList allEmails();
00082     QStringList fullEmails();
00084     bool thatIsMe( const QString& email );
00085 
00086     void setCategoryColor( const QString &cat, const QColor &color );
00087     QColor *categoryColor( const QString &cat );
00088 
00089     void setResourceColor ( const QString &, const QColor & );
00090     QColor* resourceColor( const QString & );
00091 
00092     QString mHtmlExportFile;
00093 
00094     // Groupware passwords
00095     QString mPublishPassword;
00096     QString mRetrievePassword;
00097 
00098   private:
00099     QDict<QColor> mCategoryColors;
00100     QColor mDefaultCategoryColor;
00101 
00102     QDict<QColor> mResourceColors;
00103     QColor mDefaultResourceColor;
00104 
00105     QFont mDefaultTimeBarFont;
00106     QFont mDefaultMonthViewFont;
00107 
00108   public: // Do not use - except in KOPrefsDialogMain
00109     QString mName;
00110     QString mEmail;
00111 };
00112 
00113 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys