diff options
author | Karel Kočí <cynerd@email.cz> | 2017-12-15 22:46:01 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-12-15 22:46:01 +0100 |
commit | a4d10c950fcf8181f708eb4dffdc9133aa33193b (patch) | |
tree | d7138459d8dbd55f59a73851f5cfa6933333b953 /qtmips_gui/registersdock.h | |
parent | e6ca4b4568e311b47239bfe83de15ed9e91c57b9 (diff) | |
download | qtmips-a4d10c950fcf8181f708eb4dffdc9133aa33193b.tar.gz qtmips-a4d10c950fcf8181f708eb4dffdc9133aa33193b.tar.bz2 qtmips-a4d10c950fcf8181f708eb4dffdc9133aa33193b.zip |
Implement some barebone registers dock
Diffstat (limited to 'qtmips_gui/registersdock.h')
-rw-r--r-- | qtmips_gui/registersdock.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/qtmips_gui/registersdock.h b/qtmips_gui/registersdock.h index 338edc3..90be659 100644 --- a/qtmips_gui/registersdock.h +++ b/qtmips_gui/registersdock.h @@ -2,16 +2,37 @@ #define REGISTERSDOCK_H #include <QDockWidget> -#include "ui_registersdock.h" +#include <QLabel> +#include <QFormLayout> +#include <QScrollArea> +#include <QPropertyAnimation> +#include "qtmipsmachine.h" class RegistersDock : public QDockWidget { + Q_OBJECT public: RegistersDock(QWidget *parent); ~RegistersDock(); + void setup(QtMipsMachine *machine); + +private slots: + void pc_changed(std::uint32_t val); + void gp_changed(std::uint8_t i, std::uint32_t val); + void hi_lo_changed(bool hi, std::uint32_t val); + private: - Ui::RegistersDock *ui; + const Registers *regs; + + QScrollArea *widg; + QFormLayout *layout; + + QLabel *pc; + QLabel *hi; + QLabel *lo; + QLabel *gp[32]; + void labelVal(QLabel *label, std::uint32_t val, bool dec); }; #endif // REGISTERSDOCK_H |