VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
GUISupport
Qt
Chart
vtkQtChartAxisLayer.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkQtChartAxisLayer.h
5
6
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
All rights reserved.
8
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10
This software is distributed WITHOUT ANY WARRANTY; without even
11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
PURPOSE. See the above copyright notice for more information.
13
14
=========================================================================*/
15
/*-------------------------------------------------------------------------
16
Copyright 2008 Sandia Corporation.
17
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18
the U.S. Government retains certain rights in this software.
19
-------------------------------------------------------------------------*/
20
23
24
#ifndef _vtkQtChartAxisLayer_h
25
#define _vtkQtChartAxisLayer_h
26
27
#include "vtkQtChartExport.h"
28
#include "
vtkQtChartLayer.h
"
29
#include "
vtkQtChartAxis.h
"
// Needed for enum
30
31
class
vtkQtChartAxisDomain
;
32
class
vtkQtChartAxisDomainPriority
;
33
class
vtkQtChartAxisLayerItem;
34
class
QFont;
35
class
QGraphicsRectItem;
36
37
41
class
VTKQTCHART_EXPORT
vtkQtChartAxisLayer
:
public
vtkQtChartLayer
42
{
43
Q_OBJECT
44
45
public
:
46
enum
AxisBehavior
47
{
48
ChartSelect = 0,
49
BestFit
,
50
FixedInterval
51
};
52
53
enum
{Type =
vtkQtChart_AxisLayerType
};
54
55
public
:
56
vtkQtChartAxisLayer
();
57
virtual
~
vtkQtChartAxisLayer
();
58
60
61
vtkQtChartAxis
*getAxis(
vtkQtChartAxis::AxisLocation
location
)
const
;
67
73
vtkQtChartAxis
*getHorizontalAxis(
vtkQtChartLayer::AxesCorner
axes)
const
;
74
80
vtkQtChartAxis
*getVerticalAxis(
vtkQtChartLayer::AxesCorner
axes)
const
;
81
87
AxisBehavior getAxisBehavior(
vtkQtChartAxis::AxisLocation
location
)
const
;
88
93
void
setAxisBehavior(
vtkQtChartAxis::AxisLocation
location
,
94
AxisBehavior behavior);
95
101
const
vtkQtChartAxisDomainPriority
&getAxisDomainPriority(
102
vtkQtChartAxis::AxisLocation
location
)
const
;
103
108
void
setAxisDomainPriority(
vtkQtChartAxis::AxisLocation
location
,
109
const
vtkQtChartAxisDomainPriority
&
priority
);
111
123
virtual
void
layoutChart
(
const
QRectF &area);
124
132
virtual
void
setChartArea
(
vtkQtChartArea
*area);
133
138
QRectF
getLayerBounds
()
const
{
return
this->LayerBounds;}
139
140
virtual
QRectF boundingRect()
const
;
141
virtual
void
paint(QPainter *painter,
const
QStyleOptionGraphicsItem *option,
142
QWidget *widget=0);
143
144
public
slots:
146
void
handleChartRangeChange();
147
149
void
cancelChartRangeChange();
150
151
private
:
153
void
setupAxesCorner();
154
160
vtkQtChartAxis::AxisDomain
getAxisDomain(
161
vtkQtChartAxis::AxisLocation
location
)
const
;
162
169
vtkQtChartLayer::AxesCorner
getCorner(
vtkQtChartAxis::AxisLocation
first,
170
vtkQtChartAxis::AxisLocation
second)
const
;
171
179
void
findAxisDomain(
vtkQtChartAxis::AxisLocation
axis,
180
vtkQtChartAxis::AxisLocation
neighbor,
181
vtkQtChartAxis::AxisDomain
neighborDomain,
182
const
vtkQtChartLayerDomain
&layerDomain,
183
vtkQtChartAxisDomain
&axisDomain)
const
;
184
185
private
:
186
QRectF LayerBounds;
187
QGraphicsRectItem *Border;
188
vtkQtChartAxis
*Axis[4];
189
vtkQtChartAxisLayerItem *Option[4];
190
bool
RangeChanged;
191
192
private
:
193
vtkQtChartAxisLayer
(
const
vtkQtChartAxisLayer
&);
194
vtkQtChartAxisLayer
&operator=(
const
vtkQtChartAxisLayer
&);
195
};
196
197
#endif
vtkQtChartLayer::AxesCorner
AxesCorner
Definition:
vtkQtChartLayer.h:48
vtkX3D::location
Definition:
vtkX3D.h:406
vtkQtChartLayerDomain
The vtkQtChartLayerDomain class is used to merge chart layer domains.
Definition:
vtkQtChartLayerDomain.h:37
vtkQtChartAxis::AxisDomain
AxisDomain
Definition:
vtkQtChartAxis.h:58
vtkQtChartAxisDomainPriority
The vtkQtChartAxisDomainPriority class stores the domain priority order.
Definition:
vtkQtChartAxisDomainPriority.h:35
vtkQtChartAxisDomain
The vtkQtChartAxisDomain class is used to merge similar domains for an axis.
Definition:
vtkQtChartAxisDomain.h:37
vtkQtChartLayer::layoutChart
virtual void layoutChart(const QRectF &area)=0
Used to layout the chart layer.
vtkQtChartAxisLayer::getLayerBounds
QRectF getLayerBounds() const
Gets the area inside the chart axes.
Definition:
vtkQtChartAxisLayer.h:138
vtkQtChartAxisLayer
The vtkQtChartAxisLayer class is used to display the chart axes.
Definition:
vtkQtChartAxisLayer.h:41
vtkQtChartLayer.h
vtkQtChartLayer
The vtkQtChartLayer class is the base class for all chart drawing layers.
Definition:
vtkQtChartLayer.h:43
vtkQtChartAxisLayer::AxisBehavior
AxisBehavior
Definition:
vtkQtChartAxisLayer.h:46
vtkQtChartArea
The vtkQtChartArea class manages the chart axes and layers.
Definition:
vtkQtChartArea.h:44
vtkQtChartAxis::AxisLocation
AxisLocation
Definition:
vtkQtChartAxis.h:50
vtkQtChartAxis
The vtkQtChartAxis class is used to display a cartesian axis.
Definition:
vtkQtChartAxis.h:45
vtkX3D::priority
Definition:
vtkX3D.h:450
vtkQtChartAxis.h
vtkQtChartLayer::setChartArea
virtual void setChartArea(vtkQtChartArea *area)
Sets the chart area that contains this layer.
Definition:
vtkQtChartLayer.h:78
vtkQtChart_AxisLayerType
Definition:
vtkQtChartGraphicsItemTypes.h:33
vtkQtChartAxisLayer::BestFit
The axis labels are determined by space.
Definition:
vtkQtChartAxisLayer.h:49
Generated on Sat Sep 13 2014 22:26:18 for VTK by
1.8.8