<div dir="ltr">Hi, can someone review these patches?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 28, 2019 at 4:44 PM Rohan Rajpal <<a href="mailto:rohan17089@iiitd.ac.in" target="_blank">rohan17089@iiitd.ac.in</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Add the teletxt widget to the player<br>
controller<br>
---<br>
 modules/gui/qt/Makefile.am                    |   1 +<br>
 .../gui/qt/components/player_controller.hpp   |   9 ++<br>
 .../qt/components/playercontrolbarmodel.cpp   |   4 +-<br>
 modules/gui/qt/qml/player/ControlButtons.qml  |   6 +<br>
 modules/gui/qt/qml/player/TeletextWidget.qml  | 121 ++++++++++++++++++<br>
 modules/gui/qt/vlc.qrc                        |   1 +<br>
 6 files changed, 140 insertions(+), 2 deletions(-)<br>
 create mode 100644 modules/gui/qt/qml/player/TeletextWidget.qml<br>
<br>
diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am<br>
index 966dd37924..2624f3bea1 100644<br>
--- a/modules/gui/qt/Makefile.am<br>
+++ b/modules/gui/qt/Makefile.am<br>
@@ -539,6 +539,7 @@ libqt_plugin_la_QML = \<br>
        gui/qt/qml/player/VolumeWidget.qml \<br>
        gui/qt/qml/player/ModalControlBar.qml \<br>
        gui/qt/qml/player/SliderBar.qml \<br>
+       gui/qt/qml/player/TeletextWidget.qml \<br>
        gui/qt/qml/dialogs/Dialogs.qml \<br>
        gui/qt/qml/dialogs/ModalDialog.qml \<br>
        gui/qt/qml/utils/DNDLabel.qml \<br>
diff --git a/modules/gui/qt/components/player_controller.hpp b/modules/gui/qt/components/player_controller.hpp<br>
index 885eba2cd4..bd199aece7 100644<br>
--- a/modules/gui/qt/components/player_controller.hpp<br>
+++ b/modules/gui/qt/components/player_controller.hpp<br>
@@ -97,6 +97,15 @@ public:<br>
     };<br>
     Q_ENUM(MediaStopAction)<br>
<br>
+    enum Telekeys{<br>
+        TELE_RED = VLC_PLAYER_TELETEXT_KEY_RED,<br>
+        TELE_GREEN = VLC_PLAYER_TELETEXT_KEY_GREEN,<br>
+        TELE_YELLOW = VLC_PLAYER_TELETEXT_KEY_YELLOW,<br>
+        TELE_BLUE = VLC_PLAYER_TELETEXT_KEY_BLUE,<br>
+        TELE_INDEX = VLC_PLAYER_TELETEXT_KEY_INDEX<br>
+    };<br>
+    Q_ENUM(Telekeys)<br>
+<br>
     //playback<br>
     Q_PROPERTY(PlayingState playingState READ getPlayingState NOTIFY playingStateChanged)<br>
     Q_PROPERTY(bool isPlaying READ hasInput NOTIFY inputChanged)<br>
diff --git a/modules/gui/qt/components/playercontrolbarmodel.cpp b/modules/gui/qt/components/playercontrolbarmodel.cpp<br>
index 2fd1df9682..9798abace5 100644<br>
--- a/modules/gui/qt/components/playercontrolbarmodel.cpp<br>
+++ b/modules/gui/qt/components/playercontrolbarmodel.cpp<br>
@@ -20,7 +20,7 @@<br>
 #include "qt.hpp"<br>
 #include "playercontrolbarmodel.hpp"<br>
<br>
-#define MAIN_TB1_DEFAULT "67;68;37;65;19;22;0-2;23;20;65;35;7"<br>
+#define MAIN_TB1_DEFAULT "67;68;37;65;19;22;0-2;23;20;65;35;41;38;7"<br>
<br>
 PlayerControlBarModel::PlayerControlBarModel(QObject *_parent) : QAbstractListModel(_parent)<br>
 {<br>
@@ -29,7 +29,7 @@ PlayerControlBarModel::PlayerControlBarModel(QObject *_parent) : QAbstractListMo<br>
 void PlayerControlBarModel::loadConfig()<br>
 {<br>
     p_intf = m_mainCtx->getIntf();<br>
-    QString config = getSettings() ->value( "MainWindow/PlayerControlToolbar1", MAIN_TB1_DEFAULT )<br>
+    QString config = getSettings() ->value( "MainWindow/PlayerControlToolbar1Alt", MAIN_TB1_DEFAULT )<br>
                                             .toString();<br>
     parseAndAdd(config);<br>
 }<br>
diff --git a/modules/gui/qt/qml/player/ControlButtons.qml b/modules/gui/qt/qml/player/ControlButtons.qml<br>
index 2a32d401a5..8d547d28ac 100644<br>
--- a/modules/gui/qt/qml/player/ControlButtons.qml<br>
+++ b/modules/gui/qt/qml/player/ControlButtons.qml<br>
@@ -57,6 +57,7 @@ Item{<br>
         case PlayerControlBarModel.QUIT_BUTTON: return quitBtnDelegate<br>
         case PlayerControlBarModel.VOLUME: return volumeBtnDelegate<br>
         case PlayerControlBarModel.ASPECT_RATIO_COMBOBOX: return aspectRatioDelegate<br>
+        case PlayerControlBarModel.TELETEXT_BUTTONS: return teletextdelegate<br>
         }<br>
         console.log("button delegate id " + inpID +  " doesn't exists")<br>
         return spacerDelegate<br>
@@ -405,6 +406,11 @@ Item{<br>
         }<br>
     }<br>
<br>
+    Component{<br>
+        id: teletextdelegate<br>
+        TeletextWidget{}<br>
+    }<br>
+<br>
     Component{<br>
         id: volumeBtnDelegate<br>
         VolumeWidget{}<br>
diff --git a/modules/gui/qt/qml/player/TeletextWidget.qml b/modules/gui/qt/qml/player/TeletextWidget.qml<br>
new file mode 100644<br>
index 0000000000..1842873eb9<br>
--- /dev/null<br>
+++ b/modules/gui/qt/qml/player/TeletextWidget.qml<br>
@@ -0,0 +1,121 @@<br>
+/*****************************************************************************<br>
+ * Copyright (C) 2019 VLC authors and VideoLAN<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or modify<br>
+ * it under the terms of the GNU General Public License as published by<br>
+ * the Free Software Foundation; either version 2 of the License, or<br>
+ * ( at your option ) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.<br>
+ *****************************************************************************/<br>
+<br>
+import QtQuick 2.11<br>
+import QtQuick.Layouts 1.3<br>
+import QtQuick.Controls 2.4<br>
+<br>
+import org.videolan.vlc 0.1<br>
+<br>
+import "qrc:///utils/" as Utils<br>
+import "qrc:///style/"<br>
+<br>
+FocusScope{<br>
+    id: widgetfscope<br>
+    x: teleWidget.x<br>
+    y: teleWidget.y<br>
+    width: teleWidget.width<br>
+    height: teleWidget.height<br>
+<br>
+    property bool autohide: !player.isTeletextAvailable<br>
+    property bool acceptFocus: autohide<br>
+    visible: !autohide<br>
+<br>
+    RowLayout{<br>
+        id: teleWidget<br>
+        width: autohide ? 0 : 280 * scale<br>
+<br>
+        spacing: 0<br>
+<br>
+        Utils.IconToolButton{<br>
+            id: teleActivateBtn<br>
+            text: VLCIcons.tv<br>
+            size: VLCStyle.icon_normal<br>
+            onClicked: player.teletextEnabled = !player.teletextEnabled<br>
+            checked: player.teletextEnabled<br>
+            focus: true<br>
+            KeyNavigation.right: player.teletextEnabled ?<br>
+                                     teleTransparencyBtn : blueKeyBtn.KeyNavigation.right<br>
+        }<br>
+<br>
+        Utils.IconToolButton{<br>
+            id: teleTransparencyBtn<br>
+            text: VLCIcons.tvtelx<br>
+            size: VLCStyle.icon_normal<br>
+            opacity: 0.5<br>
+            enabled: player.teletextEnabled<br>
+            onClicked: player.teletextTransparency = !player.teletextTransparency<br>
+            KeyNavigation.right: telePageNumber<br>
+        }<br>
+<br>
+        Utils.SpinBoxExt{<br>
+            id: telePageNumber<br>
+            enabled: player.teletextEnabled<br>
+            from: 100<br>
+            to: 899<br>
+            editable: true<br>
+            onValueChanged: player.teletextPage = value<br>
+            KeyNavigation.right: indexKeyBtn<br>
+        }<br>
+<br>
+        Utils.IconToolButton{<br>
+            id: indexKeyBtn<br>
+            enabled: player.teletextEnabled<br>
+            size: VLCStyle.icon_normal<br>
+            text: VLCIcons.record<br>
+            onClicked: player.teletextPage = PlayerController.TELE_INDEX<br>
+            color: "grey"<br>
+            KeyNavigation.right: redKeyBtn<br>
+        }<br>
+        Utils.IconToolButton{<br>
+            id: redKeyBtn<br>
+            enabled: player.teletextEnabled<br>
+            size: VLCStyle.icon_normal<br>
+            text: VLCIcons.record<br>
+            onClicked: player.teletextPage = PlayerController.TELE_RED<br>
+            color: enabled ? "red" : "grey"<br>
+            KeyNavigation.right: greenKeyBtn<br>
+        }<br>
+        Utils.IconToolButton{<br>
+            id: greenKeyBtn<br>
+            enabled: player.teletextEnabled<br>
+            size: VLCStyle.icon_normal<br>
+            text: VLCIcons.record<br>
+            onClicked: player.teletextPage = PlayerController.TELE_GREEN<br>
+            color: enabled ? "green" : "grey"<br>
+            KeyNavigation.right: yellowKeyBtn<br>
+        }<br>
+        Utils.IconToolButton{<br>
+            id: yellowKeyBtn<br>
+            enabled: player.teletextEnabled<br>
+            size: VLCStyle.icon_normal<br>
+            text: VLCIcons.record<br>
+            onClicked: player.teletextPage = PlayerController.TELE_YELLOW<br>
+            color: enabled ? "yellow" : "grey"<br>
+            KeyNavigation.right: blueKeyBtn<br>
+        }<br>
+        Utils.IconToolButton{<br>
+            id: blueKeyBtn<br>
+            enabled: player.teletextEnabled<br>
+            size: VLCStyle.icon_normal<br>
+            text: VLCIcons.record<br>
+            onClicked: player.teletextPage = PlayerController.TELE_BLUE<br>
+            color: enabled ? "blue" : "grey"<br>
+        }<br>
+    }<br>
+}<br>
diff --git a/modules/gui/qt/vlc.qrc b/modules/gui/qt/vlc.qrc<br>
index aa6988cd1e..cb5cbcc926 100644<br>
--- a/modules/gui/qt/vlc.qrc<br>
+++ b/modules/gui/qt/vlc.qrc<br>
@@ -253,6 +253,7 @@<br>
         <file alias="ModalControlBar.qml">qml/player/ModalControlBar.qml</file><br>
         <file alias="ControlButtons.qml">qml/player/ControlButtons.qml</file><br>
         <file alias="VolumeWidget.qml">qml/player/VolumeWidget.qml</file><br>
+        <file alias="TeletextWidget.qml">qml/player/TeletextWidget.qml</file><br>
     </qresource><br>
     <qresource prefix="/about"><br>
         <file alias="About.qml">qml/about/About.qml</file><br>
-- <br>
2.17.1<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-4630695894845061617gmail_signature"><div dir="ltr"><div><div dir="ltr">Rohan Rajpal</div></div></div></div>