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_FindPane.h 00022 // Author : Oleg Uvarov 00023 // Module : VISU 00024 // 00025 #ifndef VISUGUI_FINDPANE_H 00026 #define VISUGUI_FINDPANE_H 00027 00028 #include <SVTK_Selection.h> 00029 00030 #include <QGroupBox> 00031 00032 class QComboBox; 00033 class QLabel; 00034 class QLineEdit; 00035 class QListWidget; 00036 class QToolButton; 00037 00038 class VISU_Actor; 00039 00040 typedef QPair<int,int> TFindId; 00041 typedef QList<TFindId> TListFindId; 00042 00044 00047 class VisuGUI_FindPane : public QGroupBox 00048 { 00049 Q_OBJECT 00050 00051 public: 00052 VisuGUI_FindPane( QWidget* theParent ); 00053 ~VisuGUI_FindPane(); 00054 00055 public: 00056 void setSelectionMode( const Selection_Mode ); 00057 void setActor( VISU_Actor* ); 00058 00059 protected slots: 00060 void onConditionChanged( int ); 00061 void onApply(); 00062 00063 void onIdChanged(); 00064 void onPrevPage(); 00065 void onNextPage(); 00066 00067 private: 00068 bool isValid() const; 00069 void clearIds(); 00070 void displayIds(); 00071 00072 signals: 00073 void idChanged( int, int ); 00074 00075 private: 00076 QComboBox* myConditionBox; 00077 QLineEdit* myLeftValue; 00078 QLabel* myDashLabel; 00079 QLineEdit* myRightValue; 00080 00081 QListWidget* myIdsListWidget; 00082 QLabel* myPageLabel; 00083 QToolButton* myPrevBtn; 00084 QToolButton* myNextBtn; 00085 00086 int myCurrentPage; 00087 TListFindId myIdsList; 00088 00089 Selection_Mode mySelectionMode; 00090 VISU_Actor* myActor; 00091 }; 00092 00093 #endif