aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/programdock.h
blob: 9ed08960983abfa294761a2ee2ee95ed76c5bab0 (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
#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);

    void setup(machine::QtMipsMachine*);

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

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

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

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

    void setup(machine::QtMipsMachine *machine);

private:
    ProgramView *view;
};

#endif // PROGRAMDOCK_H