VTK
vtkQtChartLayer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQtChartLayer.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 _vtkQtChartLayer_h
25 #define _vtkQtChartLayer_h
26 
27 #include "vtkQtChartExport.h"
28 #include <QObject>
29 #include <QGraphicsItem>
30 
31 #include "vtkQtChartGraphicsItemTypes.h" // needed for enum
32 
33 class vtkQtChartAxis;
35 class vtkQtChartArea;
36 class QPainter;
37 
38 
43 class VTKQTCHART_EXPORT vtkQtChartLayer : public QObject, public QGraphicsItem
44 {
45  Q_OBJECT
46 
47 public:
49  {
50  BottomLeft = 0,
53  TopRight
54  };
55 
56  enum {Type = vtkQtChart_LayerType};
57 
58 public:
60  virtual ~vtkQtChartLayer() {}
61 
62  virtual int type() const {return vtkQtChartLayer::Type;}
63 
68  vtkQtChartArea *getChartArea() const {return this->ChartArea;}
69 
78  virtual void setChartArea(vtkQtChartArea *area) {this->ChartArea = area;}
79 
88  virtual void getLayerDomain(vtkQtChartLayerDomain &domain) const;
89 
98  virtual void layoutChart(const QRectF &area)=0;
99 
116  virtual bool drawItemFilter(QGraphicsItem *item, QPainter *painter);
117 
129  virtual bool getHelpText(const QPointF &point, QString &text);
130 
132  virtual void startInteractiveResize() {}
133 
135  virtual void finishInteractiveResize() {}
136 
137 signals:
139  void layoutNeeded();
140 
146  void rangeChanged();
147 
148 protected:
150 };
151 
152 #endif
Uses the bottom and right axes.
The vtkQtChartLayerDomain class is used to merge chart layer domains.
vtkQtChartArea * getChartArea() const
Gets the chart area containing this layer.
virtual ~vtkQtChartLayer()
virtual void startInteractiveResize()
Notifies the chart layer that a resize interaction has started.
The vtkQtChartLayer class is the base class for all chart drawing layers.
virtual void finishInteractiveResize()
Notifies the chart layer that a resize interaction has finished.
Uses the top and left axes.
The vtkQtChartArea class manages the chart axes and layers.
virtual int type() const
The vtkQtChartAxis class is used to display a cartesian axis.
vtkQtChartArea * ChartArea
Stores the containing chart area.
virtual void setChartArea(vtkQtChartArea *area)
Sets the chart area that contains this layer.