-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsolvedock.cpp
32 lines (25 loc) · 948 Bytes
/
solvedock.cpp
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
#include "solvedock.h"
#include <QMainWindow>
#include <QVBoxLayout>
#include <QHBoxLayout>
SolveDock::SolveDock(QWidget *parent) : QDockWidget("Solve data expression", parent)
{
/* define the widgets in this dock */
expressionEntry = new QLineEdit();
solveButton = new QPushButton("Solve");
solveAbortButton = new QPushButton("Abort");
solveResult = new QPlainTextEdit();
/* set some parameters of the widgets */
solveResult->setReadOnly(true);
/* lay them out */
QHBoxLayout *buttonLayout = new QHBoxLayout();
buttonLayout->addWidget(solveButton);
buttonLayout->addWidget(solveAbortButton);
QVBoxLayout *dockLayout = new QVBoxLayout();
dockLayout->addWidget(expressionEntry);
dockLayout->addLayout(buttonLayout);
dockLayout->addWidget(solveResult);
QWidget *innerDockWidget = new QWidget();
innerDockWidget->setLayout(dockLayout);
this->setWidget(innerDockWidget);
}