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
fa5841ad
Commit
fa5841ad
authored
Jan 06, 2018
by
Chupligin Sergey
Committed by
Sergey Chupligin
Apr 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Dialogs] Add selection dialog
parent
959652f8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
121 additions
and
0 deletions
+121
-0
controls.pro
src/controls/controls.pro
+1
-0
SelectionDialog.qml
src/controls/qml/dialogs/SelectionDialog.qml
+119
-0
qmldir
src/controls/qml/dialogs/qmldir
+1
-0
No files found.
src/controls/controls.pro
View file @
fa5841ad
...
@@ -15,6 +15,7 @@ QML_FILES += \
...
@@ -15,6 +15,7 @@ QML_FILES += \
qml
/
Checkbox
.
qml
\
qml
/
Checkbox
.
qml
\
qml
/
ButtonRow
.
qml
\
qml
/
ButtonRow
.
qml
\
qml
/
QueryDialog
.
qml
\
qml
/
QueryDialog
.
qml
\
qml
/
SelectionDialog
.
qml
\
qml
/
Dialog
.
qml
\
qml
/
Dialog
.
qml
\
qml
/
Header
.
qml
\
qml
/
Header
.
qml
\
qml
/
HeaderToolsLayout
.
qml
\
qml
/
HeaderToolsLayout
.
qml
\
...
...
src/controls/qml/dialogs/SelectionDialog.qml
0 → 100644
View file @
fa5841ad
import
QtQuick
2.6
import
QtQuick
.
Controls
.
Nemo
1.0
Item
{
id
:
shell
anchors.fill
:
parent
signal
accepted
()
signal
canceled
()
property
alias
cancelText
:
cancel
.
text
property
alias
acceptText
:
accept
.
text
property
alias
headingText
:
heading
.
text
property
alias
subLabelText
:
subLabel
.
text
property
real
bgOpacity
:
1
;
property
alias
model
:
selectionListView
.
model
property
int
selectedIndex
:
-
1
property
Component
delegate
:
ListViewItemWithActions
{
label
:
name
showNext
:
false
iconVisible
:
false
onClicked
:
{
shell
.
selectedIndex
=
index
}
}
function
open
(){
shell
.
visible
=
true
}
function
close
(){
shell
.
visible
=
false
}
Rectangle
{
id
:
shadow
width
:
parent
.
width
height
:
parent
.
height
-
cancel
.
height
opacity
:
shell
.
bgOpacity
color
:
Theme
.
backgroundColor
anchors.bottom
:
cancel
.
top
}
Label
{
id
:
heading
width
:
parent
.
width
*
0.95
height
:
Theme
.
itemHeightLarge
anchors
{
top
:
parent
.
top
}
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
font.weight
:
Theme
.
fontWeightLarge
font.pixelSize
:
Theme
.
fontSizeSmall
wrapMode
:
Text
.
Wrap
}
Label
{
id
:
subLabel
width
:
parent
.
width
*
0.95
wrapMode
:
Text
.
Wrap
font.weight
:
Theme
.
fontWeightMedium
font.pixelSize
:
Theme
.
fontSizeSmall
horizontalAlignment
:
Text
.
AlignHCenter
anchors
{
top
:
heading
.
bottom
topMargin
:
Theme
.
itemSpacingLarge
horizontalCenter
:
shell
.
horizontalCenter
}
}
ListView
{
id
:
selectionListView
width
:
parent
.
width
height
:
(
subLabel
.
text
!=
""
)
?
parent
.
height
-
heading
.
height
-
subLabel
.
height
-
cancel
.
height
-
Theme
.
itemSpacingLarge
:
parent
.
height
-
heading
.
height
-
cancel
.
height
-
Theme
.
itemSpacingLarge
delegate
:
shell
.
delegate
anchors.top
:
subLabel
.
bottom
ScrollDecorator
{
flickable
:
selectionListView
}
}
Button
{
id
:
cancel
width
:
parent
.
width
/
2
height
:
Theme
.
itemHeightLarge
anchors
{
left
:
parent
.
left
bottom
:
parent
.
bottom
}
onClicked
:
{
shell
.
canceled
()
close
()
}
}
Button
{
id
:
accept
width
:
parent
.
width
/
2
height
:
Theme
.
itemHeightLarge
primary
:
true
anchors
{
left
:
cancel
.
right
bottom
:
parent
.
bottom
}
onClicked
:
{
shell
.
accepted
()
close
();
}
}
}
src/controls/qml/dialogs/qmldir
View file @
fa5841ad
QueryDialog 1.0 QueryDialog.qml
QueryDialog 1.0 QueryDialog.qml
Dialog 1.0 Dialog.qml
Dialog 1.0 Dialog.qml
SelectionDialog 1.0 SelectionDialog.qml
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