video_cheatsheet.h
Go to the documentation of this file.
00001 /****************************************************************************
00002 **
00003 ** Copyright (C) 2017 The Qt Company Ltd.
00004 ** Contact: https://www.qt.io/licensing/
00005 **
00006 ** This file is part of the examples of the Qt Toolkit.
00007 **
00008 ** $QT_BEGIN_LICENSE:BSD$
00009 ** Commercial License Usage
00010 ** Licensees holding valid commercial Qt licenses may use this file in
00011 ** accordance with the commercial license agreement provided with the
00012 ** Software or, alternatively, in accordance with the terms contained in
00013 ** a written agreement between you and The Qt Company. For licensing terms
00014 ** and conditions see https://www.qt.io/terms-conditions. For further
00015 ** information use the contact form at https://www.qt.io/contact-us.
00016 **
00017 ** BSD License Usage
00018 ** Alternatively, you may use this file under the terms of the BSD license
00019 ** as follows:
00020 **
00021 ** "Redistribution and use in source and binary forms, with or without
00022 ** modification, are permitted provided that the following conditions are
00023 ** met:
00024 **   * Redistributions of source code must retain the above copyright
00025 **     notice, this list of conditions and the following disclaimer.
00026 **   * Redistributions in binary form must reproduce the above copyright
00027 **     notice, this list of conditions and the following disclaimer in
00028 **     the documentation and/or other materials provided with the
00029 **     distribution.
00030 **   * Neither the name of The Qt Company Ltd nor the names of its
00031 **     contributors may be used to endorse or promote products derived
00032 **     from this software without specific prior written permission.
00033 **
00034 **
00035 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00036 ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00037 ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00038 ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00039 ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00040 ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00041 ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00042 ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00043 ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00044 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00045 ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
00046 **
00047 ** $QT_END_LICENSE$
00048 **
00049 ****************************************************************************/
00050 
00051 #ifndef VIDEOPLAYER_H
00052 #define VIDEOPLAYER_H
00053 
00054 #include <QDialog>
00055 #include <QMediaPlayer>
00056 #include <QMediaPlaylist>
00057 #include <QWidget>
00058 #include <QLabel>
00059 #include <QListWidget>
00060 
00061 class HelpVideo : public QDialog
00062 {
00063     Q_OBJECT
00064 public:
00065     HelpVideo(QWidget *parent = nullptr);
00066     ~HelpVideo();
00067 
00068 private slots:
00069     void handleError(QMediaPlayer::Error);
00070 
00071 private:
00072 
00073     struct HelpSection
00074     {
00075         QString title;
00076         QString text;
00077         QUrl video_url;
00078     };
00079 
00080     std::vector<HelpSection> _help_sections;
00081     
00082     QMediaPlayer* _media_player;
00083     QMediaPlaylist* _playlist;
00084     QLabel *_text;
00085     void setupHelps();
00086 };
00087 
00088 #endif


plotjuggler
Author(s): Davide Faconti
autogenerated on Wed Jul 3 2019 19:28:05