| 1 | #include "byteconverterinstr.h" |
| 2 | #include "ui_byteconverterinstr.h" |
| 3 | |
| 4 | #include "pep.h" |
| 5 | #include "sim.h" |
| 6 | |
| 7 | ByteConverterInstr::ByteConverterInstr(QWidget *parent) : |
| 8 | QWidget(parent), |
| 9 | ui(new Ui::ByteConverterInstr) |
| 10 | { |
| 11 | ui->setupUi(this); |
| 12 | |
| 13 | |
| 14 | } |
| 15 | |
| 16 | ByteConverterInstr::~ByteConverterInstr() |
| 17 | { |
| 18 | delete ui; |
| 19 | } |
| 20 | |
| 21 | void ByteConverterInstr::setValue(int data) |
| 22 | { |
| 23 | ui->label->setText(" " + Pep::enumToMnemonMap.value(Pep::decodeMnemonic[data]) |
| 24 | + Pep::commaSpaceToAddrMode(Pep::decodeAddrMode[data])); |
| 25 | } |
| 26 | |
| 27 | void ByteConverterInstr::changeEvent(QEvent *e) |
| 28 | { |
| 29 | QWidget::changeEvent(e); |
| 30 | switch (e->type()) { |
| 31 | case QEvent::LanguageChange: |
| 32 | ui->retranslateUi(this); |
| 33 | break; |
| 34 | default: |
| 35 | break; |
| 36 | } |
| 37 | } |