diff options
Diffstat (limited to 'simple-visualization/simplevisualization.cpp')
-rw-r--r-- | simple-visualization/simplevisualization.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/simple-visualization/simplevisualization.cpp b/simple-visualization/simplevisualization.cpp new file mode 100644 index 0000000..0a1de02 --- /dev/null +++ b/simple-visualization/simplevisualization.cpp @@ -0,0 +1,29 @@ +#include "simplevisualization.hpp" +#include "qmpkeyboardwindow.hpp" + +qmpSimpleVisualization::qmpSimpleVisualization(qmpPluginAPI *_api){api=_api;} +void qmpSimpleVisualization::show(){p->show();} +void qmpSimpleVisualization::close(){p->close();} +void qmpSimpleVisualization::init() +{ + api->registerFunctionality(this,"Keyboard","Keyboard",api->isDarkTheme()?":/img/visualization_i.svg":":/img/visualization.svg",0,true); + p=new qmpKeyboardWindow(api,NULL); + uihs=api->registerUIHook("main.stop",qmpSimpleVisualization::cbstop,(void*)this); +} +void qmpSimpleVisualization::deinit() +{ + if(!api)return;close(); + api->unregisterFunctionality("Keyboard"); + api->unregisterUIHook("main.stop",uihs); + delete p; +} +const char* qmpSimpleVisualization::pluginGetName() +{return "QMidiPlayer Simple Visualization Plugin";} +const char* qmpSimpleVisualization::pluginGetVersion() +{return "0.8.6";} + +void qmpSimpleVisualization::cbstop(void*,void* usrd) +{ + qmpSimpleVisualization *v=(qmpSimpleVisualization*)usrd; + v->p->resetAll(); +} |