Back to index

salome-paravis  6.5.0
MyView.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 _MyView_h
00021 #define _MyView_h
00022 
00023 #include "pqView.h"
00024 #include <QMap>
00025 #include <QColor>
00026 class QLabel;
00027 
00029 class MyView : public pqView
00030 {
00031   Q_OBJECT
00032 public:
00035   MyView(const QString& viewtypemodule, 
00036          const QString& group, 
00037          const QString& name, 
00038          vtkSMViewProxy* viewmodule, 
00039          pqServer* server, 
00040          QObject* p);
00041   ~MyView();
00042 
00044   bool saveImage(int, int, const QString& ) { return false; }
00045   vtkImageData* captureImage(int) { return NULL; }
00046   vtkImageData* captureImage(const QSize&) { return NULL; }
00047 
00049   QWidget* getWidget();
00050 
00052   bool canDisplay(pqOutputPort* opPort) const;
00053 
00055   void setBackground(const QColor& col);
00056   QColor background() const;
00057 
00058 protected slots:
00060   void onRepresentationAdded(pqRepresentation*);
00061   void onRepresentationRemoved(pqRepresentation*);
00062 
00063 protected:
00064 
00065   QWidget* MyWidget;
00066   QMap<pqRepresentation*, QLabel*> Labels;
00067 
00068 };
00069 
00070 #endif // _MyView_h
00071