Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qtquickcontrols-nemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NemoMobile
qtquickcontrols-nemo
Commits
8cbb1f48
Commit
8cbb1f48
authored
Jan 06, 2018
by
Chupligin Sergey
Committed by
Sergey Chupligin
Apr 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Examples] add new dialogs type examples
parent
fa5841ad
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
102 additions
and
13 deletions
+102
-13
DialogsPage.qml
examples/touch/content/DialogsPage.qml
+100
-11
glacier-components.qml
examples/touch/glacier-components.qml
+2
-2
No files found.
examples/touch/content/
QueryDialog
Page.qml
→
examples/touch/content/
Dialogs
Page.qml
View file @
8cbb1f48
...
@@ -49,6 +49,39 @@ Page {
...
@@ -49,6 +49,39 @@ Page {
fillMode
:
Image
.
PreserveAspectCrop
fillMode
:
Image
.
PreserveAspectCrop
}
}
ListModel
{
id
:
animalsModel
ListElement
{
name
:
"
Ant
"
;
}
ListElement
{
name
:
"
Flea
"
;
}
ListElement
{
name
:
"
Parrot
"
;
}
ListElement
{
name
:
"
Guinea pig
"
;
}
ListElement
{
name
:
"
Rat
"
;
}
ListElement
{
name
:
"
Butterfly
"
;
}
ListElement
{
name
:
"
Dog
"
;
}
ListElement
{
name
:
"
Cat
"
;
}
ListElement
{
name
:
"
Pony
"
;
}
ListElement
{
name
:
"
Koala
"
;
}
ListElement
{
name
:
"
Horse
"
;
}
ListElement
{
name
:
"
Tiger
"
;
}
ListElement
{
name
:
"
Giraffe
"
;
}
ListElement
{
name
:
"
Elephant
"
;
}
ListElement
{
name
:
"
Whale
"
;
}
}
function
hideButton
(){
standartButton
.
visible
=
false
inlineButton
.
visible
=
false
simpleButton
.
visible
=
false
selectionButton
.
visible
=
false
}
function
showButton
(){
standartButton
.
visible
=
true
inlineButton
.
visible
=
true
simpleButton
.
visible
=
true
selectionButton
.
visible
=
true
}
Button
{
Button
{
id
:
standartButton
id
:
standartButton
anchors
{
anchors
{
...
@@ -56,12 +89,11 @@ Page {
...
@@ -56,12 +89,11 @@ Page {
margins
:
20
margins
:
20
horizontalCenter
:
parent
.
horizontalCenter
horizontalCenter
:
parent
.
horizontalCenter
}
}
text
:
qsTr
(
"
Standart dialog
"
)
text
:
qsTr
(
"
Standart
query
dialog
"
)
onClicked
:
{
onClicked
:
{
deleteDialog
.
inline
=
false
deleteDialog
.
inline
=
false
deleteDialog
.
visible
=
true
deleteDialog
.
open
()
standartButton
.
visible
=
false
hideButton
();
inlineButton
.
visible
=
false
}
}
}
}
...
@@ -72,15 +104,72 @@ Page {
...
@@ -72,15 +104,72 @@ Page {
margins
:
20
margins
:
20
horizontalCenter
:
parent
.
horizontalCenter
horizontalCenter
:
parent
.
horizontalCenter
}
}
text
:
qsTr
(
"
Inline dialog
"
)
text
:
qsTr
(
"
Inline
query
dialog
"
)
onClicked
:
{
onClicked
:
{
deleteDialog
.
inline
=
true
deleteDialog
.
inline
=
true
deleteDialog
.
visible
=
true
deleteDialog
.
open
()
standartButton
.
visible
=
false
hideButton
();
inlineButton
.
visible
=
false
}
}
Button
{
id
:
simpleButton
anchors
{
top
:
inlineButton
.
bottom
margins
:
20
horizontalCenter
:
parent
.
horizontalCenter
}
text
:
qsTr
(
"
Simple dialog
"
)
onClicked
:
{
hideButton
();
simpleDialog
.
open
();
}
}
}
}
Button
{
id
:
selectionButton
anchors
{
top
:
inlineButton
.
bottom
margins
:
20
horizontalCenter
:
parent
.
horizontalCenter
}
text
:
qsTr
(
"
Selection dialog
"
)
onClicked
:
{
hideButton
();
selectionDialog
.
open
();
}
}
Dialog
{
id
:
simpleDialog
acceptText
:
qsTr
(
"
Ok
"
)
headingText
:
qsTr
(
"
Simple dialog
"
)
subLabelText
:
qsTr
(
"
Simple diaolg is open
"
)
inline
:
false
icon
:
"
image://theme/exclamation-triangle
"
onAccepted
:
{
showButton
();
simpleDialog
.
close
();
}
}
SelectionDialog
{
id
:
selectionDialog
visible
:
false
cancelText
:
qsTr
(
"
Cancel
"
)
acceptText
:
qsTr
(
"
Ok
"
)
headingText
:
qsTr
(
"
Select you favorite animal?
"
)
subLabelText
:
qsTr
(
""
)
model
:
animalsModel
onSelectedIndexChanged
:
selectionDialog
.
close
()
}
QueryDialog
{
QueryDialog
{
id
:
deleteDialog
id
:
deleteDialog
visible
:
false
visible
:
false
...
@@ -99,11 +188,11 @@ Page {
...
@@ -99,11 +188,11 @@ Page {
result
.
text
=
qsTr
(
"
User canceled
"
)
result
.
text
=
qsTr
(
"
User canceled
"
)
}
}
onSelected
:
{
onSelected
:
{
standartButton
.
visible
=
true
showButton
();
inlineButton
.
visible
=
true
deleteDialog
.
close
()
visible
=
false
}
}
}
}
Label
{
Label
{
id
:
result
id
:
result
anchors.centerIn
:
parent
anchors.centerIn
:
parent
...
...
examples/touch/glacier-components.qml
View file @
8cbb1f48
...
@@ -118,8 +118,8 @@ ApplicationWindow {
...
@@ -118,8 +118,8 @@ ApplicationWindow {
page
:
"
content/ButtonRowPage.qml
"
page
:
"
content/ButtonRowPage.qml
"
}
}
ListElement
{
ListElement
{
title
:
"
Query Dialog
"
title
:
"
Dialogs
"
page
:
"
content/
QueryDialog
Page.qml
"
page
:
"
content/
Dialogs
Page.qml
"
}
}
ListElement
{
ListElement
{
title
:
"
Icons
"
title
:
"
Icons
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment