CColorSchema.h
Go to the documentation of this file.
1 #ifndef iview_CColorSchema_included
2 #define iview_CColorSchema_included
3 
4 
5 // Qt includes
6 #include <QtGui/QPainter>
7 
8 
9 // ACF includes
10 #include <iview/CColorSchemaBase.h>
11 
12 
13 namespace iview
14 {
15 
16 
23 {
24 public:
25  enum
26  {
31  };
32 
33  CColorSchema();
34 
35  // reimplemented IColorSchema
36  virtual const QFont& GetFont(IColorSchema::StandardFont fontType) const;
37  virtual void SetFont(iview::IColorSchema::StandardFont fontType, const QFont& font);
38  virtual const QPen& GetPen(IColorSchema::StandardPen penType) const;
39  virtual void SetPen(iview::IColorSchema::StandardPen penType, const QPen& pen);
40  virtual const QBrush& GetBrush(IColorSchema::StandardBrush brushType) const;
41  virtual void SetBrush(iview::IColorSchema::StandardBrush brushType, const QBrush& brush);
42 
43 protected:
44  QPen m_pens[int(IColorSchema::SP_LAST) + 1];
45  QBrush m_brushes[int(IColorSchema::SB_LAST) + 1];
46  QFont m_fonts[int(IColorSchema::SF_LAST) + 1];
47 };
48 
49 
50 
51 inline void CColorSchema::SetPen(IColorSchema::StandardPen penType, const QPen& pen)
52 {
53  m_pens[penType] = pen;
54 }
55 
56 
57 inline void CColorSchema::SetBrush(IColorSchema::StandardBrush brushType, const QBrush& brush)
58 {
59  m_brushes[brushType] = brush;
60 }
61 
62 
63 inline void CColorSchema::SetFont(IColorSchema::StandardFont fontType, const QFont& font)
64 {
65  m_fonts[fontType] = font;
66 }
67 
68 
69 inline const QFont& CColorSchema::GetFont(IColorSchema::StandardFont fontType) const
70 {
71  return m_fonts[fontType];
72 }
73 
74 
75 inline const QPen& CColorSchema::GetPen(IColorSchema::StandardPen penType) const
76 {
77  return m_pens[penType];
78 }
79 
80 
81 inline const QBrush& CColorSchema::GetBrush(IColorSchema::StandardBrush brushType) const
82 {
83  return m_brushes[brushType];
84 }
85 
86 
87 } // namespace iview
88 
89 
90 #endif // !iview_CColorSchema_included
91 
92 
QBrush m_brushes[int(IColorSchema::SB_LAST)+1]
Definition: CColorSchema.h:45
Standard size of pens set.
Definition: CColorSchema.h:30
virtual void SetPen(iview::IColorSchema::StandardPen penType, const QPen &pen)
Definition: CColorSchema.h:51
QFont m_fonts[int(IColorSchema::SF_LAST)+1]
Definition: CColorSchema.h:46
virtual void SetFont(iview::IColorSchema::StandardFont fontType, const QFont &font)
Definition: CColorSchema.h:63
QPen m_pens[int(IColorSchema::SP_LAST)+1]
Definition: CColorSchema.h:44
virtual const QFont & GetFont(IColorSchema::StandardFont fontType) const
Definition: CColorSchema.h:69
Implementation of the color schema object.
Definition: CColorSchema.h:22
virtual const QBrush & GetBrush(IColorSchema::StandardBrush brushType) const
Definition: CColorSchema.h:81
virtual const QPen & GetPen(IColorSchema::StandardPen penType) const
Definition: CColorSchema.h:75
virtual void SetBrush(iview::IColorSchema::StandardBrush brushType, const QBrush &brush)
Definition: CColorSchema.h:57

© 2007-2017 Witold Gantzke and Kirill Lepskiy