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
92c389ce
Unverified
Commit
92c389ce
authored
Nov 14, 2017
by
Aleksi Suomalainen
Committed by
GitHub
Nov 14, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #55 from neochapay/dialogs
Update QueryDialog
parents
a586e787
632cfe08
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
103 additions
and
17 deletions
+103
-17
QueryDialogPage.qml
examples/touch/content/QueryDialogPage.qml
+60
-7
example.jpg
examples/touch/images/example.jpg
+0
-0
touch.pro
examples/touch/touch.pro
+1
-0
controls.pro
src/controls/controls.pro
+7
-2
QueryDialog.qml
src/controls/qml/dialogs/QueryDialog.qml
+33
-7
qmldir
src/controls/qml/dialogs/qmldir
+1
-0
src.pro
src/src.pro
+1
-1
No files found.
examples/touch/content/QueryDialogPage.qml
View file @
92c389ce
/****************************************************************************************
**
** Copyright (C) 2014 Aleksi Suomalainen <suomalainen.aleksi@gmail.com>
** Copyright (C) 2017 Chupligin Sergey <neochapay@gmail.com>
** All rights reserved.
**
** You may use this file under the terms of BSD license as follows:
...
...
@@ -34,21 +35,73 @@ import QtQuick.Controls 1.0 //needed for the Stack attached property
import
QtQuick
.
Controls
.
Nemo
1.0
import
QtQuick
.
Controls
.
Styles
.
Nemo
1.0
import
Nemo
.
Dialogs
1.0
Page
{
id
:
root
headerTools
:
HeaderToolsLayout
{
showBackButton
:
true
;
title
:
"
Query dialog example
"
}
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
{
cancelText
:
"
Cancel
"
acceptText
:
"
Delete
"
headingText
:
"
Are you sure you want to delete this?
"
subLabelText
:
"
Continue?
"
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
"
onAccepted
:
{
result
.
text
=
"
User accepted
"
result
.
text
=
qsTr
(
"
User accepted
"
)
}
onCanceled
:
{
result
.
text
=
"
User canceled
"
result
.
text
=
qsTr
(
"
User canceled
"
)
}
onSelected
:
{
standartButton
.
visible
=
true
inlineButton
.
visible
=
true
visible
=
false
}
}
Label
{
...
...
examples/touch/images/example.jpg
0 → 100644
View file @
92c389ce
134 KB
examples/touch/touch.pro
View file @
92c389ce
...
...
@@ -31,6 +31,7 @@ qml.files += \
qml
.
path
=
/
usr
/
share
/
glacier
-
components
/
content
images
.
files
=
images
/*
.png
images.files += images
/*
.jpg
images.path = /usr/share/glacier-components/images
OTHER_FILES += $$qml.files
...
...
src/controls/controls.pro
View file @
92c389ce
...
...
@@ -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/controls/qml/QueryDialog.qml
→
src/controls/qml/
dialogs/
QueryDialog.qml
View file @
92c389ce
import
QtQuick
2.6
import
QtQuick
.
Controls
.
Nemo
1.0
Item
{
id
:
shell
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
bool
inline
:
true
Rectangle
{
anchors.fill
:
parent
id
:
shadow
width
:
parent
.
width
height
:
inline
?
(
parent
.
height
-
cancel
.
height
)
/
3
:
parent
.
height
-
cancel
.
height
opacity
:
0.65
color
:
Theme
.
backgroundColor
anchors.bottom
:
cancel
.
top
}
Image
{
id
:
icon
source
:
shell
.
icon
width
:
Theme
.
itemHeightMedium
height
:
width
anchors
{
top
:
shell
.
top
topMargin
:
Theme
.
itemSpacingHuge
horizontalCenter
:
shell
.
horizontalCenter
}
visible
:
shell
.
icon
!=
""
&&
!
inline
fillMode
:
Image
.
PreserveAspectCrop
}
Label
{
width
:
parent
.
width
*
0.8
id
:
heading
anchors.centerIn
:
parent
width
:
parent
.
width
*
0.95
anchors
{
centerIn
:
inline
?
shadow
:
parent
}
horizontalAlignment
:
Text
.
AlignHCenter
font.weight
:
Theme
.
fontWeightLarge
font.pixelSize
:
inline
?
Theme
.
fontSizeTiny
:
Theme
.
fontSizeSmall
wrapMode
:
Text
.
Wrap
}
Label
{
id
:
subLabel
width
:
parent
.
width
*
0.
8
width
:
parent
.
width
*
0.
95
wrapMode
:
Text
.
Wrap
font.weight
:
Theme
.
fontWeightMedium
font.pixelSize
:
inline
?
Theme
.
fontSizeTiny
:
Theme
.
fontSizeSmall
horizontalAlignment
:
Text
.
AlignHCenter
anchors
{
top
:
heading
.
bottom
topMargin
:
Theme
.
itemSpacingLarge
topMargin
:
inline
?
Theme
.
itemSpacingSmall
:
Theme
.
itemSpacingLarge
horizontalCenter
:
shell
.
horizontalCenter
}
}
...
...
@@ -48,7 +74,7 @@ Item {
}
onClicked
:
{
shell
.
canceled
()
shell
.
destroy
()
shell
.
selected
()
}
}
Button
{
...
...
@@ -62,7 +88,7 @@ Item {
}
onClicked
:
{
shell
.
accepted
()
shell
.
destroy
()
shell
.
selected
()
}
}
}
src/controls/qml/dialogs/qmldir
0 → 100644
View file @
92c389ce
QueryDialog 1.0 QueryDialog.qml
src/src.pro
View file @
92c389ce
...
...
@@ -2,4 +2,4 @@ TEMPLATE = subdirs
SUBDIRS
+=
controls
SUBDIRS
+=
styles
SUBDIRS
+=
models
\ No newline at end of file
SUBDIRS
+=
models
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