1 Star 0 Fork 28

kimihuang001/JanQuick_Eui

forked from long123963/JanQuick_Eui 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.qml 7.17 KB
一键复制 编辑 原始数据 按行查看 历史
long123963 提交于 2022-09-06 15:35 . 小修改
import QtQuick 2.12
import QtQuick.Window 2.12
import QtGraphicalEffects 1.13
import QtQuick.Controls 2.5
import EUIpackage 1.0
import EControl 1.0
import "./showpage"
Window {
visible: true
width: 1440
height: 900
maximumWidth: 1440
maximumHeight: 900
minimumWidth: 1440
minimumHeight: 900
title: qsTr("JanQuick_Eui")
Rectangle{
id:mainIconArea
width: 210
height: 56
color: "#334154"
Text {
text: qsTr("JanQuick_Eui")
width: contentWidth
height: contentHeight
font.pixelSize: 28
anchors.centerIn: parent
color: EColor.mainColor(EColor.MColor_1)
}
}
Rectangle{
id:listviewBg
width: 210
height: parent.height-mainIconArea.height
anchors.top: mainIconArea.bottom
color: "#222d3c"
visible: true
NavExpListView{
id:navigationBar
anchors.fill: parent
clip: true
Component.onCompleted: {
initNav()
}
}
}//end listviewBg
Rectangle{
id:menuArea
width: parent.width-listviewBg.width
height: 56
anchors.left: listviewBg.right
anchors.top: parent.top
color: "white"
Row{
height: 40
anchors.centerIn: parent
spacing: 6
// Button{
// width: 100
// height: 40
// onClicked: {
// control.value +=2
// }
// }
// Button{
// width: 100
// height: 40
// onClicked: {
// }
// }
}
}
DropShadow{//分界线阴影
anchors.fill: menuArea
source: menuArea
color: "#dde1e5"
radius: 4
samples: 8
horizontalOffset: 1
verticalOffset: 6
spread: 0
z:1
}
ColorPage{
anchors.left: listviewBg.right
anchors.right: parent.right
anchors.top:menuArea.bottom
anchors.topMargin: 5
anchors.bottom: parent.bottom
visible:navigationBar.currentIndex === 0 && navigationBar.currChildIndex === 0
}
ButtonPage{
anchors.left: listviewBg.right
anchors.right: parent.right
anchors.top:menuArea.bottom
anchors.topMargin: 5
anchors.bottom: parent.bottom
visible: navigationBar.currentIndex === 0 && navigationBar.currChildIndex === 1
}
RadioButtonPage{
anchors.left: listviewBg.right
anchors.right: parent.right
anchors.top:menuArea.bottom
anchors.topMargin: 5
anchors.bottom: parent.bottom
visible: navigationBar.currentIndex === 1 && navigationBar.currChildIndex === 0
}
CheckboxPage{
anchors.left: listviewBg.right
anchors.right: parent.right
anchors.top:menuArea.bottom
anchors.topMargin: 5
anchors.bottom: parent.bottom
visible: navigationBar.currentIndex === 1 && navigationBar.currChildIndex === 1
}
InputPage{
anchors.left: listviewBg.right
anchors.right: parent.right
anchors.top:menuArea.bottom
anchors.topMargin: 5
anchors.bottom: parent.bottom
visible: navigationBar.currentIndex === 1 && navigationBar.currChildIndex === 2
}
SpinboxPage{
anchors.left: listviewBg.right
anchors.right: parent.right
anchors.top:menuArea.bottom
anchors.topMargin: 5
anchors.bottom: parent.bottom
visible: navigationBar.currentIndex === 1 && navigationBar.currChildIndex === 3
}
ComboBoxPage{
anchors.left: listviewBg.right
anchors.right: parent.right
anchors.top:menuArea.bottom
anchors.topMargin: 5
anchors.bottom: parent.bottom
visible: navigationBar.currentIndex === 1 && navigationBar.currChildIndex === 4
}
SwitchPage{
anchors.left: listviewBg.right
anchors.right: parent.right
anchors.top:menuArea.bottom
anchors.topMargin: 5
anchors.bottom: parent.bottom
visible: navigationBar.currentIndex === 1 && navigationBar.currChildIndex === 5
}
SliderPage{
anchors.left: listviewBg.right
anchors.right: parent.right
anchors.top:menuArea.bottom
anchors.topMargin: 5
anchors.bottom: parent.bottom
visible: navigationBar.currentIndex === 1 && navigationBar.currChildIndex === 6
}
ProgressBarPage{
anchors.left: listviewBg.right
anchors.right: parent.right
anchors.top:menuArea.bottom
anchors.topMargin: 5
anchors.bottom: parent.bottom
visible: navigationBar.currentIndex === 2 && navigationBar.currChildIndex === 0
}
PaginationPage{
anchors.left: listviewBg.right
anchors.right: parent.right
anchors.top:menuArea.bottom
anchors.topMargin: 5
anchors.bottom: parent.bottom
visible: navigationBar.currentIndex === 2 && navigationBar.currChildIndex === 1
}
NoticePage{
anchors.left: listviewBg.right
anchors.right: parent.right
anchors.top:menuArea.bottom
anchors.topMargin: 5
anchors.bottom: parent.bottom
visible: navigationBar.currentIndex === 3 && navigationBar.currChildIndex === 0
}
NavigationPage{
anchors.left: listviewBg.right
anchors.right: parent.right
anchors.top:menuArea.bottom
anchors.topMargin: 5
anchors.bottom: parent.bottom
visible: navigationBar.currentIndex === 4 && navigationBar.currChildIndex === 0
}
function initNav(){
var datalist = [{paretObjName:"基础",
childenList:[{childObjName:"Color 颜色",parentIndex:0},
{childObjName:"Button 按钮",parentIndex:0}]},
{paretObjName:"表单",
childenList:[{childObjName:"Radio 单选框",parentIndex:1},
{childObjName:"Checkbox 多选框",parentIndex:1},
{childObjName:"Input 输入框",parentIndex:1},
{childObjName:"SpinBox 计数器",parentIndex:1},
{childObjName:"Combobox 下拉框",parentIndex:1},
{childObjName:"Switch 开关",parentIndex:1},
{childObjName:"Slider 滑块",parentIndex:1}]},
{paretObjName:"数据",
childenList:[{childObjName:"ProgerssBar 进度条",parentIndex:2},
{childObjName:"Pagination 分页",parentIndex:2}]},
{paretObjName:"通知",
childenList:[{childObjName:"NoticeCollection 通知合集",parentIndex:3}]},
{paretObjName:"导航",
childenList:[{childObjName:"Navigation 导航栏",parentIndex:4}]},
]
for(var i = 0;i<datalist.length;++i){
navigationBar.model.append(datalist[i])
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
QML
1
https://gitee.com/kimihuang001/jan-quick_-eui.git
git@gitee.com:kimihuang001/jan-quick_-eui.git
kimihuang001
jan-quick_-eui
JanQuick_Eui
master

搜索帮助