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
e38bf17b
Unverified
Commit
e38bf17b
authored
Dec 29, 2017
by
Aleksi Suomalainen
Committed by
GitHub
Dec 29, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #59 from neochapay/5.3.2
5.3.2
parents
0e6921d1
664ca7fa
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
161 additions
and
34 deletions
+161
-34
NotificationsPage.qml
examples/touch/content/NotificationsPage.qml
+76
-0
glacier-components.qml
examples/touch/glacier-components.qml
+10
-0
main.cpp
examples/touch/src/main.cpp
+6
-8
touch.pro
examples/touch/touch.pro
+8
-8
qtquickcontrols-nemo.spec
rpm/qtquickcontrols-nemo.spec
+5
-1
controls.pro
src/controls/controls.pro
+1
-0
ListView.qml
src/controls/qml/ListView.qml
+0
-17
ScrollDecorator.qml
src/controls/qml/ScrollDecorator.qml
+54
-0
qmldir
src/controls/qml/qmldir
+1
-0
No files found.
examples/touch/content/NotificationsPage.qml
0 → 100644
View file @
e38bf17b
/****************************************************************************************
**
** Copyright (C) 2017 Chupligin Sergey <neochapay@gmail.com>
** All rights reserved.
**
** You may use this file under the terms of BSD license as follows:
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in the
** documentation and/or other materials provided with the distribution.
** * Neither the name of the author nor the
** names of its contributors may be used to endorse or promote products
** derived from this software without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
****************************************************************************************/
import
QtQuick
2.6
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
.
Notifications
1.0
Page
{
id
:
root
headerTools
:
HeaderToolsLayout
{
showBackButton
:
true
;
title
:
"
Notifications
"
}
allowedOrientations
:
Qt
.
PortraitOrientation
|
Qt
.
LandscapeOrientation
|
Qt
.
InvertedLandscapeOrientation
|
Qt
.
InvertedPortraitOrientation
Notification
{
id
:
simpleNotify
category
:
"
x-nemo.example
"
summary
:
""
body
:
""
itemCount
:
1
remoteActions
:
[
{
"
name
"
:
"
default
"
,
"
service
"
:
"
org.nemomobile.notify
"
,
"
path
"
:
"
/org/nemomobile/notify
"
,
"
iface
"
:
"
org.nemomobile.notify
"
,
"
method
"
:
"
activateApp
"
,
"
arguments
"
:
[
"
Hello Nemo! You have a notification
"
]
}]
}
Column
{
spacing
:
40
anchors.centerIn
:
parent
Button
{
text
:
"
Test label
"
onClicked
:{
simpleNotify
.
summary
=
"
Hello Nemo! You have a notification
"
simpleNotify
.
publish
()
}
}
}
}
examples/touch/
main
.qml
→
examples/touch/
glacier-components
.qml
View file @
e38bf17b
...
...
@@ -124,6 +124,10 @@ ApplicationWindow {
title
:
"
Icons
"
page
:
"
content/IconPage.qml
"
}
ListElement
{
title
:
"
Notifications
"
page
:
"
content/NotificationsPage.qml
"
}
}
...
...
@@ -224,13 +228,19 @@ ApplicationWindow {
}
ListView
{
id
:
mainList
model
:
pageModel
anchors.fill
:
parent
clip
:
true
delegate
:
ListViewItemWithActions
{
iconVisible
:
false
label
:
title
onClicked
:
pageItem
.
Stack
.
view
.
push
(
Qt
.
resolvedUrl
(
page
))
}
ScrollDecorator
{
flickable
:
mainList
}
}
}
}
examples/touch/src/main.cpp
View file @
e38bf17b
...
...
@@ -42,18 +42,16 @@
#include <QQmlApplicationEngine>
#include <QtQuick/QQuickView>
#include <glacierapp.h>
int
main
(
int
argc
,
char
*
argv
[])
{
setenv
(
"QT_QUICK_CONTROLS_STYLE"
,
"Nemo"
,
1
);
QGuiApplication
app
(
argc
,
argv
);
QQmlApplicationEngine
*
engine
=
new
QQmlApplicationEngine
(
QUrl
(
"/usr/share/glacier-components/main.qml"
));
QObject
*
topLevel
=
engine
->
rootObjects
().
value
(
0
);
QGuiApplication
*
app
=
GlacierApp
::
app
(
argc
,
argv
);
app
->
setOrganizationName
(
"NemoMobile"
);
QQuickWindow
*
window
=
qobject_cast
<
QQuickWindow
*>
(
topLevel
);
QQuickWindow
*
window
=
GlacierApp
::
showWindow
(
);
window
->
setTitle
(
QObject
::
tr
(
"Glacier components"
));
window
->
showFullScreen
();
return
app
.
exec
();
return
app
->
exec
();
}
examples/touch/touch.pro
View file @
e38bf17b
...
...
@@ -3,12 +3,12 @@ QT += qml quick
TARGET
=
glacier
-
components
target
.
path
=
/
usr
/
bin
qtHaveModule
(
widgets
)
{
QT
+=
widgets
}
CONFIG
+=
link_pkgconfig
LIBS
+=
-
lglacierapp
PKGCONFIG
+=
glacierapp
mainqml
.
files
=
main
.
qml
mainqml
.
path
=
/
usr
/
share
/
glacier
-
components
mainqml
.
files
=
glacier
-
components
.
qml
mainqml
.
path
=
/
usr
/
share
/
glacier
-
components
/
qml
qml
.
files
+=
\
content
/
AndroidDelegate
.
qml
\
...
...
@@ -26,9 +26,10 @@ qml.files += \
content
/
ListViewPage
.
qml
\
content
/
SelectRollerPage
.
qml
\
content
/
IconPage
.
qml
\
content
/
DatePickerPage
.
qml
content
/
DatePickerPage
.
qml
\
content
/
NotificationsPage
.
qml
qml
.
path
=
/
usr
/
share
/
glacier
-
components
/
content
qml
.
path
=
/
usr
/
share
/
glacier
-
components
/
qml
/
content
images
.
files
=
images
/*
.png
images.files += images
/*
.jpg
...
...
@@ -36,7 +37,6 @@ images.path = /usr/share/glacier-components/images
OTHER_FILES += $$qml.files
desktop.path = /usr/share/applications
desktop.files = glacier-gallery.desktop
...
...
rpm/qtquickcontrols-nemo.spec
View file @
e38bf17b
Name: qt5-qtquickcontrols-nemo
Summary: Nemomobile Qt Quick Controls
Version: 5.3.
1
Version: 5.3.
2
Release: nemo1
Group: System/Library
License: LGPLv2.1 with exception or GPLv3
...
...
@@ -10,6 +10,7 @@ BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: fdupes
Requires: qt5-qtquickcontrols
Requires: qt5-qtgraphicaleffects
Requires: nemo-theme-glacier
...
...
@@ -24,7 +25,10 @@ This package contains the Qt Quick Controls library
%package examples
Summary: Examples to showcase Nemo UI components
Requires: %{name}
Requires: nemo-qml-plugin-notifications-qt5
Requires: libglacierapp
BuildRequires: desktop-file-utils
BuildRequires: pkgconfig(glacierapp)
%description examples
%{summary}.
...
...
src/controls/controls.pro
View file @
e38bf17b
...
...
@@ -25,6 +25,7 @@ QML_FILES += \
qml
/
InverseMouseArea
.
qml
\
qml
/
IconButton
.
qml
\
qml
/
DatePicker
.
qml
\
qml
/
ScrollDecorator
.
qml
\
qml
/
dialogs
/
QueryDialog
.
qml
OTHER_FILES
+=
qmldir
\
...
...
src/controls/qml/ListView.qml
View file @
e38bf17b
...
...
@@ -8,10 +8,8 @@ ListView {
signal
hideAllActions
(
int
hideIndex
)
property
bool
showDecorator
:
false
property
color
delegateColor
:
Theme
.
backgroundColor
property
color
bottomGradientColor
:
Theme
.
backgroundColor
property
color
scrollerDecoratorColor
:
Theme
.
accentColor
section.criteria
:
ViewSection
.
FullString
section.delegate
:
Component
{
...
...
@@ -67,20 +65,5 @@ ListView {
}
}
Rectangle
{
id
:
scrollerDecorator
visible
:
(
listView
.
showDecorator
&&
listView
.
contentHeight
>
listView
.
height
)
color
:
scrollerDecoratorColor
width
:
Theme
.
itemSpacingExtraSmall
height
:
listView
.
height
*
listView
.
height
/
listView
.
contentHeight
y
:
(
listView
.
height
)
/
listView
.
contentHeight
*
listView
.
contentY
anchors
{
right
:
listView
.
right
rightMargin
:
Theme
.
itemSpacingExtraSmall
/
2
}
}
}
src/controls/qml/ScrollDecorator.qml
0 → 100644
View file @
e38bf17b
/****************************************************************************************
**
** Copyright (C) 2017 Chupligin Sergey <neochapay@gmail.com>
** All rights reserved.
**
** You may use this file under the terms of BSD license as follows:
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in the
** documentation and/or other materials provided with the distribution.
** * Neither the name of the author nor the
** names of its contributors may be used to endorse or promote products
** derived from this software without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
****************************************************************************************/
import
QtQuick
2.6
import
QtQuick
.
Controls
1.0
//needed for the Stack attached property
import
QtQuick
.
Controls
.
Nemo
1.0
Rectangle
{
id
:
scroolDecorator
property
var
flickable
visible
:
(
flickable
.
contentHeight
>
flickable
.
height
)
color
:
Theme
.
accentColor
width
:
Theme
.
itemSpacingExtraSmall
height
:
flickable
.
height
*
flickable
.
height
/
flickable
.
contentHeight
y
:
(
flickable
.
height
)
/
flickable
.
contentHeight
*
flickable
.
contentY
anchors
{
right
:
flickable
.
right
rightMargin
:
Theme
.
itemSpacingExtraSmall
/
2
}
}
src/controls/qml/qmldir
View file @
e38bf17b
...
...
@@ -26,6 +26,7 @@ GlacierRollerItem 1.0 GlacierRollerItem.qml
InverseMouseArea 1.0 InverseMouseArea.qml
IconButton 1.0 IconButton.qml
DatePicker 1.0 DatePicker.qml
ScrollDecorator 1.0 ScrollDecorator.qml
# MIRRORED CONTROLS:
# These are the controls that we take directly from official QQC.
...
...
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