ACF $AcfVersion:0$
IRuler.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/QPair>
7
8// ACF includes
9#include <istd/IChangeable.h>
10
11#include <i2d/CLine2d.h>
12
13
14namespace iview
15{
16
17
23class IRuler: virtual public istd::IChangeable
24{
25public:
26 typedef QPair<double, double> Mark;
27
31 virtual void Reset() = 0;
32
36 virtual void Clear() = 0;
37
42 virtual int GetLevelsCount() const = 0;
43
48 virtual void SetLevelsCount(int count) = 0;
49
53 virtual i2d::CLine2d GetScreenLine() const = 0;
54
58 virtual void ReserveLevelSpace(int levelIndex, int marksCount) = 0;
59
63 virtual int GetMarksCount(int levelIndex) const = 0;
64
70 virtual Mark GetMark(int markIndex, int levelIndex) const = 0;
71
76 virtual void InsertMark(int levelIndex, const Mark& mark) = 0;
77};
78
79
80} // namespace iview
81
82
83
Definition of a line in 2D-space.
Definition CLine2d.h:25
Common interface for data model objects, which can be changed.
Definition IChangeable.h:28
Interface for ruler implementation.
Definition IRuler.h:24
virtual void InsertMark(int levelIndex, const Mark &mark)=0
Insert new mark.
QPair< double, double > Mark
Definition IRuler.h:26
virtual void SetLevelsCount(int count)=0
Set levels count.
virtual void ReserveLevelSpace(int levelIndex, int marksCount)=0
Reserve marks space to optimize insert operation.
virtual void Clear()=0
Remove all marks, but doesn't change reserved space.
virtual void Reset()=0
Set levels count to 0 and remove all marks.
virtual i2d::CLine2d GetScreenLine() const =0
Get pixels range, that adequate mark value.
virtual int GetMarksCount(int levelIndex) const =0
Get count of marks on specified level.
virtual int GetLevelsCount() const =0
Get count of levels.
virtual Mark GetMark(int markIndex, int levelIndex) const =0
Get a mark.
In this library is defined 2D view concept and standard visualisation objects.