VTK
vtkQtChartAxisModel.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQtChartAxisModel.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 _vtkQtChartAxisModel_h
25 #define _vtkQtChartAxisModel_h
26 
27 
28 #include "vtkQtChartExport.h"
29 #include <QObject>
30 
31 class vtkQtChartAxisModelInternal;
32 class QVariant;
33 
34 
38 class VTKQTCHART_EXPORT vtkQtChartAxisModel : public QObject
39 {
40  Q_OBJECT
41 
42 public:
46  vtkQtChartAxisModel(QObject *parent=0);
47  virtual ~vtkQtChartAxisModel();
48 
52  void addLabel(const QVariant &label);
53 
58  void insertLabel(int index, const QVariant &label);
59 
63  void removeLabel(int index);
64 
66  void removeAllLabels();
67 
78  void startModifyingData();
79 
86  void finishModifyingData();
87 
92  int getNumberOfLabels() const;
93 
98  void getLabel(int index, QVariant &label) const;
99 
105  int getLabelIndex(const QVariant &label) const;
106 
107 signals:
111  void labelInserted(int index);
112 
116  void removingLabel(int index);
117 
121  void labelRemoved(int index);
122 
124  void labelsReset();
125 
126 private:
127  vtkQtChartAxisModelInternal *Internal;
128  bool InModify;
129 };
130 
131 #endif
The vtkQtChartAxisModel class stores the labels for a chart axis.