summaryrefslogtreecommitdiffstats
path: root/kweather/dockwidget.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitae2a03c2941bf92573f89b88ef73f8aa842bea0a (patch)
tree3566563f3fb6ac3cb3496669d8f233062d3091bc /kweather/dockwidget.h
downloadtdetoys-ae2a03c2941bf92573f89b88ef73f8aa842bea0a.tar.gz
tdetoys-ae2a03c2941bf92573f89b88ef73f8aa842bea0a.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdetoys@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kweather/dockwidget.h')
-rw-r--r--kweather/dockwidget.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/kweather/dockwidget.h b/kweather/dockwidget.h
new file mode 100644
index 0000000..f61f6b1
--- /dev/null
+++ b/kweather/dockwidget.h
@@ -0,0 +1,74 @@
+/***************************************************************************
+ dockwidget.h - description
+ -------------------
+ begin : Thu Jul 6 2000
+ copyright : (C) 2000-2003 by Ian Reinhart Geiser
+ : (C) 2002-2003 Nadeem Hasan <nhasan@kde.org>
+ email : geiseri@msoe.edu
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+#ifndef DOCKWIDGET_H
+#define DOCKWIDGET_H
+
+#include <qfont.h>
+#include <qpixmap.h>
+#include <qwidget.h>
+
+#include <dcopref.h>
+
+class QLabel;
+class WeatherService_stub;
+class WeatherButton;
+
+class dockwidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ dockwidget(const QString &location, QWidget *parent=0, const char *name=0);
+ ~dockwidget();
+
+ enum {ShowIconOnly=1, ShowTempOnly=2, ShowAll=3 };
+
+ void setLocationCode(const QString &locationCode);
+ void setViewMode(int);
+ void setOrientation(Orientation o) { m_orientation = o; }
+ /** resize the view **/
+ void resizeView(const QSize &size);
+ int widthForHeight(int h);
+ int heightForWidth(int w);
+
+public slots:
+ void showWeather();
+
+signals: // Signals
+ void buttonClicked();
+
+private:
+ void initDock();
+ void updateFont();
+
+ int m_mode;
+ QString m_locationCode;
+ QFont m_font;
+ QPixmap m_icon;
+ WeatherButton *m_button;
+ QLabel *m_lblTemp;
+ QLabel *m_lblWind;
+ QLabel *m_lblPres;
+ Orientation m_orientation;
+
+ WeatherService_stub *m_weatherService;
+};
+
+#endif
+
+// vim:ts=4:sw=4:et