diff options
Diffstat (limited to 'qtmips_gui/coreview')
-rw-r--r-- | qtmips_gui/coreview/instructionview.cpp | 10 | ||||
-rw-r--r-- | qtmips_gui/coreview/instructionview.h | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/qtmips_gui/coreview/instructionview.cpp b/qtmips_gui/coreview/instructionview.cpp index 202aa3c..bab9bc8 100644 --- a/qtmips_gui/coreview/instructionview.cpp +++ b/qtmips_gui/coreview/instructionview.cpp @@ -1,9 +1,15 @@ #include "instructionview.h" +#include <QFont> using namespace coreview; -InstructionView::InstructionView() : QObject(), QGraphicsSimpleTextItem() { } +InstructionView::InstructionView() : QObject(), QGraphicsSimpleTextItem() { + QFont f; + f.setPointSize(8); + setFont(f); + instruction_update(machine::Instruction()); +} -void InstructionView::instruction_update(machine::Instruction &i) { +void InstructionView::instruction_update(const machine::Instruction &i) { setText(i.to_str()); } diff --git a/qtmips_gui/coreview/instructionview.h b/qtmips_gui/coreview/instructionview.h index 8db4756..4b7d171 100644 --- a/qtmips_gui/coreview/instructionview.h +++ b/qtmips_gui/coreview/instructionview.h @@ -12,7 +12,7 @@ public: InstructionView(); public slots: - void instruction_update(machine::Instruction &i); + void instruction_update(const machine::Instruction &i); }; } |