00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkQtChartLayer.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00020 00023 00024 #ifndef _vtkQtChartLayer_h 00025 #define _vtkQtChartLayer_h 00026 00027 #include "vtkQtChartExport.h" 00028 #include <QObject> 00029 #include <QGraphicsItem> 00030 00031 #include "vtkQtChartGraphicsItemTypes.h" // needed for enum 00032 00033 class vtkQtChartAxis; 00034 class vtkQtChartLayerDomain; 00035 class vtkQtChartArea; 00036 class QPainter; 00037 00038 00043 class VTKQTCHART_EXPORT vtkQtChartLayer : public QObject, public QGraphicsItem 00044 { 00045 Q_OBJECT 00046 00047 public: 00048 enum AxesCorner 00049 { 00050 BottomLeft = 0, 00051 BottomRight, 00052 TopLeft, 00053 TopRight 00054 }; 00055 00056 enum {Type = vtkQtChart_LayerType}; 00057 00058 public: 00059 vtkQtChartLayer(); 00060 virtual ~vtkQtChartLayer() {} 00061 00062 virtual int type() const {return vtkQtChartLayer::Type;} 00063 00068 vtkQtChartArea *getChartArea() const {return this->ChartArea;} 00069 00078 virtual void setChartArea(vtkQtChartArea *area) {this->ChartArea = area;} 00079 00088 virtual void getLayerDomain(vtkQtChartLayerDomain &domain) const; 00089 00098 virtual void layoutChart(const QRectF &area)=0; 00099 00116 virtual bool drawItemFilter(QGraphicsItem *item, QPainter *painter); 00117 00129 virtual bool getHelpText(const QPointF &point, QString &text); 00130 00132 virtual void startInteractiveResize() {} 00133 00135 virtual void finishInteractiveResize() {} 00136 00137 signals: 00139 void layoutNeeded(); 00140 00146 void rangeChanged(); 00147 00148 protected: 00149 vtkQtChartArea *ChartArea; 00150 }; 00151 00152 #endif