Salome HOME
Merge from BR_V5_DEV 16Feb09
[modules/visu.git] / src / VISUGUI / VisuGUI_StreamLinesDlg.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 //  File   : VisuGUI_StreamLinesDlg.h
23 //  Author : Vitaly SMETANNIKOV
24 //  Module : VISU
25 //
26 #ifndef VISUGUI_STREAMLINESDLG_H
27 #define VISUGUI_STREAMLINESDLG_H
28
29 #include "VisuGUI_Prs3dDlg.h"
30
31 class QTabWidget;
32 class QCheckBox;
33 class QComboBox;
34
35
36 #include "VISUConfig.hh"
37
38 class SalomeApp_Module;
39 class VisuGUI_InputPane;
40 class QtxDoubleSpinBox;
41 class QtxColorButton;
42
43 namespace VISU
44 {
45   class StreamLines_i;
46 }
47
48 class VisuGUI_StreamLinesDlg: public VisuGUI_ScalarBarBaseDlg
49 {
50     Q_OBJECT
51 public:
52     VisuGUI_StreamLinesDlg (SalomeApp_Module* theModule);
53     ~VisuGUI_StreamLinesDlg();
54
55     virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
56                                   bool theInit );
57
58     virtual int  storeToPrsObject(VISU::ColoredPrs3d_i* thePrs);
59
60     void setColor( QColor color );
61     void enableMagnColor( bool enable );
62
63 protected:
64   virtual QString GetContextHelpFilePath();
65
66 protected slots:
67   void accept();
68   void reject();
69
70 private slots:
71   void StepLengthChanged(double theValue);
72   void IntegrationStepChanged(double theValue);
73   void PropagationTimeChanged(double theValue);
74   void onSourceTypeChange(int theIndex);
75
76 private:
77   VISU::Mesh_ptr createMesh(VISU::VISUType theType, QString theName);
78
79     QtxDoubleSpinBox* myStepLen;
80     QtxDoubleSpinBox* myIntegStepLen;
81     QtxDoubleSpinBox* myPropTime;
82     QComboBox* myDirCombo;
83     QCheckBox* myUseScalar;
84     QtxColorButton*   SelColor;
85     //QCheckBox* myUseSrcChk;
86     QComboBox* myUseSrcCombo;
87     QtxDoubleSpinBox* myPntPercent;
88     QComboBox* mySrcCombo;
89
90     QTabWidget*            myTabBox;
91     VisuGUI_InputPane*     myInputPane;
92
93     QList<VISU::Prs3d_var> myPrsList;
94     QList<VISU::Prs3d_var> myEntityList;
95     QList<VISU::Prs3d_var> myFamilyList;
96     QList<VISU::Prs3d_var> myGroupList;
97     QStringList myEntitiesLst;
98     QStringList myFamilisLst;
99     QStringList myGroupsLst;
100     QStringList myPrsLst;
101
102     _PTR(SObject) mySelectionObj;
103     SALOME::GenericObjPtr<VISU::StreamLines_i> myPrsCopy;
104     SalomeApp_Module* myVisuGUI;
105
106 private slots:
107   //void setVColor();
108   void enableSetColor();
109 };
110
111 #endif  //VISUGUI_STREAMLINESDLG_H