1 #ifndef MERKAARTOR_MAPCSSPAINTSTYLE_H_
2 #define MERKAARTOR_MAPCSSPAINTSTYLE_H_
3 
4 #include "Painter.h"
5 
6 class MapView;
7 class PaintStylePrivate;
8 
9 #include <QList>
10 
11 class MapCSSPaintstyle
12 {
13     public:
instance()14         static MapCSSPaintstyle* instance() {
15             if (!m_MapCSSInstance) {
16                 m_MapCSSInstance = new MapCSSPaintstyle;
17             }
18 
19             return m_MapCSSInstance;
20         }
21 
22         MapCSSPaintstyle();
23         virtual ~MapCSSPaintstyle();
24         void initialize(QPainter& P, MapView& theView);
25 
26         int painterSize();
27         const GlobalPainter& getGlobalPainter() const;
28         void setGlobalPainter(GlobalPainter aGlobalPainter);
29         const Painter* getPainter(int i) const;
30         QList<Painter> getPainters() const;
31         void setPainters(QList<Painter> aPainters);
32 
33         void savePainters(const QString& filename);
34         void loadPainters(const QString& filename);
35 
36     private:
37         QList<Painter> Painters;
38         GlobalPainter globalPainter;
39 
40         static MapCSSPaintstyle* m_MapCSSInstance;
41 };
42 
43 #endif
44