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_THESTREAM_H 0009 #define DRAGONPLAYER_THESTREAM_H 0010 0011 #include <KConfigGroup> 0012 #include <QSize> // small header 0013 #include <QString> // small header 0014 #include <QUrl> // larger :( but no macros at least 0015 #include <phonon/Global> 0016 0017 /// for purely static classes 0018 #define DRAGONPLAYER_NO_EXPORT(T) \ 0019 T(); \ 0020 ~T(); \ 0021 T(const T &); \ 0022 T &operator=(const T &); \ 0023 bool operator==(const T &); \ 0024 bool operator!=(const T &); 0025 0026 class QAction; 0027 0028 namespace Dragon 0029 { 0030 class TheStream 0031 { 0032 DRAGONPLAYER_NO_EXPORT(TheStream) 0033 0034 public: 0035 static QUrl url(); 0036 0037 static bool canSeek(); 0038 static bool hasAudio(); 0039 static bool hasVideo(); 0040 static bool hasMedia(); 0041 0042 static QSize defaultVideoSize(); 0043 0044 static int aspectRatio(); 0045 static QAction *aspectRatioAction(); 0046 static void setRatio(QAction *); 0047 static void addRatio(int, QAction *); 0048 0049 static const char *CHANNEL_PROPERTY; 0050 static int subtitleChannel(); 0051 static int audioChannel(); 0052 0053 static QString prettyTitle(); 0054 static QString fullTitle(); 0055 0056 static QString metaData(Phonon::MetaData key); 0057 static QString discId(); 0058 0059 static bool hasProfile(); 0060 0061 static KConfigGroup profile(); 0062 0063 private: 0064 static QHash<int, QAction *> s_aspectRatioActions; 0065 }; 0066 } 0067 0068 #endif