diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-12-08 19:17:32 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-12-08 19:17:32 +0000 |
| commit | f599c04cb6e5b6394c44aa9e6f0b9b04a3f4afdb (patch) | |
| tree | aeff2b77bd6756a4ff65d483c157bbfac3e1328b /src/plugins/Input/wildmidi/decoderwildmidifactory.cpp | |
| parent | c56f4a00a5a86a2f923103fdcb921c208e1e1a84 (diff) | |
| download | qmmp-f599c04cb6e5b6394c44aa9e6f0b9b04a3f4afdb.tar.gz qmmp-f599c04cb6e5b6394c44aa9e6f0b9b04a3f4afdb.tar.bz2 qmmp-f599c04cb6e5b6394c44aa9e6f0b9b04a3f4afdb.zip | |
moved midi plugin to plugin pack
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@674 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/wildmidi/decoderwildmidifactory.cpp')
| -rw-r--r-- | src/plugins/Input/wildmidi/decoderwildmidifactory.cpp | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/src/plugins/Input/wildmidi/decoderwildmidifactory.cpp b/src/plugins/Input/wildmidi/decoderwildmidifactory.cpp deleted file mode 100644 index 6d78fd5f3..000000000 --- a/src/plugins/Input/wildmidi/decoderwildmidifactory.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2008 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., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ - -#include <QtGui> - -#include "detailsdialog.h" -#include "decoder_wildmidi.h" -#include "decoderwildmidifactory.h" - - -// DecoderWildMidiFactory - -bool DecoderWildMidiFactory::supports(const QString &source) const -{ - - return (source.right(4).toLower() == ".mid"); -} - -bool DecoderWildMidiFactory::canDecode(QIODevice *) const -{ - return FALSE; -} - -const DecoderProperties DecoderWildMidiFactory::properties() const -{ - DecoderProperties properties; - properties.name = tr("WildMidi Plugin"); - properties.filter = "*.mid"; - properties.description = tr("Midi Files"); - //properties.contentType = ; - properties.hasAbout = FALSE; - properties.hasSettings = FALSE; - properties.noInput = TRUE; - properties.protocols = "file"; - return properties; -} - -Decoder *DecoderWildMidiFactory::create(QObject *parent, QIODevice *input, - Output *output, const QString &path) -{ - Q_UNUSED(input); - return new DecoderWildMidi(parent, this, output, path); -} - -QList<FileInfo *> DecoderWildMidiFactory::createPlayList(const QString &fileName, bool useMetaData) -{ - QList <FileInfo*> list; - FileInfo *info = new FileInfo(fileName); - - void *midi_ptr = WildMidi_Open (fileName.toLocal8Bit()); - if(midi_ptr) - { - //wm_info = new _WM_Info; - _WM_Info *wm_info = WildMidi_GetInfo(midi_ptr); - info->setLength(wm_info->approx_total_samples / 44100); - qDebug("===== %d", wm_info->approx_total_samples / 44100); - WildMidi_Close(midi_ptr); - } - - list << info; - return list; -} - -QObject* DecoderWildMidiFactory::showDetails(QWidget *parent, const QString &path) -{ - /*DetailsDialog *d = new DetailsDialog(parent, path); - d -> show();*/ - return 0; -} - -void DecoderWildMidiFactory::showSettings(QWidget *) -{} - -void DecoderWildMidiFactory::showAbout(QWidget *parent) -{} - -QTranslator *DecoderWildMidiFactory::createTranslator(QObject *parent) -{ - QTranslator *translator = new QTranslator(parent); - QString locale = QLocale::system().name(); - translator->load(QString(":/wildmidi_plugin_") + locale); - return translator; -} - -Q_EXPORT_PLUGIN(DecoderWildMidiFactory) |
