00001 /**************************************************************************** 00002 ** Form implementation generated from reading ui file 'Qt/ModelManagerControl.ui' 00003 ** 00004 ** WARNING! All changes made in this file will be lost! 00005 ****************************************************************************/ 00006 00007 #include "Qt/ui/ModelManagerControl.h" 00008 00009 #include <qvariant.h> 00010 #include <qfiledialog.h> 00011 #include <qpushbutton.h> 00012 #include <qlayout.h> 00013 #include <qtooltip.h> 00014 #include <qwhatsthis.h> 00015 #include "Qt/ModelManagerControl.ui.h" 00016 00017 /* 00018 * Constructs a ModelManagerControl as a child of 'parent', with the 00019 * name 'name' and widget flags set to 'f'. 00020 * 00021 * The dialog will by default be modeless, unless you set 'modal' to 00022 * TRUE to construct a modal dialog. 00023 */ 00024 ModelManagerControl::ModelManagerControl( QWidget* parent, const char* name, bool modal, WFlags fl ) 00025 : QDialog( parent, name, modal, fl ) 00026 { 00027 if ( !name ) 00028 setName( "ModelManagerControl" ); 00029 00030 saveButton = new QPushButton( this, "saveButton" ); 00031 saveButton->setGeometry( QRect( 30, 130, 120, 40 ) ); 00032 saveButton->setAutoDefault( FALSE ); 00033 00034 loadButton = new QPushButton( this, "loadButton" ); 00035 loadButton->setGeometry( QRect( 30, 80, 120, 40 ) ); 00036 loadButton->setAutoDefault( FALSE ); 00037 00038 startstopButton = new QPushButton( this, "startstopButton" ); 00039 startstopButton->setGeometry( QRect( 30, 210, 120, 40 ) ); 00040 startstopButton->setAutoDefault( TRUE ); 00041 startstopButton->setDefault( TRUE ); 00042 00043 exitButton = new QPushButton( this, "exitButton" ); 00044 exitButton->setGeometry( QRect( 30, 290, 120, 40 ) ); 00045 00046 configButton = new QPushButton( this, "configButton" ); 00047 configButton->setGeometry( QRect( 30, 20, 120, 40 ) ); 00048 configButton->setAutoDefault( FALSE ); 00049 languageChange(); 00050 resize( QSize(182, 353).expandedTo(minimumSizeHint()) ); 00051 clearWState( WState_Polished ); 00052 00053 // signals and slots connections 00054 connect( configButton, SIGNAL( clicked() ), this, SLOT( showConfigDialog() ) ); 00055 connect( loadButton, SIGNAL( clicked() ), this, SLOT( loadConfig() ) ); 00056 connect( saveButton, SIGNAL( clicked() ), this, SLOT( saveConfig() ) ); 00057 connect( startstopButton, SIGNAL( clicked() ), this, SLOT( start_or_stop() ) ); 00058 connect( exitButton, SIGNAL( clicked() ), this, SLOT( exitPressed() ) ); 00059 } 00060 00061 /* 00062 * Destroys the object and frees any allocated resources 00063 */ 00064 ModelManagerControl::~ModelManagerControl() 00065 { 00066 // no need to delete child widgets, Qt does it all for us 00067 } 00068 00069 /* 00070 * Sets the strings of the subwidgets using the current 00071 * language. 00072 */ 00073 void ModelManagerControl::languageChange() 00074 { 00075 setCaption( tr( "Control Panel" ) ); 00076 saveButton->setText( tr( "Save config..." ) ); 00077 loadButton->setText( tr( "Load config..." ) ); 00078 startstopButton->setText( tr( "Start" ) ); 00079 exitButton->setText( tr( "Exit" ) ); 00080 configButton->setText( tr( "Configure..." ) ); 00081 } 00082