Qmmp
/usr/src/RPM/BUILD/qmmp-0.11-svn/src/qmmpui/pluginitem_p.h
00001 /***************************************************************************
00002  *   Copyright (C) 2011-2015 by Ilya Kotov                                 *
00003  *   forkotov02@hotmail.ru                                                 *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
00019  ***************************************************************************/
00020 #ifndef PLUGINITEM_P_H
00021 #define PLUGINITEM_P_H
00022 
00023 #include <QTreeWidgetItem>
00024 
00029 class QWidget;
00030 class InputSourceFactory;
00031 class DecoderFactory;
00032 class EngineFactory;
00033 class OutputFactory;
00034 class VisualFactory;
00035 class EffectFactory;
00036 class GeneralFactory;
00037 class OutputFactory;
00038 class FileDialogFactory;
00039 class UiFactory;
00040 
00041 class PluginItem : public QTreeWidgetItem
00042 {
00043 public:
00044 
00045     PluginItem(QTreeWidgetItem *parent, InputSourceFactory *factory, const QString &path);
00046     PluginItem(QTreeWidgetItem *parent, DecoderFactory *factory, const QString &path);
00047     PluginItem(QTreeWidgetItem *parent, EngineFactory *factory, const QString &path);
00048     PluginItem(QTreeWidgetItem *parent, EffectFactory *factory, const QString &path);
00049     PluginItem(QTreeWidgetItem *parent, VisualFactory *factory, const QString &path);
00050     PluginItem(QTreeWidgetItem *parent, GeneralFactory *factory, const QString &path);
00051     PluginItem(QTreeWidgetItem *parent, OutputFactory *factory, const QString &path);
00052     PluginItem(QTreeWidgetItem *parent, FileDialogFactory *factory, const QString &path);
00053     PluginItem(QTreeWidgetItem *parent, UiFactory *factory, const QString &path);
00054     ~PluginItem();
00055 
00056     enum PluginType
00057     {
00058         TRANSPORT = QTreeWidgetItem::UserType,
00059         DECODER,
00060         ENGINE,
00061         EFFECT,
00062         VISUAL,
00063         GENERAL,
00064         OUTPUT,
00065         FILE_DIALOG,
00066         USER_INTERFACE
00067     };
00068 
00069     bool hasAbout() const;
00070     bool hasSettings() const;
00071     void showAbout(QWidget *parent);
00072     void showSettings(QWidget *parent);
00073     void setEnabled(bool enabled);
00074 
00075 
00076 private:
00077     bool m_has_about;
00078     bool m_has_config;
00079     void *m_factory;
00080 };
00081 
00082 #endif
 All Classes Functions Variables Enumerations Enumerator