Line |
Branch |
Exec |
Source |
1 |
|
|
#ifndef MAIN_VIEW_H |
2 |
|
|
#define MAIN_VIEW_H |
3 |
|
|
|
4 |
|
|
#include <QWidget> |
5 |
|
|
#include <QComboBox> |
6 |
|
|
|
7 |
|
|
#include "controller/controller.h" |
8 |
|
|
#include "interpreter/interpreter.h" |
9 |
|
|
|
10 |
|
|
#include "debugtabwidget.h" |
11 |
|
|
|
12 |
|
|
|
13 |
|
|
enum TabIdentifier { |
14 |
|
|
DEBUG = 0, |
15 |
|
|
|
16 |
|
|
NOTSET |
17 |
|
|
}; |
18 |
|
|
|
19 |
|
|
namespace Ui { |
20 |
|
|
class MainView; |
21 |
|
|
} |
22 |
|
|
|
23 |
|
|
class MainView : public QWidget |
24 |
|
|
{ |
25 |
|
4 |
Q_OBJECT |
26 |
|
|
|
27 |
|
|
public: |
28 |
|
|
explicit MainView(Controller &controller, interpreter::Manager &manager, QWidget *parent = nullptr); |
29 |
|
|
~MainView() override; |
30 |
|
|
|
31 |
|
|
[[nodiscard]] QComboBox &getMidiInBox() const; |
32 |
|
|
[[nodiscard]] QComboBox &getMidiOutBox() const; |
33 |
|
|
|
34 |
|
|
[[nodiscard]] Controller &getMidiController(); |
35 |
|
|
[[nodiscard]] interpreter::Manager &getInterpretedManager(); |
36 |
|
|
protected: |
37 |
|
|
void setMidiPorts(); |
38 |
|
|
void activateDebugTab(); |
39 |
|
|
void deactivateDebugTab(); |
40 |
|
|
|
41 |
|
|
private slots: |
42 |
|
|
void tabWidgetCurrentChanged(int index); |
43 |
|
|
|
44 |
|
|
private: |
45 |
|
|
Ui::MainView *ui; |
46 |
|
|
DebugTabWidget *debugTabWidget; |
47 |
|
|
Controller &m_midiController; |
48 |
|
|
interpreter::Manager &m_interpreterManager; |
49 |
|
|
TabIdentifier m_currentTab; |
50 |
|
|
}; |
51 |
|
|
|
52 |
|
|
#endif // MAIN_VIEW_H |
53 |
|
|
|