VTK
dox/GUISupport/Qt/Chart/vtkQtChartSeriesDomainGroup.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkQtChartSeriesDomainGroup.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 _vtkQtChartSeriesDomainGroup_h
00025 #define _vtkQtChartSeriesDomainGroup_h
00026 
00027 #include "vtkQtChartExport.h"
00028 #include <QList> // needed for return type
00029 
00030 
00035 class VTKQTCHART_EXPORT vtkQtChartSeriesDomainGroup
00036 {
00037 public:
00042   vtkQtChartSeriesDomainGroup(bool sortSeries=false);
00043   virtual ~vtkQtChartSeriesDomainGroup() {}
00044 
00049   int getNumberOfGroups() const;
00050 
00056   int getNumberOfSeries(int group) const;
00057 
00063   QList<int> getGroup(int group) const;
00064 
00070   int findGroup(int series) const;
00071 
00076   virtual void prepareInsert(int seriesFirst, int seriesLast);
00077 
00082   virtual void insertSeries(int series, int group);
00083 
00085   void finishInsert();
00086 
00092   virtual int removeSeries(int series);
00093 
00098   virtual void finishRemoval(int seriesFirst=-1, int seriesLast=-1);
00099 
00101   virtual void clear();
00102 
00103 public:
00108   static void mergeSeriesLists(QList<int> &target, const QList<int> &source);
00109 
00110 protected:
00118   virtual void insertGroup(int group);
00119 
00127   virtual void removeGroup(int group);
00128 
00129 private:
00130   QList<QList<int> > Groups; 
00131   QList<QList<int> > ToSort; 
00132   bool SortSeries;           
00133 };
00134 
00135 #endif