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_BasePanel.cxx 00022 // Author : Oleg Uvarov 00023 // Module : VISU 00024 // 00025 #ifndef VISUGUI_BASEPANEL_H 00026 #define VISUGUI_BASEPANEL_H 00027 00028 #include <QGroupBox> 00029 00030 class QScrollArea; 00031 class QPushButton; 00032 00033 class VisuGUI_BasePanel : public QGroupBox 00034 { 00035 Q_OBJECT 00036 00037 class MainFrame; 00038 00039 public: 00040 enum { OKBtn = 0x0001, 00041 ApplyBtn = 0x0002, 00042 CloseBtn = 0x0004, 00043 HelpBtn = 0x0008, 00044 AllBtn = OKBtn | ApplyBtn | CloseBtn | HelpBtn 00045 }; 00046 00047 public: 00048 VisuGUI_BasePanel( const QString& theName, QWidget* theParent, const int theBtns = AllBtn ); 00049 virtual ~VisuGUI_BasePanel(); 00050 00051 virtual bool isValid( QString& theMessage ); 00052 virtual void clear(); 00053 00054 signals: 00055 void bpOk(); 00056 void bpApply(); 00057 void bpClose(); 00058 void bpHelp(); 00059 00060 protected slots: 00061 virtual void onOK(); 00062 virtual void onApply(); 00063 virtual void onClose(); 00064 virtual void onHelp(); 00065 00066 protected: 00067 QFrame* mainFrame(); 00068 00069 protected: 00070 QScrollArea* myView; 00071 QFrame* myMainFrame; 00072 00073 QPushButton* myOK; 00074 QPushButton* myApply; 00075 QPushButton* myClose; 00076 QPushButton* myHelp; 00077 }; 00078 00079 #endif