File indexing completed on 2024-04-28 04:48:38
0001 /* 0002 SPDX-FileCopyrightText: 2005 Max Howell <max.howell@methylblue.com> 0003 SPDX-FileCopyrightText: 2007 Ian Monroe <ian@monroe.nu> 0004 0005 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0006 */ 0007 0008 #ifndef DRAGONPLAYER_PART_H 0009 #define DRAGONPLAYER_PART_H 0010 0011 #include "codeine.h" 0012 0013 #include <QList> 0014 0015 #include <KParts/ReadOnlyPart> 0016 #include <KParts/StatusBarExtension> 0017 #include <QUrl> 0018 #include <phonon/MediaSource> 0019 0020 namespace Dragon 0021 { 0022 class PlayAction; 0023 0024 class Part : public KParts::ReadOnlyPart 0025 { 0026 Q_OBJECT 0027 public: 0028 Part(QWidget *parentWidget, QObject *parent, const KPluginMetaData &metaData, const QVariantList & /*args*/); 0029 0030 bool closeUrl() override; 0031 0032 public Q_SLOTS: 0033 bool openUrl(const QUrl &) override; 0034 0035 private Q_SLOTS: 0036 void engineStateChanged(Phonon::State state); 0037 void videoContextMenu(const QPoint &pos); 0038 0039 private: 0040 QUrl m_url; 0041 KParts::StatusBarExtension *m_statusBarExtension; 0042 Dragon::PlayAction *m_playPause; 0043 0044 QStatusBar *statusBar() 0045 { 0046 return m_statusBarExtension->statusBar(); 0047 } 0048 }; 0049 } 0050 0051 #endif