diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-10-29 09:43:25 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-10-29 09:43:25 +0000 |
| commit | 6f72ae7e3e61b330dd1874a951b258075649fe8e (patch) | |
| tree | c911ac5434ab5cb258328037590e78af3ca92361 /src/plugins/General/kdenotify/kdenotifyfactory.cpp | |
| parent | 81a8ff3c3605ddcd22f2e6400e5a7a3e2f330f43 (diff) | |
| download | qmmp-6f72ae7e3e61b330dd1874a951b258075649fe8e.tar.gz qmmp-6f72ae7e3e61b330dd1874a951b258075649fe8e.tar.bz2 qmmp-6f72ae7e3e61b330dd1874a951b258075649fe8e.zip | |
added kde notifications plugin (author: Artur Guzik) (Closes issue 164)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1337 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/kdenotify/kdenotifyfactory.cpp')
| -rw-r--r-- | src/plugins/General/kdenotify/kdenotifyfactory.cpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/plugins/General/kdenotify/kdenotifyfactory.cpp b/src/plugins/General/kdenotify/kdenotifyfactory.cpp new file mode 100644 index 000000000..2fdd9f75b --- /dev/null +++ b/src/plugins/General/kdenotify/kdenotifyfactory.cpp @@ -0,0 +1,43 @@ +#include "kdenotifyfactory.h" +#include "kdenotify.h" +#include "settingsdialog.h" + +#include <QtGui> + +const GeneralProperties KdeNotifyFactory::properties() const +{ + GeneralProperties properties; + properties.name = tr("KDE 4 notification plugin"); + properties.shortName = "kdenotify_icon"; + properties.hasAbout = TRUE; + properties.hasSettings = TRUE; + properties.visibilityControl = FALSE; + return properties; +} + +General *KdeNotifyFactory::create(QObject *parent) +{ + return new KdeNotify(parent); +} + +QDialog *KdeNotifyFactory::createConfigDialog(QWidget *parent) +{ + return new SettingsDialog(parent); +} + +void KdeNotifyFactory::showAbout(QWidget *parent) +{ + QMessageBox::about (parent, tr("About KDE Notification Plugin"), + tr("KDE 4 notification plugin for Qmmp \n") + + "Artur Guzik <a.guzik88@gmail.com>"); +} + +QTranslator *KdeNotifyFactory::createTranslator(QObject *parent) +{ + QTranslator *translator = new QTranslator(parent); + QString locale = Qmmp::systemLanguageID(); + translator->load(QString(":/kdenotify_plugin_") + locale); + return translator; +} + +Q_EXPORT_PLUGIN(KdeNotifyFactory) |
