00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "SimulationDialog.h"
00010
00011 #include <qvariant.h>
00012 #include <qpushbutton.h>
00013 #include <qlayout.h>
00014 #include <qtooltip.h>
00015 #include <qwhatsthis.h>
00016 #include "gui_canvas.h"
00017
00018
00019
00020
00021
00022
00023
00024
00025 SimulationDialog::SimulationDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
00026 : QDialog( parent, name, modal, fl )
00027 {
00028 if ( !name )
00029 setName( "SimulationDialog" );
00030 SimulationDialogLayout = new QVBoxLayout( this, 11, 6, "SimulationDialogLayout");
00031
00032 canvasView = new MyCanvasView( this, "canvasView" );
00033 canvasView->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, canvasView->sizePolicy().hasHeightForWidth() ) );
00034 SimulationDialogLayout->addWidget( canvasView );
00035
00036 layout10 = new QHBoxLayout( 0, 0, 6, "layout10");
00037
00038 startSimulationButton = new QPushButton( this, "startSimulationButton" );
00039 layout10->addWidget( startSimulationButton );
00040
00041 resumeSimulationButton = new QPushButton( this, "resumeSimulationButton" );
00042 layout10->addWidget( resumeSimulationButton );
00043
00044 stopSimulationButton = new QPushButton( this, "stopSimulationButton" );
00045 layout10->addWidget( stopSimulationButton );
00046 SimulationDialogLayout->addLayout( layout10 );
00047 languageChange();
00048 resize( QSize(723, 520).expandedTo(minimumSizeHint()) );
00049 clearWState( WState_Polished );
00050 }
00051
00052
00053
00054
00055 SimulationDialog::~SimulationDialog()
00056 {
00057
00058 }
00059
00060
00061
00062
00063
00064 void SimulationDialog::languageChange()
00065 {
00066 setCaption( tr( "Walking Robot Simulation" ) );
00067 startSimulationButton->setText( tr( "st&art simulation" ) );
00068 resumeSimulationButton->setText( tr( "&resume simulation" ) );
00069 resumeSimulationButton->setAccel( QKeySequence( tr( "Alt+R" ) ) );
00070 stopSimulationButton->setText( tr( "st&op simulation" ) );
00071 stopSimulationButton->setAccel( QKeySequence( tr( "Alt+O" ) ) );
00072 }
00073