aboutsummaryrefslogtreecommitdiff
path: root/simple-visualization/qmpkeyboardwindow.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'simple-visualization/qmpkeyboardwindow.hpp')
-rw-r--r--simple-visualization/qmpkeyboardwindow.hpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/simple-visualization/qmpkeyboardwindow.hpp b/simple-visualization/qmpkeyboardwindow.hpp
new file mode 100644
index 0000000..a99e62e
--- /dev/null
+++ b/simple-visualization/qmpkeyboardwindow.hpp
@@ -0,0 +1,36 @@
+#ifndef QMPKEYBOARDWINDOW_HPP
+#define QMPKEYBOARDWINDOW_HPP
+
+#include "../include/qmpcorepublic.hpp"
+#include "qmppianowidget.hpp"
+
+#include <QWidget>
+
+class EventCallback:public QObject,public ICallBack
+{
+ Q_OBJECT
+ public:
+ void callBack(void* callerdata,void* userdata);
+ signals:
+ void keystateupdated(int ch,int key,bool state);
+};
+
+class qmpKeyboardWindow:public QWidget
+{
+ Q_OBJECT
+ friend class EventCallback;
+ private:
+ qmpPianoWidget *pw[16];
+ qmpPluginAPI *api;
+ EventCallback *ec;
+ public:
+ qmpKeyboardWindow(qmpPluginAPI *_api,QWidget *parent);
+ ~qmpKeyboardWindow();
+ void resetAll();
+ protected:
+ void closeEvent(QCloseEvent *event);
+ public slots:
+ void onkeystatesupdate(int ch,int key,bool state);
+};
+
+#endif