1// qmediaplaylist.sip generated by MetaSIP 2// 3// This file is part of the QtMultimedia Python extension module. 4// 5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com> 6// 7// This file is part of PyQt5. 8// 9// This file may be used under the terms of the GNU General Public License 10// version 3.0 as published by the Free Software Foundation and appearing in 11// the file LICENSE included in the packaging of this file. Please review the 12// following information to ensure the GNU General Public License version 3.0 13// requirements will be met: http://www.gnu.org/copyleft/gpl.html. 14// 15// If you do not wish to use this file under the terms of the GPL version 3.0 16// then you may purchase a commercial license. For more information contact 17// info@riverbankcomputing.com. 18// 19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 22 23class QMediaPlaylist : QObject, QMediaBindableInterface 24{ 25%TypeHeaderCode 26#include <qmediaplaylist.h> 27%End 28 29public: 30 enum PlaybackMode 31 { 32 CurrentItemOnce, 33 CurrentItemInLoop, 34 Sequential, 35 Loop, 36 Random, 37 }; 38 39 enum Error 40 { 41 NoError, 42 FormatError, 43 FormatNotSupportedError, 44 NetworkError, 45 AccessDeniedError, 46 }; 47 48%If (Qt_5_6_1 -) 49 explicit QMediaPlaylist(QObject *parent /TransferThis/ = 0); 50%End 51%If (- Qt_5_6_1) 52 QMediaPlaylist(QObject *parent /TransferThis/ = 0); 53%End 54 virtual ~QMediaPlaylist(); 55 virtual QMediaObject *mediaObject() const; 56 QMediaPlaylist::PlaybackMode playbackMode() const; 57 void setPlaybackMode(QMediaPlaylist::PlaybackMode mode); 58 int currentIndex() const; 59 QMediaContent currentMedia() const; 60 int nextIndex(int steps = 1) const; 61 int previousIndex(int steps = 1) const; 62 QMediaContent media(int index) const; 63 int mediaCount() const; 64 bool isEmpty() const; 65 bool isReadOnly() const; 66 bool addMedia(const QMediaContent &content); 67 bool addMedia(const QList<QMediaContent> &items); 68 bool insertMedia(int index, const QMediaContent &content); 69 bool insertMedia(int index, const QList<QMediaContent> &items); 70 bool removeMedia(int pos); 71 bool removeMedia(int start, int end); 72 bool clear(); 73 void load(const QNetworkRequest &request, const char *format = 0) /ReleaseGIL/; 74 void load(const QUrl &location, const char *format = 0) /ReleaseGIL/; 75 void load(QIODevice *device, const char *format = 0) /ReleaseGIL/; 76 bool save(const QUrl &location, const char *format = 0) /ReleaseGIL/; 77 bool save(QIODevice *device, const char *format) /ReleaseGIL/; 78 QMediaPlaylist::Error error() const; 79 QString errorString() const; 80%If (Qt_5_7_0 -) 81 bool moveMedia(int from, int to); 82%End 83 84public slots: 85 void shuffle(); 86 void next(); 87 void previous(); 88 void setCurrentIndex(int index); 89 90signals: 91 void currentIndexChanged(int index); 92 void playbackModeChanged(QMediaPlaylist::PlaybackMode mode); 93 void currentMediaChanged(const QMediaContent &); 94 void mediaAboutToBeInserted(int start, int end); 95 void mediaInserted(int start, int end); 96 void mediaAboutToBeRemoved(int start, int end); 97 void mediaRemoved(int start, int end); 98 void mediaChanged(int start, int end); 99 void loaded(); 100 void loadFailed(); 101 102protected: 103 virtual bool setMediaObject(QMediaObject *object); 104}; 105