Proof-reading.
[kdetoys.git] / kweather / dockwidget.h
blob49b030b4675da45f7aff9e1a205d7f8281a493d7
1 /***************************************************************************
2 dockwidget.h - description
3 -------------------
4 begin : Thu Jul 6 2000
5 copyright : (C) 2000-2003 by Ian Reinhart Geiser
6 : (C) 2002-2003 Nadeem Hasan <nhasan@kde.org>
7 email : geiseri@msoe.edu
8 ***************************************************************************/
10 /***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
18 #ifndef DOCKWIDGET_H
19 #define DOCKWIDGET_H
21 #include <QtGui/QFont>
22 #include <QtGui/QPixmap>
23 #include <QtGui/QWidget>
25 class QLabel;
26 class WeatherButton;
27 class OrgKdeKweatherServiceInterface;
29 class dockwidget : public QWidget
31 Q_OBJECT
33 public:
34 explicit dockwidget(const QString &location, QWidget *parent=0);
35 ~dockwidget();
37 enum {ShowIconOnly=1, ShowTempOnly=2, ShowAll=3 };
39 void setLocationCode(const QString &locationCode);
40 void setViewMode(int);
41 void setOrientation(Qt::Orientation o) { m_orientation = o; }
42 /** resize the view **/
43 void resizeView(const QSize &size);
44 int widthForHeight(int h);
45 int heightForWidth(int w);
47 public slots:
48 void showWeather();
50 signals: // Signals
51 void buttonClicked();
53 private:
54 void initDock();
55 void updateFont();
56 int m_mode;
57 QString m_locationCode;
58 QFont m_font;
59 QPixmap m_icon;
60 WeatherButton *m_button;
61 QLabel *m_lblTemp;
62 QLabel *m_lblWind;
63 QLabel *m_lblPres;
64 Qt::Orientation m_orientation;
66 OrgKdeKweatherServiceInterface *m_weatherService;
69 #endif // DOCKWIDGET_H
71 // vim:ts=4:sw=4:et