From ad0557059bb83da52e1a5bd7ea608a29a4ab6346 Mon Sep 17 00:00:00 2001 From: bd Date: Sun, 27 Apr 2025 13:53:21 -0400 Subject: Use spinboxes to select cache levels --- gui/gui.ui | 110 +++++++++++-------------------------------------------------- 1 file changed, 19 insertions(+), 91 deletions(-) (limited to 'gui/gui.ui') diff --git a/gui/gui.ui b/gui/gui.ui index 67cca60..c20b3f6 100644 --- a/gui/gui.ui +++ b/gui/gui.ui @@ -6,7 +6,7 @@ 0 0 - 1499 + 1522 621 @@ -25,7 +25,7 @@ - 700 + 800 0 @@ -45,7 +45,7 @@ - + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop @@ -380,90 +380,18 @@ QLayout::SizeConstraint::SetMinimumSize - - - - Qt::Orientation::Vertical - - - - - - - QLayout::SizeConstraint::SetMinimumSize - - - - - - 16777215 - 16777215 - - - - C1 2^ - - - - - - - - 16777215 - 16777215 - - - - C2 2^ - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - C3 2^ - - - - - - - - 16777215 - 16777215 - - - - C4 2^ - - - - - - - - - - 0 - 0 - - - - + + + + Ways Selector (powers of 2) + + + + + + @@ -674,17 +602,17 @@ - - DynamicWaysEntry - QWidget -
dynamicwaysentry.h
- 1 -
DigitLabel QLabel
digitlabel.h
+ + CacheWaysSelector + QWidget +
cachewaysselector.h
+ 1 +
-- cgit v1.2.3 From 8954fab5b430623e2052753fae20707b878b858c Mon Sep 17 00:00:00 2001 From: bd Date: Sun, 27 Apr 2025 14:33:26 -0400 Subject: Fix styles --- gui/cachewaysselector.cc | 3 +-- gui/gui.ui | 7 ------- gui/resources/styles.qss | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 9 deletions(-) (limited to 'gui/gui.ui') diff --git a/gui/cachewaysselector.cc b/gui/cachewaysselector.cc index f0314e5..14dae6f 100644 --- a/gui/cachewaysselector.cc +++ b/gui/cachewaysselector.cc @@ -32,7 +32,7 @@ CacheWaysSelector::CacheWaysSelector(QWidget *parent) : QWidget(parent) v = new QVBoxLayout(this); for (i = 1; i <= 6; ++i) { - l = new QHBoxLayout(this); + l = new QHBoxLayout; b = new QLabel(QString("L%1 2^").arg(i), this); @@ -46,7 +46,6 @@ CacheWaysSelector::CacheWaysSelector(QWidget *parent) : QWidget(parent) v->addLayout(l); this->sbs.append(sb); } - v->addStretch(); } QList CacheWaysSelector::values() const diff --git a/gui/gui.ui b/gui/gui.ui index c20b3f6..57a7974 100644 --- a/gui/gui.ui +++ b/gui/gui.ui @@ -375,13 +375,6 @@
- - - - QLayout::SizeConstraint::SetMinimumSize - - - diff --git a/gui/resources/styles.qss b/gui/resources/styles.qss index a61035e..758978c 100644 --- a/gui/resources/styles.qss +++ b/gui/resources/styles.qss @@ -4,6 +4,8 @@ color: "#00cc00"; background-color: "#000200"; border: 0px solid "#000200"; + selection-background-color: "#00cc00"; + selection-color: "#000200"; } QStatusBar { @@ -50,6 +52,52 @@ QGroupBox::title { QLabel { } +QSpinBox { + padding-right: 15px; /* make room for the arrows */ + border: none; +} + +QSpinBox::up-button { + color: "#000200"; + background-color: "#00cc00"; + subcontrol-origin: border; + subcontrol-position: top right; /* position at the top right corner */ + + width: 16px; + border: none; + subcontrol-origin: border; +} + +QSpinBox::up-arrow { + width: 7px; + height: 7px; +} + +QSpinBox::up-button:pressed { + color: "#00cc00"; + background-color: "#000200"; +} + +QSpinBox::down-button { + color: "#000200"; + background-color: "#00cc00"; + subcontrol-origin: border; + subcontrol-position: bottom right; /* position at bottom right corner */ + + width: 16px; + border: none; +} + +QSpinBox::down-arrow { + width: 7px; + height: 7px; +} + +QSpinBox::down-button:pressed { + color: "#00cc00"; + background-color: "#000200"; +} + QTableView { border: 0px; selection-background-color: transparent; -- cgit v1.2.3 From 51f66c58ae8a21951d2406b3a36e96c9beb391a2 Mon Sep 17 00:00:00 2001 From: bd Date: Sun, 27 Apr 2025 15:04:24 -0400 Subject: Make the storage display bigger --- gui/gui.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui/gui.ui') diff --git a/gui/gui.ui b/gui/gui.ui index 57a7974..e571a0f 100644 --- a/gui/gui.ui +++ b/gui/gui.ui @@ -25,7 +25,7 @@ - 800 + 1500 0 -- cgit v1.2.3 From d9832fa5f24dc0e7df41b61e5d0181adbb4edf77 Mon Sep 17 00:00:00 2001 From: bd Date: Sun, 27 Apr 2025 15:09:55 -0400 Subject: Adjust storage display size --- gui/gui.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui/gui.ui') diff --git a/gui/gui.ui b/gui/gui.ui index e571a0f..18d5da1 100644 --- a/gui/gui.ui +++ b/gui/gui.ui @@ -25,7 +25,7 @@ - 1500 + 1250 0 -- cgit v1.2.3 From 336faf3fd701aaf962613abd1ff0a69cbdf021ce Mon Sep 17 00:00:00 2001 From: bd Date: Sun, 27 Apr 2025 23:34:35 -0400 Subject: Fix UI display to not be ridged --- gui/gui.ui | 21 ++++++++++++--------- src/ex.cc | 2 ++ 2 files changed, 14 insertions(+), 9 deletions(-) (limited to 'gui/gui.ui') diff --git a/gui/gui.ui b/gui/gui.ui index 18d5da1..5a5a037 100644 --- a/gui/gui.ui +++ b/gui/gui.ui @@ -6,7 +6,7 @@ 0 0 - 1522 + 1686 621 @@ -18,14 +18,17 @@ - + + + 6 + - 1250 + 0 0 @@ -35,7 +38,7 @@ - + @@ -93,7 +96,7 @@ - 200 + 0 0 @@ -146,7 +149,7 @@ - 200 + 0 0 @@ -199,7 +202,7 @@ - 200 + 0 0 @@ -255,7 +258,7 @@ - 200 + 0 0 @@ -308,7 +311,7 @@ - 200 + 0 0 diff --git a/src/ex.cc b/src/ex.cc index 3f86ad4..286c7ba 100644 --- a/src/ex.cc +++ b/src/ex.cc @@ -32,6 +32,8 @@ void EX::advance_helper() Mnemonic m; s1 = 0, s2 = 0, s3 = 0; + v1 = {0}, v2 = {0}, v3 = {0}; + v_len = 0, v_immediate = 0, v_base_addr = 0; m = this->curr_instr->mnemonic; pc = this->curr_instr->slot_B; -- cgit v1.2.3