--- /dev/null
+// VISU VISUGUI : GUI of VISU component
+//
+// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+// File : VisuGUI_MagnitudeDlg.cxx
+// Author : Laurent CORNABE & Hubert ROLLAND
+// Module : VISU
+// $Header$
+
+#include "VisuGUI_GaussPointsDlg.h"
+
+#include "VisuGUI_Tools.h"
+
+#include "VISU_GaussPoints_i.hh"
+
+#include "SalomeApp_Module.h"
+#include "SUIT_Desktop.h"
+
+#include "QtxDblSpinBox.h"
+
+#include <qlayout.h>
+#include <qtabwidget.h>
+
+using namespace std;
+
+/*!
+ * Constructor
+ */
+VisuGUI_GaussPointsDlg::VisuGUI_GaussPointsDlg(SalomeApp_Module* theModule, bool SetPref):
+ QDialog(VISU::GetDesktop(theModule),
+ "VisuGUI_GaussPointsDlg", true,
+ WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+{
+ setName("VisuGUI_ScalarBarDlg");
+ setCaption(SetPref ? tr("DLG_PREF_TITLE") : tr("DLG_PROP_TITLE"));
+ setSizeGripEnabled(TRUE);
+
+ QVBoxLayout* TopLayout = new QVBoxLayout(this);
+ TopLayout->setSpacing(6);
+ TopLayout->setMargin(11);
+
+ myScalarPane = new VisuGUI_ScalarBarPane(this, SetPref);
+ TopLayout->addWidget(myScalarPane);
+
+ // Common buttons ===========================================================
+ QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
+ GroupButtons->setColumnLayout(0, Qt::Vertical );
+ GroupButtons->layout()->setSpacing( 0 );
+ GroupButtons->layout()->setMargin( 0 );
+ QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+ GroupButtonsLayout->setAlignment( Qt::AlignTop );
+ GroupButtonsLayout->setSpacing( 6 );
+ GroupButtonsLayout->setMargin( 11 );
+
+ QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons, "buttonOk" );
+ buttonOk->setAutoDefault( TRUE );
+ buttonOk->setDefault( TRUE );
+ GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
+ GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
+
+ QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons, "buttonCancel" );
+ buttonCancel->setAutoDefault( TRUE );
+ GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
+
+ TopLayout->addWidget( GroupButtons );
+
+ connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
+ connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
+}
+
+void VisuGUI_GaussPointsDlg::initFromPrsObject (VISU::GaussPoints_i* thePrs)
+{
+ myScalarPane->initFromPrsObject(thePrs);
+}
+
+int VisuGUI_GaussPointsDlg::storeToPrsObject(VISU::GaussPoints_i* thePrs)
+{
+ return myScalarPane->storeToPrsObject(thePrs);
+}
+
+void VisuGUI_GaussPointsDlg::accept() {
+ if (myScalarPane->check()) QDialog::accept();
+}
--- /dev/null
+// VISU VISUGUI : GUI of VISU component
+//
+// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+// File : VisuGUI_MagnitudeDlg.h
+// Author : Laurent CORNABE & Hubert ROLLAND
+// Module : VISU
+// $Header$
+
+#ifndef VISUGUI_GAUSSPOINTSDLS_H
+#define VISUGUI_GAUSSPOINTSDLS_H
+
+#include "VisuGUI_ScalarBarDlg.h"
+
+
+#include <qdialog.h>
+#include <qgroupbox.h>
+#include <qcheckbox.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+
+class SalomeApp_Module;
+
+namespace VISU
+{
+ class GaussPoints_i;
+}
+
+class VisuGUI_GaussPointsDlg : public QDialog
+{
+ Q_OBJECT
+
+public:
+ VisuGUI_GaussPointsDlg (SalomeApp_Module* theModule, bool SetPref = FALSE);
+ ~VisuGUI_GaussPointsDlg() {};
+
+ void initFromPrsObject(VISU::GaussPoints_i* thePrs);
+ int storeToPrsObject(VISU::GaussPoints_i* thePrs);
+
+protected slots:
+ void accept();
+
+ private:
+ VisuGUI_ScalarBarPane* myScalarPane;
+};
+
+#endif // VISUGUI_GAUSSPOINTSDLS_H
#include "VisuGUI_Prs3dTools.h"
#include "VISU_GaussPoints_i.hh"
-#include "VisuGUI_ScalarBarDlg.h"
+#include "VisuGUI_GaussPointsDlg.h"
#include "VISU_Gen_i.hh"
#include "VISU_Result_i.hh"
VisuGUI_Module
::OnCreateGaussPoints()
{
- CreatePrs3d<VISU::GaussPoints_i,VVTK_Viewer,VisuGUI_ScalarBarDlg,1>(this);
+ CreatePrs3d<VISU::GaussPoints_i,VVTK_Viewer,VisuGUI_GaussPointsDlg,1>(this);
}
void
{
Handle(SALOME_InteractiveObject) anIO;
if(VISU::Prs3d_i* aPrs3d = GetPrsToModify(this,&anIO)){
- EditPrs3d<VISU::ScalarMap_i, VisuGUI_ScalarBarDlg>(this, aPrs3d);
+ EditPrs3d<VISU::GaussPoints_i, VisuGUI_GaussPointsDlg>(this, aPrs3d);
if(SVTK_ViewWindow* aViewWindow = GetViewWindow()){
aViewWindow->highlight(anIO, 1);
}