-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.qml
150 lines (132 loc) · 4.88 KB
/
main.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
import QtQuick 2.12
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.0
import QtQuick.Window 2.2
import "Item"
import "Item/bookshelf"
import "./View"
import "./View/readview"
import "."
import "common"
import Reader 1.0
import Chapter 1.0
import BookShelf 1.0
ApplicationWindow {
id: rootwindow
visible: true
width:450
height: 900
title: qsTr("书客")
SwipeView {
id: swipeview
height: rootwindow.height
width: parent.width
currentIndex: basebar.currentIndex
//首页
HomeView{}
// HomeView{}
//书架
BookView{}
// Rectangle{
// id:bookshelf
// color: "#CCCCCC"
// Image {
// id: rocket
// fillMode: Image.TileHorizontally
//// smooth: true
// width: rootwindow.width
// source: 'qrc:/Images/shelf/background.jpg'
// }
// TopBars{
// id: topBars
// height: 0.07*rootwindow.height
// width: rootwindow.width
// text: qsTr("我的书架")
// z: 2
// IconButton {
// id: searchButton
// anchors.right: addButton.left
// anchors.rightMargin: 16
// anchors.verticalCenter: parent.verticalCenter
// iconSource: "qrc:/Images/shelf/search.png"
// }
// IconButton {
// id: addButton
// anchors.right: parent.right
// anchors.rightMargin: 16
// anchors.verticalCenter: parent.verticalCenter
// iconSource: "qrc:/Images/shelf/add.png"
// onClicked: {
// addbtn.addbtnrec.visible=false
// addbtn.addmenu.open()
// }
// }
// }
// AddButton{
// id:addbtn
// x:addButton.x-80
// y:addButton.y
// }
// GridView{
// id:bookshelfview;
//// anchors.fill: parent;
// anchors.left: bookshelf.left
// anchors.leftMargin: 2/13*cellWidth
// width: parent.width;
// height: parent.height;
// cellWidth: 1/3*rootwindow.width;
// cellHeight: 1/3*(rootwindow.height-basebar.height);
// model: Settings.bookShelf.books;
// delegate: Book_ShelfItem{
// width: bookshelfview.cellWidth;
// height: bookshelfview.cellHeight;
// onOpenSource: {
//// readview.visible=true;
// //顶、底部导航隐藏
// topBars.visible=false;
// basebar.visible=false;
// //界面高度增加
// swipeview.height=rootwindow.height;
// //禁止滑动
// swipeview.interactive=false;
// Settings.bookShelf.currentBook=index;
// }
// }
// }
//// ReaderView{
//// id:readview;
//// visible: false;
//// width: rootwindow.width;
//// height: rootwindow.height;
//// }
// }
//分析
AnalyzeView{
id: analyzeview
width: rootwindow.width;
height: rootwindow.height;
}
//我的
MineView{}
}
Rectangle{//模拟线段
// anchors.top: gridviewrec.bottom
width:rootwindow.width //长
height:1 //高
anchors.bottom: basebar.top
color:"#e6e6e6" //颜色
}
footer: BaseTabBar{
id: basebar
// tbheight: 0.08*rootwindow.height
height: 0.08*rootwindow.height
width: rootwindow.width
currentIndex: swipeview.currentIndex
Component.onCompleted: {
myModel.append({ "modelText": "首页", "modelColor": "#000000", "modelColorG": "#1296db", "modelSrc": "qrc:/Images/guide/homepage.png", "modelSrcG": "qrc:/Images/guide/homepage_after.png"})
myModel.append({ "modelText": "书架", "modelColor": "#000000", "modelColorG": "#1296db", "modelSrc": "qrc:/Images/guide/books.png", "modelSrcG": "qrc:/Images/guide/books_after.png"})
myModel.append({ "modelText": "分析", "modelColor": "#000000", "modelColorG": "#1296db", "modelSrc": "qrc:/Images/guide/analogy.png", "modelSrcG": "qrc:/Images/guide/analogy_after.png"})
myModel.append({ "modelText": "我的", "modelColor": "#000000", "modelColorG": "#1296db", "modelSrc": "qrc:/Images/guide/me.png", "modelSrcG": "qrc:/Images/guide/me_after.png"})
}
}
}