QCAD Application Framework
CAD Application Development and Automation.
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
RRulerQt.h
Go to the documentation of this file.
1
#ifndef RRULERQT_H
2
#define RRULERQT_H
3
4
#include <QFrame>
5
#include <QMetaType>
6
7
#include "
RCoordinateListener.h
"
8
#include "
RRuler.h
"
9
#include "
RVector.h
"
10
11
class
RGraphicsView
;
12
class
RDocumentInterface
;
13
20
class
RRulerQt
:
public
QFrame,
public
RRuler
,
public
RCoordinateListener
{
21
22
Q_OBJECT
23
Q_PROPERTY(Qt::Orientation
orientation
READ
getOrientation
WRITE
setOrientation
);
24
25
public
:
26
RRulerQt
(QWidget* parent=0);
27
virtual
~RRulerQt
();
28
29
virtual
void
setOrientation
(Qt::Orientation
orientation
);
30
31
virtual
QSize
sizeHint
()
const
;
32
33
virtual
void
paintTick
(
int
pos,
bool
major,
const
QString& label);
34
35
virtual
QFont
getFont
()
const
;
36
37
void
updateViewport
();
38
39
virtual
void
updateCoordinate
(
RDocumentInterface
* documentInterface);
40
41
protected
:
42
void
paintEvent
(QPaintEvent *);
43
44
private
:
45
QPainter *
painter
;
46
QImage
buffer
;
47
QSize
lastSize
;
48
bool
viewportChanged
;
49
QPainterPath
cursorArrow
;
50
RVector
cursorPosition
;
51
mutable
QSize
hint
;
52
};
53
54
Q_DECLARE_METATYPE
(
RRulerQt
*)
55
56
#endif
src
gui
RRulerQt.h
Generated on Tue Jun 26 2012 18:41:08 for QCAD Application Framework by
1.8.1.1