diff options
author | Gary Wang <wzc782970009@gmail.com> | 2020-11-21 19:15:08 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2021-01-07 14:16:22 +0800 |
commit | 2716ffaf602fd9f39d9aca06a0853ed10cf90132 (patch) | |
tree | c70579c587e30a36980cc74218bff4dc33a4f808 /windows-extra/windowsextra.hpp | |
parent | ea68a817c1947b2001775d42755d260d66f4d37f (diff) | |
download | QMidiPlayer-2716ffaf602fd9f39d9aca06a0853ed10cf90132.tar.xz |
feat: windows extra plugin
Diffstat (limited to 'windows-extra/windowsextra.hpp')
-rw-r--r-- | windows-extra/windowsextra.hpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/windows-extra/windowsextra.hpp b/windows-extra/windowsextra.hpp new file mode 100644 index 0000000..227d4ad --- /dev/null +++ b/windows-extra/windowsextra.hpp @@ -0,0 +1,38 @@ +#ifndef SAMPLEPLUGIN_H +#define SAMPLEPLUGIN_H + +#include "../include/qmpcorepublic.hpp" + +#include <QWinTaskbarButton> + +class qmpWindowsExtraPlugin: public qmpPluginIntf +{ +private: + qmpPluginAPI *api; +public: + qmpWindowsExtraPlugin(qmpPluginAPI *_api); + ~qmpWindowsExtraPlugin(); + void init(); + void deinit(); + const char *pluginGetName(); + const char *pluginGetVersion(); + +private: + QWinTaskbarButton * m_taskbarIcon = nullptr; + QTimer * m_timer = nullptr; + QMetaObject::Connection m_timerConnection; + int ui_start, ui_stop, ui_pause, ui_reset; +}; + +extern "C" { + EXPORTSYM qmpPluginIntf *qmpPluginGetInterface(qmpPluginAPI *api) + { + return new qmpWindowsExtraPlugin(api); + } + EXPORTSYM const char *qmpPluginGetAPIRev() + { + return QMP_PLUGIN_API_REV; + } +} + +#endif // SAMPLEPLUGIN_H |