![]() |
VLC-Qt 0.8.0- (Different version)
|
00001 /**************************************************************************** 00002 * VLC-Qt - Qt and libvlc connector library 00003 * Copyright (C) 2012 Tadej Novak <tadej@tano.si> 00004 * 00005 * This library is free software: you can redistribute it and/or modify 00006 * it under the terms of the GNU Lesser General Public License as published 00007 * by the Free Software Foundation, either version 3 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This library 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 Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public License 00016 * along with this library. If not, see <http://www.gnu.org/licenses/>. 00017 *****************************************************************************/ 00018 00019 #ifndef VLCQT_CONTROLAUDIO_H_ 00020 #define VLCQT_CONTROLAUDIO_H_ 00021 00022 #include <QtCore/QList> 00023 #include <QtCore/QMap> 00024 00025 #include "Enums.h" 00026 #include "SharedExportWidgets.h" 00027 00028 class QAction; 00029 class QTimer; 00030 00031 class VlcAudio; 00032 class VlcMediaPlayer; 00033 00041 class VLCQT_WIDGETS_EXPORT VlcControlAudio : public QObject 00042 { 00043 Q_OBJECT 00044 public: 00051 explicit VlcControlAudio(VlcMediaPlayer *player, 00052 const QString &language = 0, 00053 QObject *parent = 0); 00054 00058 ~VlcControlAudio(); 00059 00060 00066 void reset(); 00067 00072 void setDefaultAudioLanguage(const QString &language); 00073 00074 00075 signals: 00081 void actions(QList<QAction *>, 00082 const Vlc::ActionsType); 00083 00088 void audioTracks(QList<QAction *>); 00089 00090 00091 private slots: 00092 void clean(); 00093 void update(); 00094 void updateActions(); 00095 00096 private: 00097 VlcAudio *_vlcAudio; 00098 VlcMediaPlayer *_vlcMediaPlayer; 00099 00100 QTimer *_timer; 00101 00102 QList<QAction *> _actionList; 00103 QMap<QString, int> _desc; 00104 QMap<int, int> _id; 00105 00106 bool _manualLanguage; 00107 QStringList _preferedLanguage; 00108 }; 00109 00110 #endif // VLCQT_CONTROLAUDIO_H_