kalarm Library API Documentation

prefsettings.h

00001 /*
00002  *  prefsettings.h  -  program preference settings
00003  *  Program:  kalarm
00004  *
00005  *  (C) 2001, 2002 by David Jarvie  software@astrojar.org.uk
00006  *
00007  *  This program is free software; you can redistribute it and/or modify
00008  *  it under the terms of the GNU General Public License as published by
00009  *  the Free Software Foundation; either version 2 of the License, or
00010  *  (at your option) any later version.
00011  *
00012  *  This program is distributed in the hope that it will be useful,
00013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00015  *  GNU General Public License for more details.
00016  *
00017  *  You should have received a copy of the GNU General Public License
00018  *  along with this program; if not, write to the Free Software
00019  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00020  */
00021 
00022 #ifndef PREFSETTINGS_H
00023 #define PREFSETTINGS_H
00024 
00025 #include <qobject.h>
00026 #include <qcolor.h>
00027 #include <qfont.h>
00028 #include <qdatetime.h>
00029 class QWidget;
00030 
00031 #include "recurrenceedit.h"
00032 
00033 
00034 // Settings configured in the Preferences dialog
00035 class Settings : public QObject
00036 {
00037                 Q_OBJECT
00038         public:
00039                 Settings(QWidget* parent);
00040 
00041                 QColor         defaultBgColour() const          { return mDefaultBgColour; }
00042                 const QFont&   messageFont() const              { return mMessageFont; }
00043                 bool           runInSystemTray() const          { return mRunInSystemTray; }
00044                 bool           disableAlarmsIfStopped() const   { return mDisableAlarmsIfStopped; }
00045                 bool           autostartTrayIcon() const        { return mAutostartTrayIcon; }
00046                 bool           confirmAlarmDeletion() const     { return mConfirmAlarmDeletion; }
00047                 int            daemonTrayCheckInterval() const  { return mDaemonTrayCheckInterval; }
00048                 const QTime&   startOfDay() const               { return mStartOfDay; }
00049                 bool           startOfDayChanged() const        { return mStartOfDayChanged; }
00050                 bool           defaultLateCancel() const        { return mDefaultLateCancel; }
00051                 bool           defaultConfirmAck() const        { return mDefaultConfirmAck; }
00052                 bool           defaultBeep() const              { return mDefaultBeep; }
00053       bool           defaultEmailBcc() const          { return mDefaultEmailBcc; }
00054                 RecurrenceEdit::RepeatType
00055                                defaultRecurPeriod() const       { return mDefaultRecurPeriod; }
00056 
00057                 void           loadSettings();
00058                 void           saveSettings(bool syncToDisc = true);
00059                 void           updateStartOfDayCheck();
00060                 void           emitSettingsChanged();
00061 
00062                 static const QColor default_defaultBgColour;
00063                 static const QFont  default_messageFont;
00064                 static const QTime  default_startOfDay;
00065                 static const bool   default_runInSystemTray;
00066                 static const bool   default_disableAlarmsIfStopped;
00067                 static const bool   default_autostartTrayIcon;
00068                 static const bool   default_confirmAlarmDeletion;
00069                 static const int    default_daemonTrayCheckInterval;
00070                 static const bool   default_defaultLateCancel;
00071                 static const bool   default_defaultConfirmAck;
00072                 static const bool   default_defaultBeep;
00073                 static const bool   default_defaultEmailBcc;
00074                 static const RecurrenceEdit::RepeatType
00075                                     default_defaultRecurPeriod;
00076                 bool                mRunInSystemTray;
00077                 bool                mDisableAlarmsIfStopped;
00078                 bool                mAutostartTrayIcon;
00079                 bool                mConfirmAlarmDeletion;
00080                 int                 mDaemonTrayCheckInterval;
00081                 QTime               mStartOfDay;
00082                 QColor              mDefaultBgColour;
00083                 QFont               mMessageFont;
00084                 // Default settings for Edit Alarm dialog
00085                 bool                mDefaultLateCancel;
00086                 bool                mDefaultConfirmAck;
00087                 bool                mDefaultBeep;
00088       bool                mDefaultEmailBcc;
00089                 RecurrenceEdit::RepeatType  mDefaultRecurPeriod;
00090                 bool                mStartOfDayChanged;   // start-of-day check value doesn't tally with mStartOfDay
00091 
00092         signals:
00093                 void settingsChanged();
00094         private:
00095                 int          startOfDayCheck() const;
00096 };
00097 
00098 #endif // PREFSETTINGS_H
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Oct 18 02:47:27 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001