00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkQtChartContentsArea.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 _vtkQtChartContentsArea_h 00025 #define _vtkQtChartContentsArea_h 00026 00027 #include "vtkQtChartExport.h" 00028 #include <QGraphicsItem> 00029 00030 #include "vtkQtChartGraphicsItemTypes.h" // needed for enum 00031 00032 00033 class VTKQTCHART_EXPORT vtkQtChartContentsArea : public QGraphicsItem 00034 { 00035 public: 00036 enum {Type = vtkQtChart_ContentsAreaType}; 00037 00038 public: 00039 vtkQtChartContentsArea(QGraphicsItem *parent=0, QGraphicsScene *scene=0); 00040 virtual ~vtkQtChartContentsArea() {} 00041 00045 void setXOffset(float offset); 00046 00050 void setYOffset(float offset); 00051 00052 virtual int type() const {return vtkQtChartContentsArea::Type;} 00053 virtual QRectF boundingRect() const; 00054 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, 00055 QWidget *widget=0); 00056 00057 private: 00058 void updateMatrix(); 00059 00060 private: 00061 float XOffset; 00062 float YOffset; 00063 }; 00064 00065 #endif