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,
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);
246 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;