2 * birthdaydlg.h - dialog to pick birthdays from address book
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.
23 #include <kalarmcal/kaevent.h>
32 class FontColourButton
;
34 class SpecialActionsButton
;
35 class RepetitionButton
;
36 class LateCancelSelector
;
39 class BirthdaySortModel
;
40 class QDialogButtonBox
;
42 using namespace KAlarmCal
;
44 class BirthdayDlg
: public QDialog
48 explicit BirthdayDlg(QWidget
* parent
= Q_NULLPTR
);
49 QVector
<KAEvent
> events() const;
52 virtual void slotOk();
55 void slotSelectionChanged();
56 void slotTextLostFocus();
57 void resizeViewColumns();
58 void setColours(const QColor
& fg
, const QColor
& bg
);
61 BirthdaySortModel
* mBirthdaySortModel
;
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
83 explicit BLineEdit(QWidget
* parent
= Q_NULLPTR
) : QLineEdit(parent
) {}
84 explicit BLineEdit(const QString
& text
, QWidget
* parent
= Q_NULLPTR
) : QLineEdit(text
, parent
) {}
90 void focusOutEvent(QFocusEvent
*) Q_DECL_OVERRIDE
{ Q_EMIT
focusLost(); }
93 #endif // BIRTHDAYDLG_H