1 #include "CustomCommands.h" 2 #include "ui_CustomCommands.h" 3 ~CustomCommands()4CustomCommands::~CustomCommands() 5 { 6 delete ui; 7 } 8 CustomCommands(QWidget * parent)9CustomCommands::CustomCommands(QWidget* parent): 10 QWidget(parent), 11 ui(new Ui::CustomCommands) 12 { 13 ui->setupUi(this); 14 } 15 initialize(bool checkable,bool checked,const QString & prelaunch,const QString & wrapper,const QString & postexit)16void CustomCommands::initialize(bool checkable, bool checked, const QString& prelaunch, const QString& wrapper, const QString& postexit) 17 { 18 ui->customCommandsGroupBox->setCheckable(checkable); 19 if(checkable) 20 { 21 ui->customCommandsGroupBox->setChecked(checked); 22 } 23 ui->preLaunchCmdTextBox->setText(prelaunch); 24 ui->wrapperCmdTextBox->setText(wrapper); 25 ui->postExitCmdTextBox->setText(postexit); 26 } 27 28 checked() const29bool CustomCommands::checked() const 30 { 31 if(!ui->customCommandsGroupBox->isCheckable()) 32 return true; 33 return ui->customCommandsGroupBox->isChecked(); 34 } 35 prelaunchCommand() const36QString CustomCommands::prelaunchCommand() const 37 { 38 return ui->preLaunchCmdTextBox->text(); 39 } 40 wrapperCommand() const41QString CustomCommands::wrapperCommand() const 42 { 43 return ui->wrapperCmdTextBox->text(); 44 } 45 postexitCommand() const46QString CustomCommands::postexitCommand() const 47 { 48 return ui->postExitCmdTextBox->text(); 49 } 50