blob: 57f293ef48c81265934be00d05c317c40c1cc8db (
plain) (
blame)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
#ifndef QMPCHANNELSWINDOW_H
#define QMPCHANNELSWINDOW_H
#include <QLabel>
#include <QPushButton>
#include <QDialog>
#include <QComboBox>
#include <QShowEvent>
#include <QCloseEvent>
#include <QMoveEvent>
#include "qmppresetselect.hpp"
#include "qmpchanneleditor.hpp"
#include "../core/qmpmidimappers.hpp"
namespace Ui {
class qmpChannelsWindow;
}
class QDCLabel:public QLabel
{
Q_OBJECT
private:
int id;
protected:
void mouseDoubleClickEvent(QMouseEvent *event){event->accept();emit onDoubleClick(id);}
public:
QDCLabel(QString s):QLabel(s){id=-1;}
void setID(int _id){id=_id;}
signals:
void onDoubleClick(int id);
};
class QDCPushButton:public QPushButton
{
Q_OBJECT
private:
int id;
protected:
void mousePressEvent(QMouseEvent *event){QPushButton::mousePressEvent(event);emit onClick(id);}
public:
QDCPushButton(QString s):QPushButton(s){id=-1;}
void setID(int _id){id=_id;}
signals:
void onClick(int id);
};
class QDCComboBox:public QComboBox
{
Q_OBJECT
private:
int id;
public:
QDCComboBox():QComboBox(){id=-1;connect(this,SIGNAL(currentIndexChanged(int)),this,SLOT(indexChangedSlot(int)));}
void setID(int _id){id=_id;}
signals:
void onChange(int id,int idx);
public slots:
void indexChangedSlot(int idx){emit(onChange(id,idx));}
};
class qmpChannelsWindow:public QDialog
{
Q_OBJECT
public:
explicit qmpChannelsWindow(QWidget *parent = 0);
~qmpChannelsWindow();
void showEvent(QShowEvent *event);
void closeEvent(QCloseEvent *event);
void moveEvent(QMoveEvent *event);
signals:
void dialogClosing();
public slots:
void channelWindowsUpdate();
void channelMSChanged();
void showPresetWindow(int chid);
void showChannelEditorWindow(int chid);
void changeMidiMapping(int chid,int idx);
void on_pbUnmute_clicked();
void on_pbUnsolo_clicked();
private:
Ui::qmpChannelsWindow *ui;
qmpPresetSelector *pselectw;
qmpChannelEditor *ceditw;
qmpMidiMapperRtMidi *mapper;
};
#endif // QMPCHANNELSWINDOW_H
|