X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlot2d%2FPlot2d_FitDataDlg.cxx;h=d1212cea1f974946b83201739835ac351b784ee3;hb=5204b0c67ebf51714353b53f585ff7aafe70af30;hp=91a63af3013d637326cd496df2083c045f7f25e6;hpb=2e750f9ded92337bc3c44e9d7388180974cc4a43;p=modules%2Fgui.git diff --git a/src/Plot2d/Plot2d_FitDataDlg.cxx b/src/Plot2d/Plot2d_FitDataDlg.cxx index 91a63af30..d1212cea1 100755 --- a/src/Plot2d/Plot2d_FitDataDlg.cxx +++ b/src/Plot2d/Plot2d_FitDataDlg.cxx @@ -1,16 +1,36 @@ -// Copyright (C) 2003 CEA/DEN, EDF R&D +// Copyright (C) 2007-2016 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 // +// 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 // -// File : Plot2d_FitDataDlg.cxx -// Author : Vadim SANDLER -// Module : SALOME -// $Header$ +// File : Plot2d_FitDataDlg.cxx +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) +// #include "Plot2d_FitDataDlg.h" -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #define SPACING_SIZE 6 #define MARGIN_SIZE 11 @@ -21,24 +41,22 @@ */ Plot2d_FitDataDlg::Plot2d_FitDataDlg( QWidget* parent, bool secondAxisY ) : QDialog( parent ? parent : 0, - "Plot2d_FitDataDlg", - true, - WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ), - myY2MinEdit( 0 ), myY2MaxEdit( 0 ), mySecondAxisY( secondAxisY ) + Qt::WindowTitleHint | Qt::WindowSystemMenuHint ), + myY2MinEdit( 0 ), myY2MaxEdit( 0 ), mySecondAxisY( secondAxisY ) { - setCaption( tr( "FIT_DATA_TLT" ) ); - setSizeGripEnabled( TRUE ); + setObjectName( "Plot2d_FitDataDlg" ); + setModal( true ); + setWindowTitle( tr( "FIT_DATA_TLT" ) ); + setSizeGripEnabled( true ); QGridLayout* topLayout = new QGridLayout( this ); topLayout->setSpacing( SPACING_SIZE ); topLayout->setMargin( MARGIN_SIZE ); // 'Range' group - myRangeGrp = new QButtonGroup( this ); - myRangeGrp->setColumnLayout( 0, Qt::Vertical ); - myRangeGrp->layout()->setSpacing( 0 ); - myRangeGrp->layout()->setMargin( 0 ); - QGridLayout* aGridLayout = new QGridLayout( myRangeGrp->layout() ); + myRangeGrp = new QGroupBox( this ); + QGridLayout* aGridLayout = new QGridLayout( myRangeGrp ); + myRangeGrp->setLayout( aGridLayout ); aGridLayout->setAlignment( Qt::AlignTop ); aGridLayout->setMargin( MARGIN_SIZE ); aGridLayout->setSpacing( SPACING_SIZE ); @@ -104,45 +122,47 @@ Plot2d_FitDataDlg::Plot2d_FitDataDlg( QWidget* parent, bool secondAxisY ) QFont font = horLab->font(); font.setBold( true ); horLab->setFont( font ); verLab->setFont( font ); - aGridLayout->addMultiCellLayout( aModeLayout, 0, 0, 0, 4 ); - aGridLayout->addMultiCellWidget( aHLine, 1, 1, 0, 4 ); - aGridLayout->addWidget ( horLab, 2, 0 ); - aGridLayout->addWidget ( new QLabel( tr( "MIN_VALUE_LAB" ), myRangeGrp ), - 2, 1 ); - aGridLayout->addWidget ( myXMinEdit, 2, 2 ); - aGridLayout->addWidget ( new QLabel( tr( "MAX_VALUE_LAB" ), myRangeGrp ), - 2, 3 ); - aGridLayout->addWidget ( myXMaxEdit, 2, 4 ); - aGridLayout->addWidget ( verLab, 3, 0 ); - aGridLayout->addWidget ( new QLabel( tr( "MIN_VALUE_LAB" ), myRangeGrp ), - 3, 1 ); - aGridLayout->addWidget ( myYMinEdit, 3, 2 ); - aGridLayout->addWidget ( new QLabel( tr( "MAX_VALUE_LAB" ), myRangeGrp ), - 3, 3 ); - aGridLayout->addWidget ( myYMaxEdit, 3, 4 ); + aGridLayout->addLayout( aModeLayout, 0, 0, 1, 5 ); + aGridLayout->addWidget( aHLine, 1, 0, 1, 5 ); + aGridLayout->addWidget( horLab, 2, 0 ); + aGridLayout->addWidget( new QLabel( tr( "MIN_VALUE_LAB" ), myRangeGrp ), + 2, 1 ); + aGridLayout->addWidget( myXMinEdit, 2, 2 ); + aGridLayout->addWidget( new QLabel( tr( "MAX_VALUE_LAB" ), myRangeGrp ), + 2, 3 ); + aGridLayout->addWidget( myXMaxEdit, 2, 4 ); + aGridLayout->addWidget( verLab, 3, 0 ); + aGridLayout->addWidget( new QLabel( tr( "MIN_VALUE_LAB" ), myRangeGrp ), + 3, 1 ); + aGridLayout->addWidget( myYMinEdit, 3, 2 ); + aGridLayout->addWidget( new QLabel( tr( "MAX_VALUE_LAB" ), myRangeGrp ), + 3, 3 ); + aGridLayout->addWidget( myYMaxEdit, 3, 4 ); if (mySecondAxisY) { QLabel* ver2Lab = new QLabel(tr( "VERTICAL_RIGHT_AXIS" ), myRangeGrp ); ver2Lab->setFont( font ); - aGridLayout->addWidget ( ver2Lab, 4, 0 ); - aGridLayout->addWidget ( new QLabel( tr( "MIN_VALUE_LAB" ), myRangeGrp ), - 4, 1 ); - aGridLayout->addWidget ( myY2MinEdit, 4, 2 ); - aGridLayout->addWidget ( new QLabel( tr( "MAX_VALUE_LAB" ), myRangeGrp ), - 4, 3 ); - aGridLayout->addWidget ( myY2MaxEdit, 4, 4 ); + aGridLayout->addWidget( ver2Lab, 4, 0 ); + aGridLayout->addWidget( new QLabel( tr( "MIN_VALUE_LAB" ), myRangeGrp ), + 4, 1 ); + aGridLayout->addWidget( myY2MinEdit, 4, 2 ); + aGridLayout->addWidget( new QLabel( tr( "MAX_VALUE_LAB" ), myRangeGrp ), + 4, 3 ); + aGridLayout->addWidget( myY2MaxEdit, 4, 4 ); } // OK/Cancel buttons - myOkBtn = new QPushButton( tr( "BUT_OK" ), this, "buttonOk" ); - myOkBtn->setAutoDefault( TRUE ); - myOkBtn->setDefault( TRUE ); - myCancelBtn = new QPushButton( tr( "BUT_CANCEL" ), this, "buttonCancel" ); - myCancelBtn->setAutoDefault( TRUE ); + myOkBtn = new QPushButton( tr( "BUT_OK" ), this ); + myOkBtn->setObjectName( "buttonOk" ); + myOkBtn->setAutoDefault( true ); + myOkBtn->setDefault( true ); + myCancelBtn = new QPushButton( tr( "BUT_CANCEL" ), this ); + myCancelBtn->setObjectName( "buttonCancel" ); + myCancelBtn->setAutoDefault( true ); - topLayout->addMultiCellWidget( myRangeGrp, 0, 0, 0, 2 ); + topLayout->addWidget( myRangeGrp, 0, 0, 1, 3 ); topLayout->addWidget( myOkBtn, 1, 0 ); - topLayout->setColStretch( 1, 5 ); + topLayout->setColumnStretch( 1, 5 ); topLayout->addWidget( myCancelBtn, 1, 2 ); // connect signals