Use qtpaths directly
[kdepim.git] / kalarm / birthdaydlg.h
blob07c3ad19c65523d665eea5fe050d15904de37a38
1 /*
2 * birthdaydlg.h - dialog to pick birthdays from address book
3 * Program: kalarm
4 * Copyright © 2002-2005,2007-2011 by David Jarvie <djarvie@kde.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef BIRTHDAYDLG_H
21 #define BIRTHDAYDLG_H
23 #include <kalarmcal/kaevent.h>
25 #include <QDialog>
26 #include <QVector>
27 #include <QLineEdit>
29 class QFocusEvent;
30 class QTreeView;
31 class CheckBox;
32 class FontColourButton;
33 class SoundPicker;
34 class SpecialActionsButton;
35 class RepetitionButton;
36 class LateCancelSelector;
37 class Reminder;
38 class BLineEdit;
39 class BirthdaySortModel;
40 class QDialogButtonBox;
42 using namespace KAlarmCal;
44 class BirthdayDlg : public QDialog
46 Q_OBJECT
47 public:
48 explicit BirthdayDlg(QWidget* parent = Q_NULLPTR);
49 QVector<KAEvent> events() const;
51 protected Q_SLOTS:
52 virtual void slotOk();
54 private Q_SLOTS:
55 void slotSelectionChanged();
56 void slotTextLostFocus();
57 void resizeViewColumns();
58 void setColours(const QColor& fg, const QColor& bg);
60 private:
61 BirthdaySortModel* mBirthdaySortModel;
62 QTreeView* mListView;
63 BLineEdit* mPrefix;
64 BLineEdit* mSuffix;
65 Reminder* mReminder;
66 SoundPicker* mSoundPicker;
67 FontColourButton* mFontColourButton;
68 CheckBox* mConfirmAck;
69 LateCancelSelector* mLateCancel;
70 SpecialActionsButton* mSpecialActionsButton;
71 RepetitionButton* mSubRepetition;
72 QDialogButtonBox * mButtonBox;
73 QString mPrefixText; // last entered value of prefix text
74 QString mSuffixText; // last entered value of suffix text
75 KAEvent::Flags mFlags; // event flag bits
79 class BLineEdit : public QLineEdit
81 Q_OBJECT
82 public:
83 explicit BLineEdit(QWidget* parent = Q_NULLPTR) : QLineEdit(parent) {}
84 explicit BLineEdit(const QString& text, QWidget* parent = Q_NULLPTR) : QLineEdit(text, parent) {}
86 Q_SIGNALS:
87 void focusLost();
89 protected:
90 void focusOutEvent(QFocusEvent*) Q_DECL_OVERRIDE { Q_EMIT focusLost(); }
93 #endif // BIRTHDAYDLG_H
95 // vim: et sw=4: