Back to index

salome-paravis  6.5.0
pqCustomPlotSettingsModel.h
Go to the documentation of this file.
00001 // Copyright (C) 2010-2012  CEA/DEN, EDF R&D
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #ifndef __pqCustomPlotSettingsModel_h
00021 #define __pqCustomPlotSettingsModel_h
00022 
00023 #include "pqPlotSettingsModel.h"
00024 
00025 class pqDataRepresentation;
00026 
00027 class pqCustomPlotSettingsModel : public pqPlotSettingsModel
00028 {
00029   typedef pqPlotSettingsModel Superclass;
00030 
00031   Q_OBJECT
00032 
00033 public:
00034   pqCustomPlotSettingsModel(QObject* parent = 0);
00035   ~pqCustomPlotSettingsModel();
00036 
00037   void setRepresentation(pqDataRepresentation* rep);
00038   pqDataRepresentation* representation() const;
00039 
00045   virtual bool setData(const QModelIndex &index, const QVariant &value,
00046                        int role=Qt::EditRole);
00047 
00048   void SetIgnoreUnitsModeOn(bool enabled);
00049   void SetAutoSelectModeOn(bool enabled);
00050 
00051 public slots:
00052 
00053   // Description:
00054   // API to enable series.
00055   void setSeriesEnabled(int row, bool enabled);
00056 
00057 private:
00058   QString getUnit(const QString& seriesName); 
00059   
00060 private:
00061   class pqImplementation;
00062   pqImplementation* Implementation;
00063 
00064   bool IgnoreUnitsModeOn;
00065   bool AutoSelectModeOn;
00066 };
00067 
00068 #endif