• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/GUISupport/Qt/Chart/vtkQtChartLegendModel.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkQtChartLegendModel.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 _vtkQtChartLegendModel_h
00025 #define _vtkQtChartLegendModel_h
00026 
00027 
00028 #include "vtkQtChartExport.h"
00029 #include <QObject>
00030 #include <QPixmap> // Needed for return type
00031 #include <QString> // Needed for return type
00032 
00033 class vtkQtChartLegendModelInternal;
00034 class vtkQtPointMarker;
00035 class QPen;
00036 
00037 
00041 class VTKQTCHART_EXPORT vtkQtChartLegendModel : public QObject
00042 {
00043   Q_OBJECT
00044 
00045 public:
00049   vtkQtChartLegendModel(QObject *parent=0);
00050   virtual ~vtkQtChartLegendModel();
00051 
00058   int addEntry(const QPixmap &icon, const QString &text);
00059 
00067   int insertEntry(int index, const QPixmap &icon, const QString &text);
00068 
00072   void removeEntry(int index);
00073 
00075   void removeAllEntries();
00076 
00087   void startModifyingData();
00088 
00095   void finishModifyingData();
00096 
00101   int getNumberOfEntries() const;
00102 
00109   int getIndexForId(unsigned int id) const;
00110 
00117   QPixmap getIcon(int index) const;
00118 
00123   void setIcon(int index, const QPixmap &icon);
00124 
00131   QString getText(int index) const;
00132 
00137   void setText(int index, const QString &text);
00138 
00139 signals:
00143   void entryInserted(int index);
00144 
00148   void removingEntry(int index);
00149 
00153   void entryRemoved(int index);
00154 
00156   void entriesReset();
00157 
00161   void iconChanged(int index);
00162 
00166   void textChanged(int index);
00167 
00168 private:
00169   vtkQtChartLegendModelInternal *Internal; 
00170   bool InModify;                        
00171 };
00172 
00173 #endif

Generated by  doxygen 1.7.1