QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RRuler.h
Go to the documentation of this file.
1
20#ifndef RRULER_H
21#define RRULER_H
22
23#include "core_global.h"
24
25#include <Qt>
26#include <QMetaType>
27
28class QFont;
29class RGraphicsView;
30
38
39public:
41 view(NULL), orientation(Qt::Horizontal) {
42 }
43 virtual ~RRuler() {
44 }
45
46 void setGraphicsView(RGraphicsView* view);
47 Qt::Orientation getOrientation() const;
48 void setOrientation(Qt::Orientation orientation);
49
50 virtual void paintTick(int pos, bool major, const QString& label) = 0;
51
52 virtual QFont getFont() const = 0;
53
54 virtual void updateViewport() = 0;
55
56protected:
58 Qt::Orientation orientation;
59};
60
62
63#endif
Q_DECLARE_METATYPE(RMath *)
Graphics view.
Definition RGraphicsView.h:67
Abstract base class for widgets that display a ruler, usually shown at the top and left of a graphics...
Definition RRuler.h:37
virtual void paintTick(int pos, bool major, const QString &label)=0
RGraphicsView * view
Definition RRuler.h:57
Qt::Orientation orientation
Definition RRuler.h:58
virtual QFont getFont() const =0
RRuler()
Definition RRuler.h:40
virtual void updateViewport()=0
virtual ~RRuler()
Definition RRuler.h:43
#define QCADCORE_EXPORT
Definition core_global.h:10
#define NULL
Definition opennurbs_system.h:256