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