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
62
63
64
65
66
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
Generated on Sun Sep 9 2012 13:03:38 for VTK by
1.8.1.2