VLC-Qt 0.8.0- (Different version)
ControlVideo.h
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_CONTROLVIDEO_H_
00020 #define VLCQT_CONTROLVIDEO_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 VlcMediaPlayer;
00032 class VlcVideo;
00033 
00041 class VLCQT_WIDGETS_EXPORT VlcControlVideo : public QObject
00042 {
00043 Q_OBJECT
00044 public:
00051     explicit VlcControlVideo(VlcMediaPlayer *player,
00052                              const QString &language = 0,
00053                              QObject *parent = 0);
00054 
00058     ~VlcControlVideo();
00059 
00060 
00066     void reset();
00067 
00072     void setDefaultSubtitleLanguage(const QString &language);
00073 
00074 
00075 public slots:
00080     void loadSubtitle(const QString &subtitle);
00081 
00082 
00083 signals:
00089     void actions(QList<QAction *>,
00090                  const Vlc::ActionsType);
00091 
00097     void subtitleTracks(QList<QAction *>);
00098 
00104     void videoTracks(QList<QAction *>);
00105 
00106 
00107 private slots:
00108     void updateSubtitleActions();
00109     void updateSubtitles();
00110     void updateVideoActions();
00111     void updateVideo();
00112 
00113 private:
00114     VlcMediaPlayer *_vlcMediaPlayer;
00115     VlcVideo *_vlcVideo;
00116 
00117     QTimer *_timerSubtitles;
00118     QTimer *_timerVideo;
00119 
00120     QList<QAction *> _actionSubList;
00121     QMap<QString, int> _descSub;
00122     QMap<int, int> _idSub;
00123 
00124     QList<QAction *> _actionVideoList;
00125     QMap<QString, int> _descVideo;
00126     QMap<int, int> _idVideo;
00127 
00128     bool _manualLanguage;
00129     QStringList _preferedLanguage;
00130 };
00131 
00132 #endif // VLCQT_CONTROLVIDEO_H_
 All Classes Namespaces Functions Enumerations