diff options
Diffstat (limited to 'utils/themeeditor/graphics/rbviewport.h')
-rw-r--r-- | utils/themeeditor/graphics/rbviewport.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/utils/themeeditor/graphics/rbviewport.h b/utils/themeeditor/graphics/rbviewport.h index c6f0c636c2..1d65eb8d56 100644 --- a/utils/themeeditor/graphics/rbviewport.h +++ b/utils/themeeditor/graphics/rbviewport.h | |||
@@ -33,6 +33,13 @@ class RBRenderInfo; | |||
33 | class RBViewport : public QGraphicsItem | 33 | class RBViewport : public QGraphicsItem |
34 | { | 34 | { |
35 | public: | 35 | public: |
36 | enum Alignment | ||
37 | { | ||
38 | Left, | ||
39 | Center, | ||
40 | Right | ||
41 | }; | ||
42 | |||
36 | RBViewport(skin_element* node, const RBRenderInfo& info); | 43 | RBViewport(skin_element* node, const RBRenderInfo& info); |
37 | virtual ~RBViewport(); | 44 | virtual ~RBViewport(); |
38 | 45 | ||
@@ -48,9 +55,14 @@ public: | |||
48 | 55 | ||
49 | void newLine(); | 56 | void newLine(); |
50 | void write(QString text); | 57 | void write(QString text); |
58 | void alignText(Alignment align){ textAlign = align; } | ||
51 | 59 | ||
52 | private: | 60 | private: |
53 | 61 | ||
62 | void alignLeft(); | ||
63 | void alignCenter(); | ||
64 | void alignRight(); | ||
65 | |||
54 | QRectF size; | 66 | QRectF size; |
55 | RBFont* font; | 67 | RBFont* font; |
56 | QColor foreground; | 68 | QColor foreground; |
@@ -62,6 +74,11 @@ private: | |||
62 | int lineHeight; | 74 | int lineHeight; |
63 | 75 | ||
64 | RBScreen* screen; | 76 | RBScreen* screen; |
77 | |||
78 | QList<QGraphicsItem*> leftText; | ||
79 | QList<QGraphicsItem*> centerText; | ||
80 | QList<QGraphicsItem*> rightText; | ||
81 | Alignment textAlign; | ||
65 | }; | 82 | }; |
66 | 83 | ||
67 | #endif // RBVIEWPORT_H | 84 | #endif // RBVIEWPORT_H |