IRuler.h
Go to the documentation of this file.
1 #ifndef iview_IRuler_included
2 #define iview_IRuler_included
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 
14 namespace iview
15 {
16 
17 
23 class IRuler: virtual public istd::IChangeable
24 {
25 public:
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 #endif // !iview_IRuler_included
84 
virtual int GetLevelsCount() const =0
Get count of levels.
virtual void SetLevelsCount(int count)=0
Set levels count.
Definition of a line in 2D-space.
Definition: CLine2d.h:24
virtual i2d::CLine2d GetScreenLine() const =0
Get pixels range, that adequate mark value.
virtual void Reset()=0
Set levels count to 0 and remove all marks.
virtual void Clear()=0
Remove all marks, but doesn't change reserved space.
Common interface for data model objects, which can be changed.
Definition: IChangeable.h:24
QPair< double, double > Mark
Definition: IRuler.h:26
virtual int GetMarksCount(int levelIndex) const =0
Get count of marks on specified level.
virtual Mark GetMark(int markIndex, int levelIndex) const =0
Get a mark.
virtual void InsertMark(int levelIndex, const Mark &mark)=0
Insert new mark.
virtual void ReserveLevelSpace(int levelIndex, int marksCount)=0
Reserve marks space to optimize insert operation.
Interface for ruler implementation.
Definition: IRuler.h:23

© 2007-2017 Witold Gantzke and Kirill Lepskiy