Salome HOME
Merge from BR_V5_DEV 16Feb09
[modules/visu.git] / src / VISUGUI / VisuGUI_StreamLinesDlg.h
index 0b9c78b671943ae7c1d6737a5f24800b10280d81..a9997da79f45e9b7ee9b36b9e86543fc7660d8aa 100644 (file)
-//  VISU VISUGUI : GUI of VISU component
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  Copyright (C) 2003  CEA/DEN, EDF R&D
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
 //
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //  File   : VisuGUI_StreamLinesDlg.h
 //  Author : Vitaly SMETANNIKOV
 //  Module : VISU
-
+//
 #ifndef VISUGUI_STREAMLINESDLG_H
 #define VISUGUI_STREAMLINESDLG_H
 
-#include "QAD_SpinBoxDbl.h"
+#include "VisuGUI_Prs3dDlg.h"
 
-#include <qdialog.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qstringlist.h>
+class QTabWidget;
+class QCheckBox;
+class QComboBox;
 
-#include "SALOMEconfig.h"
-#include CORBA_CLIENT_HEADER(VISU_Gen)
 
-namespace VISU{
+#include "VISUConfig.hh"
+
+class SalomeApp_Module;
+class VisuGUI_InputPane;
+class QtxDoubleSpinBox;
+class QtxColorButton;
+
+namespace VISU
+{
   class StreamLines_i;
 }
 
-class VisuGUI_StreamLinesDlg: public QDialog
-{ 
+class VisuGUI_StreamLinesDlg: public VisuGUI_ScalarBarBaseDlg
+{
     Q_OBJECT
 public:
-    VisuGUI_StreamLinesDlg();
-    ~VisuGUI_StreamLinesDlg() {};
+    VisuGUI_StreamLinesDlg (SalomeApp_Module* theModule);
+    ~VisuGUI_StreamLinesDlg();
+
+    virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
+                                 bool theInit );
+
+    virtual int  storeToPrsObject(VISU::ColoredPrs3d_i* thePrs);
 
-    void initFromPrsObject(VISU::StreamLines_i* thePrs);
-    void storeToPrsObject(VISU::StreamLines_i* thePrs);
     void setColor( QColor color );
     void enableMagnColor( bool enable );
 
+protected:
+  virtual QString GetContextHelpFilePath();
+
+protected slots:
+  void accept();
+  void reject();
+
 private slots:
-  void onSelectionActive(bool theActive);
   void StepLengthChanged(double theValue);
   void IntegrationStepChanged(double theValue);
   void PropagationTimeChanged(double theValue);
   void onSourceTypeChange(int theIndex);
 
 private:
-  VISU::Mesh_var createMesh(VISU::VISUType theType, QString theName);
+  VISU::Mesh_ptr createMesh(VISU::VISUType theType, QString theName);
 
-    QAD_SpinBoxDbl* myStepLen;
-    QAD_SpinBoxDbl* myIntegStepLen;
-    QAD_SpinBoxDbl* myPropTime;
+    QtxDoubleSpinBox* myStepLen;
+    QtxDoubleSpinBox* myIntegStepLen;
+    QtxDoubleSpinBox* myPropTime;
     QComboBox* myDirCombo;
     QCheckBox* myUseScalar;
-    QPushButton*    SelColor;
-    QColor          myColor;
+    QtxColorButton*   SelColor;
     //QCheckBox* myUseSrcChk;
     QComboBox* myUseSrcCombo;
-    QAD_SpinBoxDbl* myPntPercent;
+    QtxDoubleSpinBox* myPntPercent;
     QComboBox* mySrcCombo;
-    QValueList<VISU::Prs3d_var> myPrsList;
-    QValueList<VISU::Prs3d_var> myEntityList;
-    QValueList<VISU::Prs3d_var> myFamilyList;
-    QValueList<VISU::Prs3d_var> myGroupList;
+
+    QTabWidget*            myTabBox;
+    VisuGUI_InputPane*     myInputPane;
+
+    QList<VISU::Prs3d_var> myPrsList;
+    QList<VISU::Prs3d_var> myEntityList;
+    QList<VISU::Prs3d_var> myFamilyList;
+    QList<VISU::Prs3d_var> myGroupList;
     QStringList myEntitiesLst;
     QStringList myFamilisLst;
     QStringList myGroupsLst;
     QStringList myPrsLst;
-    SALOMEDS::SObject_var mySelectionObj;
+
+    _PTR(SObject) mySelectionObj;
+    SALOME::GenericObjPtr<VISU::StreamLines_i> myPrsCopy;
+    SalomeApp_Module* myVisuGUI;
 
 private slots:
-  void setVColor();
+  //void setVColor();
   void enableSetColor();
 };