karm Library API Documentation

preferences.h

00001 #ifndef KARM_PREFERENCES_H
00002 #define KARM_PREFERENCES_H
00003 
00004 #include <kdialogbase.h>
00005 
00006 class QCheckBox;
00007 class QLabel;
00008 class QSpinBox;
00009 class KURLRequester;
00010 
00015 class Preferences :public KDialogBase
00016 {
00017   Q_OBJECT
00018 
00019   public:
00020     static Preferences *instance();
00021     void disableIdleDetection();
00022 
00023     // Retrive information about settings
00024     bool detectIdleness() const;
00025     int idlenessTimeout() const;
00026     QString iCalFile() const;
00027     QString activeCalendarFile() const;
00028     bool autoSave() const;
00029     int autoSavePeriod() const;
00030     bool promptDelete() const;
00031     bool displayColumn(int n) const;
00032     QString userRealName() const;
00033 
00034     void emitSignals();
00035 
00036   public slots:
00037     void showDialog();
00038     void load();
00039     void save();
00040 
00041   signals:
00042     void detectIdleness(bool on);
00043     void idlenessTimeout(int minutes);
00044     void iCalFile(QString);
00045     void autoSave(bool on);
00046     void autoSavePeriod(int minutes);
00047     void setupChanged();
00048 
00049   protected slots:
00050     virtual void slotOk();
00051     virtual void slotCancel();
00052     void idleDetectCheckBoxChanged();
00053     void autoSaveCheckBoxChanged();
00054 
00055   private:
00056     void makeDisplayPage();
00057     void makeBehaviorPage();
00058     void makeStoragePage();
00059 
00060     Preferences();
00061     static Preferences *_instance;
00062     bool _unsavedChanges;
00063 
00064     // Widgets
00065     QCheckBox *_doIdleDetectionW, *_doAutoSaveW, *_promptDeleteW;
00066     QCheckBox *_displayTimeW, *_displaySessionW,
00067               *_displayTotalTimeW, *_displayTotalSessionW;
00068     QLabel    *_idleDetectLabelW, *_displayColumnsLabelW;
00069     QSpinBox  *_idleDetectValueW, *_autoSaveValueW;
00070     KURLRequester *_iCalFileW ;
00071 
00072     // Values
00073     bool _doIdleDetectionV, _doAutoSaveV, _promptDeleteV;
00074     bool _displayColumnV[4];
00075     int  _idleDetectValueV, _autoSaveValueV;
00076     QString _iCalFileV;
00077 
00079     QString _userRealName;
00080 };
00081 
00082 #endif // KARM_PREFERENCES_H
00083 
KDE Logo
This file is part of the documentation for karm Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:37:53 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003