Version: 6.3.1

src/VISUGUI/VisuGUI_Panel.h

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
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 //  VISU VISUGUI : GUI of VISU component
00021 //  File   : VisuGUI_Panel.cxx
00022 //  Author : Oleg Uvarov
00023 //  Module : VISU
00024 //
00025 #ifndef VISUGUI_PANEL_H
00026 #define VISUGUI_PANEL_H
00027 
00028 #include <QtxDockWidget.h>
00029 
00030 class QScrollArea;
00031 class QPushButton;
00032 
00033 class VisuGUI;
00034 
00035 class VisuGUI_Panel : public QtxDockWidget
00036 {
00037   Q_OBJECT
00038 
00039   class MainFrame;
00040 
00041 public:
00042   enum { OKBtn      = 0x0001,
00043          ApplyBtn   = 0x0002,
00044          CloseBtn   = 0x0004,
00045          HelpBtn    = 0x0008, 
00046          AllBtn = OKBtn | ApplyBtn | CloseBtn | HelpBtn
00047   };
00048 
00049 public:
00050   VisuGUI_Panel( const QString& theName,
00051                  VisuGUI*       theModule,
00052                  QWidget*       theParent = 0,
00053                  const int      theBtns   = AllBtn ); 
00054   virtual ~VisuGUI_Panel();
00055 
00056   virtual bool              isValid( QString& theMessage );
00057   virtual void              clear();
00058 
00059 protected slots:
00060   virtual void              onOK();
00061   virtual void              onApply();
00062   virtual void              onClose();
00063   virtual void              onHelp();
00064 
00065   virtual void              onModuleActivated();
00066   virtual void              onModuleDeactivated();
00067 
00068 protected:
00069   QWidget*                  mainFrame();
00070 
00071 protected:
00072   QScrollArea*              myView;
00073   QWidget*                  myMainFrame;
00074 
00075   QPushButton*              myOK;
00076   QPushButton*              myApply;
00077   QPushButton*              myClose;
00078   QPushButton*              myHelp;
00079 
00080   VisuGUI*                  myModule;
00081 };
00082 
00083 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS