CColorSchemaComp.h
Go to the documentation of this file.
1 #ifndef iview_CColorSchemaComp_included
2 #define iview_CColorSchemaComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QByteArray>
7 #include <QtCore/QString>
8 
9 // ACF includes
10 #include <icomp/CComponentBase.h>
11 #include <iview/CColorSchema.h>
12 
13 
14 namespace iview
15 {
16 
17 
19 {
20 public:
22 
23  I_BEGIN_COMPONENT(CColorSchemaPenAttr);
24  I_REGISTER_INTERFACE(IColorSchema);
25  I_ASSIGN(m_normalPenColorAttrPtr, "NormalPenColor", "Normal pen color", false, "green");
26  I_ASSIGN(m_normalPenWidthAttrPtr, "NormalPenWidth", "Normal pen width", false, 1.5);
27  I_ASSIGN(m_selectedPenColorAttrPtr, "SelectedPenColor", "Selected pen color", false, "yellow");
28  I_ASSIGN(m_selectedPenWidthAttrPtr, "SelectedPenWidth", "Selected pen width", false, 1.5);
29  I_ASSIGN(m_selectedTickerPenColorAttrPtr, "SelectedTickerPenColor", "Selected ticker pen color", false, "purple");
30  I_ASSIGN(m_selectedTickerPenWidthAttrPtr, "SelectedTickerPenWidth", "Selected ticker pen width", false, 1);
31  I_ASSIGN(m_tickerPenColorAttrPtr, "TickerPenColor", "Ticker pen color", false, "deepskyblue");
32  I_ASSIGN(m_tickerPenWidthAttrPtr, "TickerPenWidth", "Ticker pen width", false, 1);
33  I_ASSIGN(m_importantPenColorAttrPtr, "ImportantPenColor", "Important pen color", false, "fuchsia");
34  I_ASSIGN(m_importantPenWidthAttrPtr, "ImportantPenWidth", "Important pen width", false, 1.5);
35  I_ASSIGN(m_orientDarkPenColorAttrPtr, "OrientDarkPenColor", "OrientDark pen color", false, "black");
36  I_ASSIGN(m_orientBrightPenColorAttrPtr, "OrientBrightPenColor", "OrientBright pen color", false, "white");
37  I_END_COMPONENT;
38 
39 protected:
40  I_ATTR(QByteArray, m_normalPenColorAttrPtr);
41  I_ATTR(double, m_normalPenWidthAttrPtr);
42  I_ATTR(QByteArray, m_selectedPenColorAttrPtr);
43  I_ATTR(double, m_selectedPenWidthAttrPtr);
44  I_ATTR(QByteArray, m_selectedTickerPenColorAttrPtr);
45  I_ATTR(double, m_selectedTickerPenWidthAttrPtr);
46  I_ATTR(QByteArray, m_tickerPenColorAttrPtr);
47  I_ATTR(double, m_tickerPenWidthAttrPtr);
48  I_ATTR(QByteArray, m_importantPenColorAttrPtr);
49  I_ATTR(double, m_importantPenWidthAttrPtr);
50  I_ATTR(QByteArray, m_orientDarkPenColorAttrPtr);
51  I_ATTR(QByteArray, m_orientBrightPenColorAttrPtr);
52 };
53 
54 
56 {
57 public:
59 
60  I_BEGIN_COMPONENT(CColorSchemaBrushAttr);
61  I_ASSIGN(m_normalBrushColorAttrPtr, "NormalBrushColor", "Normal brush color", false, "rosybrown");
62  I_ASSIGN(m_selectedBrushColorAttrPtr, "SelectedBrushColor", "Selected brush color", false, "lightpink");
63  I_ASSIGN(m_selectedTickerBrushColorAttrPtr, "SelectedTickerBrushColor", "Selected ticker brush color", false, "lightcoral");
64  I_ASSIGN(m_tickerBrushColorAttrPtr, "TickerBrushColor", "Ticker brush color", false, "mediumslateblue");
65  I_ASSIGN(m_importantBrushColorAttrPtr, "ImportantBrushColor", "Important brush color", false, "blue");
66  I_END_COMPONENT;
67 
68 protected:
69  I_ATTR(QByteArray, m_normalBrushColorAttrPtr);
70  I_ATTR(QByteArray, m_selectedBrushColorAttrPtr);
71  I_ATTR(QByteArray, m_selectedTickerBrushColorAttrPtr);
72  I_ATTR(QByteArray, m_tickerBrushColorAttrPtr);
73  I_ATTR(QByteArray, m_importantBrushColorAttrPtr);
74 };
75 
76 
81 {
82 public:
84 
85  I_BEGIN_COMPONENT(CColorSchemaComp);
86  I_ASSIGN(m_halfTransparentBrushColorAttrPtr, "HalfTransparentBrushColor", "Half-Transparent brush color", false, "mediumslateblue");
87  I_ASSIGN(m_halfTransparent2BrushColorAttrPtr, "HalfTransparent2BrushColor", "Half-Transparent2 brush color", false, "mediumslateblue");
88  I_ASSIGN(m_backgroundBrushColorAttrPtr, "BackgroundBrushColor", "Background brush color", false, "AppColor");
89  I_ASSIGN(m_normalFontFamilyAttrPtr, "NormalFontFamily", "Name of family of normal font", false, "Helvetica");
90  I_ASSIGN(m_normalFontSizeAttrPtr, "NormalFontSize", "Size of normal font", false, 10);
91  I_ASSIGN(m_normalFontWeightAttrPtr, "NormalFontWeight", "Size of normal font", false, 50);
92  I_ASSIGN(m_opacityAttrPtr, "Opacity", "Level opacity (0.0 - fully transparent 1.0 - fully opaque", true, 0.2);
93  I_END_COMPONENT;
94 
95 protected:
96  // reimplemented (icomp::CComponentBase)
97  virtual void OnComponentCreated();
98 
99 private:
100  I_ATTR(QByteArray, m_halfTransparentBrushColorAttrPtr);
101  I_ATTR(QByteArray, m_halfTransparent2BrushColorAttrPtr);
102  I_ATTR(QByteArray, m_backgroundBrushColorAttrPtr);
103  I_ATTR(QString, m_normalFontFamilyAttrPtr);
104  I_ATTR(int, m_normalFontSizeAttrPtr);
105  I_ATTR(int, m_normalFontWeightAttrPtr);
106  I_ATTR(double, m_opacityAttrPtr);
107 };
108 
109 
110 } // namespace iview
111 
112 
113 #endif // !iview_CColorSchemaComp_included
114 
115 
Base class for component implementation.
icomp::CComponentBase BaseClass
Implementation of a ColorSchema as a component.
virtual void OnComponentCreated()
Implementation of the color schema object.
Definition: CColorSchema.h:22
CColorSchemaBrushAttr BaseClass
Defines set of standard pens, brushes and simple management of unions.
Definition: IColorSchema.h:28
CColorSchemaPenAttr BaseClass

© 2007-2017 Witold Gantzke and Kirill Lepskiy