Salome HOME
Imported using TkCVS
[plugins/ghs3dprlplugin.git] / src / tepal2med / dlg_ghs3dmain.cxx
1 /****************************************************************************
2 ** Form implementation generated from reading ui file 'dlg_ghs3dmain.ui'
3 **
4 ** Created: mer fév 14 13:34:54 2007
5 **      by: The User Interface Compiler ($Id$)
6 **
7 ** WARNING! All changes made in this file will be lost!
8 ****************************************************************************/
9
10 #include "dlg_ghs3dmain.h"
11
12 #include <qvariant.h>
13 #include <qgroupbox.h>
14 #include <qspinbox.h>
15 #include <qlabel.h>
16 #include <qradiobutton.h>
17 #include <qpushbutton.h>
18 #include <qlayout.h>
19 #include <qtooltip.h>
20 #include <qwhatsthis.h>
21 #include <qimage.h>
22 #include <qpixmap.h>
23
24 #include "dlg_ghs3dmain.ui.h"
25 /*
26  *  Constructs a dlg_ghs3dmain as a child of 'parent', with the
27  *  name 'name' and widget flags set to 'f'.
28  *
29  *  The dialog will by default be modeless, unless you set 'modal' to
30  *  TRUE to construct a modal dialog.
31  */
32 dlg_ghs3dmain::dlg_ghs3dmain( QWidget* parent, const char* name, bool modal, WFlags fl )
33     : QDialog( parent, name, modal, fl )
34 {
35     if ( !name ) setName( "tepal2med" );
36     setMinimumSize( QSize( 270, 150 ) );
37     setMaximumSize( QSize( 270, 150 ) );
38     setSizeGripEnabled( FALSE );
39
40     Parameters = new QGroupBox( this, "Parameters" );
41     Parameters->setGeometry( QRect( 10, 10, 250, 91 ) );
42
43     NbPart = new QSpinBox( Parameters, "NbPart" );
44     NbPart->setGeometry( QRect( 10, 20, 80, 31 ) );
45     NbPart->setMaxValue( 256 );
46     NbPart->setMinValue( 1 );
47
48     textNbPart = new QLabel( Parameters, "textNbPart" );
49     textNbPart->setGeometry( QRect( 100, 20, 141, 31 ) );
50
51     KeepFiles = new QRadioButton( Parameters, "KeepFiles" );
52     KeepFiles->setEnabled( TRUE );
53     KeepFiles->setGeometry( QRect( 40, 50, 190, 31 ) );
54     KeepFiles->setChecked( FALSE );
55
56     Ok = new QPushButton( this, "Ok" );
57     Ok->setGeometry( QRect( 180, 112, 80, 30 ) );
58     Ok->setAutoDefault( FALSE );
59     languageChange();
60     resize( QSize(270, 150).expandedTo(minimumSizeHint()) );
61     clearWState( WState_Polished );
62
63     // signals and slots connections
64     connect( Ok, SIGNAL( clicked() ), this, SLOT( slotok() ) );
65     //connect( Ok, SIGNAL( released() ), this, SLOT( close() ) );
66     init();
67 }
68
69 /*
70  *  Destroys the object and frees any allocated resources
71  */
72 dlg_ghs3dmain::~dlg_ghs3dmain()
73 {
74     destroy();
75     // no need to delete child widgets, Qt does it all for us
76 }
77
78 /*
79  *  Sets the strings of the subwidgets using the current
80  *  language.
81  */
82 void dlg_ghs3dmain::languageChange()
83 {
84     //setCaption( tr( "GHS3DPRL" ) );
85     Parameters->setTitle( tr( "Parameters" ) );
86     textNbPart->setText( tr( "Nb of partitions" ) );
87     KeepFiles->setText( tr( "          Keep files" ) );
88     KeepFiles->setAccel( QKeySequence( QString::null ) );
89     QToolTip::add( KeepFiles, QString::null );
90     QWhatsThis::add( KeepFiles, tr( "Keep outputs files of tepal" ) );
91     Ok->setText( tr( "Ok" ) );
92     Ok->setAccel( QKeySequence( QString::null ) );
93 }
94