summaryrefslogtreecommitdiffabout
path: root/libkdepim/kdateedit.h
Unidiff
Diffstat (limited to 'libkdepim/kdateedit.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kdateedit.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libkdepim/kdateedit.h b/libkdepim/kdateedit.h
index 742d843..cf3b90a 100644
--- a/libkdepim/kdateedit.h
+++ b/libkdepim/kdateedit.h
@@ -49,65 +49,66 @@ class KDateValidator;
49* @author Cornelius Schumacher <schumacher@kde.org> 49* @author Cornelius Schumacher <schumacher@kde.org>
50* @author Mike Pilone <mpilone@slac.com> 50* @author Mike Pilone <mpilone@slac.com>
51*/ 51*/
52class KDateEdit : public QHBox 52class KDateEdit : public QHBox
53{ 53{
54 Q_OBJECT 54 Q_OBJECT
55 public: 55 public:
56 KDateEdit(QWidget *parent=0, const char *name=0, bool withoutDP = false ); 56 KDateEdit(QWidget *parent=0, const char *name=0, bool withoutDP = false );
57 virtual ~KDateEdit(); 57 virtual ~KDateEdit();
58 58
59 /** @return True if the date in the text edit is valid, 59 /** @return True if the date in the text edit is valid,
60 * false otherwise. This will not modify the display of the date, 60 * false otherwise. This will not modify the display of the date,
61 * but only check for validity. 61 * but only check for validity.
62 */ 62 */
63 bool inputIsValid(); 63 bool inputIsValid();
64 64
65 /** @return The date entered. This will not 65 /** @return The date entered. This will not
66 * modify the display of the date, but only return it. 66 * modify the display of the date, but only return it.
67 */ 67 */
68 QDate date() const; 68 QDate date() const;
69 69
70 /** @param handleInvalid If true the date edit accepts invalid dates 70 /** @param handleInvalid If true the date edit accepts invalid dates
71 * and displays them as the empty ("") string. It also returns an invalid date. 71 * and displays them as the empty ("") string. It also returns an invalid date.
72 * If false (default) invalid dates are not accepted and instead the date 72 * If false (default) invalid dates are not accepted and instead the date
73 * of today will be returned. 73 * of today will be returned.
74 */ 74 */
75 void setHandleInvalid(bool handleInvalid); 75 void setHandleInvalid(bool handleInvalid);
76 76
77 /** Checks for a focus out event. The display of the date is updated 77 /** Checks for a focus out event. The display of the date is updated
78 * to display the proper date when the focus leaves. 78 * to display the proper date when the focus leaves.
79 */ 79 */
80 virtual bool eventFilter(QObject *o, QEvent *e); 80 virtual bool eventFilter(QObject *o, QEvent *e);
81 81 void toggleDateFormat();
82 void clear();
82 signals: 83 signals:
83 /** This signal is emitted whenever the user modifies the date. This 84 /** This signal is emitted whenever the user modifies the date. This
84 * may not get emitted until the user presses enter in the line edit or 85 * may not get emitted until the user presses enter in the line edit or
85 * focus leaves the widget (ie: the user confirms their selection). 86 * focus leaves the widget (ie: the user confirms their selection).
86 */ 87 */
87 void dateChanged(QDate); 88 void dateChanged(QDate);
88 void returnPressed(); 89 void returnPressed();
89 public slots: 90 public slots:
90 /** Sets the date. 91 /** Sets the date.
91 * 92 *
92 * @param date The new date to display. This date must be valid or 93 * @param date The new date to display. This date must be valid or
93 * it will not be displayed. 94 * it will not be displayed.
94 */ 95 */
95 void setDate(QDate date); 96 void setDate(QDate date);
96 // set Date with key_up key_down to relation of cursor Position 97 // set Date with key_up key_down to relation of cursor Position
97 // and set selection from begin to end of single date 98 // and set selection from begin to end of single date
98 void setDate(QDate, int *cpos, const int, const bool); 99 void setDate(QDate, int *cpos, const int, const bool);
99 100
100 /** Sets the date edit to be enabled or disabled (grayed out) 101 /** Sets the date edit to be enabled or disabled (grayed out)
101 * 102 *
102 * @param on Enabled if true, disabled if false 103 * @param on Enabled if true, disabled if false
103 */ 104 */
104 void setEnabled(bool on); 105 void setEnabled(bool on);
105 106
106 protected slots: 107 protected slots:
107 void toggleDatePicker(); 108 void toggleDatePicker();
108 void lineEnterPressed(); 109 void lineEnterPressed();
109 void textChanged(const QString &); 110 void textChanged(const QString &);
110 111
111 private: 112 private:
112 /** Reads the text from the line edit. If the text is a keyword, the 113 /** Reads the text from the line edit. If the text is a keyword, the
113 * word will be translated to a date. If the text is not a keyword, the 114 * word will be translated to a date. If the text is not a keyword, the