SimulationDialog.cpp

gehe zur Dokumentation dieser Datei
00001 /****************************************************************************
00002 ** Form implementation generated from reading ui file 'SimulationDialog.ui'
00003 **
00004 ** Created: Mo Nov 24 15:30:47 2008
00005 **
00006 ** WARNING! All changes made in this file will be lost!
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  *  Constructs a SimulationDialog as a child of 'parent', with the
00020  *  name 'name' and widget flags set to 'f'.
00021  *
00022  *  The dialog will by default be modeless, unless you set 'modal' to
00023  *  TRUE to construct a modal dialog.
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  *  Destroys the object and frees any allocated resources
00054  */
00055 SimulationDialog::~SimulationDialog()
00056 {
00057     // no need to delete child widgets, Qt does it all for us
00058 }
00059 
00060 /*
00061  *  Sets the strings of the subwidgets using the current
00062  *  language.
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 

Erzeugt am Mon Nov 24 15:30:59 2008 für Walking Robot Simulation GUI - API Documentation von  doxygen 1.5.5