Qwt User's Guide: qwt_plot_axis.cpp Source File

Qwt User's Guide 6.3.0

Loading...
Searching...
No Matches
qwt_plot_axis.cpp
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#include "qwt_plot.h"
11#include "qwt_scale_widget.h"
12#include "qwt_scale_map.h"
13#include "qwt_scale_div.h"
14#include "qwt_scale_engine.h"
15#include "qwt_interval.h"
16
17namespace
18{
19 class AxisData
20 {
21 public:
22 AxisData()
23 : isVisible( true )
24 , doAutoScale( true )
25 , minValue( 0.0 )
26 , maxValue( 1000.0 )
27 , stepSize( 0.0 )
28 , maxMajor( 8 )
29 , maxMinor( 5 )
30 , isValid( false )
31 , scaleEngine( new QwtLinearScaleEngine() )
32 , scaleWidget( NULL )
33 {
34 }
35
36 ~AxisData()
37 {
38 delete scaleEngine;
39 }
40
41 void initWidget( QwtScaleDraw::Alignment align, const QString& name, QwtPlot* plot )
42 {
43 scaleWidget = new QwtScaleWidget( align, plot );
44 scaleWidget->setObjectName( name );
45
46 #if 1
47 // better find the font sizes from the application font
48 const QFont fscl( plot->fontInfo().family(), 10 );
49 const QFont fttl( plot->fontInfo().family(), 12, QFont::Bold );
50 #endif
51
52 scaleWidget->setTransformation( scaleEngine->transformation() );
53
54 scaleWidget->setFont( fscl );
55 scaleWidget->setMargin( 2 );
56
57 QwtText text = scaleWidget->title();
58 text.setFont( fttl );
59 scaleWidget->setTitle( text );
60 }
61
62 bool isVisible;
63 bool doAutoScale;
64
65 double minValue;
66 double maxValue;
67 double stepSize;
68
69 int maxMajor;
70 int maxMinor;
71
72 bool isValid;
73
74 QwtScaleDiv scaleDiv;
75 QwtScaleEngine* scaleEngine;
76 QwtScaleWidget* scaleWidget;
77 };
78}
79
80class QwtPlot::ScaleData
81{
82 public:
83 ScaleData( QwtPlot* plot )
84 {
85 using namespace QwtAxis;
86
87 m_axisData[YLeft].initWidget( QwtScaleDraw::LeftScale, "QwtPlotAxisYLeft", plot );
88 m_axisData[YRight].initWidget( QwtScaleDraw::RightScale, "QwtPlotAxisYRight", plot );
89 m_axisData[XTop].initWidget( QwtScaleDraw::TopScale, "QwtPlotAxisXTop", plot );
90 m_axisData[XBottom].initWidget( QwtScaleDraw::BottomScale, "QwtPlotAxisXBottom", plot );
91 }
92
93 inline AxisData& axisData( QwtAxisId axisId )
94 {
95 return m_axisData[ axisId ];
96 }
97
98 inline const AxisData& axisData( QwtAxisId axisId ) const
99 {
100 return m_axisData[ axisId ];
101 }
102
103 private:
104 AxisData m_axisData[ QwtAxis::AxisPositions ];
105};
106
107void QwtPlot::initAxesData()
108{
109 m_scaleData = new ScaleData( this );
110
111 m_scaleData->axisData( QwtAxis::YRight ).isVisible = false;
112 m_scaleData->axisData( QwtAxis::XTop ).isVisible = false;
113}
114
115void QwtPlot::deleteAxesData()
116{
117 delete m_scaleData;
118 m_scaleData = NULL;
119}
120
132 bool QwtPlot::isAxisValid( QwtAxisId axisId ) const
133{
134 return QwtAxis::isValid( axisId );
135}
136
141 const QwtScaleWidget* QwtPlot::axisWidget( QwtAxisId axisId ) const
142{
143 if ( isAxisValid( axisId ) )
144 return m_scaleData->axisData( axisId ).scaleWidget;
145
146 return NULL;
147}
148
153 QwtScaleWidget* QwtPlot::axisWidget( QwtAxisId axisId )
154{
155 if ( isAxisValid( axisId ) )
156 return m_scaleData->axisData( axisId ).scaleWidget;
157
158 return NULL;
159}
160
169 void QwtPlot::setAxisScaleEngine( QwtAxisId axisId, QwtScaleEngine* scaleEngine )
170{
171 if ( isAxisValid( axisId ) && scaleEngine != NULL )
172 {
173 AxisData& d = m_scaleData->axisData( axisId );
174
175 delete d.scaleEngine;
176 d.scaleEngine = scaleEngine;
177
178 d.scaleWidget->setTransformation( scaleEngine->transformation() );
179
180 d.isValid = false;
181
182 autoRefresh();
183 }
184}
185
190 QwtScaleEngine* QwtPlot::axisScaleEngine( QwtAxisId axisId )
191{
192 if ( isAxisValid( axisId ) )
193 return m_scaleData->axisData( axisId ).scaleEngine;
194 else
195 return NULL;
196}
197
202 const QwtScaleEngine* QwtPlot::axisScaleEngine( QwtAxisId axisId ) const
203{
204 if ( isAxisValid( axisId ) )
205 return m_scaleData->axisData( axisId ).scaleEngine;
206 else
207 return NULL;
208}
213 bool QwtPlot::axisAutoScale( QwtAxisId axisId ) const
214{
215 if ( isAxisValid( axisId ) )
216 return m_scaleData->axisData( axisId ).doAutoScale;
217 else
218 return false;
219}
220
225 bool QwtPlot::isAxisVisible( QwtAxisId axisId ) const
226{
227 if ( isAxisValid( axisId ) )
228 return m_scaleData->axisData( axisId ).isVisible;
229 else
230 return false;
231}
232
237QFont QwtPlot::axisFont( QwtAxisId axisId ) const
238{
239 if ( isAxisValid( axisId ) )
240 return axisWidget( axisId )->font();
241 else
242 return QFont();
243
244}
245
251 int QwtPlot::axisMaxMajor( QwtAxisId axisId ) const
252{
253 if ( isAxisValid( axisId ) )
254 return m_scaleData->axisData( axisId ).maxMajor;
255 else
256 return 0;
257}
258
264 int QwtPlot::axisMaxMinor( QwtAxisId axisId ) const
265{
266 if ( isAxisValid( axisId ) )
267 return m_scaleData->axisData( axisId ).maxMinor;
268 else
269 return 0;
270}
271
283 const QwtScaleDiv& QwtPlot::axisScaleDiv( QwtAxisId axisId ) const
284{
285 if ( isAxisValid( axisId ) )
286 return m_scaleData->axisData( axisId ).scaleDiv;
287
288 static QwtScaleDiv dummyScaleDiv;
289 return dummyScaleDiv;
290}
291
298 const QwtScaleDraw* QwtPlot::axisScaleDraw( QwtAxisId axisId ) const
299{
300 if ( !isAxisValid( axisId ) )
301 return NULL;
302
303 return axisWidget( axisId )->scaleDraw();
304}
305
312 QwtScaleDraw* QwtPlot::axisScaleDraw( QwtAxisId axisId )
313{
314 if ( !isAxisValid( axisId ) )
315 return NULL;
316
317 return axisWidget( axisId )->scaleDraw();
318}
319
330 double QwtPlot::axisStepSize( QwtAxisId axisId ) const
331{
332 if ( !isAxisValid( axisId ) )
333 return 0;
334
335 return m_scaleData->axisData( axisId ).stepSize;
336}
337
348 QwtInterval QwtPlot::axisInterval( QwtAxisId axisId ) const
349{
350 if ( !isAxisValid( axisId ) )
351 return QwtInterval();
352
353 return m_scaleData->axisData( axisId ).scaleDiv.interval();
354}
355
360 QwtText QwtPlot::axisTitle( QwtAxisId axisId ) const
361{
362 if ( isAxisValid( axisId ) )
363 return axisWidget( axisId )->title();
364 else
365 return QwtText();
366}
367
380 void QwtPlot::setAxisVisible( QwtAxisId axisId, bool on )
381{
382 if ( isAxisValid( axisId ) && on != m_scaleData->axisData( axisId ).isVisible )
383 {
384 m_scaleData->axisData( axisId ).isVisible = on;
385 updateLayout();
386 }
387}
388
401 double QwtPlot::invTransform( QwtAxisId axisId, double pos ) const
402{
403 if ( isAxisValid( axisId ) )
404 return( canvasMap( axisId ).invTransform( pos ) );
405 else
406 return 0.0;
407}
408
409
418 double QwtPlot::transform( QwtAxisId axisId, double value ) const
419{
420 if ( isAxisValid( axisId ) )
421 return( canvasMap( axisId ).transform( value ) );
422 else
423 return 0.0;
424}
425
434 void QwtPlot::setAxisFont( QwtAxisId axisId, const QFont& font )
435{
436 if ( isAxisValid( axisId ) )
437 axisWidget( axisId )->setFont( font );
438}
439
453 void QwtPlot::setAxisAutoScale( QwtAxisId axisId, bool on )
454{
455 if ( isAxisValid( axisId ) && ( m_scaleData->axisData( axisId ).doAutoScale != on ) )
456 {
457 m_scaleData->axisData( axisId ).doAutoScale = on;
458 autoRefresh();
459 }
460}
461
477 void QwtPlot::setAxisScale( QwtAxisId axisId, double min, double max, double stepSize )
478{
479 if ( isAxisValid( axisId ) )
480 {
481 AxisData& d = m_scaleData->axisData( axisId );
482
483 d.doAutoScale = false;
484 d.isValid = false;
485
486 d.minValue = min;
487 d.maxValue = max;
488 d.stepSize = stepSize;
489
490 autoRefresh();
491 }
492}
493
506 void QwtPlot::setAxisScaleDiv( QwtAxisId axisId, const QwtScaleDiv& scaleDiv )
507{
508 if ( isAxisValid( axisId ) )
509 {
510 AxisData& d = m_scaleData->axisData( axisId );
511
512 d.doAutoScale = false;
513 d.scaleDiv = scaleDiv;
514 d.isValid = true;
515
516 autoRefresh();
517 }
518}
519
536 void QwtPlot::setAxisScaleDraw( QwtAxisId axisId, QwtScaleDraw* scaleDraw )
537{
538 if ( isAxisValid( axisId ) )
539 {
540 axisWidget( axisId )->setScaleDraw( scaleDraw );
541 autoRefresh();
542 }
543}
544
553 void QwtPlot::setAxisLabelAlignment( QwtAxisId axisId, Qt::Alignment alignment )
554{
555 if ( isAxisValid( axisId ) )
556 axisWidget( axisId )->setLabelAlignment( alignment );
557}
558
568 void QwtPlot::setAxisLabelRotation( QwtAxisId axisId, double rotation )
569{
570 if ( isAxisValid( axisId ) )
571 axisWidget( axisId )->setLabelRotation( rotation );
572}
573
582 void QwtPlot::setAxisMaxMinor( QwtAxisId axisId, int maxMinor )
583{
584 if ( isAxisValid( axisId ) )
585 {
586 maxMinor = qBound( 0, maxMinor, 100 );
587
588 AxisData& d = m_scaleData->axisData( axisId );
589 if ( maxMinor != d.maxMinor )
590 {
591 d.maxMinor = maxMinor;
592 d.isValid = false;
593 autoRefresh();
594 }
595 }
596}
597
606 void QwtPlot::setAxisMaxMajor( QwtAxisId axisId, int maxMajor )
607{
608 if ( isAxisValid( axisId ) )
609 {
610 maxMajor = qBound( 1, maxMajor, 10000 );
611
612 AxisData& d = m_scaleData->axisData( axisId );
613 if ( maxMajor != d.maxMajor )
614 {
615 d.maxMajor = maxMajor;
616 d.isValid = false;
617 autoRefresh();
618 }
619 }
620}
621
628 void QwtPlot::setAxisTitle( QwtAxisId axisId, const QString& title )
629{
630 if ( isAxisValid( axisId ) )
631 axisWidget( axisId )->setTitle( title );
632}
633
640 void QwtPlot::setAxisTitle( QwtAxisId axisId, const QwtText& title )
641{
642 if ( isAxisValid( axisId ) )
643 axisWidget( axisId )->setTitle( title );
644}
645
670 void QwtPlot::updateAxes()
671{
672 // Find bounding interval of the item data
673 // for all axes, where autoscaling is enabled
674
675 QwtInterval boundingIntervals[QwtAxis::AxisPositions];
676
677 const QwtPlotItemList& itmList = itemList();
678
679 QwtPlotItemIterator it;
680 for ( it = itmList.begin(); it != itmList.end(); ++it )
681 {
682 const QwtPlotItem* item = *it;
683
684 if ( !item->testItemAttribute( QwtPlotItem::AutoScale ) )
685 continue;
686
687 if ( !item->isVisible() )
688 continue;
689
690 const QwtAxisId xAxis = item->xAxis();
691 const QwtAxisId yAxis = item->yAxis();
692
693 if ( axisAutoScale( xAxis ) || axisAutoScale( yAxis ) )
694 {
695 const QRectF rect = item->boundingRect();
696
697 if ( axisAutoScale( xAxis ) && rect.width() >= 0.0 )
698 boundingIntervals[xAxis] |= QwtInterval( rect.left(), rect.right() );
699
700 if ( axisAutoScale( yAxis ) && rect.height() >= 0.0 )
701 boundingIntervals[yAxis] |= QwtInterval( rect.top(), rect.bottom() );
702 }
703 }
704
705 // Adjust scales
706
707 for ( int axisPos = 0; axisPos < QwtAxis::AxisPositions; axisPos++ )
708 {
709 {
710 const QwtAxisId axisId( axisPos );
711
712 AxisData& d = m_scaleData->axisData( axisId );
713
714 double minValue = d.minValue;
715 double maxValue = d.maxValue;
716 double stepSize = d.stepSize;
717
718 const QwtInterval& interval = boundingIntervals[axisId];
719
720 if ( d.doAutoScale && interval.isValid() )
721 {
722 d.isValid = false;
723
724 minValue = interval.minValue();
725 maxValue = interval.maxValue();
726
727 d.scaleEngine->autoScale( d.maxMajor,
728 minValue, maxValue, stepSize );
729 }
730 if ( !d.isValid )
731 {
732 d.scaleDiv = d.scaleEngine->divideScale(
733 minValue, maxValue, d.maxMajor, d.maxMinor, stepSize );
734 d.isValid = true;
735 }
736
737 QwtScaleWidget* scaleWidget = axisWidget( axisId );
738 scaleWidget->setScaleDiv( d.scaleDiv );
739
740 int startDist, endDist;
741 scaleWidget->getBorderDistHint( startDist, endDist );
742 scaleWidget->setBorderDist( startDist, endDist );
743 }
744 }
745
746 for ( it = itmList.begin(); it != itmList.end(); ++it )
747 {
748 QwtPlotItem* item = *it;
749 if ( item->testItemInterest( QwtPlotItem::ScaleInterest ) )
750 {
751 item->updateScaleDiv( axisScaleDiv( item->xAxis() ),
752 axisScaleDiv( item->yAxis() ) );
753 }
754 }
755}
QList< QwtPlotItem * >
QwtInterval
A class representing an interval.
Definition qwt_interval.h:23
QwtInterval::minValue
double minValue() const
Definition qwt_interval.h:192
QwtInterval::maxValue
double maxValue() const
Definition qwt_interval.h:198
QwtInterval::isValid
bool isValid() const
Definition qwt_interval.h:210
QwtLinearScaleEngine
A scale engine for linear scales.
Definition qwt_scale_engine.h:152
QwtPlotDict::itemList
const QwtPlotItemList & itemList() const
A QwtPlotItemList of all attached plot items.
Definition qwt_plot_dict.cpp:166
QwtPlot
A 2-D plotting widget.
Definition qwt_plot.h:79
QwtPlot::transform
double transform(QwtAxisId, double value) const
Transform a value into a coordinate in the plotting region.
Definition qwt_plot_axis.cpp:418
QwtPlot::setAxisVisible
void setAxisVisible(QwtAxisId, bool on=true)
Hide or show a specified axis.
Definition qwt_plot_axis.cpp:380
QwtPlot::axisFont
QFont axisFont(QwtAxisId) const
Definition qwt_plot_axis.cpp:237
QwtPlot::updateAxes
void updateAxes()
Rebuild the axes scales.
Definition qwt_plot_axis.cpp:670
QwtPlot::setAxisLabelAlignment
void setAxisLabelAlignment(QwtAxisId, Qt::Alignment)
Definition qwt_plot_axis.cpp:553
QwtPlot::setAxisScale
void setAxisScale(QwtAxisId, double min, double max, double stepSize=0)
Disable autoscaling and specify a fixed scale for a selected axis.
Definition qwt_plot_axis.cpp:477
QwtPlot::axisScaleEngine
QwtScaleEngine * axisScaleEngine(QwtAxisId)
Definition qwt_plot_axis.cpp:190
QwtPlot::axisStepSize
double axisStepSize(QwtAxisId) const
Return the step size parameter that has been set in setAxisScale.
Definition qwt_plot_axis.cpp:330
QwtPlot::setAxisScaleDraw
void setAxisScaleDraw(QwtAxisId, QwtScaleDraw *)
Set a scale draw.
Definition qwt_plot_axis.cpp:536
QwtPlot::setAxisLabelRotation
void setAxisLabelRotation(QwtAxisId, double rotation)
Definition qwt_plot_axis.cpp:568
QwtPlot::setAxisFont
void setAxisFont(QwtAxisId, const QFont &)
Change the font of an axis.
Definition qwt_plot_axis.cpp:434
QwtPlot::setAxisTitle
void setAxisTitle(QwtAxisId, const QString &)
Change the title of a specified axis.
Definition qwt_plot_axis.cpp:628
QwtPlot::setAxisAutoScale
void setAxisAutoScale(QwtAxisId, bool on=true)
Enable autoscaling for a specified axis.
Definition qwt_plot_axis.cpp:453
QwtPlot::setAxisScaleEngine
void setAxisScaleEngine(QwtAxisId, QwtScaleEngine *)
Definition qwt_plot_axis.cpp:169
QwtPlot::setAxisMaxMajor
void setAxisMaxMajor(QwtAxisId, int maxMajor)
Definition qwt_plot_axis.cpp:606
QwtPlot::isAxisVisible
bool isAxisVisible(QwtAxisId) const
Definition qwt_plot_axis.cpp:225
QwtPlot::axisAutoScale
bool axisAutoScale(QwtAxisId) const
Definition qwt_plot_axis.cpp:213
QwtPlot::axisInterval
QwtInterval axisInterval(QwtAxisId) const
Return the current interval of the specified axis.
Definition qwt_plot_axis.cpp:348
QwtPlot::invTransform
double invTransform(QwtAxisId, double pos) const
Definition qwt_plot_axis.cpp:401
QwtPlot::axisTitle
QwtText axisTitle(QwtAxisId) const
Definition qwt_plot_axis.cpp:360
QwtPlot::isAxisValid
bool isAxisValid(QwtAxisId) const
Definition qwt_plot_axis.cpp:132
QwtPlot::setAxisMaxMinor
void setAxisMaxMinor(QwtAxisId, int maxMinor)
Definition qwt_plot_axis.cpp:582
QwtPlot::axisWidget
const QwtScaleWidget * axisWidget(QwtAxisId) const
Definition qwt_plot_axis.cpp:141
QwtPlot::canvasMap
virtual QwtScaleMap canvasMap(QwtAxisId) const
Definition qwt_plot.cpp:800
QwtPlot::axisMaxMinor
int axisMaxMinor(QwtAxisId) const
Definition qwt_plot_axis.cpp:264
QwtPlot::updateLayout
virtual void updateLayout()
Adjust plot content to its current size.
Definition qwt_plot.cpp:577
QwtPlot::autoRefresh
void autoRefresh()
Replots the plot if autoReplot() is true.
Definition qwt_plot.cpp:289
QwtPlot::axisScaleDiv
const QwtScaleDiv & axisScaleDiv(QwtAxisId) const
Return the scale division of a specified axis.
Definition qwt_plot_axis.cpp:283
QwtPlot::setAxisScaleDiv
void setAxisScaleDiv(QwtAxisId, const QwtScaleDiv &)
Disable autoscaling and specify a fixed scale for a selected axis.
Definition qwt_plot_axis.cpp:506
QwtPlot::axisScaleDraw
const QwtScaleDraw * axisScaleDraw(QwtAxisId) const
Return the scale draw of a specified axis.
Definition qwt_plot_axis.cpp:298
QwtPlot::title
QwtText title() const
Definition qwt_plot.cpp:351
QwtPlot::axisMaxMajor
int axisMaxMajor(QwtAxisId) const
Definition qwt_plot_axis.cpp:251
QwtPlotItem
Base class for items on the plot canvas.
Definition qwt_plot_item.h:67
QwtPlotItem::yAxis
QwtAxisId yAxis() const
Return yAxis.
Definition qwt_plot_item.cpp:559
QwtPlotItem::isVisible
bool isVisible() const
Definition qwt_plot_item.cpp:470
QwtPlotItem::xAxis
QwtAxisId xAxis() const
Return xAxis.
Definition qwt_plot_item.cpp:553
QwtPlotItem::testItemInterest
bool testItemInterest(ItemInterest) const
Definition qwt_plot_item.cpp:299
QwtPlotItem::updateScaleDiv
virtual void updateScaleDiv(const QwtScaleDiv &, const QwtScaleDiv &)
Update the item to changes of the axes scale division.
Definition qwt_plot_item.cpp:665
QwtPlotItem::testItemAttribute
bool testItemAttribute(ItemAttribute) const
Definition qwt_plot_item.cpp:266
QwtPlotItem::AutoScale
@ AutoScale
Definition qwt_plot_item.h:157
QwtPlotItem::boundingRect
virtual QRectF boundingRect() const
Definition qwt_plot_item.cpp:568
QwtPlotItem::ScaleInterest
@ ScaleInterest
Definition qwt_plot_item.h:185
QwtScaleDiv
A class representing a scale division.
Definition qwt_scale_div.h:34
QwtScaleDiv::interval
QwtInterval interval() const
Definition qwt_scale_div.cpp:111
QwtScaleDraw
A class for drawing scales.
Definition qwt_scale_draw.h:36
QwtScaleDraw::Alignment
Alignment
Definition qwt_scale_draw.h:43
QwtScaleDraw::BottomScale
@ BottomScale
The scale is below.
Definition qwt_scale_draw.h:45
QwtScaleDraw::TopScale
@ TopScale
The scale is above.
Definition qwt_scale_draw.h:48
QwtScaleDraw::RightScale
@ RightScale
The scale is right.
Definition qwt_scale_draw.h:54
QwtScaleDraw::LeftScale
@ LeftScale
The scale is left.
Definition qwt_scale_draw.h:51
QwtScaleEngine
Base class for scale engines.
Definition qwt_scale_engine.h:46
QwtScaleEngine::transformation
QwtTransform * transformation() const
Definition qwt_scale_engine.cpp:265
QwtScaleEngine::autoScale
virtual void autoScale(int maxNumSteps, double &x1, double &x2, double &stepSize) const =0
QwtScaleEngine::divideScale
virtual QwtScaleDiv divideScale(double x1, double x2, int maxMajorSteps, int maxMinorSteps, double stepSize=0.0) const =0
Calculate a scale division.
QwtScaleWidget
A Widget which contains a scale.
Definition qwt_scale_widget.h:35
QwtScaleWidget::title
QwtText title() const
Definition qwt_scale_widget.cpp:372
QwtScaleWidget::setTitle
void setTitle(const QString &title)
Definition qwt_scale_widget.cpp:172
QwtScaleWidget::scaleDraw
const QwtScaleDraw * scaleDraw() const
Definition qwt_scale_widget.cpp:354
QwtScaleWidget::setTransformation
void setTransformation(QwtTransform *)
Definition qwt_scale_widget.cpp:885
QwtScaleWidget::setLabelAlignment
void setLabelAlignment(Qt::Alignment)
Change the alignment for the labels.
Definition qwt_scale_widget.cpp:296
QwtScaleWidget::getBorderDistHint
void getBorderDistHint(int &start, int &end) const
Calculate a hint for the border distances.
Definition qwt_scale_widget.cpp:815
QwtScaleWidget::setBorderDist
void setBorderDist(int dist1, int dist2)
Definition qwt_scale_widget.cpp:251
QwtScaleWidget::setLabelRotation
void setLabelRotation(double rotation)
Change the rotation for the labels. See QwtScaleDraw::setLabelRotation().
Definition qwt_scale_widget.cpp:309
QwtScaleWidget::setScaleDiv
void setScaleDiv(const QwtScaleDiv &)
Assign a scale division.
Definition qwt_scale_widget.cpp:867
QwtScaleWidget::setScaleDraw
void setScaleDraw(QwtScaleDraw *)
Definition qwt_scale_widget.cpp:326
QwtText
A class representing a text.
Definition qwt_text.h:52
QwtText::setFont
void setFont(const QFont &)
Definition qwt_text.cpp:329
QwtAxis
Definition qwt_axis.h:19
QwtAxis::YRight
@ YRight
Y axis right of the canvas.
Definition qwt_axis.h:27
QwtAxis::XTop
@ XTop
X axis above the canvas.
Definition qwt_axis.h:33
QwtAxis::XBottom
@ XBottom
X axis below the canvas.
Definition qwt_axis.h:30
QwtAxis::YLeft
@ YLeft
Y axis left of the canvas.
Definition qwt_axis.h:24
QwtAxis::isValid
bool isValid(int axisPos)
Definition qwt_axis.h:45