blob: e4f25fbdaff99f63dee6ea32bc26f62a6392e957 (
plain) (
blame)
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
|
#include "horizonhelpwindow.hh"
#include <QDialogButtonBox>
#include <QTextEdit>
#include <QVBoxLayout>
HorizonHelpWindow::HorizonHelpWindow(QFile *helpFile, QWidget *parent) :
QDialog(parent), helpFile(helpFile)
{
QDialogButtonBox *buttonBox;
QTextEdit *helpText;
QVBoxLayout *layout;
setFixedSize(QSize(600, 400));
setSizeGripEnabled(false);
setWindowTitle("Horizon Help");
helpText = new QTextEdit(this);
helpText->setReadOnly(true);
helpText->setHtml(helpFile->readAll().toStdString().c_str());
buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok, this);
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
layout = new QVBoxLayout();
layout->addWidget(helpText);
layout->addWidget(buttonBox);
setLayout(layout);
}
|