Salome HOME
6e8304aa2c08a324007a4a68ff886c6463a4328e
[modules/visu.git] / src / VISUGUI / VisuGUI_StreamLinesDlg.h
1 // Copyright (C) 2007-2011  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   void storeToPrsCopy();
67
68 protected slots:
69   void accept();
70   void reject();
71
72 private slots:
73   void StepLengthChanged(double theValue);
74   void IntegrationStepChanged(double theValue);
75   void PropagationTimeChanged(double theValue);
76   void onSourceTypeChange(int theIndex);
77
78 private:
79   VISU::Mesh_ptr createMesh(VISU::VISUType theType, QString theName);
80
81     SalomeApp_DoubleSpinBox* myStepLen;
82     SalomeApp_DoubleSpinBox* myIntegStepLen;
83     SalomeApp_DoubleSpinBox* myPropTime;
84     QComboBox* myDirCombo;
85     QCheckBox* myUseScalar;
86     QtxColorButton*   SelColor;
87     //QCheckBox* myUseSrcChk;
88     QComboBox* myUseSrcCombo;
89     SalomeApp_DoubleSpinBox* myPntPercent;
90     QComboBox* mySrcCombo;
91
92     QTabWidget*            myTabBox;
93     VisuGUI_InputPane*     myInputPane;
94
95     QList<VISU::Prs3d_var> myPrsList;
96     QList<VISU::Prs3d_var> myEntityList;
97     QList<VISU::Prs3d_var> myFamilyList;
98     QList<VISU::Prs3d_var> myGroupList;
99     QStringList myEntitiesLst;
100     QStringList myFamilisLst;
101     QStringList myGroupsLst;
102     QStringList myPrsLst;
103
104     _PTR(SObject) mySelectionObj;
105     SALOME::GenericObjPtr<VISU::StreamLines_i> myPrsCopy;
106     SalomeApp_Module* myVisuGUI;
107     bool myStatus;
108
109 private slots:
110   //void setVColor();
111   void enableSetColor();
112 };
113
114 #endif  //VISUGUI_STREAMLINESDLG_H