-/****************************************************************************
-** Form implementation generated from reading ui file 'dlg_ghs3dmain.ui'
-**
-** Created: mer fév 14 13:34:54 2007
-** by: The User Interface Compiler ($Id$)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
+// Copyright (C) 2007-2008 OPEN CASCADE, CEA/DEN, EDF R&D
+//
+// 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 : dlg_gsh3dmain.cxx
+// Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+//
+// ---
#include "dlg_ghs3dmain.h"
-#include <qvariant.h>
-#include <qgroupbox.h>
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qimage.h>
-#include <qpixmap.h>
-
-#include "dlg_ghs3dmain.ui.h"
-/*
- * Constructs a dlg_ghs3dmain as a child of 'parent', with the
- * name 'name' and widget flags set to 'f'.
- *
- * The dialog will by default be modeless, unless you set 'modal' to
- * TRUE to construct a modal dialog.
- */
-dlg_ghs3dmain::dlg_ghs3dmain( QWidget* parent, const char* name, bool modal, WFlags fl )
- : QDialog( parent, name, modal, fl )
+dlg_ghs3dmain::dlg_ghs3dmain()
{
- if ( !name ) setName( "tepal2med" );
- setMinimumSize( QSize( 270, 150 ) );
- setMaximumSize( QSize( 270, 150 ) );
- setSizeGripEnabled( FALSE );
-
- Parameters = new QGroupBox( this, "Parameters" );
- Parameters->setGeometry( QRect( 10, 10, 250, 91 ) );
-
- NbPart = new QSpinBox( Parameters, "NbPart" );
- NbPart->setGeometry( QRect( 10, 20, 80, 31 ) );
- NbPart->setMaxValue( 256 );
- NbPart->setMinValue( 1 );
-
- textNbPart = new QLabel( Parameters, "textNbPart" );
- textNbPart->setGeometry( QRect( 100, 20, 141, 31 ) );
-
- KeepFiles = new QRadioButton( Parameters, "KeepFiles" );
- KeepFiles->setEnabled( TRUE );
- KeepFiles->setGeometry( QRect( 40, 50, 190, 31 ) );
- KeepFiles->setChecked( FALSE );
-
- Ok = new QPushButton( this, "Ok" );
- Ok->setGeometry( QRect( 180, 112, 80, 30 ) );
- Ok->setAutoDefault( FALSE );
- languageChange();
- resize( QSize(270, 150).expandedTo(minimumSizeHint()) );
- clearWState( WState_Polished );
-
- // signals and slots connections
- connect( Ok, SIGNAL( clicked() ), this, SLOT( slotok() ) );
- //connect( Ok, SIGNAL( released() ), this, SLOT( close() ) );
- init();
+ ui.setupUi( this );
+ connect( ui.Ok, SIGNAL( clicked() ), this, SLOT( accept() ) );
}
-/*
- * Destroys the object and frees any allocated resources
- */
dlg_ghs3dmain::~dlg_ghs3dmain()
{
- destroy();
- // no need to delete child widgets, Qt does it all for us
}
-/*
- * Sets the strings of the subwidgets using the current
- * language.
- */
-void dlg_ghs3dmain::languageChange()
+int dlg_ghs3dmain::NbPart() const
{
- //setCaption( tr( "GHS3DPRL" ) );
- Parameters->setTitle( tr( "Parameters" ) );
- textNbPart->setText( tr( "Nb of partitions" ) );
- KeepFiles->setText( tr( " Keep files" ) );
- KeepFiles->setAccel( QKeySequence( QString::null ) );
- QToolTip::add( KeepFiles, QString::null );
- QWhatsThis::add( KeepFiles, tr( "Keep outputs files of tepal" ) );
- Ok->setText( tr( "Ok" ) );
- Ok->setAccel( QKeySequence( QString::null ) );
+ return ui.NbPart->value();
}
+bool dlg_ghs3dmain::KeepFiles() const
+{
+ return ui.KeepFiles->isChecked();
+}