aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/programdock.h
blob: 888e681f02acf20e7942b8ed705df53a303c0131 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef PROGRAMDOCK_H
#define PROGRAMDOCK_H

#include <QDockWidget>
#include <QBoxLayout>
#include <QComboBox>
#include <QLabel>
#include <QLineEdit>
#include "qtmipsmachine.h"
#include "memoryview.h"

class ProgramView : public MemoryView {
    Q_OBJECT
public:
    ProgramView(QWidget *parent, QSettings *settings);

    void setup(machine::QtMipsMachine*);

    void jump_to_pc(std::uint32_t);

protected:
    QList<QWidget*> row_widget(std::uint32_t address, QWidget *parent);

    void addr0_save_change(std::uint32_t val);

private slots:
    void cb_single_changed(int index);
    void cb_pipelined_changed(int index);

private:
    QComboBox *cb_single;
    QComboBox *cb_pipelined;
    QSettings *settings;
};

class ProgramDock : public QDockWidget {
    Q_OBJECT
public:
    ProgramDock(QWidget *parent, QSettings *settings);

    void setup(machine::QtMipsMachine *machine);

public slots:
    void jump_to_pc(std::uint32_t);

private:
    ProgramView *view;
};

#endif // PROGRAMDOCK_H