korganizer Library API Documentation

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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, 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 "koprefs_base.h"
00030 #include "kabc/stdaddressbook.h"
00031 
00032 class KConfig;
00033 class QFont;
00034 class QColor;
00035 class QStringList;
00036 
00037 QColor getTextColor(const QColor &c);
00038 
00039 
00040 class KOPrefs : public KOPrefsBase
00041 {
00042   public:
00043     virtual ~KOPrefs();
00044 
00047     static KOPrefs *instance();
00048 
00050     void usrSetDefaults();
00051 
00053     void usrReadConfig();
00054 
00056     void usrWriteConfig();
00057 
00058   protected:
00059     void setCategoryDefaults();
00060     void setTimeZoneIdDefault();
00061 
00063     void fillMailDefaults();
00064 
00065   private:
00068     KOPrefs();
00069 
00070     static KOPrefs *mInstance;
00071 
00072   public:
00073     // preferences data
00074     void setFullName( const QString & );
00075     QString fullName();
00076     void setEmail( const QString & );
00077     QString email();
00079     QStringList allEmails();
00081     QStringList fullEmails();
00083     bool thatIsMe( const QString& email );
00084 
00085     void setCategoryColor( QString cat, const QColor &color );
00086     QColor *categoryColor( QString cat );
00087 
00088     void setResourceColor ( const QString &, const QColor & );
00089     QColor* resourceColor( const QString & );
00090 
00091     QString mHtmlExportFile;
00092 
00093     // Groupware passwords
00094     QString mPublishPassword;
00095     QString mRetrievePassword;
00096 
00097   private:
00098     QDict<QColor> mCategoryColors;
00099     QColor mDefaultCategoryColor;
00100 
00101     QDict<QColor> mResourceColors;
00102     QColor mDefaultResourceColor;
00103 
00104     QFont mDefaultMonthViewFont;
00105     KABC::Addressee mMe;
00106 
00107   public: // Do not use - except in KOPrefsDialogMain
00108     QString mName;
00109     QString mEmail;
00110 };
00111 
00112 #endif
KDE Logo
This file is part of the documentation for korganizer Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jul 25 11:21:00 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003