summaryrefslogtreecommitdiffabout
path: root/microkde/kdatetbl.h
Unidiff
Diffstat (limited to 'microkde/kdatetbl.h') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdatetbl.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/microkde/kdatetbl.h b/microkde/kdatetbl.h
index 87808df..2d3d2cf 100644
--- a/microkde/kdatetbl.h
+++ b/microkde/kdatetbl.h
@@ -12,35 +12,41 @@
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20#ifndef KDATETBL_H 20#ifndef KDATETBL_H
21#define KDATETBL_H 21#define KDATETBL_H
22 22
23#include <qvalidator.h> 23#include <qvalidator.h>
24#include <qgridview.h> 24#include <q3gridview.h>
25#include <qlineedit.h> 25#include <qlineedit.h>
26#include <qdatetime.h> 26#include <qdatetime.h>
27//Added by qt3to4:
28#include <QResizeEvent>
29#include <QMouseEvent>
30#include <Q3Frame>
31#include <QKeyEvent>
32#include <QFocusEvent>
27 33
28/** 34/**
29* A table containing month names. It is used to pick a month directly. 35* A table containing month names. It is used to pick a month directly.
30* @internal 36* @internal
31* @version $Id$ 37* @version $Id$
32* @author Tim Gilman, Mirko Boehm 38* @author Tim Gilman, Mirko Boehm
33*/ 39*/
34class KDateInternalMonthPicker : public QGridView 40class KDateInternalMonthPicker : public Q3GridView
35{ 41{
36 Q_OBJECT 42 Q_OBJECT
37protected: 43protected:
38 /** 44 /**
39 * Store the month that has been clicked [1..12]. 45 * Store the month that has been clicked [1..12].
40 */ 46 */
41 int result; 47 int result;
42 /** 48 /**
43 * the cell under mouse cursor when LBM is pressed 49 * the cell under mouse cursor when LBM is pressed
44 */ 50 */
45 short int activeCol; 51 short int activeCol;
46 short int activeRow; 52 short int activeRow;
@@ -118,25 +124,25 @@ public:
118 void setYear(int year); 124 void setYear(int year);
119 125
120private: 126private:
121 class KDateInternalYearPrivate; 127 class KDateInternalYearPrivate;
122 KDateInternalYearPrivate *d; 128 KDateInternalYearPrivate *d;
123}; 129};
124 130
125/** 131/**
126 * Frame with popup menu behaviour. 132 * Frame with popup menu behaviour.
127 * @author Tim Gilman, Mirko Boehm 133 * @author Tim Gilman, Mirko Boehm
128 * @version $Id$ 134 * @version $Id$
129 */ 135 */
130class KPopupFrame : public QFrame 136class KPopupFrame : public Q3Frame
131{ 137{
132 Q_OBJECT 138 Q_OBJECT
133protected: 139protected:
134 /** 140 /**
135 * The result. It is returned from exec() when the popup window closes. 141 * The result. It is returned from exec() when the popup window closes.
136 */ 142 */
137 int result; 143 int result;
138 /** 144 /**
139 * Catch key press events. 145 * Catch key press events.
140 */ 146 */
141 void keyPressEvent(QKeyEvent* e); 147 void keyPressEvent(QKeyEvent* e);
142 /** 148 /**
@@ -173,25 +179,25 @@ public:
173 void popup(const QPoint &pos); 179 void popup(const QPoint &pos);
174 /** 180 /**
175 * Execute the popup window. 181 * Execute the popup window.
176 */ 182 */
177 int exec(QPoint p); 183 int exec(QPoint p);
178 /** 184 /**
179 * Dito. 185 * Dito.
180 */ 186 */
181 int exec(int x, int y); 187 int exec(int x, int y);
182 188
183private: 189private:
184 190
185 virtual bool close(bool alsoDelete) { return QFrame::close(alsoDelete); } 191 virtual bool close(bool alsoDelete) { return Q3Frame::close(alsoDelete); }
186protected: 192protected:
187 virtual void virtual_hook( int id, void* data ); 193 virtual void virtual_hook( int id, void* data );
188private: 194private:
189 class KPopupFramePrivate; 195 class KPopupFramePrivate;
190 KPopupFramePrivate *d; 196 KPopupFramePrivate *d;
191}; 197};
192 198
193/** 199/**
194* Validates user-entered dates. 200* Validates user-entered dates.
195*/ 201*/
196class KDateValidator : public QValidator 202class KDateValidator : public QValidator
197{ 203{
@@ -206,34 +212,34 @@ public:
206 * Date selection table. 212 * Date selection table.
207 * This is a support class for the KDatePicker class. It just 213 * This is a support class for the KDatePicker class. It just
208 * draws the calender table without titles, but could theoretically 214 * draws the calender table without titles, but could theoretically
209 * be used as a standalone. 215 * be used as a standalone.
210 * 216 *
211 * When a date is selected by the user, it emits a signal: 217 * When a date is selected by the user, it emits a signal:
212 * dateSelected(QDate) 218 * dateSelected(QDate)
213 * 219 *
214 * @internal 220 * @internal
215 * @version $Id$ 221 * @version $Id$
216 * @author Tim Gilman, Mirko Boehm 222 * @author Tim Gilman, Mirko Boehm
217 */ 223 */
218class KDateTable : public QGridView 224class KDateTable : public Q3GridView
219{ 225{
220 Q_OBJECT 226 Q_OBJECT
221public: 227public:
222 /** 228 /**
223 * The constructor. 229 * The constructor.
224 */ 230 */
225 KDateTable(QWidget *parent=0, 231 KDateTable(QWidget *parent=0,
226 QDate date=QDate::currentDate(), 232 QDate date=QDate::currentDate(),
227 const char* name=0, WFlags f=0); 233 const char* name=0, Qt::WFlags f=0);
228 /** 234 /**
229 * Returns a recommended size for the widget. 235 * Returns a recommended size for the widget.
230 * To save some time, the size of the largest used cell content is 236 * To save some time, the size of the largest used cell content is
231 * calculated in each paintCell() call, since all calculations have 237 * calculated in each paintCell() call, since all calculations have
232 * to be done there anyway. The size is stored in maxCell. The 238 * to be done there anyway. The size is stored in maxCell. The
233 * sizeHint() simply returns a multiple of maxCell. 239 * sizeHint() simply returns a multiple of maxCell.
234 */ 240 */
235 virtual QSize sizeHint() const; 241 virtual QSize sizeHint() const;
236 /** 242 /**
237 * Set the font size of the date table. 243 * Set the font size of the date table.
238 */ 244 */
239 void setFontSize(int size); 245 void setFontSize(int size);
@@ -298,25 +304,25 @@ signals:
298 * A date has been selected by clicking on the table. 304 * A date has been selected by clicking on the table.
299 */ 305 */
300 void tableClicked(); 306 void tableClicked();
301 307
302protected: 308protected:
303 virtual void virtual_hook( int id, void* data ); 309 virtual void virtual_hook( int id, void* data );
304private: 310private:
305 class KDateTablePrivate; 311 class KDateTablePrivate;
306 KDateTablePrivate *d; 312 KDateTablePrivate *d;
307}; 313};
308 314
309#endif // KDATETBL_H 315#endif // KDATETBL_H
310class KDateInternalWeekPicker : public QGridView 316class KDateInternalWeekPicker : public Q3GridView
311{ 317{
312 Q_OBJECT 318 Q_OBJECT
313protected: 319protected:
314 /** 320 /**
315 * Store the month that has been clicked [1..12]. 321 * Store the month that has been clicked [1..12].
316 */ 322 */
317 int result; 323 int result;
318 /** 324 /**
319 * the cell under mouse cursor when LBM is pressed 325 * the cell under mouse cursor when LBM is pressed
320 */ 326 */
321 short int activeCol; 327 short int activeCol;
322 short int activeRow; 328 short int activeRow;