Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
glacier-home
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
glacier-home
Commits
3c392d7f
Commit
3c392d7f
authored
Jan 23, 2015
by
Aleksi Suomalainen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[devicelock] Device lock for the homescreen.
parent
aad959f3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
2 deletions
+65
-2
DeviceLock.qml
src/qml/DeviceLock.qml
+52
-0
Lockscreen.qml
src/qml/Lockscreen.qml
+8
-0
compositor.qml
src/qml/compositor.qml
+1
-0
src.pro
src/src.pro
+4
-2
No files found.
src/qml/DeviceLock.qml
0 → 100644
View file @
3c392d7f
import
QtQuick
2.1
import
QtQuick
.
Controls
1.0
import
QtQuick
.
Controls
.
Nemo
1.0
import
QtQuick
.
Controls
.
Styles
.
Nemo
1.0
import
QtQuick
.
Layouts
1.0
Item
{
id
:
root
anchors.top
:
clock
.
bottom
anchors.bottom
:
parent
.
bottom
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
ColumnLayout
{
anchors.fill
:
parent
spacing
:
40
TextField
{
id
:
lockCodeField
readOnly
:
true
echoMode
:
TextInput
.
PasswordEchoOnEdit
}
GridLayout
{
height
:
parent
.
height
width
:
parent
.
width
columns
:
3
Repeater
{
model
:
[
"
1
"
,
"
2
"
,
"
3
"
,
"
4
"
,
"
5
"
,
"
6
"
,
"
7
"
,
"
8
"
,
"
9
"
,
"
Ca
"
,
"
0
"
,
"
OK
"
]
delegate
:
Button
{
Layout.fillWidth
:
true
text
:
modelData
onClicked
:
{
if
(
text
!==
"
Ca
"
&&
text
!==
"
OK
"
)
{
lockCodeField
.
insert
(
lockCodeField
.
cursorPosition
,
text
)
}
else
{
if
(
text
===
"
OK
"
)
{
if
(
deviceLock
.
checkCode
(
lockCodeField
.
text
))
{
deviceLock
.
setState
(
0
)
lockCodeField
.
text
=
""
}
else
{
lockCodeField
.
text
=
""
}
}
else
if
(
text
===
"
Ca
"
){
lockCodeField
.
text
=
""
}
}
}
}
}
}
}
}
src/qml/Lockscreen.qml
View file @
3c392d7f
...
...
@@ -6,12 +6,20 @@ Image {
visible
:
LipstickSettings
.
lockscreenVisible
LockscreenClock
{
id
:
clock
anchors
{
top
:
parent
.
top
left
:
parent
.
left
right
:
parent
.
right
}
}
DeviceLock
{
id
:
deviceLockUI
anchors.fill
:
parent
visible
:
deviceLock
.
state
===
1
z
:
201
}
MouseArea
{
anchors.fill
:
parent
}
...
...
src/qml/compositor.qml
View file @
3c392d7f
...
...
@@ -133,6 +133,7 @@ Compositor {
property
real
lockThreshold
:
0.25
property
int
lockscreenX
property
int
lockscreenY
enabled
:
deviceLock
.
state
===
0
onGestureStarted
:
{
swipeAnimation
.
stop
()
...
...
src/src.pro
View file @
3c392d7f
...
...
@@ -35,7 +35,8 @@ qml.files = qml/MainScreen.qml \
qml
/
BatteryPanel
.
qml
\
qml
/
CommonPanel
.
qml
\
qml
/
ShutdownScreen
.
qml
\
qml
/
GlacierRotation
.
qml
qml
/
GlacierRotation
.
qml
\
qml
/
DeviceLock
.
qml
qmlcompositor
.
path
=
/
usr
/
share
/
lipstick
-
glacier
-
home
-
qt5
/
qml
/
compositor
qmlcompositor
.
files
=
qml
/
compositor
/
WindowWrapperMystic
.
qml
\
...
...
@@ -107,6 +108,7 @@ OTHER_FILES += qml/*.qml \
qml/BatteryPanel.qml \
qml/CommonPanel.qml \
qml/ShutdownScreen.qml \
qml/GlacierRotation.qml
qml/GlacierRotation.qml \
qml/DeviceLock.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