diff options
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 |