kalarm
birthdaydlg.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef BIRTHDAYDLG_H
00021 #define BIRTHDAYDLG_H
00022
00023 #include <qlineedit.h>
00024 #include <klistview.h>
00025 #include <kdialogbase.h>
00026
00027 #include "alarmevent.h"
00028
00029 class QCheckBox;
00030 class KListView;
00031 class CheckBox;
00032 class FontColourButton;
00033 class SoundPicker;
00034 class SpecialActionsButton;
00035 class RepetitionButton;
00036 class LateCancelSelector;
00037 class Reminder;
00038 namespace KABC { class AddressBook; }
00039 class BLineEdit;
00040 class BListView;
00041
00042
00043 class BirthdayDlg : public KDialogBase
00044 {
00045 Q_OBJECT
00046 public:
00047 BirthdayDlg(QWidget* parent = 0);
00048 QValueList<KAEvent> events() const;
00049 static void close();
00050
00051 protected slots:
00052 virtual void slotOk();
00053
00054 private slots:
00055 void slotSelectionChanged();
00056 void slotTextLostFocus();
00057 void updateSelectionList();
00058
00059 private:
00060 void loadAddressBook();
00061
00062 static const KABC::AddressBook* mAddressBook;
00063 BListView* mAddresseeList;
00064 BLineEdit* mPrefix;
00065 BLineEdit* mSuffix;
00066 Reminder* mReminder;
00067 SoundPicker* mSoundPicker;
00068 FontColourButton* mFontColourButton;
00069 CheckBox* mConfirmAck;
00070 LateCancelSelector* mLateCancel;
00071 SpecialActionsButton* mSpecialActionsButton;
00072 RepetitionButton* mSubRepetition;
00073 QString mPrefixText;
00074 QString mSuffixText;
00075 int mFlags;
00076 };
00077
00078
00079 class BLineEdit : public QLineEdit
00080 {
00081 Q_OBJECT
00082 public:
00083 BLineEdit(QWidget* parent = 0, const char* name = 0)
00084 : QLineEdit(parent, name) {}
00085 BLineEdit(const QString& text, QWidget* parent = 0, const char* name = 0)
00086 : QLineEdit(text, parent, name) {}
00087 signals:
00088 void focusLost();
00089 protected:
00090 virtual void focusOutEvent(QFocusEvent*) { emit focusLost(); }
00091 };
00092
00093 class BListView : public KListView
00094 {
00095 Q_OBJECT
00096 public:
00097 BListView(QWidget* parent = 0, const char* name = 0);
00098 public slots:
00099 virtual void slotSelectAll() { selectAll(true); }
00100 virtual void slotDeselect() { selectAll(false); }
00101 };
00102
00103 #endif // BIRTHDAYDLG_H
|