editdlg.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef EDITDLG_H
00026 #define EDITDLG_H
00027
00028 #include <qcheckbox.h>
00029 #include <qdatetime.h>
00030 #include <qradiobutton.h>
00031
00032 #include <kdialogbase.h>
00033
00034 #include "msgevent.h"
00035 using namespace KCal;
00036
00037 class QButtonGroup;
00038 class QGroupBox;
00039 class QMultiLineEdit;
00040 class QSpinBox;
00041 class QHBox;
00042 class ButtonGroup;
00043 class FontColourChooser;
00044 class ColourCombo;
00045 class TimeSpinBox;
00046 class AlarmTimeWidget;
00047 class RecurrenceEdit;
00048
00052 class EditAlarmDlg : public KDialogBase
00053 {
00054 Q_OBJECT
00055 public:
00056 enum MessageType { MESSAGE, FILE };
00057
00058 EditAlarmDlg(const QString& caption, QWidget* parent = 0L, const char* name = 0L,
00059 const KAlarmEvent* = 0L);
00060 virtual ~EditAlarmDlg();
00061 void getEvent(KAlarmEvent&);
00062 QDateTime getDateTime(bool* anyTime = 0L);
00063
00064 protected:
00065 virtual void resizeEvent(QResizeEvent*);
00066 protected slots:
00067 virtual void slotOk();
00068 virtual void slotCancel();
00069 virtual void slotTry();
00070 void slotRecurTypeChange(int repeatType);
00071 void slotAlarmTypeClicked(int id);
00072 void slotRepeatClicked(int id);
00073 void slotEditDeferral();
00074 void slotBrowseFile();
00075 void slotSoundToggled(bool on);
00076 void slotPickSound();
00077 void slotShowMainPage();
00078 void slotShowRecurrenceEdit();
00079
00080 private:
00081 KAlarmAlarm::Type getAlarmType() const;
00082 int getAlarmFlags() const;
00083 bool checkText(QString& result);
00084 void setSoundPicker();
00085
00086 void initDisplayAlarms(QWidget* parent);
00087 void initCommand(QWidget* parent);
00088
00089 int mainPageIndex;
00090 int recurPageIndex;
00091 QWidgetStack* recurTabStack;
00092 QLabel* recurDisabled;
00093 bool recurSetEndDate;
00094
00095 QRadioButton* messageRadio;
00096 QRadioButton* commandRadio;
00097 QRadioButton* fileRadio;
00098 QWidgetStack* alarmTypeStack;
00099
00100
00101 QFrame* displayAlarmsFrame;
00102 QHBox* fileBox;
00103 QHBox* filePadding;
00104 QCheckBox* sound;
00105 QPushButton* soundPicker;
00106 QString soundDefaultDir;
00107 QCheckBox* confirmAck;
00108 #ifdef SELECT_FONT
00109 FontColourChooser* fontColour;
00110 #else
00111 ColourCombo* bgColourChoose;
00112 #endif
00113
00114 QMultiLineEdit* textMessageEdit;
00115
00116 QLineEdit* fileMessageEdit;
00117 QPushButton* fileBrowseButton;
00118 QString fileDefaultDir;
00119
00120 QFrame* commandFrame;
00121 QLineEdit* commandMessageEdit;
00122
00123 QGroupBox* deferGroup;
00124 QLabel* deferTimeLabel;
00125 AlarmTimeWidget* timeWidget;
00126 QCheckBox* lateCancel;
00127
00128 QRadioButton* noRepeatRadio;
00129 QRadioButton* repeatAtLoginRadio;
00130 QRadioButton* recurRadio;
00131 RecurrenceEdit* recurrenceEdit;
00132
00133 QString alarmMessage;
00134 QDateTime alarmDateTime;
00135 QDateTime deferDateTime;
00136 QString soundFile;
00137 QSize basicSize;
00138 int deferGroupHeight;
00139 bool alarmAnyTime;
00140 bool timeDialog;
00141 };
00142
00143
00144 class PageFrame : public QFrame
00145 {
00146 Q_OBJECT
00147 public:
00148 PageFrame(QWidget* parent = 0L, const char* name = 0L) : QFrame(parent, name) { }
00149 protected:
00150 virtual void showEvent(QShowEvent*) { emit shown(); }
00151 signals:
00152 void shown();
00153 };
00154
00155 #endif // EDITDLG_H
This file is part of the documentation for kdelibs Version 3.1.4.