Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Plasma Mobile Settings
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Plasma Mobile
Plasma Mobile Settings
Commits
58bafb98
Commit
58bafb98
authored
Jan 04, 2019
by
Marco Martin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'kcm-rework-cleanup' into 'master'
Rework mobile kcms See merge request kde/plasma-settings!2
parents
0ff28e9a
f706b28e
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
245 additions
and
488 deletions
+245
-488
modules/CMakeLists.txt
modules/CMakeLists.txt
+2
-7
modules/accounts/package/contents/ui/Accounts.qml
modules/accounts/package/contents/ui/Accounts.qml
+76
-134
modules/development/package/contents/ui/devel.qml
modules/development/package/contents/ui/devel.qml
+10
-31
modules/powermanagement/package/contents/ui/Power.qml
modules/powermanagement/package/contents/ui/Power.qml
+6
-12
modules/theme/package/contents/ui/Theme.qml
modules/theme/package/contents/ui/Theme.qml
+8
-15
modules/time/CMakeLists.txt
modules/time/CMakeLists.txt
+1
-1
modules/time/package/contents/ui/Digit.qml
modules/time/package/contents/ui/Digit.qml
+1
-3
modules/time/package/contents/ui/Time.qml
modules/time/package/contents/ui/Time.qml
+141
-156
modules/time/package/contents/ui/TimeZonePicker.qml
modules/time/package/contents/ui/TimeZonePicker.qml
+0
-129
No files found.
modules/CMakeLists.txt
View file @
58bafb98
# Install the packages, also make it known to the system
add_subdirectory
(
theme
)
add_subdirectory
(
development
)
if
(
${
KF5KDELibs4Support_FOUND
}
)
add_subdirectory
(
time
)
endif
()
#add_subdirectory(locale)
# Web
#install(DIRECTORY web/ DESTINATION ${DATA_INSTALL_DIR}/plasma/packages/org.kde.active.settings.web)
#install(FILES web/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR} RENAME org.kde.active.settings.web.desktop)
#Power
#
Power
add_subdirectory
(
powermanagement
)
#install(DIRECTORY powermanagement/ DESTINATION ${DATA_INSTALL_DIR}/plasma/packages/org.kde.active.settings.powermanagement)
#install(FILES powermanagement/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR} RENAME org.kde.active.settings.powermanagement.desktop)
#Accounts
# Accounts
if
(
KAccounts_FOUND AND AccountsQt5_FOUND AND SignOnQt5_FOUND
)
add_subdirectory
(
accounts
)
endif
()
modules/accounts/package/contents/ui/Accounts.qml
View file @
58bafb98
...
...
@@ -17,144 +17,98 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import
QtQuick
2.2
import
QtQuick
.
Layouts
1.1
import
QtQuick
.
Controls
1.2
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
2.0
as
PlasmaComponents
import
org
.
kde
.
plasma
.
extras
2.0
as
PlasmaExtras
import
QtQuick
2.7
import
QtQuick
.
Layouts
1.11
import
QtQuick
.
Controls
2.0
as
Controls
import
org
.
kde
.
kirigami
2.4
as
Kirigami
import
org
.
kde
.
active
.
settings
2.0
as
ActiveSettings
import
org
.
kde
.
kaccounts
1.0
import
org
.
kde
.
kcm
1.2
import
Ubuntu
.
OnlineAccounts
0.1
as
OA
Item
{
ScrollViewKCM
{
id
:
kaccountsRoot
objectName
:
"
kaccountsModule
"
width
:
800
;
height
:
500
// Existing accounts
view
:
ListView
{
Layout.fillWidth
:
true
Layout.fillHeight
:
true
StackView
{
id
:
mainView
anchors.fill
:
parent
model
:
OA.AccountServiceModel
{
id
:
accountsModel
service
:
"
global
"
includeDisabled
:
true
}
initialItem
:
ColumnLayout
{
delegate
:
Kirigami.SwipeListItem
{
Layout.fillWidth
:
true
Layout.fillHeight
:
true
ListView
{
Layout.fillWidth
:
true
Layout.fillHeight
:
true
spacing
:
units
.
smallSpacing
Controls.Label
{
text
:
model
.
displayName
+
"
(
"
+
providerName
+
"
)
"
model
:
OA.AccountServiceModel
{
id
:
accountsModel
service
:
"
global
"
includeDisabled
:
true
OA.Account
{
id
:
account
objectHandle
:
model
.
accountHandle
}
delegate
:
RowLayout
{
anchors
{
left
:
parent
.
left
right
:
parent
.
right
}
PlasmaComponents.Button
{
Layout.fillWidth
:
true
text
:
model
.
displayName
onClicked
:
{
mainView
.
push
(
availableServices
)
servicesModel
.
accountId
=
model
.
accountId
}
}
PlasmaComponents.Button
{
iconSource
:
"
list-remove
"
OA.Account
{
id
:
account
objectHandle
:
model
.
accountHandle
}
onClicked
:
{
account
.
remove
();
}
}
actions
:
[
Kirigami.Action
{
iconName
:
"
bookmark-remove
"
onTriggered
:
{
account
.
remove
()
}
}
]
onClicked
:
{
availableServicesSheet
.
open
()
servicesModel
.
accountId
=
model
.
accountId
}
}
}
PlasmaComponents.Button
{
Layout.fillWidth
:
true
text
:
i18n
(
"
Add new Account
"
)
onClicked
:
mainView
.
push
(
availableAccounts
)
footer
:
RowLayout
{
Controls.Button
{
Layout.alignment
:
Qt
.
AlignRight
text
:
i18n
(
"
Add new Account
"
)
icon.name
:
"
contact-new
"
onClicked
:
{
availableAccountsSheet
.
open
()
}
}
}
Component
{
id
:
availableAccounts
Kirigami.OverlaySheet
{
id
:
availableAccountsSheet
parent
:
kaccountsRoot
.
parent
ColumnLayout
{
RowLayout
{
PlasmaComponents.Button
{
text
:
"
<
"
onClicked
:
{
mainView
.
push
(
mainView
.
initialItem
);
}
}
ListView
{
Layout.fillWidth
:
true
Layout.fillHeight
:
true
PlasmaComponents.Label
{
Layout.fillWidth
:
true
text
:
i18n
(
"
Available Accounts
"
)
}
}
model
:
OA.ProviderModel
{}
GridLayout
{
delegate
:
Kirigami.BasicListItem
{
icon
:
model
.
iconName
label
:
model
.
displayName
Layout.fillWidth
:
true
Layout.fillHeight
:
true
columns
:
3
Repeater
{
model
:
OA.ProviderModel
{}
// We don't have a button that has text under icon _and_ looks like a button
// so this creates one
PlasmaComponents.Button
{
Layout.fillWidth
:
true
Layout.fillHeight
:
true
ColumnLayout
{
anchors.fill
:
parent
anchors.margins
:
units
.
smallSpacing
PlasmaCore.IconItem
{
Layout.fillWidth
:
true
Layout.fillHeight
:
true
source
:
model
.
iconName
}
PlasmaComponents.Label
{
Layout.fillWidth
:
true
Layout.alignment
:
Qt
.
AlignHCenter
horizontalAlignment
:
Text
.
AlignHCenter
text
:
model
.
displayName
}
}
Component
{
id
:
jobComponent
CreateAccount
{
onFinished
:
{
mainView
.
push
(
mainView
.
initialItem
);
}
}
}
onClicked
:
{
var
job
=
jobComponent
.
createObject
(
mainView
,
{
providerName
:
providerId
})
job
.
start
()
}
}
onClicked
:
{
var
job
=
jobComponent
.
createObject
(
kaccountsRoot
,
{
"
providerName
"
:
providerId
})
job
.
start
()
}
}
}
Component
{
id
:
jobComponent
CreateAccount
{
onFinished
:
{
availableAccountsSheet
.
close
()
}
}
}
...
...
@@ -164,44 +118,32 @@ Item {
id
:
servicesModel
}
Component
{
id
:
availableServices
Kirigami.OverlaySheet
{
id
:
availableServicesSheet
parent
:
kaccountsRoot
.
parent
ColumnLayout
{
RowLayout
{
Layout.maximumHeight
:
backButton
.
height
PlasmaComponents.Button
{
id
:
backButton
text
:
"
<
"
onClicked
:
{
mainView
.
push
(
mainView
.
initialItem
);
}
}
PlasmaComponents.Label
{
Layout.fillWidth
:
true
text
:
i18n
(
"
Available Services
"
)
}
Kirigami.Heading
{
Layout.fillWidth
:
true
text
:
i18n
(
"
Available Services
"
)
}
ColumnLayout
{
Layout.fillHeight
:
true
Layout.fillWidth
:
true
spacing
:
u
nits
.
smallSpacing
spacing
:
Kirigami
.
U
nits
.
smallSpacing
Repeater
{
Layout.fillWidth
:
true
model
:
servicesModel
PlasmaComponents.CheckBox
{
Controls.CheckDelegate
{
Layout.fillWidth
:
true
text
:
model
.
serviceName
checked
:
model
.
enabled
}
}
}
Item
{
Layout.fillHeight
:
true
}
}
}
}
modules/development/package/contents/ui/devel.qml
View file @
58bafb98
...
...
@@ -19,51 +19,30 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import
QtQuick
2.2
import
QtQuick
.
Layouts
1.1
import
QtQuick
2.7
import
QtQuick
.
Layouts
1.11
import
QtQuick
.
Controls
2.0
as
Controls
Item
{
import
org
.
kde
.
kirigami
2.4
as
Kirigami
import
org
.
kde
.
kcm
1.2
SimpleKCM
{
id
:
develModule
objectName
:
"
develModule
"
// ActiveSettings.DevelSettings {
// id: settings
// }
GridLayout
{
ColumnLayout
{
id
:
formLayout
columns
:
2
//rows: 4
columnSpacing
:
units
.
gridUnit
rowSpacing
:
units
.
gridUnit
anchors
{
fill
:
parent
margins
:
units
.
gridUnit
leftMargin
:
0
}
Controls.Label
{
id
:
timeZoneLabel
text
:
i18n
(
"
Allow remote SSH access:
"
)
Layout.fillWidth
:
true
}
Controls.Switch
{
Controls.SwitchDelegate
{
id
:
ssh
text
:
i18n
(
"
Allow remote SSH access:
"
)
checked
:
kcm
.
sshEnabled
Layout.fillWidth
:
true
onClicked
:
{
kcm
.
sshEnabled
=
checked
;
// we have to check to se if it failed
checked
=
kcm
.
sshEnabled
;
}
}
Item
{
width
:
2
Layout.fillHeight
:
true
}
}
}
modules/powermanagement/package/contents/ui/Power.qml
View file @
58bafb98
...
...
@@ -20,18 +20,18 @@
import
QtQuick
2.2
import
QtQuick
.
Controls
2.0
as
Controls
import
QtQuick
.
Layouts
1.11
import
org
.
kde
.
kirigami
2.1
as
Kirigami
import
org
.
kde
.
plasma
.
components
2.0
as
PlasmaComponents
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
active
.
settings
2.0
as
ActiveSettings
import
org
.
kde
.
kcm
1.2
Item
{
SimpleKCM
{
id
:
powermanagementModule
objectName
:
"
powermanagementModule
"
width
:
800
;
height
:
500
ActiveSettings.ConfigGroup
{
id
:
screensaverConfig
file
:
"
kscreensaverrc
"
...
...
@@ -98,23 +98,17 @@ Item {
connectedSources
:
[
"
PowerDevil
"
]
}
Column
{
Column
Layout
{
id
:
mainItem
anchors
{
fill
:
parent
margins
:
units
.
gridUnit
leftMargin
:
0
}
spacing
:
units
.
gridUnit
/
2
spacing
:
Kirigami
.
Units
.
gridUnit
*
0.5
Kirigami.Heading
{
text
:
i18n
(
"
Screen Brightness
"
)
level
:
3
}
Row
{
spacing
:
units
.
gridUnit
spacing
:
Kirigami
.
Units
.
gridUnit
*
0.5
Controls.Label
{
width
:
screensaverEnabledSwitch
.
width
text
:
i18n
(
"
0%
"
)
...
...
modules/theme/package/contents/ui/Theme.qml
View file @
58bafb98
...
...
@@ -22,20 +22,15 @@ import QtQuick.Layouts 1.1
import
QtQuick
.
Controls
2.0
as
Controls
import
org
.
kde
.
kirigami
2.1
as
Kirigami
import
org
.
kde
.
kcm
1.
0
import
org
.
kde
.
kcm
1.
2
Item
{
id
:
t
i
meModule
objectName
:
"
t
i
meModule
"
SimpleKCM
{
id
:
t
he
meModule
objectName
:
"
t
he
meModule
"
ColumnLayout
{
anchors
{
left
:
parent
.
left
top
:
parent
.
top
right
:
parent
.
right
rightMargin
:
units
.
gridUnit
}
spacing
:
units
.
gridUnit
/
2
width
:
parent
.
width
spacing
:
Kirigami
.
Units
.
gridUnit
*
0.5
Kirigami.Heading
{
text
:
i18n
(
"
Font
"
)
...
...
@@ -44,7 +39,7 @@ Item {
Controls.Slider
{
id
:
fontSizeSlider
Layout.preferredWidth
:
timeModule
.
width
-
units
.
gridUnit
Layout.preferredWidth
:
parent
.
width
-
Kirigami
.
Units
.
gridUnit
*
2
stepSize
:
1.0
from
:
3
to
:
12
...
...
@@ -69,7 +64,7 @@ Item {
delegate
:
Controls.RadioDelegate
{
Layout.fillWidth
:
true
text
:
model
.
display
checked
:
kcm
.
themeName
==
model
.
packageNameRole
checked
:
kcm
.
themeName
==
=
model
.
packageNameRole
onCheckedChanged
:
{
if
(
checked
)
{
kcm
.
themeName
=
model
.
packageNameRole
;
...
...
@@ -78,9 +73,7 @@ Item {
}
}
}
Component.onCompleted
:
{
print
(
"
KCM.fontSize:
"
+
kcm
.
fontSize
);
}
}
modules/time/CMakeLists.txt
View file @
58bafb98
project
(
kcm_mobile_time
)
project
(
kcm_mobile_time
)
#include_directories(../../../../components/settings)
...
...
modules/time/package/contents/ui/Digit.qml
View file @
58bafb98
...
...
@@ -17,9 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import
QtQuick
2.1
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
2.0
as
PlasmaComponents
import
QtQuick
2.7
// import org.kde.active.settings.time 2.0
...
...
modules/time/package/contents/ui/Time.qml
View file @
58bafb98
...
...
@@ -18,100 +18,62 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import
QtQuick
2.
2
import
QtQuick
.
Layouts
1.
1
import
QtQuick
2.
7
import
QtQuick
.
Layouts
1.
3
import
QtQuick
.
Controls
2.3
as
Controls
import
QtQuick
.
Controls
1.3
as
QQC1
import
org
.
kde
.
kirigami
2.4
as
Kirigami
import
org
.
kde
.
plasma
.
components
2.0
as
PlasmaComponents
import
org
.
kde
.
kcm
1.
0
import
org
.
kde
.
active
.
settings
2.0
import
org
.
kde
.
kcm
1.
2
Item
{
SimpleKCM
{
id
:
timeModule
objectName
:
"
timeModule
"
QQC1.ScrollView
{
id
:
scrollView
anchors.fill
:
parent
ColumnLayout
{
width
:
parent
.
width
spacing
:
0
id
:
formLayout
GridLayout
{
id
:
formLayout
property
int
gridspacing
:
Kirigami
.
Units
.
gridUnit
//anchors.fill: parent
//height: implicitHeight
width
:
scrollView
.
width
-
Kirigami
.
Units
.
gridUnit
//Rectangle { color: "orange"; opacity: 0.3; anchors.fill: parent}
columns
:
2
//rows: 4
//anchors.fill: parent
//anchors.rightMargin: gridspacing
//rowSpacing: gridspacing
columnSpacing
:
gridspacing
Item
{
Layout.preferredHeight
:
Kirigami
.
Units
.
gridUnit
/
3
Layout.columnSpan
:
2
}
Kirigami.Heading
{
Layout.columnSpan
:
2
// Layout.rowSpacing: Kirigami.Units.gridUnit * 4
text
:
i18n
(
"
Time Display
"
)
level
:
3
}
Controls.Label
{
text
:
i18n
(
"
Use 24-hour clock:
"
)
Layout.fillWidth
:
true
}
Kirigami.Heading
{
Layout.bottomMargin
:
Kirigami
.
Units
.
gridUnit
*
0.5
text
:
i18n
(
"
Time Display
"
)
level
:
3
}
Kirigami.BasicListItem
{
label
:
i18n
(
"
Use 24-hour clock:
"
)
icon
:
"
clock
"
Controls.Switch
{
id
:
twentyFourSwitch
checked
:
kcm
.
twentyFour
Layout.alignment
:
Qt
.
AlignRight
onClicked
:
{
kcm
.
twentyFour
=
checked
print
(
kcm
.
timeZone
);
}
}
}
Controls.Label
{
id
:
timeZoneLabel
text
:
i18n
(
"
Timezone:
"
)
Layout.fillWidth
:
true
}
Controls.Button
{
Kirigami.BasicListItem
{
label
:
"
Timezone:
"
Controls.ToolButton
{
id
:
timeZoneButton
text
:
kcm
.
timeZone
onClicked
:
timeZonePickerDialog
.
open
()
}
}
Item
{
height
:
Kirigami
.
Units
.
gridUnit
}
Kirigami.Heading
{
Layout.columnSpan
:
2
// Layout.rowSpacing: Kirigami.Units.gridUnit * 4
text
:
i18n
(
"
Set Time and Date
"
)
level
:
3
}
Controls.Label
{
id
:
ntpLabel
text
:
i18n
(
"
Set time automatically:
"
)
Layout.fillWidth
:
true
}
Kirigami.Heading
{
Layout.topMargin
:
Kirigami
.
Units
.
gridUnit
Layout.bottomMargin
:
Kirigami
.
Units
.
gridUnit
*
0.5
text
:
i18n
(
"
Set Time and Date
"
)
level
:
3
}
Kirigami.BasicListItem
{
label
:
i18n
(
"
Set time automatically:
"
)
Controls.Switch
{
id
:
ntpCheckBox
Layout.alignment
:
Qt
.
AlignRight
checked
:
kcm
.
useNtp
onClicked
:
{
kcm
.
useNtp
=
checked
;
...
...
@@ -121,113 +83,136 @@ Item {
}
}
}
Kirigami.Heading
{
Layout.columnSpan
:
2
// Layout.rowSpacing: Kirigami.Units.gridUnit * 4
text
:
i18n
(
"
Set Time
"
)
level
:
4
}
Kirigami.BasicListItem
{
label
:
i18n
(
"
Time
"
)
icon
:
"
clock
"
Controls.ToolButton
{
text
:
{
var
date
=
new
Date
(
kcm
.
currentTime
);
return
date
.
toTimeString
()
}
onClicked
:
timePickerDialog
.
open
()
}
}
TimePicker
{
id
:
timePicker
enabled
:
!
ntpCheckBox
.
checked
twentyFour
:
twentyFourSwitch
.
checked
Kirigami.BasicListItem
{