00001 /**************************************************************************** 00002 ** Form implementation generated from reading ui file 'Qt/BayesNetworkDialog.ui' 00003 ** 00004 ** 00005 ** WARNING! All changes made in this file will be lost! 00006 ****************************************************************************/ 00007 00008 #include "Qt/ui/BayesNetworkDialog.h" 00009 00010 #include <qvariant.h> 00011 #include <qtabwidget.h> 00012 #include <qwidget.h> 00013 #include <qpushbutton.h> 00014 #include <qlayout.h> 00015 #include <qtooltip.h> 00016 #include <qwhatsthis.h> 00017 #include "Qt/BayesNetworkDialog.ui.h" 00018 00019 /* 00020 * Constructs a BayesNetworkDialog as a child of 'parent', with the 00021 * name 'name' and widget flags set to 'f'. 00022 * 00023 * The dialog will by default be modeless, unless you set 'modal' to 00024 * TRUE to construct a modal dialog. 00025 */ 00026 BayesNetworkDialog::BayesNetworkDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) 00027 : QDialog( parent, name, modal, fl ) 00028 { 00029 if ( !name ) 00030 setName( "BayesNetworkDialog" ); 00031 setSizeGripEnabled( TRUE ); 00032 BayesNetworkDialogLayout = new QVBoxLayout( this, 11, 6, "BayesNetworkDialogLayout"); 00033 00034 tabWidget = new QTabWidget( this, "tabWidget" ); 00035 00036 tab = new QWidget( tabWidget, "tab" ); 00037 tabWidget->insertTab( tab, QString::fromLatin1("") ); 00038 BayesNetworkDialogLayout->addWidget( tabWidget ); 00039 00040 layout2 = new QHBoxLayout( 0, 0, 6, "layout2"); 00041 spacer2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 00042 layout2->addItem( spacer2 ); 00043 00044 buttonOk = new QPushButton( this, "buttonOk" ); 00045 buttonOk->setAutoDefault( TRUE ); 00046 buttonOk->setDefault( TRUE ); 00047 layout2->addWidget( buttonOk ); 00048 00049 buttonCancel = new QPushButton( this, "buttonCancel" ); 00050 buttonCancel->setAutoDefault( TRUE ); 00051 layout2->addWidget( buttonCancel ); 00052 BayesNetworkDialogLayout->addLayout( layout2 ); 00053 languageChange(); 00054 resize( QSize(567, 587).expandedTo(minimumSizeHint()) ); 00055 clearWState( WState_Polished ); 00056 00057 // signals and slots connections 00058 connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) ); 00059 connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); 00060 } 00061 00062 /* 00063 * Destroys the object and frees any allocated resources 00064 */ 00065 BayesNetworkDialog::~BayesNetworkDialog() 00066 { 00067 // no need to delete child widgets, Qt does it all for us 00068 } 00069 00070 /* 00071 * Sets the strings of the subwidgets using the current 00072 * language. 00073 */ 00074 void BayesNetworkDialog::languageChange() 00075 { 00076 setCaption( tr( "MyDialog" ) ); 00077 tabWidget->changeTab( tab, tr( "BayesNet" ) ); 00078 buttonOk->setText( tr( "&OK" ) ); 00079 buttonOk->setAccel( QKeySequence( QString::null ) ); 00080 buttonCancel->setText( tr( "&Cancel" ) ); 00081 buttonCancel->setAccel( QKeySequence( QString::null ) ); 00082 } 00083