00001
00002
00003
00004
00005
00006
00007
00008 #include "Qt/ui/ModelManagerDialog.h"
00009
00010 #include <qvariant.h>
00011 #include <qlabel.h>
00012 #include <qpushbutton.h>
00013 #include <qheader.h>
00014 #include <qlistview.h>
00015 #include <qlayout.h>
00016 #include <qtooltip.h>
00017 #include <qwhatsthis.h>
00018 #include "Qt/ModelManagerDialog.ui.h"
00019
00020
00021
00022
00023
00024
00025
00026
00027 ModelManagerDialog::ModelManagerDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
00028 : QDialog( parent, name, modal, fl )
00029 {
00030 if ( !name )
00031 setName( "ModelManagerDialog" );
00032
00033 textLabel1 = new QLabel( this, "textLabel1" );
00034 textLabel1->setGeometry( QRect( 10, 10, 600, 130 ) );
00035 textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
00036
00037 wizardButton = new QPushButton( this, "wizardButton" );
00038 wizardButton->setGeometry( QRect( 20, 540, 90, 31 ) );
00039
00040 cancelButton = new QPushButton( this, "cancelButton" );
00041 cancelButton->setGeometry( QRect( 520, 540, 81, 31 ) );
00042
00043 applyButton = new QPushButton( this, "applyButton" );
00044 applyButton->setGeometry( QRect( 430, 540, 70, 30 ) );
00045 applyButton->setDefault( TRUE );
00046
00047 listview = new QListView( this, "listview" );
00048 listview->addColumn( tr( "Model Parameter" ) );
00049 listview->addColumn( tr( "Value" ) );
00050 listview->setGeometry( QRect( 10, 150, 600, 370 ) );
00051 languageChange();
00052 resize( QSize(624, 586).expandedTo(minimumSizeHint()) );
00053 clearWState( WState_Polished );
00054
00055
00056 connect( applyButton, SIGNAL( clicked() ), this, SLOT( handleApplyButton() ) );
00057 connect( listview, SIGNAL( itemRenamed(QListViewItem*,int,const QString&) ), this, SLOT( handleItemEdit(QListViewItem*) ) );
00058 connect( cancelButton, SIGNAL( clicked() ), this, SLOT( handleCancelButton() ) );
00059 connect( wizardButton, SIGNAL( clicked() ), this, SLOT( handleWizardButton() ) );
00060 }
00061
00062
00063
00064
00065 ModelManagerDialog::~ModelManagerDialog()
00066 {
00067
00068 }
00069
00070
00071
00072
00073
00074 void ModelManagerDialog::languageChange()
00075 {
00076 setCaption( tr( "Model Configuration" ) );
00077 textLabel1->setText( tr( "Model parameters for this program are listed in the configuration box below. Note that some of these components will require reconfiguration if you change its type, such as FrameGrabberType in FrameGrabberConfigurator. When everything is configured, press <b>Apply</b>, or press <b>Cancel</b> to discard your changes.<br><br>If you are not sure how to set the parameters, you can try using a guided approach by pressing<b> Wizard...</b>" ) );
00078 wizardButton->setText( tr( "Wizard..." ) );
00079 cancelButton->setText( tr( "Cancel" ) );
00080 applyButton->setText( tr( "Apply" ) );
00081 listview->header()->setLabel( 0, tr( "Model Parameter" ) );
00082 listview->header()->setLabel( 1, tr( "Value" ) );
00083 }
00084