-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOperationDialog.cpp
More file actions
34 lines (28 loc) · 889 Bytes
/
OperationDialog.cpp
File metadata and controls
34 lines (28 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "OperationDialog.h"
#include "ui_OperationDialog.h"
#include <QVBoxLayout>
#include <QHBoxLayout>
OperationDialog::OperationDialog(std::string message, QWidget *parent) :
QDialog(parent),
ui(new Ui::OperationDialog)
{
ui->setupUi(this);
this->message = message;
ui->plainTextEdit->setPlainText(QString::fromStdString(message));
QVBoxLayout* outerLayout = new QVBoxLayout();
setLayout(outerLayout);
outerLayout->addWidget(ui->plainTextEdit);
QHBoxLayout* buttonsLayout = new QHBoxLayout();
outerLayout->addLayout(buttonsLayout);
buttonsLayout->addStretch(80);
buttonsLayout->addWidget(ui->buttonBox);
setMaximumSize(300, 200);
}
OperationDialog::~OperationDialog()
{
delete ui;
}
void OperationDialog::on_buttonBox_helpRequested()
{
ui->plainTextEdit->setPlainText("No one can hear you scream into the void...");
}