| 11 | DialogSaveTask::~DialogSaveTask() = default; |
| 12 | |
| 13 | void DialogSaveTask::createUI() |
| 14 | { |
| 15 | this->resize(900, 500); |
| 16 | this->setWindowTitle( "Save Task" ); |
| 17 | this->setProperty("Main", "base"); |
| 18 | |
| 19 | commandLineLabel = new QLabel("CommandLine:", this); |
| 20 | commandLineInput = new QLineEdit(this); |
| 21 | |
| 22 | messageLabel = new QLabel("Message:", this); |
| 23 | messageCombo = new QComboBox(this); |
| 24 | messageCombo->addItems(QStringList() << "Success" << "Error" ); |
| 25 | messageInput = new QLineEdit(this); |
| 26 | |
| 27 | textLabel = new QLabel("Output:", this); |
| 28 | textEdit = new QTextEdit(this); |
| 29 | |
| 30 | spacer_1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Maximum); |
| 31 | spacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Maximum); |
| 32 | |
| 33 | createButton = new QPushButton("Save", this); |
| 34 | createButton->setDefault(true); |
| 35 | cancelButton = new QPushButton("Cancel", this); |
| 36 | |
| 37 | hLayoutBottom = new QHBoxLayout(); |
| 38 | hLayoutBottom->addItem(spacer_1); |
| 39 | hLayoutBottom->addWidget(createButton); |
| 40 | hLayoutBottom->addWidget(cancelButton); |
| 41 | hLayoutBottom->addItem(spacer_2); |
| 42 | |
| 43 | mainGridLayout = new QGridLayout(this); |
| 44 | mainGridLayout->setContentsMargins(4, 4, 4, 4 ); |
| 45 | mainGridLayout->addWidget(commandLineLabel, 0, 0, 1, 1); |
| 46 | mainGridLayout->addWidget(commandLineInput, 0, 1, 1, 2); |
| 47 | mainGridLayout->addWidget(messageLabel, 1, 0, 1, 1); |
| 48 | mainGridLayout->addWidget(messageCombo, 1, 1, 1, 1); |
| 49 | mainGridLayout->addWidget(messageInput, 1, 2, 1, 1); |
| 50 | mainGridLayout->addWidget(textLabel, 2, 0, 1, 1); |
| 51 | mainGridLayout->addWidget(textEdit, 2, 1, 1, 2); |
| 52 | mainGridLayout->addLayout(hLayoutBottom, 3, 0, 1, 3); |
| 53 | |
| 54 | int buttonWidth = createButton->width(); |
| 55 | createButton->setFixedWidth(buttonWidth); |
| 56 | cancelButton->setFixedWidth(buttonWidth); |
| 57 | |
| 58 | int buttonHeight = createButton->height(); |
| 59 | createButton->setFixedHeight(buttonHeight); |
| 60 | cancelButton->setFixedHeight(buttonHeight); |
| 61 | } |
| 62 | |
| 63 | void DialogSaveTask::StartDialog(const QString &text) |
| 64 | { |
no test coverage detected