From: Friedemann Kleint Date: Wed, 20 Jun 2012 13:49:50 +0000 (+0200) Subject: Fix dependencies of the QtTools module. X-Git-Tag: accepted/tizen/20131212.181521~296 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e5333359ef3c1e645e66f6ab59ba1ea08a68808e;p=platform%2Fupstream%2Fqttools.git Fix dependencies of the QtTools module. - Remove phonon designer plugin. - Disable the ActiveX designer plugin, which will later be moved to the ActiveQt module. Change-Id: I36240e9d22f852c2a3bbfcb00052221adfb2e681 Reviewed-by: Lars Knoll --- diff --git a/src/designer/src/plugins/phononwidgets/images/seekslider.png b/src/designer/src/plugins/phononwidgets/images/seekslider.png deleted file mode 100644 index a1f4cb0..0000000 Binary files a/src/designer/src/plugins/phononwidgets/images/seekslider.png and /dev/null differ diff --git a/src/designer/src/plugins/phononwidgets/images/videoplayer.png b/src/designer/src/plugins/phononwidgets/images/videoplayer.png deleted file mode 100644 index 55d86a6..0000000 Binary files a/src/designer/src/plugins/phononwidgets/images/videoplayer.png and /dev/null differ diff --git a/src/designer/src/plugins/phononwidgets/images/videowidget.png b/src/designer/src/plugins/phononwidgets/images/videowidget.png deleted file mode 100644 index 3e8706e..0000000 Binary files a/src/designer/src/plugins/phononwidgets/images/videowidget.png and /dev/null differ diff --git a/src/designer/src/plugins/phononwidgets/images/volumeslider.png b/src/designer/src/plugins/phononwidgets/images/volumeslider.png deleted file mode 100644 index ea81dd2..0000000 Binary files a/src/designer/src/plugins/phononwidgets/images/volumeslider.png and /dev/null differ diff --git a/src/designer/src/plugins/phononwidgets/phononcollection.cpp b/src/designer/src/plugins/phononwidgets/phononcollection.cpp deleted file mode 100644 index 5400ed9..0000000 --- a/src/designer/src/plugins/phononwidgets/phononcollection.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "videoplayerplugin.h" -#include "seeksliderplugin.h" -#include "volumesliderplugin.h" - -#include -#include - -QT_BEGIN_NAMESPACE - -class PhononCollection: public QObject, public QDesignerCustomWidgetCollectionInterface -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetCollectionInterface" FILE "phononwidgets.json") - Q_INTERFACES(QDesignerCustomWidgetCollectionInterface) -public: - explicit PhononCollection(QObject *parent = 0); - - virtual QList customWidgets() const; - -private: - QList m_plugins; -}; - -PhononCollection::PhononCollection(QObject *parent) : - QObject(parent) -{ - const QString group = QStringLiteral("Phonon"); - m_plugins.push_back(new VideoPlayerPlugin(group, this)); - m_plugins.push_back(new SeekSliderPlugin(group, this)); - m_plugins.push_back(new VolumeSliderPlugin(group, this)); -} - -QList PhononCollection::customWidgets() const -{ - return m_plugins; -} - -QT_END_NAMESPACE - -#include "phononcollection.moc" diff --git a/src/designer/src/plugins/phononwidgets/phononwidgets.json b/src/designer/src/plugins/phononwidgets/phononwidgets.json deleted file mode 100644 index 0967ef4..0000000 --- a/src/designer/src/plugins/phononwidgets/phononwidgets.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/src/designer/src/plugins/phononwidgets/phononwidgets.pro b/src/designer/src/plugins/phononwidgets/phononwidgets.pro deleted file mode 100644 index 32517ad..0000000 --- a/src/designer/src/plugins/phononwidgets/phononwidgets.pro +++ /dev/null @@ -1,25 +0,0 @@ -TEMPLATE = lib -TARGET = phononwidgets -CONFIG += qt warn_on plugin -QT += widgets phonon designer-private - -include(../plugins.pri) -build_all:!build_pass { - CONFIG -= build_all - CONFIG += release -} - -SOURCES += videoplayerplugin.cpp \ - videoplayertaskmenu.cpp \ - seeksliderplugin.cpp \ - volumesliderplugin.cpp \ - phononcollection.cpp - -HEADERS += videoplayerplugin.h \ - videoplayertaskmenu.h \ - seeksliderplugin.h \ - volumesliderplugin.h - -OTHER_FILES = "phonon.json" - -RESOURCES += phononwidgets.qrc diff --git a/src/designer/src/plugins/phononwidgets/phononwidgets.qrc b/src/designer/src/plugins/phononwidgets/phononwidgets.qrc deleted file mode 100644 index 2e1250b..0000000 --- a/src/designer/src/plugins/phononwidgets/phononwidgets.qrc +++ /dev/null @@ -1,8 +0,0 @@ - - - images/videoplayer.png - images/videowidget.png - images/seekslider.png - images/volumeslider.png - - diff --git a/src/designer/src/plugins/phononwidgets/seeksliderplugin.cpp b/src/designer/src/plugins/phononwidgets/seeksliderplugin.cpp deleted file mode 100644 index 2721ab8..0000000 --- a/src/designer/src/plugins/phononwidgets/seeksliderplugin.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "seeksliderplugin.h" - -#include - -static const char *toolTipC = "Phonon Seek Slider"; - -QT_BEGIN_NAMESPACE - -SeekSliderPlugin::SeekSliderPlugin(const QString &group, QObject *parent) : - QObject(parent), - m_group(group), - m_initialized(false) -{ -} - -QString SeekSliderPlugin::name() const -{ - return QStringLiteral("Phonon::SeekSlider"); -} - -QString SeekSliderPlugin::group() const -{ - return m_group; -} - -QString SeekSliderPlugin::toolTip() const -{ - return tr(toolTipC); -} - -QString SeekSliderPlugin::whatsThis() const -{ - return tr(toolTipC); -} - -QString SeekSliderPlugin::includeFile() const -{ - return QStringLiteral(""); -} - -QIcon SeekSliderPlugin::icon() const -{ - return QIcon(QStringLiteral(":/qt-project.org/phononwidgets/images/seekslider.png")); -} - -bool SeekSliderPlugin::isContainer() const -{ - return false; -} - -QWidget *SeekSliderPlugin::createWidget(QWidget *parent) -{ - return new Phonon::SeekSlider(parent); -} - -bool SeekSliderPlugin::isInitialized() const -{ - return m_initialized; -} - -void SeekSliderPlugin::initialize(QDesignerFormEditorInterface *) -{ - if (m_initialized) - return; - m_initialized = true; -} - -QString SeekSliderPlugin::domXml() const -{ - return QStringLiteral("\ - \ - \ - "); -} - -QT_END_NAMESPACE diff --git a/src/designer/src/plugins/phononwidgets/seeksliderplugin.h b/src/designer/src/plugins/phononwidgets/seeksliderplugin.h deleted file mode 100644 index 72b5e0b..0000000 --- a/src/designer/src/plugins/phononwidgets/seeksliderplugin.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef SEEKSLIDER_PLUGIN_H -#define SEEKSLIDER_PLUGIN_H - -#include - -QT_BEGIN_NAMESPACE - -class SeekSliderPlugin: public QObject, public QDesignerCustomWidgetInterface -{ - Q_OBJECT - Q_INTERFACES(QDesignerCustomWidgetInterface) -public: - explicit SeekSliderPlugin(const QString &group, QObject *parent = 0); - - virtual QString name() const; - virtual QString group() const; - virtual QString toolTip() const; - virtual QString whatsThis() const; - virtual QString includeFile() const; - virtual QIcon icon() const; - virtual bool isContainer() const; - virtual QWidget *createWidget(QWidget *parent); - virtual bool isInitialized() const; - virtual void initialize(QDesignerFormEditorInterface *core); - virtual QString domXml() const; - -private: - const QString m_group; - bool m_initialized; -}; - -QT_END_NAMESPACE - -#endif // SEEKSLIDER_PLUGIN_H diff --git a/src/designer/src/plugins/phononwidgets/videoplayerplugin.cpp b/src/designer/src/plugins/phononwidgets/videoplayerplugin.cpp deleted file mode 100644 index a12484a..0000000 --- a/src/designer/src/plugins/phononwidgets/videoplayerplugin.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "videoplayerplugin.h" -#include "videoplayertaskmenu.h" - -#include -#include -#include - -#include -#include - -static const char *toolTipC = "Phonon Video Player"; - -QT_BEGIN_NAMESPACE - -VideoPlayerPlugin::VideoPlayerPlugin(const QString &group, QObject *parent) : - QObject(parent), - m_group(group), - m_initialized(false) -{ -} - -QString VideoPlayerPlugin::name() const -{ - return QStringLiteral("Phonon::VideoPlayer"); -} - -QString VideoPlayerPlugin::group() const -{ - return m_group; -} - -QString VideoPlayerPlugin::toolTip() const -{ - return tr(toolTipC); -} - -QString VideoPlayerPlugin::whatsThis() const -{ - return tr(toolTipC); -} - -QString VideoPlayerPlugin::includeFile() const -{ - return QStringLiteral(""); -} - -QIcon VideoPlayerPlugin::icon() const -{ - return QIcon(QStringLiteral(":/qt-project.org/phononwidgets/images/videoplayer.png")); -} - -bool VideoPlayerPlugin::isContainer() const -{ - return false; -} - -QWidget *VideoPlayerPlugin::createWidget(QWidget *parent) -{ - return new Phonon::VideoPlayer(Phonon::NoCategory, parent); -} - -bool VideoPlayerPlugin::isInitialized() const -{ - return m_initialized; -} - -void VideoPlayerPlugin::initialize(QDesignerFormEditorInterface * core) -{ - if (m_initialized) - return; - - QExtensionManager *mgr = core->extensionManager(); - VideoPlayerTaskMenuFactory::registerExtension(mgr, Q_TYPEID(QDesignerTaskMenuExtension)); - m_initialized = true; -} - -QString VideoPlayerPlugin::domXml() const -{ - return QStringLiteral("\ - \ - \ - \ - \ - 0\ - 0\ - 300\ - 200\ - \ - \ - \ - "); -} - -QT_END_NAMESPACE diff --git a/src/designer/src/plugins/phononwidgets/videoplayerplugin.h b/src/designer/src/plugins/phononwidgets/videoplayerplugin.h deleted file mode 100644 index 6ef93bb..0000000 --- a/src/designer/src/plugins/phononwidgets/videoplayerplugin.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef VIDEOPLAYER_PLUGIN_H -#define VIDEOPLAYER_PLUGIN_H - -#include - -QT_BEGIN_NAMESPACE - -class VideoPlayerPlugin: public QObject, public QDesignerCustomWidgetInterface -{ - Q_OBJECT - Q_INTERFACES(QDesignerCustomWidgetInterface) -public: - explicit VideoPlayerPlugin(const QString &group, QObject *parent = 0); - - virtual QString name() const; - virtual QString group() const; - virtual QString toolTip() const; - virtual QString whatsThis() const; - virtual QString includeFile() const; - virtual QIcon icon() const; - virtual bool isContainer() const; - virtual QWidget *createWidget(QWidget *parent); - virtual bool isInitialized() const; - virtual void initialize(QDesignerFormEditorInterface *core); - virtual QString domXml() const; - -private: - const QString m_group; - bool m_initialized; -}; - -QT_END_NAMESPACE - -#endif // VIDEOPLAYER_PLUGIN_H diff --git a/src/designer/src/plugins/phononwidgets/videoplayertaskmenu.cpp b/src/designer/src/plugins/phononwidgets/videoplayertaskmenu.cpp deleted file mode 100644 index 4950c39..0000000 --- a/src/designer/src/plugins/phononwidgets/videoplayertaskmenu.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "videoplayertaskmenu.h" - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -// ----------------- MimeTypeDialog: Display mime types in scrollable text - -class MimeTypeDialog : public QDialog { - Q_DISABLE_COPY(MimeTypeDialog) -public: - explicit MimeTypeDialog(QWidget *parent = 0); - - void setMimeTypes(const QStringList &); - -private: - QPlainTextEdit *m_plainTextEdit; -}; - -MimeTypeDialog::MimeTypeDialog(QWidget *parent) : - QDialog(parent), - m_plainTextEdit(new QPlainTextEdit) -{ - setModal(true); - setWindowTitle(VideoPlayerTaskMenu::tr("Available Mime Types")); - setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); - - QVBoxLayout *layout = new QVBoxLayout; - m_plainTextEdit->setReadOnly(true); - layout->addWidget(m_plainTextEdit); - - QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok); - connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); - connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); - layout->addWidget(buttonBox); - - setLayout(layout); -} - -void MimeTypeDialog::setMimeTypes(const QStringList &l) -{ - m_plainTextEdit->setPlainText(l.join(QString(1, QLatin1Char('\n')))); -} - -// ----------------- VideoPlayerTaskMenu -VideoPlayerTaskMenu::VideoPlayerTaskMenu(Phonon::VideoPlayer *object, QObject *parent) : - QObject(parent), - m_widget(object), - m_displayMimeTypesAction(new QAction(tr("Display supported mime types..."), this)), - m_loadAction(new QAction(tr("Load..."), this)), - m_playAction(new QAction(tr("Play"), this)), - m_pauseAction(new QAction(tr("Pause"), this)), - m_stopAction(new QAction(tr("Stop"), this)) -{ - m_taskActions << m_displayMimeTypesAction << m_loadAction << m_playAction << m_pauseAction << m_stopAction; - - connect(m_widget->mediaObject(), SIGNAL(stateChanged(Phonon::State,Phonon::State)), this, SLOT(mediaObjectStateChanged(Phonon::State,Phonon::State))); - connect(m_displayMimeTypesAction, SIGNAL(triggered()), this, SLOT(slotMimeTypes())); - connect(m_loadAction, SIGNAL(triggered()), this, SLOT(slotLoad())); - connect(m_playAction, SIGNAL(triggered()), object, SLOT(play())); - connect(m_pauseAction, SIGNAL(triggered()), object, SLOT(pause())); - connect(m_stopAction, SIGNAL(triggered()), object, SLOT(stop())); -} - -QList VideoPlayerTaskMenu::taskActions() const -{ - const bool isPlaying = m_widget->isPlaying(); - const bool isPaused = m_widget->isPlaying(); - m_loadAction->setEnabled(!isPlaying && !isPaused); - m_playAction->setEnabled(!isPlaying); - m_pauseAction->setEnabled(isPlaying); - m_stopAction->setEnabled(isPlaying || isPaused); - return m_taskActions; -} - -void VideoPlayerTaskMenu::slotMimeTypes() -{ - MimeTypeDialog mimeTypeDialog(m_widget->window()); - mimeTypeDialog.setMimeTypes(Phonon::BackendCapabilities::availableMimeTypes()); - mimeTypeDialog.exec(); -} - -void VideoPlayerTaskMenu::slotLoad() -{ - const QString fileName = QFileDialog::getOpenFileName(m_widget->window(), tr("Choose Video Player Media Source")); - if (fileName.isEmpty()) - return; - m_widget->load(Phonon::MediaSource(fileName)); - -} - -void VideoPlayerTaskMenu::mediaObjectStateChanged(Phonon::State newstate, Phonon::State /* oldstate */) -{ - if (newstate == Phonon::ErrorState) { - const QString msg = tr("An error has occurred in '%1': %2").arg(m_widget->objectName(), m_widget->mediaObject()->errorString()); - QMessageBox::warning(m_widget->window(), tr("Video Player Error"), msg); - } -} - -QT_END_NAMESPACE diff --git a/src/designer/src/plugins/phononwidgets/videoplayertaskmenu.h b/src/designer/src/plugins/phononwidgets/videoplayertaskmenu.h deleted file mode 100644 index 74540fe..0000000 --- a/src/designer/src/plugins/phononwidgets/videoplayertaskmenu.h +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef VIDEOPLAYERTASKMENU_H -#define VIDEOPLAYERTASKMENU_H - - -#include -#include -#include - -#include -#include - -QT_BEGIN_NAMESPACE - -class VideoPlayerTaskMenu: public QObject, public QDesignerTaskMenuExtension -{ - Q_OBJECT - Q_INTERFACES(QDesignerTaskMenuExtension) -public: - explicit VideoPlayerTaskMenu(Phonon::VideoPlayer *object, QObject *parent = 0); - virtual QList taskActions() const; - -private slots: - void slotLoad(); - void slotMimeTypes(); - void mediaObjectStateChanged(Phonon::State newstate, Phonon::State oldstate); - -private: - Phonon::VideoPlayer *m_widget; - QAction *m_displayMimeTypesAction; - QAction *m_loadAction; - QAction *m_playAction; - QAction *m_pauseAction; - QAction *m_stopAction; - - QList m_taskActions; -}; - -typedef qdesigner_internal::ExtensionFactory VideoPlayerTaskMenuFactory; - -QT_END_NAMESPACE - -#endif // VIDEOPLAYERTASKMENU_H diff --git a/src/designer/src/plugins/phononwidgets/volumesliderplugin.cpp b/src/designer/src/plugins/phononwidgets/volumesliderplugin.cpp deleted file mode 100644 index 0a19ede..0000000 --- a/src/designer/src/plugins/phononwidgets/volumesliderplugin.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "volumesliderplugin.h" - -#include - -static const char *toolTipC = "Phonon Volume Slider"; - -QT_BEGIN_NAMESPACE - -VolumeSliderPlugin::VolumeSliderPlugin(const QString &group, QObject *parent) : - QObject(parent), - m_group(group), - m_initialized(false) -{ -} - -QString VolumeSliderPlugin::name() const -{ - return QStringLiteral("Phonon::VolumeSlider"); -} - -QString VolumeSliderPlugin::group() const -{ - return m_group; -} - -QString VolumeSliderPlugin::toolTip() const -{ - return tr(toolTipC); -} - -QString VolumeSliderPlugin::whatsThis() const -{ - return tr(toolTipC); -} - -QString VolumeSliderPlugin::includeFile() const -{ - return QStringLiteral(""); -} - -QIcon VolumeSliderPlugin::icon() const -{ - return QIcon(QStringLiteral(":/qt-project.org/phononwidgets/images/volumeslider.png")); -} - -bool VolumeSliderPlugin::isContainer() const -{ - return false; -} - -QWidget *VolumeSliderPlugin::createWidget(QWidget *parent) -{ - return new Phonon::VolumeSlider(parent); -} - -bool VolumeSliderPlugin::isInitialized() const -{ - return m_initialized; -} - -void VolumeSliderPlugin::initialize(QDesignerFormEditorInterface *) -{ - if (m_initialized) - return; - m_initialized = true; -} - -QString VolumeSliderPlugin::domXml() const -{ - return QStringLiteral("\ - \ - \ - "); -} - -QT_END_NAMESPACE diff --git a/src/designer/src/plugins/phononwidgets/volumesliderplugin.h b/src/designer/src/plugins/phononwidgets/volumesliderplugin.h deleted file mode 100644 index b485939..0000000 --- a/src/designer/src/plugins/phononwidgets/volumesliderplugin.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef VOLUMESLIDER_PLUGIN_H -#define VOLUMESLIDER_PLUGIN_H - -#include - -QT_BEGIN_NAMESPACE - -class VolumeSliderPlugin: public QObject, public QDesignerCustomWidgetInterface -{ - Q_OBJECT - Q_INTERFACES(QDesignerCustomWidgetInterface) -public: - explicit VolumeSliderPlugin(const QString &group, QObject *parent = 0); - - virtual QString name() const; - virtual QString group() const; - virtual QString toolTip() const; - virtual QString whatsThis() const; - virtual QString includeFile() const; - virtual QIcon icon() const; - virtual bool isContainer() const; - virtual QWidget *createWidget(QWidget *parent); - virtual bool isInitialized() const; - virtual void initialize(QDesignerFormEditorInterface *core); - virtual QString domXml() const; - -private: - const QString m_group; - bool m_initialized; -}; - -QT_END_NAMESPACE - -#endif // VOLUMESLIDER_PLUGIN_H diff --git a/src/designer/src/plugins/plugins.pro b/src/designer/src/plugins/plugins.pro index c0d2428..628d44c 100644 --- a/src/designer/src/plugins/plugins.pro +++ b/src/designer/src/plugins/plugins.pro @@ -4,5 +4,4 @@ CONFIG += ordered REQUIRES = !CONFIG(static,shared|static) # contains(QT_CONFIG, opengl): SUBDIRS += tools/view3d contains(QT_CONFIG, webkit): SUBDIRS += qwebview -contains(QT_CONFIG, phonon): SUBDIRS += phononwidgets -win32: contains(QT_CONFIG, activeqt): SUBDIRS += activeqt +# win32: contains(QT_CONFIG, activeqt): SUBDIRS += activeqt