mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 11:17:15 +08:00
update
This commit is contained in:
parent
1f1e8b0ed0
commit
d8d95399cd
32
example/T_MediaPlayer.qml
Normal file
32
example/T_MediaPlayer.qml
Normal file
@ -0,0 +1,32 @@
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
import QtQuick.Window 2.15
|
||||
import QtGraphicalEffects 1.15
|
||||
import FluentUI 1.0
|
||||
|
||||
FluScrollablePage{
|
||||
|
||||
title:"ColorPicker"
|
||||
|
||||
FluArea{
|
||||
width: parent.width
|
||||
height: 280
|
||||
Layout.topMargin: 20
|
||||
paddings: 10
|
||||
ColumnLayout{
|
||||
anchors{
|
||||
verticalCenter: parent.verticalCenter
|
||||
left:parent.left
|
||||
}
|
||||
|
||||
FluMediaPlayer{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
QT += quick concurrent network
|
||||
QT += quick concurrent network multimedia
|
||||
CONFIG += c++11
|
||||
|
||||
DEFINES += QT_DEPRECATED_WARNINGS QT_NO_WARNING_OUTPUT
|
||||
|
@ -35,7 +35,7 @@ FluWindow {
|
||||
fontStyle: FluText.Title
|
||||
}
|
||||
FluText{
|
||||
text:"v1.1.3"
|
||||
text:"v1.1.4"
|
||||
fontStyle: FluText.Body
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
}
|
||||
|
@ -200,6 +200,17 @@ FluWindow {
|
||||
}
|
||||
}
|
||||
|
||||
FluPaneItemHeader{
|
||||
title:"Media"
|
||||
}
|
||||
|
||||
FluPaneItem{
|
||||
title:"MediaPlayer"
|
||||
onTap:{
|
||||
nav_view.push("qrc:/T_MediaPlayer.qml")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
FluObject{
|
||||
|
@ -44,5 +44,6 @@
|
||||
<file>T_CalendarPicker.qml</file>
|
||||
<file>T_ColorPicker.qml</file>
|
||||
<file>T_Carousel.qml</file>
|
||||
<file>T_MediaPlayer.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -32,26 +32,22 @@ void Fluent::registerTypes(const char *uri){
|
||||
|
||||
qmlRegisterType<WindowHelper>(uri,major,minor,"WindowHelper");
|
||||
qmlRegisterType<FluColorSet>(uri,major,minor,"FluColorSet");
|
||||
|
||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluArea.qml"),uri,major,minor,"FluArea");
|
||||
|
||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluBadge.qml"),uri,major,minor,"FluBadge");
|
||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluMediaPlayer.qml"),uri,major,minor,"FluMediaPlayer");
|
||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluContentPage.qml"),uri,major,minor,"FluContentPage");
|
||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluScrollablePage.qml"),uri,major,minor,"FluScrollablePage");
|
||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluPaneItemHeader.qml"),uri,major,minor,"FluPaneItemHeader");
|
||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluPaneItem.qml"),uri,major,minor,"FluPaneItem");
|
||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluPaneItemSeparator.qml"),uri,major,minor,"FluPaneItemSeparator");
|
||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluNavigationView.qml"),uri,major,minor,"FluNavigationView");
|
||||
|
||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluCalendarPicker.qml"),uri,major,minor,"FluCalendarPicker");
|
||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluCalendarView.qml"),uri,major,minor,"FluCalendarView");
|
||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluDatePicker.qml"),uri,major,minor,"FluDatePicker");
|
||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluTimePicker.qml"),uri,major,minor,"FluTimePicker");
|
||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluColorView.qml"),uri,major,minor,"FluColorView");
|
||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluColorPicker.qml"),uri,major,minor,"FluColorPicker");
|
||||
|
||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluCarousel.qml"),uri,major,minor,"FluCarousel");
|
||||
|
||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluAutoSuggestBox.qml"),uri,major,minor,"FluAutoSuggestBox");
|
||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluExpander.qml"),uri,major,minor,"FluExpander");
|
||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluTreeView.qml"),uri,major,minor,"FluTreeView");
|
||||
|
@ -1,4 +1,4 @@
|
||||
QT += qml quick svg
|
||||
QT += qml quick svg multimedia network
|
||||
CONFIG += plugin c++11
|
||||
TEMPLATE = lib
|
||||
TARGET = FluentUI
|
||||
|
28
src/controls/FluMediaPlayer.qml
Normal file
28
src/controls/FluMediaPlayer.qml
Normal file
@ -0,0 +1,28 @@
|
||||
import QtQuick 2.15
|
||||
import QtMultimedia 5.9
|
||||
|
||||
Item {
|
||||
width: 320
|
||||
height: 240
|
||||
|
||||
MediaPlayer {
|
||||
id: mediaplayer
|
||||
source: "http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"
|
||||
}
|
||||
|
||||
|
||||
VideoOutput {
|
||||
anchors.fill: parent
|
||||
source: mediaplayer
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onPressed: {
|
||||
console.debug("------>")
|
||||
mediaplayer.play()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -57,5 +57,6 @@
|
||||
<file>colorpicker/content/NumberBox.qml</file>
|
||||
<file>colorpicker/content/PanelBorder.qml</file>
|
||||
<file>colorpicker/content/SBPicker.qml</file>
|
||||
<file>controls/FluMediaPlayer.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Loading…
Reference in New Issue
Block a user