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

« back to all changes in this revision

Viewing changes to PaintStyle/EditPaintStyle.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
 
#ifndef MERKAARTOR_EDITPAINTSTYLE_H_
2
 
#define MERKAARTOR_EDITPAINTSTYLE_H_
3
 
 
4
 
#include "PaintStyle.h"
5
 
 
6
 
class EditPaintStylePrivate;
7
 
class Projection;
8
 
class QPainter;
9
 
class QString;
10
 
 
11
 
#include <vector>
12
 
 
13
 
#define M_STYLE EditPaintStyle::instance()
14
 
 
15
 
class EditPaintStyle : public PaintStyle
16
 
{
17
 
        public:
18
 
                static EditPaintStyle* instance() {
19
 
                        if (!m_EPSInstance) {
20
 
                                m_EPSInstance = new EditPaintStyle;
21
 
                        }
22
 
 
23
 
                        return m_EPSInstance;
24
 
                }
25
 
 
26
 
                EditPaintStyle();
27
 
                virtual ~EditPaintStyle();
28
 
                void initialize(QPainter& P, const Projection& theProjection);
29
 
 
30
 
                int painterSize();
31
 
                const GlobalPainter& getGlobalPainter() const;
32
 
                void setGlobalPainter(GlobalPainter aGlobalPainter);
33
 
                const FeaturePainter* getPainter(int i) const;
34
 
                QVector<FeaturePainter> getPainters() const;
35
 
                void setPainters(QVector<FeaturePainter> aPainters);
36
 
 
37
 
                void savePainters(const QString& filename);
38
 
                void loadPainters(const QString& filename);
39
 
 
40
 
        private:
41
 
                EditPaintStylePrivate* p;
42
 
                QVector<FeaturePainter> Painters;
43
 
                GlobalPainter globalPainter;
44
 
                
45
 
                static EditPaintStyle* m_EPSInstance;
46
 
};
47
 
 
48
 
/* FEATUREPAINTSELECTOR */
49
 
 
50
 
class EPBackgroundLayer : public PaintStyleLayer
51
 
{
52
 
        public:
53
 
                void setP(EditPaintStylePrivate* p);
54
 
                virtual void draw(Road* R);
55
 
                virtual void draw(TrackPoint* Pt);
56
 
                virtual void draw(Relation* R);
57
 
        private:
58
 
                EditPaintStylePrivate* p;
59
 
};
60
 
 
61
 
class EPForegroundLayer : public PaintStyleLayer
62
 
{
63
 
        public:
64
 
                void setP(EditPaintStylePrivate* p);
65
 
                virtual void draw(Road* R);
66
 
                virtual void draw(TrackPoint* Pt);
67
 
                virtual void draw(Relation* R);
68
 
        private:
69
 
                EditPaintStylePrivate* p;
70
 
};
71
 
 
72
 
class EPTouchupLayer : public PaintStyleLayer
73
 
{
74
 
        public:
75
 
                void setP(EditPaintStylePrivate* p);
76
 
                virtual void draw(Road* R);
77
 
                virtual void draw(TrackPoint* Pt);
78
 
                virtual void draw(Relation* R);
79
 
        private:
80
 
                EditPaintStylePrivate* p;
81
 
};
82
 
 
83
 
class EPLabelLayer : public PaintStyleLayer
84
 
{
85
 
        public:
86
 
                void setP(EditPaintStylePrivate* p);
87
 
                virtual void draw(Road* R);
88
 
                virtual void draw(TrackPoint* Pt);
89
 
                virtual void draw(Relation* R);
90
 
        private:
91
 
                EditPaintStylePrivate* p;
92
 
};
93
 
 
94
 
#endif