diff options
author | Karel Kočí <cynerd@email.cz> | 2017-12-21 15:01:18 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-12-21 15:01:18 +0100 |
commit | 1008f8180161b3ab7c6b885cb6f6a19df59dd398 (patch) | |
tree | 17250b4cc966333b173b1ba08ec863da5ec712ff /qtmips_gui/registersdock.cpp | |
parent | f1c0203237b976c366bedd950a2e6ffbcb8f7bcd (diff) | |
download | qtmips-1008f8180161b3ab7c6b885cb6f6a19df59dd398.tar.gz qtmips-1008f8180161b3ab7c6b885cb6f6a19df59dd398.tar.bz2 qtmips-1008f8180161b3ab7c6b885cb6f6a19df59dd398.zip |
A lot of small changes in gui
Added machine status.
Widgets now hold size and registers dock has now scrollbars.
And more...
Diffstat (limited to 'qtmips_gui/registersdock.cpp')
-rw-r--r-- | qtmips_gui/registersdock.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/qtmips_gui/registersdock.cpp b/qtmips_gui/registersdock.cpp index 20eb9e4..5d965ca 100644 --- a/qtmips_gui/registersdock.cpp +++ b/qtmips_gui/registersdock.cpp @@ -3,8 +3,10 @@ RegistersDock::RegistersDock(QWidget *parent) : QDockWidget(parent) { regs = nullptr; - widg = new QScrollArea(this); + scrollarea = new QScrollArea(this); + widg = new QWidget(scrollarea); layout = new QFormLayout(widg); + layout->setSizeConstraint(QLayout::SetMinAndMaxSize); #define INIT(X, LABEL) do{ \ X = new QLabel(widg); \ @@ -17,10 +19,13 @@ RegistersDock::RegistersDock(QWidget *parent) : QDockWidget(parent) { INIT(gp[i], QString("GP") + QString::number(i) + QString(" ($") + QString::number(i) + QString("):")); INIT(lo, "LO:"); INIT(hi, "HI:"); - #undef INIT + widg->setLayout(layout); + scrollarea->setWidget(widg); - setWidget(widg); + setWidget(scrollarea); + setObjectName("Registers"); + setWindowTitle("Registers"); } RegistersDock::~RegistersDock() { |