VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkQtChartAxisModel.h 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 _vtkQtChartAxisModel_h 00025 #define _vtkQtChartAxisModel_h 00026 00027 00028 #include "vtkQtChartExport.h" 00029 #include <QObject> 00030 00031 class vtkQtChartAxisModelInternal; 00032 class QVariant; 00033 00034 00038 class VTKQTCHART_EXPORT vtkQtChartAxisModel : public QObject 00039 { 00040 Q_OBJECT 00041 00042 public: 00046 vtkQtChartAxisModel(QObject *parent=0); 00047 virtual ~vtkQtChartAxisModel(); 00048 00052 void addLabel(const QVariant &label); 00053 00058 void insertLabel(int index, const QVariant &label); 00059 00063 void removeLabel(int index); 00064 00066 void removeAllLabels(); 00067 00078 void startModifyingData(); 00079 00086 void finishModifyingData(); 00087 00092 int getNumberOfLabels() const; 00093 00098 void getLabel(int index, QVariant &label) const; 00099 00105 int getLabelIndex(const QVariant &label) const; 00106 00107 signals: 00111 void labelInserted(int index); 00112 00116 void removingLabel(int index); 00117 00121 void labelRemoved(int index); 00122 00124 void labelsReset(); 00125 00126 private: 00127 vtkQtChartAxisModelInternal *Internal; 00128 bool InModify; 00129 }; 00130 00131 #endif