korganizer Library API Documentation

koprefs.h

00001 /*
00002     This file is part of KOrganizer.
00003     Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program; if not, write to the Free Software
00017     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 
00019     As a special exception, permission is given to link this program
00020     with any edition of Qt, and distribute the resulting executable,
00021     without including the source code for Qt in the source distribution.
00022 */
00023 #ifndef KOPREFS_H
00024 #define KOPREFS_H
00025 
00026 #include <qdict.h>
00027 
00028 #include <libkdepim/kpimprefs.h>
00029 
00030 class KConfig;
00031 class QFont;
00032 class QColor;
00033 class QStringList;
00034 
00035 class KOPrefs : public KPimPrefs
00036 {
00037   public:
00038     enum { FormatVCalendar, FormatICalendar };
00039     enum { MailClientKMail, MailClientSendmail };
00040     enum { IMIPDummy, IMIPKMail };
00041     enum { IMIPOutbox, IMIPdirectsend };
00042     enum { neverAuto, addressbookAuto, selectedAuto };
00043   
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();
00079 
00080     QString mAdditional;
00081 
00082     bool    mEmailControlCenter;
00083 
00084     bool    mBcc;
00085     bool    mAutoSave;
00086     int     mAutoSaveInterval;
00087     bool    mConfirm;
00088   
00089     bool    mEnableGroupScheduling;
00090     bool    mEnableProjectView;
00091   
00092     int     mDefaultFormat;
00093     int     mMailClient;
00094 
00095     QString mTimeZone;
00096     QString mTimeZoneId;
00097     int     mStartTime;
00098     int     mDefaultDuration;
00099     int     mAlarmTime;
00100     int     mDaylightSavings;
00101 
00102     int     mWorkingHoursStart;
00103     int     mWorkingHoursEnd;
00104     bool    mExcludeHolidays;
00105     bool    mExcludeSaturdays;
00106     bool    mMarcusBainsShowSeconds;
00107 
00108     QFont   mTimeBarFont;
00109     QFont   mMonthViewFont;
00110     QFont   mAgendaViewFont;
00111     QFont   mMarcusBainsFont;
00112 
00113     QColor  mHolidayColor;
00114     QColor  mHighlightColor;
00115     QColor  mEventColor;
00116     QColor  mAgendaBgColor;
00117     QColor  mWorkingHoursColor;
00118     QColor  mTodoDueTodayColor;
00119     QColor  mTodoOverdueColor;
00120 
00121     int     mDayBegins;
00122     int     mHourSize;
00123     bool    mDailyRecur;
00124     bool    mWeeklyRecur;
00125     bool    mEnableToolTips;
00126     bool    mEnableMonthScroll;
00127     bool    mFullViewMonth;
00128     bool    mMonthViewUsesCategoryColor;    
00129     bool    mFullViewTodo;
00130     bool    mMarcusBainsEnabled;
00131     int     mNextXDays;
00132    
00133     bool    mCompactDialogs;
00134     bool    mVerticalScreen;
00135 
00136     void setCategoryColor(QString cat,const QColor & color);
00137     QColor *categoryColor(QString cat);
00138 
00139     QString mArchiveFile;
00140     QString mHtmlExportFile;
00141     bool    mHtmlWithSave;
00142 
00143     QStringList mSelectedPlugins;
00144 
00145     int mIMIPScheduler;
00146     int mIMIPSend;
00147     QStringList mAdditionalMails;
00148     int mIMIPAutoRefresh;
00149     int mIMIPAutoInsertReply;
00150     int mIMIPAutoInsertRequest;
00151     int mIMIPAutoFreeBusy;
00152     int mIMIPAutoFreeBusyReply;
00153 
00154     QStringList mTodoTemplates;
00155     QStringList mEventTemplates;
00156 
00157   private:
00158     QDict<QColor> mCategoryColors;
00159     QColor mDefaultCategoryColor;
00160 
00161     QFont mDefaultTimeBarFont;
00162     QFont mDefaultViewFont;
00163     QFont mDefaultMonthViewFont;
00164 
00165     QString mName;
00166     QString mEmail;
00167 };
00168 
00169 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:41:09 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001