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
632cfe08
Commit
632cfe08
authored
Nov 14, 2017
by
Chupligin Sergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dialogs] Update QueryDialog and QueryDialog Example
parent
d46caed4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
64 additions
and
35 deletions
+64
-35
QueryDialogPage.qml
examples/touch/content/QueryDialogPage.qml
+47
-1
controls.pro
src/controls/controls.pro
+7
-2
QueryDialog.qml
src/controls/qml/dialogs/QueryDialog.qml
+10
-16
qmldir
src/controls/qml/dialogs/qmldir
+0
-0
dialogs.pro
src/dialogs/dialogs.pro
+0
-15
src.pro
src/src.pro
+0
-1
No files found.
examples/touch/content/QueryDialogPage.qml
View file @
632cfe08
...
...
@@ -42,14 +42,55 @@ Page {
headerTools
:
HeaderToolsLayout
{
showBackButton
:
true
;
title
:
qsTr
(
"
Query dialog example
"
)
}
Image
{
id
:
bgImage
source
:
"
/usr/share/glacier-components/images/example.jpg
"
anchors.fill
:
parent
fillMode
:
Image
.
PreserveAspectCrop
}
Button
{
id
:
standartButton
anchors
{
top
:
parent
.
top
margins
:
20
horizontalCenter
:
parent
.
horizontalCenter
}
text
:
qsTr
(
"
Standart dialog
"
)
onClicked
:
{
deleteDialog
.
inline
=
false
deleteDialog
.
visible
=
true
standartButton
.
visible
=
false
inlineButton
.
visible
=
false
}
}
Button
{
id
:
inlineButton
anchors
{
top
:
standartButton
.
bottom
margins
:
20
horizontalCenter
:
parent
.
horizontalCenter
}
text
:
qsTr
(
"
Inline dialog
"
)
onClicked
:
{
deleteDialog
.
inline
=
true
deleteDialog
.
visible
=
true
standartButton
.
visible
=
false
inlineButton
.
visible
=
false
}
}
QueryDialog
{
id
:
deleteDialog
visible
:
false
cancelText
:
qsTr
(
"
Cancel
"
)
acceptText
:
qsTr
(
"
Delete
"
)
headingText
:
qsTr
(
"
Are you sure you want to delete this?
"
)
subLabelText
:
qsTr
(
"
Do you want to continue?
"
)
icon
:
"
image://theme/trash
"
image
:
"
/usr/share/glacier-components/images/example.jpg
"
onAccepted
:
{
result
.
text
=
qsTr
(
"
User accepted
"
)
...
...
@@ -57,6 +98,11 @@ Page {
onCanceled
:
{
result
.
text
=
qsTr
(
"
User canceled
"
)
}
onSelected
:
{
standartButton
.
visible
=
true
inlineButton
.
visible
=
true
visible
=
false
}
}
Label
{
id
:
result
...
...
src/controls/controls.pro
View file @
632cfe08
...
...
@@ -24,7 +24,8 @@ QML_FILES += \
qml
/
GlacierRollerItem
.
qml
\
qml
/
InverseMouseArea
.
qml
\
qml
/
IconButton
.
qml
\
qml
/
DatePicker
.
qml
qml
/
DatePicker
.
qml
\
qml
/
dialogs
/
QueryDialog
.
qml
OTHER_FILES
+=
qmldir
\
$$
QML_FILES
...
...
@@ -59,7 +60,11 @@ qmlfiles.files = $$_PRO_FILE_PWD_/qml/*.qml
qmlfiles.files += $$_PRO_FILE_PWD_/qml/qmldir
qmlfiles.path = $$[QT_INSTALL_QML]/$$PLUGIN_IMPORT_PATH
dialogs.files = $$_PRO_FILE_PWD_/qml/dialogs
/*
.qml
dialogs.files += $$_PRO_FILE_PWD_/qml/dialogs/qmldir
dialogs.path = $$[QT_INSTALL_QML]/Nemo/Dialogs
images.files = $$_PRO_FILE_PWD_/images
images.path = $$[QT_INSTALL_QML]/$$PLUGIN_IMPORT_PATH
INSTALLS += target qmlfiles images
INSTALLS += target qmlfiles images
dialogs
src/dialogs/QueryDialog.qml
→
src/
controls/qml/
dialogs/QueryDialog.qml
View file @
632cfe08
...
...
@@ -6,25 +6,19 @@ Item {
anchors.fill
:
parent
signal
accepted
()
signal
canceled
()
signal
selected
()
property
alias
cancelText
:
cancel
.
text
property
alias
acceptText
:
accept
.
text
property
alias
headingText
:
heading
.
text
property
alias
subLabelText
:
subLabel
.
text
property
string
icon
:
""
property
string
image
:
""
Image
{
anchors.fill
:
parent
fillMode
:
Image
.
PreserveAspectCrop
source
:
shell
.
image
visible
:
shell
.
image
!=
""
}
property
bool
inline
:
true
Rectangle
{
id
:
shadow
width
:
parent
.
width
height
:
(
shell
.
image
!=
""
&&
shell
.
icon
==
""
)
?
(
parent
.
height
-
cancel
.
height
)
/
3
:
parent
.
height
-
cancel
.
height
height
:
inline
?
(
parent
.
height
-
cancel
.
height
)
/
3
:
parent
.
height
-
cancel
.
height
opacity
:
0.65
color
:
Theme
.
backgroundColor
anchors.bottom
:
cancel
.
top
...
...
@@ -40,7 +34,7 @@ Item {
topMargin
:
Theme
.
itemSpacingHuge
horizontalCenter
:
shell
.
horizontalCenter
}
visible
:
shell
.
icon
!=
""
visible
:
shell
.
icon
!=
""
&&
!
inline
fillMode
:
Image
.
PreserveAspectCrop
}
...
...
@@ -48,11 +42,11 @@ Item {
id
:
heading
width
:
parent
.
width
*
0.95
anchors
{
centerIn
:
(
shell
.
image
!=
""
&&
shell
.
icon
==
""
)
?
shadow
:
parent
centerIn
:
inline
?
shadow
:
parent
}
horizontalAlignment
:
Text
.
AlignHCenter
font.weight
:
Theme
.
fontWeightLarge
font.pixelSize
:
(
shell
.
image
!=
""
&&
shell
.
icon
==
""
)
?
Theme
.
fontSizeTiny
:
Theme
.
fontSizeSmall
font.pixelSize
:
inline
?
Theme
.
fontSizeTiny
:
Theme
.
fontSizeSmall
wrapMode
:
Text
.
Wrap
}
...
...
@@ -61,11 +55,11 @@ Item {
width
:
parent
.
width
*
0.95
wrapMode
:
Text
.
Wrap
font.weight
:
Theme
.
fontWeightMedium
font.pixelSize
:
(
shell
.
image
!=
""
&&
shell
.
icon
==
""
)
?
Theme
.
fontSizeTiny
:
Theme
.
fontSizeSmall
font.pixelSize
:
inline
?
Theme
.
fontSizeTiny
:
Theme
.
fontSizeSmall
horizontalAlignment
:
Text
.
AlignHCenter
anchors
{
top
:
heading
.
bottom
topMargin
:
(
shell
.
image
!=
""
&&
shell
.
icon
==
""
)
?
Theme
.
itemSpacingSmall
:
Theme
.
itemSpacingLarge
topMargin
:
inline
?
Theme
.
itemSpacingSmall
:
Theme
.
itemSpacingLarge
horizontalCenter
:
shell
.
horizontalCenter
}
}
...
...
@@ -80,7 +74,7 @@ Item {
}
onClicked
:
{
shell
.
canceled
()
shell
.
destroy
()
shell
.
selected
()
}
}
Button
{
...
...
@@ -94,7 +88,7 @@ Item {
}
onClicked
:
{
shell
.
accepted
()
shell
.
destroy
()
shell
.
selected
()
}
}
}
src/dialogs/qmldir
→
src/
controls/qml/
dialogs/qmldir
View file @
632cfe08
File moved
src/dialogs/dialogs.pro
deleted
100644 → 0
View file @
d46caed4
TEMPLATE
=
lib
TARGET
=
nemouxdialogs
PLUGIN_IMPORT_PATH
=
Nemo
/
Dialogs
qmlfiles
.
files
=
qmldir
qmlfiles
.
files
+=
*.
qml
qmlfiles
.
path
=
$$
[
QT_INSTALL_QML
]
/
$$
PLUGIN_IMPORT_PATH
DISTFILES
+=
\
qmldir
\
QueryDialog
.
qml
INSTALLS
+=
qmlfiles
src/src.pro
View file @
632cfe08
...
...
@@ -3,4 +3,3 @@ TEMPLATE = subdirs
SUBDIRS
+=
controls
SUBDIRS
+=
styles
SUBDIRS
+=
models
SUBDIRS
+=
dialogs
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