summaryrefslogtreecommitdiffabout
path: root/korganizer/koprefs.h
authorzautrix <zautrix>2005-06-12 18:19:37 (UTC)
committer zautrix <zautrix>2005-06-12 18:19:37 (UTC)
commit8cfca2b9b7ece646229a72843cf8d6d63e7b8af9 (patch) (side-by-side diff)
tree7c21b30011a56411a54f981f990bb2fcf344041a /korganizer/koprefs.h
parentb56d3be87557510285d3381250faf9b7af300680 (diff)
downloadkdepimpi-8cfca2b9b7ece646229a72843cf8d6d63e7b8af9.zip
kdepimpi-8cfca2b9b7ece646229a72843cf8d6d63e7b8af9.tar.gz
kdepimpi-8cfca2b9b7ece646229a72843cf8d6d63e7b8af9.tar.bz2
cal setting saving-loading
Diffstat (limited to 'korganizer/koprefs.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koprefs.h32
1 files changed, 31 insertions, 1 deletions
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index 864cf1b..7d71cbd 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -17,39 +17,64 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef KOPREFS_H
#define KOPREFS_H
#include <libkdepim/kpimprefs.h>
#include <qdict.h>
+#include <qdir.h>
+#include <qobject.h>
class KConfig;
class QFont;
class QColor;
class QStringList;
#define VIEW_WN_VIEW 1
#define VIEW_NX_VIEW 2
#define VIEW_J_VIEW 3
#define VIEW_A_VIEW 4
#define VIEW_ML_VIEW 5
#define VIEW_M_VIEW 6
#define VIEW_L_VIEW 7
#define VIEW_T_VIEW 8
+class KopiCalendarFile : public QObject
+{
+ public:
+ KopiCalendarFile( ) : QObject( )
+ {
+ isStandard = false;
+ isEnabled = true;
+ isAlarmEnabled = true;
+ isReadOnly = false;
+ mName = "Calendar";
+ mFileName = QDir::homeDirPath() + "/icalfile.ics";
+ mCalNumber = 0;
+ mDefaultColor = Qt::red;
+ }
+ bool isStandard;
+ bool isEnabled;
+ bool isAlarmEnabled;
+ bool isReadOnly;
+ QString mName;
+ QString mFileName;
+ int mCalNumber;
+ QColor mDefaultColor;
+};
class KOPrefs : public KPimPrefs
{
public:
enum { FormatVCalendar, FormatICalendar };
enum { MailClientKMail, MailClientSendmail };
enum { IMIPDummy, IMIPKMail };
enum { IMIPOutbox, IMIPdirectsend };
enum { neverAuto, addressbookAuto, selectedAuto };
enum { standardDestination, askDestination };
virtual ~KOPrefs();
@@ -58,25 +83,27 @@ class KOPrefs : public KPimPrefs
static KOPrefs *instance();
/** Set preferences to default values */
void usrSetDefaults();
/** Read preferences from config file */
void usrReadConfig();
/** Write preferences to config file */
void usrWriteConfig();
void setCategoryDefaults();
void setAllDefaults();
-
+ KopiCalendarFile * getNewCalendar();
+ void deleteCalendar( int );
+ QColor defaultColor( int ) const;
protected:
void setTimeZoneIdDefault();
/** Fill empty mail fields with default values. */
void fillMailDefaults();
private:
/** Constructor disabled for public. Use instance() to create a KOPrefs
object. */
KOPrefs();
static KOPrefs *mInstance;
@@ -296,26 +323,29 @@ class KOPrefs : public KPimPrefs
QString mActiveSyncPort;
QString mActiveSyncIP;
// settings for eventviewer
bool mEVshowDetails;
bool mEVshowCreated;
bool mEVshowChanged;
bool mWTshowDetails;
bool mWTshowCreated;
bool mWTshowChanged;
int mCurrentDisplayedView;
+ QPtrList<KopiCalendarFile> mCalendars;
+ int mNextAvailableCalendar;
private:
QDict<QColor> mCategoryColors;
+ QArray<KopiCalendarFile*> mDefCalColors;
QColor mDefaultCategoryColor;
QFont mDefaultTimeBarFont;
QFont mDefaultViewFont;
QFont mDefaultMonthViewFont;
QString mName;
QString mEmail;
};
#endif