24 #ifndef _vtkQtChartAxis_h
25 #define _vtkQtChartAxis_h
27 #include "vtkQtChartExport.h"
29 #include <QGraphicsItem>
33 class vtkQtChartAxisInternal;
38 class QGraphicsLineItem;
45 class VTKQTCHART_EXPORT
vtkQtChartAxis :
public QObject,
public QGraphicsItem
60 UnsupportedDomain = -1,
81 AxisLocation getLocation()
const {
return this->Location;}
128 void setDataAvailable(
bool available);
135 bool isBestFitGenerated()
const;
141 void setBestFitGenerated(
bool on);
147 void getBestFitRange(QVariant &min, QVariant &
max)
const;
153 void setBestFitRange(
const QVariant &min,
const QVariant &
max);
164 bool isRangePaddingUsed()
const;
169 void setRangePaddingUsed(
bool padRange);
181 bool isExpansionToZeroUsed()
const;
186 void setExpansionToZeroUsed(
bool expand);
199 bool isExtraSpaceUsed()
const;
206 void setExtraSpaceUsed(
bool addSpace);
212 bool isSpaceTooSmall()
const;
217 void setSpaceTooSmall(
bool tooSmall);
240 void layoutAxis(
const QRectF &area);
254 void adjustAxisLayout();
266 float getPreferredSpace()
const;
272 float getFontHeight()
const;
281 float getMaxLabelWidth()
const;
287 float getTickLength()
const;
293 float getSmallTickLength()
const;
299 float getTickLabelSpacing()
const;
305 bool isLogScaleAvailable()
const;
312 virtual void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option,
318 virtual QRectF boundingRect()
const;
328 QRectF getBounds()
const;
335 bool isLabelTickVisible(
int index)
const;
342 float getLabelLocation(
int index)
const;
348 AxisDomain getAxisDomain()
const;
355 bool isValueInDomain(
const QVariant &
value)
const;
365 float getPixel(
const QVariant &
value)
const;
376 float getZeroPixel()
const;
386 static bool isLogScaleValid(
const QVariant &min,
const QVariant &
max);
399 void pixelScaleChanged();
408 void setOffset(
float offset);
412 void handleFontChange();
415 void handlePresentationChange();
418 void handleColorChange();
421 void handleAxisScaleChange();
426 void insertLabel(
int index);
431 void startLabelRemoval(
int index);
436 void finishLabelRemoval(
int index);
449 float getLabelWidthGuess(
const QVariant &minimum,
450 const QVariant &maximum)
const;
455 void generateLabels(
const QRectF &contents);
460 void generateLogLabels(
const QRectF &contents);
466 vtkQtChartAxisInternal *Internal;
The vtkQtChartAxisOptions class stores the drawing options for a chart axis.
The axis is on the bottom of the chart.
The vtkQtChartContentsSpace class defines the contents space for a chart.
The vtkQtChartAxisModel class stores the labels for a chart axis.
vtkQtChartAxisModel * getModel() const
Gets the chart axis model.
The axis is on the right of the chart.
static const double MinLogValue
Stores the log scale minimum.
Domain for QDate and QDateTime.
The vtkQtChartAxis class is used to display a cartesian axis.