]> SALOME platform Git repositories - modules/visu.git/blob - src/VISUGUI/VisuGUI_FindPane.h
Salome HOME
Bug IPAL21228 SIGSEGV on exit from Salome with active GaussPointsDlg
[modules/visu.git] / src / VISUGUI / VisuGUI_FindPane.h
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  VISU VISUGUI : GUI of VISU component
23 //  File   : VisuGUI_FindPane.h
24 //  Author : Oleg Uvarov
25 //  Module : VISU
26 //
27 #ifndef VISUGUI_FINDPANE_H
28 #define VISUGUI_FINDPANE_H
29
30 #include <SVTK_Selection.h>
31
32 #include <QGroupBox>
33
34 class QComboBox;
35 class QLabel;
36 class QLineEdit;
37 class QListWidget;
38 class QToolButton;
39
40 class VISU_Actor;
41
42 typedef QPair<int,int> TFindId;
43 typedef QList<TFindId> TListFindId;
44
45 //! Find pane.
46 /*!
47  * Used for filter and highlight mesh-elements by their scalar values.
48  */
49 class VisuGUI_FindPane : public QGroupBox
50 {
51   Q_OBJECT
52
53 public:
54   VisuGUI_FindPane( QWidget* theParent );
55   ~VisuGUI_FindPane();
56
57 public:
58   void             setSelectionMode( const Selection_Mode );
59   void             setActor( VISU_Actor* );
60
61 protected slots:
62   void             onConditionChanged( int );
63   void             onApply();
64
65   void             onIdChanged();
66   void             onPrevPage();
67   void             onNextPage();
68
69 private:
70   bool             isValid() const;
71   void             clearIds();
72   void             displayIds();
73
74 signals:
75   void             idChanged( int, int );
76
77 private:
78   QComboBox*       myConditionBox;
79   QLineEdit*       myLeftValue;
80   QLabel*          myDashLabel;
81   QLineEdit*       myRightValue;
82
83   QListWidget*     myIdsListWidget;
84   QLabel*          myPageLabel;
85   QToolButton*     myPrevBtn;
86   QToolButton*     myNextBtn;
87
88   int              myCurrentPage;
89   TListFindId      myIdsList;
90
91   Selection_Mode   mySelectionMode;
92   VISU_Actor*      myActor;
93 };
94
95 #endif