VTK
vtkQtChartSeriesDomainGroup.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQtChartSeriesDomainGroup.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 _vtkQtChartSeriesDomainGroup_h
25 #define _vtkQtChartSeriesDomainGroup_h
26 
27 #include "vtkQtChartExport.h"
28 #include <QList> // needed for return type
29 
30 
35 class VTKQTCHART_EXPORT vtkQtChartSeriesDomainGroup
36 {
37 public:
42  vtkQtChartSeriesDomainGroup(bool sortSeries=false);
44 
49  int getNumberOfGroups() const;
50 
56  int getNumberOfSeries(int group) const;
57 
63  QList<int> getGroup(int group) const;
64 
70  int findGroup(int series) const;
71 
76  virtual void prepareInsert(int seriesFirst, int seriesLast);
77 
82  virtual void insertSeries(int series, int group);
83 
85  void finishInsert();
86 
92  virtual int removeSeries(int series);
93 
98  virtual void finishRemoval(int seriesFirst=-1, int seriesLast=-1);
99 
101  virtual void clear();
102 
103 public:
108  static void mergeSeriesLists(QList<int> &target, const QList<int> &source);
109 
110 protected:
118  virtual void insertGroup(int group);
119 
127  virtual void removeGroup(int group);
128 
129 private:
130  QList<QList<int> > Groups;
131  QList<QList<int> > ToSort;
132  bool SortSeries;
133 };
134 
135 #endif