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 // SMESH SMESHGUI : GUI for SMESH component 00021 // File : SMESHGUI_GroupOnShapeDlg.h 00022 // Author : Edard AGAPOV 00023 // Module : SMESH 00024 // 00025 #ifndef SMESHGUI_GroupOnShapeDlg_H_H 00026 #define SMESHGUI_GroupOnShapeDlg_H_H 00027 00028 #include "SMESH_SMESHGUI.hxx" 00029 00030 #include "SMESHGUI_SelectionOp.h" 00031 00032 class QLineEdit; 00033 class QListWidget; 00034 class QPushButton; 00035 class SMESHGUI_GroupOnShapeDlg; 00036 00037 //================================================================================= 00038 // class : SMESHGUI_GroupOnShapeOp 00039 // purpose : create groups on shapes of nodes and element at once, Issue 19970 00040 //================================================================================= 00041 00042 class SMESHGUI_EXPORT SMESHGUI_GroupOnShapeOp : public SMESHGUI_SelectionOp 00043 { 00044 Q_OBJECT 00045 00046 public: 00047 SMESHGUI_GroupOnShapeOp(); 00048 ~SMESHGUI_GroupOnShapeOp(); 00049 00050 virtual LightApp_Dialog* dlg() const; 00051 static QString GetDefaultName(const QString& theOperation); 00052 00053 public slots: 00054 00055 protected: 00056 00057 virtual void startOperation(); 00058 virtual void selectionDone(); 00059 virtual SUIT_SelectionFilter* createFilter( const int ) const; 00060 //virtual bool isValid( SUIT_Operation* ) const; 00061 00062 private slots: 00063 00064 bool onApply(); 00065 void onButtonClick(); 00066 00067 00068 // void onSelectColor(); 00069 00070 00071 private: 00072 00073 void init(); 00074 // void setGroupColor( const SALOMEDS::Color& ); 00075 // SALOMEDS::Color getGroupColor() const; 00076 00077 // void setGroupQColor( const QColor& ); 00078 // QColor getGroupQColor() const; 00079 00080 // void setDefaultGroupColor(); 00081 00082 private: 00083 00084 SMESHGUI_GroupOnShapeDlg* myDlg; 00085 00086 QString myMeshID; 00087 QStringList myElemGeoIDs, myNodeGeoIDs; 00088 //GEOM::ListOfGO_var myElemGObj; 00089 }; 00090 00091 class SMESHGUI_EXPORT SMESHGUI_GroupOnShapeDlg : public SMESHGUI_Dialog 00092 { 00093 Q_OBJECT 00094 00095 public: 00096 SMESHGUI_GroupOnShapeDlg(); 00097 virtual ~SMESHGUI_GroupOnShapeDlg(); 00098 00099 public slots: 00100 00101 void updateButtons(); 00102 void init(); 00103 00104 private: 00105 00106 //QLineEdit* myGrpNameLine; 00107 00108 QPushButton* myMeshBtn; 00109 QLineEdit* myMeshLine; 00110 00111 QPushButton* myElemGeomBtn; 00112 QListWidget* myElemGeomList; 00113 00114 QPushButton* myNodeGeomBtn; 00115 QListWidget* myNodeGeomList; 00116 00117 // QPushButton* myColorBtn; 00118 00119 // bool myCreate, myIsBusy; 00120 00121 // QString myHelpFileName; 00122 00123 friend class SMESHGUI_GroupOnShapeOp; 00124 }; 00125 00126 #endif // SMESHGUI_GroupOnShapeDlg_H_H