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/stationdatabase.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 kweather/stationdatabase.h (limited to 'kweather/stationdatabase.h') diff --git a/kweather/stationdatabase.h b/kweather/stationdatabase.h new file mode 100644 index 0000000..1e020a9 --- /dev/null +++ b/kweather/stationdatabase.h @@ -0,0 +1,54 @@ +// +// +// C++ Interface: $MODULE$ +// +// Description: +// +// +// Author: ian reinhart geiser , (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef STATIONDATABASE_H +#define STATIONDATABASE_H + +#include +#include + +#include +#include + +/** +This is the main database for mapping METAR codes to Station information. + +@author ian reinhart geiser +*/ + +class StationInfo; + +class StationDatabase +{ +public: + StationDatabase(const QString path = locate("data", "kweatherservice/stations.dat")); + ~StationDatabase(); + + QString stationNameFromID(const QString& id); + + QString stationLongitudeFromID( const QString &stationID); + + QString stationLatitudeFromID(const QString &stationID); + + QString stationCountryFromID( const QString &stationID); + + QString stationIDfromName( const QString &name ); + +private: + QMap theDB; + + bool loadStation( const QString & stationID ); + + const QString mPath; +}; + +#endif -- cgit v1.2.1