From 0484d574d6530d03cb533131009d3a84d6817704 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Wed, 3 Nov 2021 12:16:42 +0100 Subject: [PATCH] QmlDesigner: Add QtMultimedia Add property editor sheets and item library entries for QtMultimedia. Task-number: QDS-5147 Change-Id: Ic4fc2926e7bf5aa5376f3fd7b6b5e452034e4001 Reviewed-by: Qt CI Bot Reviewed-by: Thomas Hartmann --- .../QtMultimedia/AudioOutputSpecifics.qml | 37 ++++++ .../QtMultimedia/AudioSection.qml | 67 +++++++++++ .../QtMultimedia/MediaPlayerSection.qml | 56 ++++++++++ .../QtMultimedia/MediaPlayerSpecifics.qml | 37 ++++++ .../QtMultimedia/VideoSection.qml | 105 ++++++++++++++++++ .../QtMultimedia/VideoSpecifics.qml | 41 +++++++ .../qtquickplugin/images/audio-16px.png | Bin 0 -> 267 bytes .../qtquickplugin/images/audio-24px.png | Bin 0 -> 521 bytes .../qtquickplugin/images/audio-24px@2x.png | Bin 0 -> 1026 bytes .../images/audio-output-16px.png | Bin 0 -> 359 bytes .../images/audio-output-24px.png | Bin 0 -> 595 bytes .../images/audio-output-24px@2x.png | Bin 0 -> 1129 bytes .../images/media-player-16px.png | Bin 0 -> 148 bytes .../images/media-player-24px.png | Bin 0 -> 179 bytes .../images/media-player-24px@2x.png | Bin 0 -> 260 bytes .../qtquickplugin/images/video-16px.png | Bin 0 -> 216 bytes .../qtquickplugin/images/video-24px.png | Bin 0 -> 286 bytes .../qtquickplugin/images/video-24px@2x.png | Bin 0 -> 399 bytes .../images/video-output-16px.png | Bin 0 -> 289 bytes .../images/video-output-24px.png | Bin 0 -> 387 bytes .../images/video-output-24px@2x.png | Bin 0 -> 610 bytes .../qtquickplugin/qtquickplugin.qrc | 16 +++ .../qmldesigner/qtquickplugin/quick.metainfo | 85 ++++++++++++++ .../qtquickplugin/source/audio.qml | 35 ++++++ 24 files changed, 479 insertions(+) create mode 100644 share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/AudioOutputSpecifics.qml create mode 100644 share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/AudioSection.qml create mode 100644 share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/MediaPlayerSection.qml create mode 100644 share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/MediaPlayerSpecifics.qml create mode 100644 share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/VideoSection.qml create mode 100644 share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/VideoSpecifics.qml create mode 100644 src/plugins/qmldesigner/qtquickplugin/images/audio-16px.png create mode 100644 src/plugins/qmldesigner/qtquickplugin/images/audio-24px.png create mode 100644 src/plugins/qmldesigner/qtquickplugin/images/audio-24px@2x.png create mode 100644 src/plugins/qmldesigner/qtquickplugin/images/audio-output-16px.png create mode 100644 src/plugins/qmldesigner/qtquickplugin/images/audio-output-24px.png create mode 100644 src/plugins/qmldesigner/qtquickplugin/images/audio-output-24px@2x.png create mode 100644 src/plugins/qmldesigner/qtquickplugin/images/media-player-16px.png create mode 100644 src/plugins/qmldesigner/qtquickplugin/images/media-player-24px.png create mode 100644 src/plugins/qmldesigner/qtquickplugin/images/media-player-24px@2x.png create mode 100644 src/plugins/qmldesigner/qtquickplugin/images/video-16px.png create mode 100644 src/plugins/qmldesigner/qtquickplugin/images/video-24px.png create mode 100644 src/plugins/qmldesigner/qtquickplugin/images/video-24px@2x.png create mode 100644 src/plugins/qmldesigner/qtquickplugin/images/video-output-16px.png create mode 100644 src/plugins/qmldesigner/qtquickplugin/images/video-output-24px.png create mode 100644 src/plugins/qmldesigner/qtquickplugin/images/video-output-24px@2x.png create mode 100644 src/plugins/qmldesigner/qtquickplugin/source/audio.qml diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/AudioOutputSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/AudioOutputSpecifics.qml new file mode 100644 index 00000000000..ab5860ec02a --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/AudioOutputSpecifics.qml @@ -0,0 +1,37 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import HelperWidgets 2.0 +import StudioControls 1.0 as StudioControls +import StudioTheme 1.0 as StudioTheme + +Column { + anchors.left: parent.left + anchors.right: parent.right + + AudioSection {} +} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/AudioSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/AudioSection.qml new file mode 100644 index 00000000000..db226e755a9 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/AudioSection.qml @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import HelperWidgets 2.0 +import StudioControls 1.0 as StudioControls +import StudioTheme 1.0 as StudioTheme + +Section { + caption: qsTr("Audio") + + anchors.left: parent.left + anchors.right: parent.right + + SectionLayout { + PropertyLabel { text: qsTr("Volume") } + + SecondColumnLayout { + SpinBox { + implicitWidth: StudioTheme.Values.twoControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + backendValue: backendValues.volume + decimals: 1 + minimumValue: 0.0 + maximumValue: 1.0 + } + + ExpandingSpacer {} + } + + PropertyLabel { text: qsTr("Muted") } + + SecondColumnLayout { + CheckBox { + implicitWidth: StudioTheme.Values.twoControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + backendValue: backendValues.muted + text: backendValues.muted.valueToString + } + + ExpandingSpacer {} + } + } +} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/MediaPlayerSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/MediaPlayerSection.qml new file mode 100644 index 00000000000..b76a1bd0fb5 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/MediaPlayerSection.qml @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import HelperWidgets 2.0 +import StudioControls 1.0 as StudioControls +import StudioTheme 1.0 as StudioTheme + +Section { + caption: qsTr("Media Player") + + anchors.left: parent.left + anchors.right: parent.right + + // TODO position property, what should be the range?! + + SectionLayout { + PropertyLabel { text: qsTr("Playback rate") } + + SecondColumnLayout { + SpinBox { + implicitWidth: StudioTheme.Values.twoControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + backendValue: backendValues.playbackRate + decimals: 1 + minimumValue: -1000 // TODO correct range + maximumValue: 1000 + } + + ExpandingSpacer {} + } + } +} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/MediaPlayerSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/MediaPlayerSpecifics.qml new file mode 100644 index 00000000000..1a6c41ecf88 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/MediaPlayerSpecifics.qml @@ -0,0 +1,37 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import HelperWidgets 2.0 +import StudioControls 1.0 as StudioControls +import StudioTheme 1.0 as StudioTheme + +Column { + anchors.left: parent.left + anchors.right: parent.right + + MediaPlayerSection {} +} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/VideoSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/VideoSection.qml new file mode 100644 index 00000000000..d5a87af559a --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/VideoSection.qml @@ -0,0 +1,105 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import HelperWidgets 2.0 +import StudioControls 1.0 as StudioControls +import StudioTheme 1.0 as StudioTheme + +Section { + caption: qsTr("Video") + + anchors.left: parent.left + anchors.right: parent.right + + SectionLayout { + PropertyLabel { text: qsTr("Source") } + + SecondColumnLayout { + UrlChooser { + backendValue: backendValues.source + filter: "*.mp4" + } + + ExpandingSpacer {} + } + + PropertyLabel { text: qsTr("Fill mode") } + + SecondColumnLayout { + ComboBox { + implicitWidth: StudioTheme.Values.singleControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + width: implicitWidth + scope: "VideoOutput" + model: ["Stretch", "PreserveAspectFit", "PreserveAspectCrop"] + backendValue: backendValues.fillMode + } + + ExpandingSpacer {} + } + + PropertyLabel { text: qsTr("Orientation") } + + SecondColumnLayout { + ComboBox { + id: orientationComboBox + implicitWidth: StudioTheme.Values.singleControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + width: implicitWidth + model: [0, 90, 180, 270, 360] + backendValue: backendValues.orientation + manualMapping: true + + onValueFromBackendChanged: { + if (!orientationComboBox.__isCompleted) + return + + orientationComboBox.syncIndexToBackendValue() + } + onCompressedActivated: { + if (!orientationComboBox.__isCompleted) + return + + if (orientationComboBox.block) + return + + backendValues.orientation.value = orientationComboBox.model[orientationComboBox.currentIndex] + } + Component.onCompleted: orientationComboBox.syncIndexToBackendValue() + + function syncIndexToBackendValue() { + orientationComboBox.block = true + orientationComboBox.currentIndex = orientationComboBox.model.indexOf(backendValues.orientation.value) + orientationComboBox.block = false + } + } + + ExpandingSpacer {} + } + } +} + diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/VideoSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/VideoSpecifics.qml new file mode 100644 index 00000000000..45c8cce6290 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/VideoSpecifics.qml @@ -0,0 +1,41 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import HelperWidgets 2.0 +import StudioControls 1.0 as StudioControls +import StudioTheme 1.0 as StudioTheme + +Column { + anchors.left: parent.left + anchors.right: parent.right + + MediaPlayerSection {} + + VideoSection {} + + AudioSection {} +} diff --git a/src/plugins/qmldesigner/qtquickplugin/images/audio-16px.png b/src/plugins/qmldesigner/qtquickplugin/images/audio-16px.png new file mode 100644 index 0000000000000000000000000000000000000000..d9fd2f57bf4498e4abbbbfd4645bfa62e272bdbd GIT binary patch literal 267 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4i*LmhONKMUokK+T=H~r4AD5>I&nX@W1z@! zeL+_Zv%$%fP@7I6)bCt#Yr*nS) zy>rg?`KsB!bb}upS-y`w^V*mBmDA?@%$qsegZn7N%u0I8OQzxj}t_grVr$ zdEb~<6sfwpt(sIN>85aGnqgVk79B=MsYyFu8vbN6*?D3!JI~taBbJwss`dt4S<(GW z-l0|5kSplvSHrzg;j#rMCkUG9e3S^E`ZysXq+M9^^Qy&X;vD9*T+P2xFr)8Z?RVJ= YF%LrTFVdQ&MBb@0DvcRdjJ3c literal 0 HcmV?d00001 diff --git a/src/plugins/qmldesigner/qtquickplugin/images/audio-24px.png b/src/plugins/qmldesigner/qtquickplugin/images/audio-24px.png new file mode 100644 index 0000000000000000000000000000000000000000..9e477c806db00f9ddc7552df5db78f6d551c6887 GIT binary patch literal 521 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|4mJh`h6m-gKNuJoFL=5*hIn*dy=I*)8Ysg0 z;Qc)guNnuIgKBOY1%!@>BXX~w>>MYv9Qm!UP#RNriL~6D+nJM15 zv0{Nxi-{7)v1~(iA-$PT+OoOKd7huK%f2@2c-(KF#aFW;PiL&tw3b@Un4TtFJEObf z{@j?$AB9t%2`u}_>z-xscjnE_S&e6G+OJFKtemH6@c2i^@|ibpPjpDjJ9kFYXHmJO zj@h(AmhVQJH?DC=<9n>@x6WaY!1al#bt2*mCeD1lVI^-3*Yyqi+TKLC*qk|IcjtKe zoN&>z(mW5f%S=Bq73Us5V)UdtS)#o_DqQ)I`noAw-&))`a*eO!)gw{4=|7*Ixznru zBcMn*R&s4cqRjq~siihbQ5BI2&9T;&O8Zv)as2x3VX)-(zpukC-n$VM%boI!?~V5I z_or^eAG^7Z#VdNp(odIdbP0l+XkKxDV|Q literal 0 HcmV?d00001 diff --git a/src/plugins/qmldesigner/qtquickplugin/images/audio-24px@2x.png b/src/plugins/qmldesigner/qtquickplugin/images/audio-24px@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..41948718fd106fedca16814c3235746ecd293604 GIT binary patch literal 1026 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_%L9BuTp1V`{{R2KVieFf z1o~zc|6yQYs3{5Z3ua(oWMXDvW9Q=K;};MV5*87YkdakTR?*PZ($P0CF|)L?v9ot{ zcJuJ|^$Q3NNk~jiOV7wFC@QP0u4!m&YH9E2>gk;@anj@|Q)kSbw|MD_HETC*-o9h! zu08t>96ojC{N*b*Zr;B0;Nhbu&tJTJ{pQ`L&tJZN`~KtC?>~S4O?+#$oq>UIpQnps zh{y4#*KP)14iGv1aem-ME-sBN57>en*DUH#;NU7{6c=+{yXac4YtF&F0vY@3_wbv{ z%-lA6-=oS?KIhVl{EOaOUTm~-{>|9pa{bi$xTE~pSK40w_<45y0Y{!{O7AK)*MZgASH|Mx;jtHOe62Aj{%=AUvl zxS+!@J?pdn{{#F+-JfMAN!c;gY*1OfcCQrw0sdXuANB@cnkm~*_tG@c@a?qSvkJtv zY6$YOF;pn6+{<*MS1rMo{f4h+6?4H=mXarvi)~p9l38|f1Z-I%a=_a7f_Q`9$zRMO zNe%4`*HvoSybKR;9N4hL#(~Fxt6(#q0kc6s?4|b-3A_(Vw!T=OHi7X*NnG|h4xwy@ z{<-|+_gSRwF-^I<_F_KMb;gQUIr}aJ?(JX`W;p%sTik?_HJSQ-_chrYHk*kAzhm^e zUe=T3a8X!yBM{Kjab=A@$vVwb*V7w~#rUpD2x!%Y{-8&8g_bax(Hk&?JEa;m&!j8g33 zozKhO6?XX7PCx(s^B(`_mHYfxMd;kJw>Xg?E4E+&`ul2Ny25y)dt!^InC8ths@{M6mg?k3GImE`Ahu&^@=I zO*n-mSlxo&XsbK(=$E>~jpp*H z>o>B>M~MCL`m?g#H1)u`_oqu*f=w1^Gj5P(eG(Y5^W0Sl4-K95#x;yxMwb7@mfcNd QU|?YIboFyt=akR{00@nq3jhEB literal 0 HcmV?d00001 diff --git a/src/plugins/qmldesigner/qtquickplugin/images/audio-output-24px.png b/src/plugins/qmldesigner/qtquickplugin/images/audio-output-24px.png new file mode 100644 index 0000000000000000000000000000000000000000..f2133ca716739f83e9fe9284fdec8086317dc87b GIT binary patch literal 595 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|4mJh`h6m-gKNuL8q&!_5Lp(a?UiI$qEtFyZ zaQ>^;ArV7Qvne*-L6=e#v%EGe}+@nXHSl= zZi^RQ?(u2<0@>2E(Fwud4F^g|IELmS-PS@UiFUe&iR(QM*|$@9pt>@ z>-6KU&N4&2~;Y7m3lf=R*y#hj!1zCAY+h_D)(LGJTRjoTJp^nm5N)*XRkg zE?gM3z4(GllS=PL?pG0=m7y)6%(Eh9)ldCs&uE|e`7fvS#;si|ZY!C84BeLMe=_gN z+Z_?E5v45CKYv@B^W5f0+|65SG=;-t4;tTW-KO!LKZ!H0OgN19MuYp0so&?TDb`Gz z+k1-fvg)4AKRUi{T6uHoF^i^N)mbmUHAFb5RNJT-G@aeio~`<4f8E;d8o#o?VtY^5 zTHHLkrSs&S_xCv_3A~b+uy=E?XzwkvWmKfmad+mshNeP zjjg?dle3Gfn}?^jk6%b=WOQs?LQ+b4c1~V?K~YIrc~y0NLt{((go%?TPn$7w&isXo zmaSZ~cKwEpo3?D-v2*v{{YQ=+KX>uk&D(eHJ$mx=+4C1~-+lW0`#5HKQM2yfnj>J!ov6)Gj`tDobO+5v^h*wNbW?|^5xbyd$w)i z+a#y4V*CD!E~;(QLjpcDSUs6i{r*R18ADb0)x>HC%kL}+3hGLqbg#0^36>A!-j~lT zSFzUo>;ZP=9egn>P2!o3`y9w@+$Os8c%ec*!{!6JZ=IPknJZX*Rz6TKxXN&>K|gBU zwgZ*S9?X_o|I0sUV)S8ttTiKa|0aG7*8~Sv^RF&fo;_4CSp1~Wdds@m2UG;+evdkB zd%!k%S*k!rM`fSeZtG1C~oK^hnr1~e*Wq2 z^<4{+Ek$OuOuVmDB>t|QDZO)-@s|0_3mw=!zdsOM)57@nUcNowQiFt!=66e^7n(kp z`o;67OkQ_KigL`VRYi5Iu1jhpe$BV@cDeD_nVt3jBvtPAJ4fFBQejlp4xIbSx;oK4 z%dx2|Dfi~x2%R<3r}7TB?)|vd`SI+@Y}@SX8M7+93$Gk+4q#wlVDNPHb6Mw<&;$Ud C+eYI6 literal 0 HcmV?d00001 diff --git a/src/plugins/qmldesigner/qtquickplugin/images/media-player-16px.png b/src/plugins/qmldesigner/qtquickplugin/images/media-player-16px.png new file mode 100644 index 0000000000000000000000000000000000000000..515287a8462d07725fdef587a5888d8718e99cbc GIT binary patch literal 148 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdnK1d_r6q7#RNl|GxqQBu}aN z$H2hAUJ~RN%)lU5(X{+Ki{Q!a3=9k^o-U3d9MQ=FElg}aZk8em={pWe_&f|?V>aH! i5#wvg$JVx#;mH$6>t_%ze|NsAAK?wBv zx9?zJVBjeU@(X5QU=g#=$(wWO{fB?`oHI%p7#Q?DT^vIsrX~xxF!8t)ol{`kWa(Ws z!GinBGlfElGv5^oC6WqGD7{Z$>D9*-kfByW(&x$nz7#J8BJYD@<);T3K0RWaI BK{fyY literal 0 HcmV?d00001 diff --git a/src/plugins/qmldesigner/qtquickplugin/images/media-player-24px@2x.png b/src/plugins/qmldesigner/qtquickplugin/images/media-player-24px@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..86ae5914acab5d2860d9bf6f9115c757a9923d8a GIT binary patch literal 260 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_oC178Tp1V`{{R2Kf&$RP zeW;p&fkCt+$S;_IfsIRANy{UoqIvnIJ+~h`{PN@1Z#8$9p9~BPF`h1tAs)xyUUlbd zFyLXmxUk%5@BdKC!#We1HhlN*daK{=B(|Sr`x=IwO`j(zZ0%;bkS`R_+s=I9jF7{2 zF9*vvd=9pIx!+7qxm>iStk6ixtj6kIq3J%xNAu4y*(^TM@c$A|=w}871_n=8KbLh* G2~7Y@?Q(Sh literal 0 HcmV?d00001 diff --git a/src/plugins/qmldesigner/qtquickplugin/images/video-16px.png b/src/plugins/qmldesigner/qtquickplugin/images/video-16px.png new file mode 100644 index 0000000000000000000000000000000000000000..caf9c16a61d38d4b72497d7637832381762b8d77 GIT binary patch literal 216 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7=6kw0hFJ7ooovX(u_!Ry;B#2M@VnYe*Zd8!4Au!37%Ui*J*#gECouXnzZJ4b&)dV~cHqs-@4GzR z($2hYy&wPZbpvm~8s>ElQ#m6(?Kot0R#o|HqvHFsA&l&vw?j6>dhKfYU%$-SHC!`$ UW9FV-1_lNOPgg&ebxsLQ0J)`A*Z=?k literal 0 HcmV?d00001 diff --git a/src/plugins/qmldesigner/qtquickplugin/images/video-24px.png b/src/plugins/qmldesigner/qtquickplugin/images/video-24px.png new file mode 100644 index 0000000000000000000000000000000000000000..df1b84e5c99654bc885875e39a7db24db89f20b0 GIT binary patch literal 286 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|4mJh`h6m-gKNuJoo_e}ChIn+oy}HoL#ZjdF zaUTMeiw<@guf*YG-ZN3QK>DBb;=+M4q4;Wsz?Y=0jr~GKq q^^T76IjL#v+yQ6zop~up{WcE3=E#GelF{r5}E*sDSRFP literal 0 HcmV?d00001 diff --git a/src/plugins/qmldesigner/qtquickplugin/images/video-24px@2x.png b/src/plugins/qmldesigner/qtquickplugin/images/video-24px@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..4b9f31faf390bcf63565bd4405cf088cd9c26c70 GIT binary patch literal 399 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_8UuVnTp1V`{{R2KV&H&& zMK&h`1A|sckY6wZ0}BVAps1LHl(ek2jh$y|c0pn3#7UE<&D_4@>Vt=mpFDs4_TBpr zfBycP8pD5yfq`MNr;B5V$MLsQJ^7m)B%HOm@*cEVE9kAb@&7-wt%sAr#D(gfGs=HY z+LxmDc7ZyR_7-Obx7kmQ%Fo%BTqArZ!re@Jar4nrM^%z-zh?@TPYeIlA?qt+_p{Px zl4a210!9XVExijq^7sCEI!dgQe|phn#hzWA4%!h9;}1oOKCugtRxgi=<1L)7RQS^= i{C?Q))KZrU=A+`5reqtLeqdl=VDNPHb6Mw<&;$SyR=YU> literal 0 HcmV?d00001 diff --git a/src/plugins/qmldesigner/qtquickplugin/images/video-output-16px.png b/src/plugins/qmldesigner/qtquickplugin/images/video-output-16px.png new file mode 100644 index 0000000000000000000000000000000000000000..f00afc52e97f09e6d4991e73c286c72b4d83cb95 GIT binary patch literal 289 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7UU<4VhFJ7oy=>^k;waGi zFn^k0t8J@7hr+xAK0Q97yZRFrt=!nDAhBkm`HQ#@T+7m)P;wlDn_ z-l1soNW?t0Vbe>4r#Ai0Ic1%*%`}3~vG2$dyf4lEm-$1?>)$sH=bS#!qMDrj;o{+Q tEKAnv8FVP#IVP}eL)YI&|Ld3evujyz=kgPp%fP_E;OXk;vd$@?2>=Z4d#V5c literal 0 HcmV?d00001 diff --git a/src/plugins/qmldesigner/qtquickplugin/images/video-output-24px.png b/src/plugins/qmldesigner/qtquickplugin/images/video-output-24px.png new file mode 100644 index 0000000000000000000000000000000000000000..fd3c89c08177c783140aa57f295011e9b1be878f GIT binary patch literal 387 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|4mJh`h6m-gKNuJoy*ynULp(a)Ufq}#;waMo z@qVm0^Fb#jE+v()rq;X1+%COl)<{=SWYN)aHCW=Kwed42%jG+f9@MhfM?3-!KzHG&+Q>n{}SANNMoLo}8zg~R)hdoO_uvk~j zRr)tae~RV(gEd_@-aay(7yG1uL+0UC0h{jfh~qgkix(Vn{J_}}8K z(s!kP={GJnbs8kqCSeGZd$EWg!e^qfimBO`b2gJ9OwbG9`{E^m7f_$taI{Mnw~c-{y9 zeIy$Aj@5GXZ@l!R{Qv)d`HB_8 z5?SYn&Sqd>@GJ@P3ua(oWMbjq&svlDTeg)SH<)lp`iDHj z1HC%!N1b(EayD8v!d0`}LteXoy3F@J=0*0y-M7xZTq%${rPXI^x4oT(ID5~M13z;3 zOV)|D#E4mFRWD@BiMrKbygQ^jI-&E11NV;CzvLP$O{aeO&cLwkP#-fx{bZJgjQK1H zUVau2Ow8h=`52631l|Pc?tH~n%;ueU^v)zh!zK3=uPk;ud^=!9images/text-edit-icon16.png images/text-input-icon16.png images/webview-icon16.png + source/audio.qml source/listview.qml source/listviewv2.qml source/gridview.qml @@ -83,5 +84,20 @@ images/loader-icon.png images/loader-icon@2x.png images/loader-icon16.png + images/audio-16px.png + images/audio-24px.png + images/audio-24px@2x.png + images/audio-output-16px.png + images/audio-output-24px.png + images/audio-output-24px@2x.png + images/media-player-16px.png + images/media-player-24px.png + images/media-player-24px@2x.png + images/video-16px.png + images/video-24px.png + images/video-24px@2x.png + images/video-output-16px.png + images/video-output-24px.png + images/video-output-24px@2x.png diff --git a/src/plugins/qmldesigner/qtquickplugin/quick.metainfo b/src/plugins/qmldesigner/qtquickplugin/quick.metainfo index 5ad17c372e2..7858ca08ea1 100644 --- a/src/plugins/qmldesigner/qtquickplugin/quick.metainfo +++ b/src/plugins/qmldesigner/qtquickplugin/quick.metainfo @@ -501,4 +501,89 @@ MetaInfo { version: "2.0" } } + + Type { + name: "QtMultimedia.MediaPlayer" + icon: ":/qtquickplugin/images/media-player-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeContainer: false + } + + ItemLibraryEntry { + name: "Media Player" + category: "f.Qt Quick - Multimedia" + libraryIcon: ":/qtquickplugin/images/media-player-24px.png" + version: "6.0" + requiredImport: "QtMultimedia" + } + } + + Type { + name: "QtMultimedia.MediaPlayer" + icon: ":/qtquickplugin/images/audio-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeContainer: false + } + + ItemLibraryEntry { + name: "Audio" + category: "f.Qt Quick - Multimedia" + libraryIcon: ":/qtquickplugin/images/audio-24px.png" + version: "6.0" + requiredImport: "QtMultimedia" + + QmlSource { source: ":/qtquickplugin/source/audio.qml" } + } + } + + Type { + name: "QtMultimedia.AudioOutput" + icon: ":/qtquickplugin/images/audio-output-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeContainer: false + } + + ItemLibraryEntry { + name: "Audio Output" + category: "f.Qt Quick - Multimedia" + libraryIcon: ":/qtquickplugin/images/audio-output-24px.png" + version: "6.0" + requiredImport: "QtMultimedia" + } + } + + Type { + name: "QtMultimedia.Video" + icon: ":/qtquickplugin/images/video-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: true + canBeContainer: false + } + + ItemLibraryEntry { + name: "Video" + category: "f.Qt Quick - Multimedia" + libraryIcon: ":/qtquickplugin/images/video-24px.png" + version: "6.0" + requiredImport: "QtMultimedia" + + Property { name: "width"; type: "int"; value: 200; } + Property { name: "height"; type: "int"; value: 200; } + } + } } diff --git a/src/plugins/qmldesigner/qtquickplugin/source/audio.qml b/src/plugins/qmldesigner/qtquickplugin/source/audio.qml new file mode 100644 index 00000000000..b3d1347e85e --- /dev/null +++ b/src/plugins/qmldesigner/qtquickplugin/source/audio.qml @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +import QtQuick 2.0 +import QtMultimedia 6.0 + +MediaPlayer { + audioOutput: output + + AudioOutput { + id: output + } +}