superkaramba
date.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 * Copyright (C) 2003 by Hans Karlsson * 00003 * karlsson.h@home.se * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 ***************************************************************************/ 00010 #ifndef DATESENSOR_H 00011 #define DATESENSOR_H 00012 00013 #include <KDatePicker> 00014 00015 #include "sensor.h" 00016 #include "sensorparams.h" 00017 00018 class DatePicker : public QWidget 00019 { 00020 public: 00021 DatePicker(QWidget*); 00022 private: 00023 KDatePicker *picker; 00024 void keyReleaseEvent(QKeyEvent *e); 00025 }; 00026 00027 class DateSensor : public Sensor 00028 { 00029 Q_OBJECT 00030 public: 00031 DateSensor(int interval); 00032 ~DateSensor(); 00033 00034 void toggleCalendar(QMouseEvent *ev); 00035 void mousePressEvent(QMouseEvent *ev); 00036 void update(); 00037 00038 protected slots: 00039 void slotCalendarDeleted(); 00040 00041 private: 00042 bool hidden; 00043 DatePicker* cal; 00044 00045 }; 00046 00047 #endif // SENSOR_H
KDE 4.0 API Reference