aboutsummaryrefslogtreecommitdiff
path: root/windows-extra/windowsextra.hpp
blob: ba09638223b42cc7e40a55ec0404f2fcb0fbb276 (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
#ifndef SAMPLEPLUGIN_H
#define SAMPLEPLUGIN_H

#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