~ubuntu-branches/ubuntu/saucy/merkaartor/saucy

« back to all changes in this revision

Viewing changes to src/Preferences/WmsServersList.h

  • Committer: Bazaar Package Importer
  • Author(s): Bernd Zeimetz
  • Date: 2009-09-13 00:52:12 UTC
  • mto: (1.2.7 upstream) (0.1.3 upstream) (3.1.7 sid)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: james.westby@ubuntu.com-20090913005212-pjecal8zxm07x0fj
ImportĀ upstreamĀ versionĀ 0.14+svnfixes~20090912

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
// C++ Interface: WMSServersList
 
3
//
 
4
// Description:
 
5
//
 
6
//
 
7
// Author: cbro <cbro@semperpax.com>, (C) 2009
 
8
//
 
9
// Copyright: See COPYING file that comes with this distribution
 
10
//
 
11
//
 
12
 
 
13
#ifndef WMSSERVERS_LIST_H
 
14
#define WMSSERVERS_LIST_H
 
15
 
 
16
#include <QString>
 
17
#include <QMap>
 
18
#include <QtXml>
 
19
 
 
20
class WmsServer
 
21
{
 
22
        public:
 
23
                WmsServer();
 
24
                WmsServer(const WmsServer& other);
 
25
                WmsServer(QString Name, QString Adress, QString Path, QString Layers, QString Projections, QString Styles, QString ImgFormat, bool Deleted=false);
 
26
 
 
27
                void toXml(QDomElement parent);
 
28
                static WmsServer fromXml(QDomElement parent);
 
29
 
 
30
        public:
 
31
                QString WmsName;
 
32
                QString WmsAdress;
 
33
                QString WmsPath;
 
34
                QString WmsLayers;
 
35
                QString WmsProjections;
 
36
                QString WmsStyles;
 
37
                QString WmsImgFormat;
 
38
                bool deleted;
 
39
};
 
40
typedef QMap<QString, WmsServer> WmsServerList;
 
41
typedef QMapIterator<QString, WmsServer> WmsServerListIterator;
 
42
 
 
43
class WmsServersList
 
44
{
 
45
        public:
 
46
                void add(WmsServersList aWmsServersList);
 
47
                void addServer(WmsServer aServer);
 
48
                bool contains(QString name) const;
 
49
                WmsServerList* getServers();
 
50
                WmsServer getServer(QString name) const;
 
51
                void toXml(QDomElement parent);
 
52
                static WmsServersList fromXml(QDomElement parent);
 
53
 
 
54
        private:
 
55
                WmsServerList theServers;
 
56
};
 
57
 
 
58
#endif // WMSSERVERS_LIST_H