summaryrefslogtreecommitdiffabout
path: root/libkdepim/kdatepicker.h
authorzautrix <zautrix>2005-02-16 22:38:07 (UTC)
committer zautrix <zautrix>2005-02-16 22:38:07 (UTC)
commit0eca506b6b4c7d7ef52bcecc5ad64193698dc3f3 (patch) (unidiff)
tree5bc6d924f1a71cc04cb8f1ee0001fce7cde0fa71 /libkdepim/kdatepicker.h
parentf33a37a0f7c9b37cfea1346ed373ce1c27c1d6ba (diff)
downloadkdepimpi-0eca506b6b4c7d7ef52bcecc5ad64193698dc3f3.zip
kdepimpi-0eca506b6b4c7d7ef52bcecc5ad64193698dc3f3.tar.gz
kdepimpi-0eca506b6b4c7d7ef52bcecc5ad64193698dc3f3.tar.bz2
added today but to datepicker
Diffstat (limited to 'libkdepim/kdatepicker.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kdatepicker.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libkdepim/kdatepicker.h b/libkdepim/kdatepicker.h
index 6625357..3db9a89 100644
--- a/libkdepim/kdatepicker.h
+++ b/libkdepim/kdatepicker.h
@@ -62,120 +62,122 @@ public:
62 * The destructor. 62 * The destructor.
63 **/ 63 **/
64 virtual ~KDatePicker(); 64 virtual ~KDatePicker();
65 65
66 /** The size hint for date pickers. The size hint recommends the 66 /** The size hint for date pickers. The size hint recommends the
67 * minimum size of the widget so that all elements may be placed 67 * minimum size of the widget so that all elements may be placed
68 * without clipping. This sometimes looks ugly, so when using the 68 * without clipping. This sometimes looks ugly, so when using the
69 * size hint, try adding 28 to each of the reported numbers of 69 * size hint, try adding 28 to each of the reported numbers of
70 * pixels. 70 * pixels.
71 **/ 71 **/
72 QSize sizeHint() const; 72 QSize sizeHint() const;
73 73
74 /** 74 /**
75 * Sets the date. 75 * Sets the date.
76 * 76 *
77 * @returns @p false and does not change anything 77 * @returns @p false and does not change anything
78 * if the date given is invalid. 78 * if the date given is invalid.
79 **/ 79 **/
80 bool setDate(const QDate&); 80 bool setDate(const QDate&);
81 81
82 /** 82 /**
83 * Returns the selected date. 83 * Returns the selected date.
84 * @deprecated 84 * @deprecated
85 **/ 85 **/
86 const QDate& getDate() const; 86 const QDate& getDate() const;
87 87
88 /** 88 /**
89 * @returns the selected date. 89 * @returns the selected date.
90 */ 90 */
91 const QDate &date() const; 91 const QDate &date() const;
92 92
93 /** 93 /**
94 * Enables or disables the widget. 94 * Enables or disables the widget.
95 **/ 95 **/
96 void setEnabled(bool); 96 void setEnabled(bool);
97 97
98 /** 98 /**
99 * Sets the font size of the widgets elements. 99 * Sets the font size of the widgets elements.
100 **/ 100 **/
101 void setFontSize(int); 101 void setFontSize(int);
102 /** 102 /**
103 * Returns the font size of the widget elements. 103 * Returns the font size of the widget elements.
104 */ 104 */
105 int fontSize() const 105 int fontSize() const
106 { return fontsize; } 106 { return fontsize; }
107protected: 107protected:
108 /// the resize event 108 /// the resize event
109 void resizeEvent(QResizeEvent*); 109 void resizeEvent(QResizeEvent*);
110 QToolButton *todayBut;
110 /// the year forward button 111 /// the year forward button
111 QToolButton *yearForward; 112 QToolButton *yearForward;
112 /// the year backward button 113 /// the year backward button
113 QToolButton *yearBackward; 114 QToolButton *yearBackward;
114 /// the month forward button 115 /// the month forward button
115 QToolButton *monthForward; 116 QToolButton *monthForward;
116 /// the month backward button 117 /// the month backward button
117 QToolButton *monthBackward; 118 QToolButton *monthBackward;
118 /// the button for selecting the month directly 119 /// the button for selecting the month directly
119 QToolButton *selectMonth; 120 QToolButton *selectMonth;
120 /// the button for selecting the year directly 121 /// the button for selecting the year directly
121 QToolButton *selectYear; 122 QToolButton *selectYear;
122 /// the line edit to enter the date directly 123 /// the line edit to enter the date directly
123 //QLineEdit *line; 124 //QLineEdit *line;
124 KDateEdit *lineDate; 125 KDateEdit *lineDate;
125 /// the validator for the line edit: 126 /// the validator for the line edit:
126 KDateValidator *val; 127 KDateValidator *val;
127 /// the date table 128 /// the date table
128 KDateTable *table; 129 KDateTable *table;
129 /// the size calculated during resize events 130 /// the size calculated during resize events
130 // QSize sizehint; 131 // QSize sizehint;
131 /// the widest month string in pixels: 132 /// the widest month string in pixels:
132 QSize maxMonthRect; 133 QSize maxMonthRect;
133protected slots: 134protected slots:
134 void dateChangedSlot(QDate); 135 void dateChangedSlot(QDate);
135 void tableClickedSlot(); 136 void tableClickedSlot();
136 void monthForwardClicked(); 137 void monthForwardClicked();
137 void monthBackwardClicked(); 138 void monthBackwardClicked();
138 void yearForwardClicked(); 139 void yearForwardClicked();
139 void yearBackwardClicked(); 140 void yearBackwardClicked();
140 void selectMonthClicked(); 141 void selectMonthClicked();
141 void selectYearClicked(); 142 void selectYearClicked();
142 void lineEnterPressed(); 143 void lineEnterPressed();
143 void slotSetDate(QDate); 144 void slotSetDate(QDate);
145 void goToday();
144signals: 146signals:
145 /** This signal is emitted each time the selected date is changed. 147 /** This signal is emitted each time the selected date is changed.
146 * Usually, this does not mean that the date has been entered, 148 * Usually, this does not mean that the date has been entered,
147 * since the date also changes, for example, when another month is 149 * since the date also changes, for example, when another month is
148 * selected. 150 * selected.
149 * @see dateSelected 151 * @see dateSelected
150 */ 152 */
151 void dateChanged(QDate); 153 void dateChanged(QDate);
152 /** This signal is emitted each time a day has been selected by 154 /** This signal is emitted each time a day has been selected by
153 * clicking on the table (hitting a day in the current month). It 155 * clicking on the table (hitting a day in the current month). It
154 * has the same meaning as dateSelected() in older versions of 156 * has the same meaning as dateSelected() in older versions of
155 * KDatePicker. 157 * KDatePicker.
156 */ 158 */
157 void dateSelected(QDate); 159 void dateSelected(QDate);
158 /** This signal is emitted when enter is pressed and a VALID date 160 /** This signal is emitted when enter is pressed and a VALID date
159 * has been entered before into the line edit. Connect to both 161 * has been entered before into the line edit. Connect to both
160 * dateEntered() and dateSelected() to receive all events where the 162 * dateEntered() and dateSelected() to receive all events where the
161 * user really enters a date. 163 * user really enters a date.
162 */ 164 */
163 void dateEntered(QDate); 165 void dateEntered(QDate);
164 /** This signal is emitted when the day has been selected by 166 /** This signal is emitted when the day has been selected by
165 * clicking on it in the table. 167 * clicking on it in the table.
166 */ 168 */
167 void tableClicked(); 169 void tableClicked();
168 170
169private: 171private:
170 /// the font size for the widget 172 /// the font size for the widget
171 int fontsize; 173 int fontsize;
172 174
173protected: 175protected:
174 virtual void virtual_hook( int id, void* data ); 176 virtual void virtual_hook( int id, void* data );
175private: 177private:
176 class KDatePickerPrivate; 178 class KDatePickerPrivate;
177 KDatePickerPrivate *d; 179 KDatePickerPrivate *d;
178 void keyPressEvent ( QKeyEvent * ) ; 180 void keyPressEvent ( QKeyEvent * ) ;
179}; 181};
180 182
181#endif // KDATEPICKER_H 183#endif // KDATEPICKER_H