3rdparty
qwt
src
qwt_abstract_scale_draw.h
Go to the documentation of this file.
1
/******************************************************************************
2
* Qwt Widget Library
3
* Copyright (C) 1997 Josef Wilgen
4
* Copyright (C) 2002 Uwe Rathmann
5
*
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the Qwt License, Version 1.0
8
*****************************************************************************/
9
10
#ifndef QWT_ABSTRACT_SCALE_DRAW_H
11
#define QWT_ABSTRACT_SCALE_DRAW_H
12
13
#include "
qwt_global.h
"
14
#include "
qwt_scale_div.h
"
15
16
class
QwtText
;
17
class
QPalette;
18
class
QPainter;
19
class
QFont;
20
class
QwtTransform
;
21
class
QwtScaleMap
;
22
31
class
QWT_EXPORT
QwtAbstractScaleDraw
32
{
33
public
:
34
39
enum
ScaleComponent
40
{
42
Backbone = 0x01,
43
45
Ticks = 0x02,
46
48
Labels = 0x04
49
};
50
51
Q_DECLARE_FLAGS( ScaleComponents, ScaleComponent )
52
53
QwtAbstractScaleDraw
();
54
virtual
~
QwtAbstractScaleDraw
();
55
56
void
setScaleDiv(
const
QwtScaleDiv
& );
57
const
QwtScaleDiv
& scaleDiv()
const
;
58
59
void
setTransformation(
QwtTransform
* );
60
const
QwtScaleMap
& scaleMap()
const
;
61
QwtScaleMap
& scaleMap();
62
63
void
enableComponent( ScaleComponent,
bool
enable
=
true
);
64
bool
hasComponent( ScaleComponent )
const
;
65
66
void
setTickLength(
QwtScaleDiv::TickType
,
double
length );
67
double
tickLength(
QwtScaleDiv::TickType
)
const
;
68
double
maxTickLength()
const
;
69
70
void
setSpacing(
double
);
71
double
spacing()
const
;
72
73
void
setPenWidthF( qreal width );
74
qreal penWidthF()
const
;
75
76
virtual
void
draw( QPainter*,
const
QPalette& )
const
;
77
78
virtual
QwtText
label(
double
)
const
;
79
92
virtual
double
extent(
const
QFont& font )
const
= 0;
93
94
void
setMinimumExtent(
double
);
95
double
minimumExtent()
const
;
96
97
void
invalidateCache();
98
99
protected
:
109
virtual
void
drawTick
( QPainter* painter,
double
value,
double
len )
const
= 0;
110
117
virtual
void
drawBackbone
( QPainter* painter )
const
= 0;
118
127
virtual
void
drawLabel( QPainter* painter,
double
value )
const
= 0;
128
129
const
QwtText
& tickLabel(
const
QFont&,
double
value )
const
;
130
131
private
:
132
Q_DISABLE_COPY(
QwtAbstractScaleDraw
)
133
134
class
PrivateData
;
135
PrivateData
* m_data;
136
};
137
138
Q_DECLARE_OPERATORS_FOR_FLAGS(
QwtAbstractScaleDraw
::ScaleComponents )
139
140
#endif
qwt_scale_div.h
QwtTransform
A transformation between coordinate systems.
Definition:
qwt_transform.h:35
qwt_global.h
QwtScaleRendererReal::drawBackbone
void drawBackbone(QPainter *painter, const QwtScaleDraw *scaleDraw)
Definition:
qwt_scale_draw.cpp:60
QwtAbstractScaleDraw::ScaleComponent
ScaleComponent
Definition:
qwt_abstract_scale_draw.h:39
QwtText
A class representing a text.
Definition:
qwt_text.h:51
QwtAbstractScaleDraw
A abstract base class for drawing scales.
Definition:
qwt_abstract_scale_draw.h:31
sol::meta::enable
std::enable_if_t< all< Args... >::value, enable_t > enable
Definition:
sol.hpp:2244
QwtAbstractScaleDraw::PrivateData
Definition:
qwt_abstract_scale_draw.cpp:22
QwtScaleMap
A scale map.
Definition:
qwt_scale_map.h:26
QwtScaleRendererReal::drawTick
void drawTick(QPainter *painter, const QwtScaleDraw *scaleDraw, qreal tickPos, qreal tickLength)
Definition:
qwt_scale_draw.cpp:100
QwtScaleDiv::TickType
TickType
Scale tick types.
Definition:
qwt_scale_div.h:37
QWT_EXPORT
#define QWT_EXPORT
Definition:
qwt_global.h:38
QwtScaleDiv
A class representing a scale division.
Definition:
qwt_scale_div.h:33
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45