Applets
clockapplet.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef CLOCKAPPLET_H
00022 #define CLOCKAPPLET_H
00023
00024 #include <QtCore/QTime>
00025 #include <QtCore/QDate>
00026
00027 #include <plasma/applet.h>
00028 #include <plasma/dataengine.h>
00029 #include <plasma/dialog.h>
00030 #include "ui_calendar.h"
00031
00032 #include "plasmaclock_export.h"
00033
00034
00035 class KDialog;
00036
00037 namespace Plasma
00038 {
00039 class Svg;
00040 }
00041
00042 class PLASMA_EXPORT ClockApplet : public Plasma::Applet
00043 {
00044 Q_OBJECT
00045 public:
00046 ClockApplet(QObject *parent, const QVariantList &args);
00047 ~ClockApplet();
00048
00049 QString currentTimezone() const;
00050 bool isLocalTimezone() const;
00051
00052 static QString localTimezone();
00053
00054 protected:
00055 void mousePressEvent(QGraphicsSceneMouseEvent *event);
00056 void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
00057
00058 protected Q_SLOTS:
00059 void setCurrentTimezone(const QString &tz);
00060 void showCalendar(QGraphicsSceneMouseEvent *event);
00061
00062 private:
00063 void updateToolTipContent();
00064
00065 class Private;
00066 Private * const d;
00067 };
00068
00069
00070 #endif