diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2010-02-01 12:21:49 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2010-02-01 12:21:49 +0000 |
| commit | 5c707aac4f1c5246443fee32f5629881ecc134c5 (patch) | |
| tree | 325526cf796f0cdacbba9b713678855578b6804c /src/plugins/Transports/http | |
| parent | dbe1c2bb4eda63205b744411ddcaf12d5d6436fb (diff) | |
| download | qmmp-5c707aac4f1c5246443fee32f5629881ecc134c5.tar.gz qmmp-5c707aac4f1c5246443fee32f5629881ecc134c5.tar.bz2 qmmp-5c707aac4f1c5246443fee32f5629881ecc134c5.zip | |
added transport settings
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1534 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Transports/http')
| -rw-r--r-- | src/plugins/Transports/http/httpinputfactory.cpp | 29 | ||||
| -rw-r--r-- | src/plugins/Transports/http/httpinputfactory.h | 7 |
2 files changed, 34 insertions, 2 deletions
diff --git a/src/plugins/Transports/http/httpinputfactory.cpp b/src/plugins/Transports/http/httpinputfactory.cpp index 25964eaa1..63997b934 100644 --- a/src/plugins/Transports/http/httpinputfactory.cpp +++ b/src/plugins/Transports/http/httpinputfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009 by Ilya Kotov * + * Copyright (C) 2009-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -19,6 +19,10 @@ ***************************************************************************/ #include <QtPlugin> +#include <QMessageBox> +#include <QTranslator> +#include <curl/curlver.h> +#include <qmmp/qmmp.h> #include "httpinputsource.h" #include "httpinputfactory.h" @@ -26,7 +30,10 @@ const InputSourceProperties HTTPInputFactory::properties() const { InputSourceProperties p; p.protocols = "http"; + p.name = tr("HTTP Plugin"); p.shortName = "http"; + p.hasAbout = TRUE; + p.hasSettings = TRUE; return p; } @@ -34,4 +41,24 @@ InputSource *HTTPInputFactory::create(const QString &url, QObject *parent) { return new HTTPInputSource(url, parent); } + +void HTTPInputFactory::showSettings(QWidget *parent) +{ +} + +void HTTPInputFactory::showAbout(QWidget *parent) +{ + QMessageBox::about (parent, tr("About HTTP Transport Plugin"), + tr("Qmmp HTTP Transport Plugin")+"\n"+ + tr("Compiled against libcurl-%1").arg(LIBCURL_VERSION) + "\n" + + tr("Writen by: Ilya Kotov <forkotov02@hotmail.ru>")); +} + +QTranslator *HTTPInputFactory::createTranslator(QObject *parent) +{ + QTranslator *translator = new QTranslator(parent); + QString locale = Qmmp::systemLanguageID(); + translator->load(QString(":/http_plugin_") + locale); + return translator; +} Q_EXPORT_PLUGIN2(http, HTTPInputFactory); diff --git a/src/plugins/Transports/http/httpinputfactory.h b/src/plugins/Transports/http/httpinputfactory.h index 78e02f1f4..220984ad2 100644 --- a/src/plugins/Transports/http/httpinputfactory.h +++ b/src/plugins/Transports/http/httpinputfactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009 by Ilya Kotov * + * Copyright (C) 2009-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -24,6 +24,8 @@ #include <QObject> #include <qmmp/inputsourcefactory.h> +class QTranslator; + /*! * @author Ilya Kotov <forkotov02@hotmail.ru> */ @@ -34,6 +36,9 @@ Q_INTERFACES(InputSourceFactory); public: const InputSourceProperties properties() const; InputSource *create(const QString &url, QObject *parent = 0); + void showSettings(QWidget *parent); + void showAbout(QWidget *parent); + QTranslator *createTranslator(QObject *parent); }; #endif // HTTPINPUTFACTORY_H |
