From ae2a03c2941bf92573f89b88ef73f8aa842bea0a Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: 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 --- kweather/kweather.h | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 kweather/kweather.h (limited to 'kweather/kweather.h') diff --git a/kweather/kweather.h b/kweather/kweather.h new file mode 100644 index 0000000..d139411 --- /dev/null +++ b/kweather/kweather.h @@ -0,0 +1,90 @@ +/*************************************************************************** + kweather.h - description + ------------------- + begin : Wed Jul 5 23:09:02 CDT 2000 + copyright : (C) 2000 by Ian Reinhart Geiser + 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 KWEATHER_H +#define KWEATHER_H + +#include +#include + +#include "weatherIface.h" + +class QTimer; +class dockwidget; +class reportView; +class KPopupMenu; +class WeatherService_stub; +class QPalette; + +class kweather : public KPanelApplet, public weatherIface +{ + Q_OBJECT + +public: + kweather(const QString& configFile, Type t = Normal, int actions = 0, QWidget *parent = 0, const char *name = 0); + ~kweather(); + void help(); + void resizeEvent(QResizeEvent*); + int heightForWidth(int i) const; + int widthForHeight(int i) const; + void refresh(QString); + void setBackground(); + void setLabelColor(); + +public slots: // Public slots + void preferences(); + void about(); + +protected: + void paletteChange(const QPalette &); + +protected slots: + void doReport(); + void timeout(); + void slotPrefsAccepted(); + void slotReportFinished(); + void slotUpdateNow(); + +private: // Private methods + void initContextMenu(); + void initDCOP(); + void loadPrefs(); + void savePrefs(); + void showWeather(); + void writeLogEntry(); + void mousePressEvent(QMouseEvent *e); + + bool attach(); + + QString reportLocation; + QString fileName; + QString metarData; + bool logOn; + bool mFirstRun; + int mViewMode; + QTimer *timeOut; + dockwidget *dockWidget; + reportView *mReport; + DCOPClient *mClient; + //DCOPRef *mWeatherService; + KPopupMenu *mContextMenu; + WeatherService_stub *mWeatherService; + KCMultiDialog *settingsDialog; + QColor mTextColor; +}; + +#endif -- cgit v1.2.1