ACF $AcfVersion:0$
IColorSchema.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QVector>
7#include <QtGui/QPen>
8#include <QtGui/QBrush>
9#include <QtGui/QFont>
10
11// ACF includes
12#include <istd/IPolymorphic.h>
13#include <istd/CIndex2d.h>
14#include <i2d/CRect.h>
15
16
17class QPainter;
18
19
20namespace iview
21{
22
23
24
28class IColorSchema: virtual public istd::IPolymorphic
29{
30public:
58
70
76
142
143 virtual void Assign(const IColorSchema& colorSchema) = 0;
144 virtual const QPen& GetPen(StandardPen penType) const = 0;
145 virtual void SetPen(StandardPen penType, const QPen& pen) = 0;
146 virtual const QBrush& GetBrush(StandardBrush brushType) const = 0;
147 virtual void SetBrush(StandardBrush brushType, const QBrush& brush) = 0;
148 virtual const QFont& GetFont(StandardFont fontType) const = 0;
149 virtual void SetFont(StandardFont fontType, const QFont& font) = 0;
150
154 virtual void DrawTicker(QPainter& drawContext, istd::CIndex2d point, TickerType tickerType) const = 0;
155
159 virtual const i2d::CRect& GetTickerBox(TickerType tickerType) const = 0;
160
166 virtual int GetLogicalLineWidth() const = 0;
167};
168
169
171{
172 return (iview::IColorSchema::TickerType)(int(tickerType1) | int(tickerType2));
173}
174
175
176} // namespace iview
177
178
179
180
Simple rectangle with integer bounds.
Definition CRect.h:22
Index implementation for addressing elements in 2D-space.
Definition CIndex2d.h:21
Base interface for all used interfaces and implementations.
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)