diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2014-03-06 10:53:52 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2014-03-06 10:53:52 +0000 |
| commit | 389799c3433a17a7babaeb3365f1fb8c12ea12fe (patch) | |
| tree | 4b0092c3936016af0f01062a0a5d8475e793a4ea /src/plugins/General/gnomehotkey/gnomehotkeyfactory.cpp | |
| parent | bc4c331d2c1fe0060de15c999110803f41f62b29 (diff) | |
| download | qmmp-389799c3433a17a7babaeb3365f1fb8c12ea12fe.tar.gz qmmp-389799c3433a17a7babaeb3365f1fb8c12ea12fe.tar.bz2 qmmp-389799c3433a17a7babaeb3365f1fb8c12ea12fe.zip | |
added gnome hotkey plugin
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4123 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/gnomehotkey/gnomehotkeyfactory.cpp')
| -rw-r--r-- | src/plugins/General/gnomehotkey/gnomehotkeyfactory.cpp | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/plugins/General/gnomehotkey/gnomehotkeyfactory.cpp b/src/plugins/General/gnomehotkey/gnomehotkeyfactory.cpp new file mode 100644 index 000000000..191c133a1 --- /dev/null +++ b/src/plugins/General/gnomehotkey/gnomehotkeyfactory.cpp @@ -0,0 +1,64 @@ +/*************************************************************************** + * Copyright (C) 2014 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#include <QtGui> +#include <qmmp/qmmp.h> +#include "mediakeys.h" +#include "gnomehotkeyfactory.h" + +const GeneralProperties GnomeHotkeyFactory::properties() const +{ + GeneralProperties properties; + properties.name = tr("Gnome Hotkey Plugin"); + properties.shortName = "gnomehotkey"; + properties.hasAbout = true; + properties.hasSettings = false; + properties.visibilityControl = false; + return properties; +} + +QObject *GnomeHotkeyFactory::create(QObject *parent) +{ + return new MediaKeys(parent); +} + +QDialog *GnomeHotkeyFactory::createConfigDialog(QWidget *parent) +{ + Q_UNUSED(parent); + return 0; +} + +void GnomeHotkeyFactory::showAbout(QWidget *parent) +{ + QMessageBox::about (parent, tr("About Gnome Hotkey Plugin"), + tr("Qmmp Gnome Hotkey Plugin") + "\n" + + tr("This plugin adds support of the GNOME/Cinnamone hotkeys") + "\n" + + tr("Written by: Ilya Kotov <forkotov02@hotmail.ru>")); +} + +QTranslator *GnomeHotkeyFactory::createTranslator(QObject *parent) +{ + QTranslator *translator = new QTranslator(parent); + QString locale = Qmmp::systemLanguageID(); + translator->load(QString(":/gnomehotkey_plugin_") + locale); + return translator; +} + +Q_EXPORT_PLUGIN2(gnomehotkey, GnomeHotkeyFactory) |
