-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheffectsonicfactory.cpp
48 lines (42 loc) · 1.25 KB
/
effectsonicfactory.cpp
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
39
40
41
42
43
44
45
46
47
48
#include "effectsonicfactory.h"
#include "sonicplugin.h"
#include "settingsdialog.h"
#include <QMessageBox>
#if (QMMP_VERSION_INT < 0x10700) || (0x20000 <= QMMP_VERSION_INT && QMMP_VERSION_INT < 0x20200)
const EffectProperties EffectSonicFactory::properties() const
#else
EffectProperties EffectSonicFactory::properties() const
#endif
{
EffectProperties properties;
properties.name = tr("Speed Pitch Plugin");
properties.shortName = "sonic";
properties.hasSettings = true;
properties.hasAbout = true;
return properties;
}
Effect *EffectSonicFactory::create()
{
return new SonicPlugin();
}
#if (QMMP_VERSION_INT < 0x10700) || (0x20000 <= QMMP_VERSION_INT && QMMP_VERSION_INT < 0x20200)
void EffectSonicFactory::showSettings(QWidget *parent)
{
(new SettingsDialog(parent))->show();
}
#else
QDialog *EffectSonicFactory::createSettings(QWidget *parent)
{
return new SettingsDialog(parent);
}
#endif
void EffectSonicFactory::showAbout(QWidget *parent)
{
QMessageBox::about(parent, tr("About Speed Pitch Effect Plugin"),
tr("Qmmp Speed Pitch Effect Plugin") + "\n" +
tr("Written by: Greedysky <[email protected]>"));
}
QString EffectSonicFactory::translation() const
{
return QString();
}