20 #ifndef KTIMECOMBOBOX_H
21 #define KTIMECOMBOBOX_H
25 #include <QtGui/QWidget>
30 class KTimeComboBoxPrivate;
36 Q_PROPERTY(QTime time READ time WRITE setTime NOTIFY timeChanged USER
true)
37 Q_PROPERTY(QTime minimumTime READ minimumTime WRITE setMinimumTime RESET resetMinimumTime)
38 Q_PROPERTY(QTime maximumTime READ maximumTime WRITE setMaximumTime RESET resetMaximumTime)
39 Q_PROPERTY(
int timeListInterval READ timeListInterval WRITE setTimeListInterval)
40 Q_PROPERTY(Options options READ options WRITE setOptions)
54 WarnOnInvalid = 0x0008
56 Q_DECLARE_FLAGS(Options,
Option)
98 Options options() const;
107 KLocale::TimeFormatOptions displayFormat() const;
114 QTime minimumTime() const;
119 void resetMinimumTime();
126 QTime maximumTime() const;
131 void resetMaximumTime();
143 void setTimeRange(const QTime &minTime,
144 const QTime &maxTime,
146 const QString &maxWarnMsg = QString());
151 void resetTimeRange();
161 int timeListInterval() const;
171 QList<QTime> timeList() const;
182 void timeEntered(const QTime &time);
192 void timeChanged(const QTime &time);
201 void timeEdited(const QTime &time);
213 void setTime(const QTime &time);
220 void setOptions(Options options);
229 void setDisplayFormat(
KLocale::TimeFormatOptions formatOptions);
244 void setMinimumTime(const QTime &minTime, const QString &minWarnMsg = QString());
259 void setMaximumTime(const QTime &maxTime, const QString &maxWarnMsg = QString());
280 void setTimeListInterval(
int minutes);
299 void setTimeList(
QList<QTime> timeList,
300 const QString &minWarnMsg = QString(),
301 const QString &maxWarnMsg = QString());
305 virtual
bool eventFilter(
QObject *
object, QEvent *event);
306 virtual
void showPopup();
307 virtual
void hidePopup();
308 virtual
void mousePressEvent(QMouseEvent *event);
309 virtual
void wheelEvent(QWheelEvent *event);
310 virtual
void keyPressEvent(QKeyEvent *event);
311 virtual
void focusInEvent(QFocusEvent *event);
312 virtual
void focusOutEvent(QFocusEvent *event);
313 virtual
void resizeEvent(QResizeEvent *event);
322 virtual
void assignTime(const QTime &time);
326 friend class KTimeComboBoxPrivate;
327 KTimeComboBoxPrivate *const d;
329 Q_PRIVATE_SLOT(d,
void selectTime(
int index))
330 Q_PRIVATE_SLOT(d,
void editTime(const QString&))
331 Q_PRIVATE_SLOT(d,
void enterTime(const QTime&))
332 Q_PRIVATE_SLOT(d,
void parseTime())
336 Q_DECLARE_OPERATORS_FOR_FLAGS(KTimeComboBox::Options)
338 #endif // KTIMECOMBOBOX_H
Option
Options provided by the widget.