ICF 3.1.1.10
Technical documentation of ICF Libraries
IColorSchema.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#ifndef iview_IColorSchema_included
7#define iview_IColorSchema_included
8
9
10// Qt includes
11#include <QtCore/QVector>
12#include <QtGui/QPen>
13#include <QtGui/QBrush>
14#include <QtGui/QFont>
15
16// ICF includes
17#include <istd/IPolymorphic.h>
18#include <istd/CIndex2d.h>
19#include <i2d/CRect.h>
20
21
22class QPainter;
23
24
25namespace iview
26{
27
28
29
33class IColorSchema: virtual public istd::IPolymorphic
34{
35public:
60
74
80
146
147 virtual void Assign(const IColorSchema& colorSchema) = 0;
148 virtual const QPen& GetPen(StandardPen penType) const = 0;
149 virtual void SetPen(StandardPen penType, const QPen& pen) = 0;
150 virtual const QBrush& GetBrush(StandardBrush brushType) const = 0;
151 virtual void SetBrush(StandardBrush brushType, const QBrush& brush) = 0;
152 virtual const QFont& GetFont(StandardFont fontType) const = 0;
153 virtual void SetFont(StandardFont fontType, const QFont& font) = 0;
154
158 virtual void DrawTicker(QPainter& drawContext, istd::CIndex2d point, TickerType tickerType) const = 0;
159
163 virtual const i2d::CRect& GetTickerBox(TickerType tickerType) const = 0;
164
170 virtual int GetLogicalLineWidth() const = 0;
171};
172
173
175{
176 return (iview::IColorSchema::TickerType)(int(tickerType1) | int(tickerType2));
177}
178
179
180} // namespace iview
181
182
183#endif // !iview_IColorSchema_included
184
185
Simple rectangle with integer bounds.
Definition CRect.h:26
Index implementation for addressing elements in 2D-space.
Definition CIndex2d.h:25
Defines set of standard pens, brushes and simple management of unions.
virtual const QFont & GetFont(StandardFont fontType) const =0
TickerType
Defines a type of ticker.
@ TT_SMALL
Small ticker.
@ TT_SELECTED_INACTIVE
Selected inactive ticker.
@ TT_INSERT
Ticker used to add node.
@ TT_ROTATE
Ticker used to rotate object.
@ TT_NORMAL
Normal (default active) ticker.
@ TT_DELETE
Ticker used to delete node.
@ TT_SELECTED_INACTIVE_SMALL
Selected inactive small ticker.
@ TT_CHECKBOX_ON
Ticker used to checkbox, when it is on.
@ TT_SKEW
Ticker used to skew object.
@ TT_CHECKBOX_OFF
Ticker used to checkbox, when it is off.
@ TT_INACTIVE_SMALL
Inactive small ticker.
@ TT_MOVE_CENTER
Ticker used to move center pins.
@ TT_INACTIVE
Inactive ticker.
@ TT_MOVE
Ticker used to move object.
virtual void Assign(const IColorSchema &colorSchema)=0
virtual const QPen & GetPen(StandardPen penType) const =0
virtual void SetPen(StandardPen penType, const QPen &pen)=0
virtual void SetFont(StandardFont fontType, const QFont &font)=0
virtual const QBrush & GetBrush(StandardBrush brushType) const =0
virtual const i2d::CRect & GetTickerBox(TickerType tickerType) const =0
Get bounding box of ticker in position (0, 0).
virtual int GetLogicalLineWidth() const =0
Return width of line.
virtual void SetBrush(StandardBrush brushType, const QBrush &brush)=0
virtual void DrawTicker(QPainter &drawContext, istd::CIndex2d point, TickerType tickerType) const =0
Draw a ticker.
In this library is defined 2D view concept and standard visualisation objects.
iview::IColorSchema::TickerType operator|(iview::IColorSchema::TickerType tickerType1, iview::IColorSchema::TickerType tickerType2)

© Witold Gantzke and Kirill Lepskiy