X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSVTK%2FSVTK_NonIsometricDlg.cxx;h=05104b9a366a97ea7ffd15707d1476d7cf902754;hb=259ecb356eb789678497db6b655cc3e377a67cce;hp=a01bcbdcb7729ca31ce328ee1f3ad721c786acf3;hpb=9f1a66957ba9a2308f8fdc3f9397140af9df5fd0;p=modules%2Fgui.git diff --git a/src/SVTK/SVTK_NonIsometricDlg.cxx b/src/SVTK/SVTK_NonIsometricDlg.cxx index a01bcbdcb..05104b9a3 100644 --- a/src/SVTK/SVTK_NonIsometricDlg.cxx +++ b/src/SVTK/SVTK_NonIsometricDlg.cxx @@ -1,60 +1,54 @@ -// SALOME VTKViewer : build VTK viewer into Salome desktop +// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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 +// 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, or (at your option) any later version. // +// 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 +// + +// SALOME VTKViewer : build VTK viewer into Salome desktop // File : // Author : -// Module : SALOME -// $Header$ #include "SVTK_NonIsometricDlg.h" -#include "SVTK_MainWindow.h" +#include "SVTK_ViewWindow.h" #include "SVTK_Renderer.h" -#include "QtxDblSpinBox.h" +#include "QtxDoubleSpinBox.h" #include "QtxAction.h" -#include -#include -#include -#include - -using namespace std; +#include +#include +#include +#include /*! Constructor */ SVTK_NonIsometricDlg -::SVTK_NonIsometricDlg(SVTK_MainWindow* theParent, - const char* theName, - QtxAction* theAction): - QDialog(theParent, - theName, - false, - WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ), - m_MainWindow(theParent), - m_Action(theAction) +::SVTK_NonIsometricDlg(QtxAction* theAction, + SVTK_ViewWindow* theParent, + const char* theName): + ViewerTools_DialogBase(theAction, + theParent, + theName), + m_MainWindow(theParent) { - setCaption(tr("DLG_TITLE")); + setWindowTitle(tr("DLG_TITLE")); setSizeGripEnabled(TRUE); // Create layout for this dialog @@ -63,66 +57,78 @@ SVTK_NonIsometricDlg layoutDlg->setMargin(11); // Create croup box with grid layout - QGroupBox* GroupBox = new QGroupBox(this, "GroupBox"); - QGridLayout* glGroupBox = new QGridLayout(GroupBox); - glGroupBox->setMargin(11); - glGroupBox->setSpacing(6); + QGroupBox* aGroupBox = new QGroupBox(this); + aGroupBox->setObjectName("GroupBox"); + QHBoxLayout* aHBoxLayout = new QHBoxLayout(aGroupBox); + aHBoxLayout->setMargin(11); + aHBoxLayout->setSpacing(6); // "X" scaling - QLabel* TextLabelX = new QLabel (tr("LBL_X"), GroupBox, "TextLabelX"); - m_sbXcoeff = new QtxDblSpinBox(-VTK_LARGE_FLOAT, VTK_LARGE_FLOAT, 0.1, GroupBox); + QLabel* TextLabelX = new QLabel (tr("LBL_X"), aGroupBox); + TextLabelX->setObjectName("TextLabelX"); + TextLabelX->setFixedWidth(15); + m_sbXcoeff = new QtxDoubleSpinBox(-VTK_LARGE_FLOAT, VTK_LARGE_FLOAT, 0.1, aGroupBox); m_sbXcoeff->setMinimumWidth(80); m_sbXcoeff->setValue(1.0); // "Y" scaling - QLabel* TextLabelY = new QLabel (tr("LBL_Y"), GroupBox, "TextLabelY"); - m_sbYcoeff = new QtxDblSpinBox(-VTK_LARGE_FLOAT, VTK_LARGE_FLOAT, 0.1, GroupBox); + QLabel* TextLabelY = new QLabel (tr("LBL_Y"), aGroupBox); + TextLabelY->setObjectName("TextLabelY"); + TextLabelY->setFixedWidth(15); + m_sbYcoeff = new QtxDoubleSpinBox(-VTK_LARGE_FLOAT, VTK_LARGE_FLOAT, 0.1, aGroupBox); m_sbYcoeff->setMinimumWidth(80); m_sbYcoeff->setValue(1.0); // "Z" scaling - QLabel* TextLabelZ = new QLabel (tr("LBL_Z"), GroupBox, "TextLabelZ"); - m_sbZcoeff = new QtxDblSpinBox(-VTK_LARGE_FLOAT, VTK_LARGE_FLOAT, 0.1, GroupBox); + QLabel* TextLabelZ = new QLabel (tr("LBL_Z"), aGroupBox); + TextLabelZ->setObjectName("TextLabelZ"); + TextLabelZ->setFixedWidth(15); + m_sbZcoeff = new QtxDoubleSpinBox(-VTK_LARGE_FLOAT, VTK_LARGE_FLOAT, 0.1, aGroupBox); m_sbZcoeff->setMinimumWidth(80); m_sbZcoeff->setValue(1.0); // Create button - m_bReset = new QPushButton(tr("&Reset"), GroupBox, "m_bReset"); + m_bReset = new QPushButton(tr("&Reset"), aGroupBox); + m_bReset->setObjectName("m_bReset"); // Layout widgets in the group box - glGroupBox->addWidget(TextLabelX, 0, 0); - glGroupBox->addWidget(m_sbXcoeff, 0, 1); - glGroupBox->addWidget(TextLabelY, 0, 2); - glGroupBox->addWidget(m_sbYcoeff, 0, 3); - glGroupBox->addWidget(TextLabelZ, 0, 4); - glGroupBox->addWidget(m_sbZcoeff, 0, 5); - glGroupBox->addWidget(m_bReset, 0, 6); + aHBoxLayout->addWidget(TextLabelX); + aHBoxLayout->addWidget(m_sbXcoeff); + aHBoxLayout->addWidget(TextLabelY); + aHBoxLayout->addWidget(m_sbYcoeff); + aHBoxLayout->addWidget(TextLabelZ); + aHBoxLayout->addWidget(m_sbZcoeff); + //aHBoxLayout->addStretch(); + aHBoxLayout->addWidget(m_bReset); // OK, CANCEL, Apply button - QGroupBox* aWgt = new QGroupBox(this); - QHBoxLayout* aHBoxLayout = new QHBoxLayout(aWgt); - aHBoxLayout->setMargin(11); - aHBoxLayout->setSpacing(6); + QGroupBox* aGroupBox2 = new QGroupBox(this); + QHBoxLayout* aHBoxLayout2 = new QHBoxLayout(aGroupBox2); + aHBoxLayout2->setMargin(11); + aHBoxLayout2->setSpacing(6); // Create button - QPushButton* m_bOk = new QPushButton(tr("O&K"), aWgt, "m_bOk"); + QPushButton* m_bOk = new QPushButton(tr("O&K"), aGroupBox2); + m_bOk->setObjectName("m_bOk"); m_bOk->setDefault(TRUE); m_bOk->setAutoDefault(TRUE); // Create button - QPushButton* m_bApply = new QPushButton(tr("&Apply"), aWgt, "m_bApply"); + QPushButton* m_bApply = new QPushButton(tr("&Apply"), aGroupBox2); + m_bApply->setObjectName("m_bApply"); m_bApply->setAutoDefault(TRUE); // Create button - QPushButton* m_bCancel = new QPushButton(tr("&Cancel"), aWgt, "m_bCancel"); + QPushButton* m_bCancel = new QPushButton(tr("&Cancel"), aGroupBox2); + m_bCancel->setObjectName("m_bCancel"); m_bCancel->setAutoDefault(TRUE); // Layout buttons - aHBoxLayout->addWidget(m_bOk); - aHBoxLayout->addWidget(m_bApply); - aHBoxLayout->addStretch(); - aHBoxLayout->addWidget(m_bCancel); + aHBoxLayout2->addWidget(m_bOk); + aHBoxLayout2->addWidget(m_bApply); + aHBoxLayout2->addStretch(); + aHBoxLayout2->addWidget(m_bCancel); // Layout top level widgets - layoutDlg->addWidget(GroupBox,0,0); - layoutDlg->addWidget(aWgt,1,0); + layoutDlg->addWidget(aGroupBox,0,0); + layoutDlg->addWidget(aGroupBox2,1,0); // signals and slots connections connect(m_bCancel, SIGNAL(clicked()), this, SLOT(onClickClose())); @@ -187,14 +193,4 @@ SVTK_NonIsometricDlg ::onClickClose() { reject(); - - m_Action->setOn( false ); -} - -void -SVTK_NonIsometricDlg -::done( int r ) -{ - m_Action->setOn( false ); - QDialog::done( r ); }