diff options
author | Chris Xiong <chirs241097@gmail.com> | 2017-02-12 00:29:01 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2017-02-12 00:29:01 +0800 |
commit | d779d32c8c32e0e0c22662046498620b11fa46de (patch) | |
tree | ba63a0d33d1fb6a07bca30d74dd72934b9ef69ce /visualization | |
parent | acf466561f17bf0eb6c19ea0467b27f5392aeb36 (diff) | |
download | QMidiPlayer-d779d32c8c32e0e0c22662046498620b11fa46de.tar.xz |
New functionality API. Port built-in features to the new API.
Start the revamp of the main Window. Credit of the new design goes to @BLumia.
Diffstat (limited to 'visualization')
-rw-r--r-- | visualization/qmpvisualization.cpp | 4 | ||||
-rw-r--r-- | visualization/qmpvisualization.hpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/visualization/qmpvisualization.cpp b/visualization/qmpvisualization.cpp index 8bc0ecb..9a8f675 100644 --- a/visualization/qmpvisualization.cpp +++ b/visualization/qmpvisualization.cpp @@ -754,7 +754,7 @@ void qmpVisualization::init() rendererTh=NULL;playing=false; memset(spectra,0,sizeof(spectra)); memset(spectrar,0,sizeof(spectrar)); - hvif=api->registerVisualizationIntf(vi); + api->registerVisualizationIntf(vi,"Visualization","Visualization",api->isDarkTheme()?":/img/visualization_i.png":":/img/visualization.png",0); herif=api->registerEventReaderIntf(cb,NULL); hehif=api->registerEventHandlerIntf(hcb,NULL); hfrf=api->registerFileReadFinishedHandlerIntf(frcb,NULL); @@ -828,7 +828,7 @@ void qmpVisualization::deinit() { if(!api)return;close();tspool.clear(); for(unsigned i=0;i<pool.size();++i)delete pool[i];pool.clear(); - api->unregisterVisualizationIntf(hvif); + api->unregisterVisualizationIntf("Visualization"); api->unregisterEventReaderIntf(herif); api->unregisterEventHandlerIntf(hehif); api->unregisterFileReadFinishedHandlerIntf(hfrf); diff --git a/visualization/qmpvisualization.hpp b/visualization/qmpvisualization.hpp index 28e9b52..6518376 100644 --- a/visualization/qmpvisualization.hpp +++ b/visualization/qmpvisualization.hpp @@ -70,7 +70,7 @@ class qmpVisualization:public qmpPluginIntf uint32_t ctc,ctk,fintk,elb; double etps; bool shouldclose,playing; - int hvif,herif,hehif,hfrf; + int herif,hehif,hfrf; std::vector<std::pair<uint32_t,uint32_t>>tspool; int traveld[16][128];bool notestatus[16][128],lastnotestatus[16][128]; int spectra[16][128],spectrar[16][128]; |