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 Phone Components
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
26
Issues
26
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Plasma
Plasma Phone Components
Commits
62ff6312
Commit
62ff6312
authored
Feb 25, 2015
by
Marco Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a containment
it will replace most of the logic of Desktop.qml
parent
5b39069d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
258 additions
and
0 deletions
+258
-0
CMakeLists.txt
CMakeLists.txt
+1
-0
containments/CMakeLists.txt
containments/CMakeLists.txt
+2
-0
containments/homescreen/contents/ui/HomeLauncher.qml
containments/homescreen/contents/ui/HomeLauncher.qml
+40
-0
containments/homescreen/contents/ui/HomeLauncherSvg.qml
containments/homescreen/contents/ui/HomeLauncherSvg.qml
+33
-0
containments/homescreen/contents/ui/SatelliteStripe.qml
containments/homescreen/contents/ui/SatelliteStripe.qml
+21
-0
containments/homescreen/contents/ui/main.qml
containments/homescreen/contents/ui/main.qml
+144
-0
containments/homescreen/metadata.desktop
containments/homescreen/metadata.desktop
+17
-0
No files found.
CMakeLists.txt
View file @
62ff6312
...
...
@@ -42,3 +42,4 @@ add_subdirectory(bin)
add_subdirectory
(
qmlcomponents
)
add_subdirectory
(
services
)
add_subdirectory
(
settingsmodules
)
add_subdirectory
(
containments
)
containments/CMakeLists.txt
0 → 100644
View file @
62ff6312
plasma_install_package
(
homescreen org.kde.phone.homescreen
)
containments/homescreen/contents/ui/HomeLauncher.qml
0 → 100644
View file @
62ff6312
import
QtQuick
2.0
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
kio
1.0
as
Kio
import
org
.
kde
.
plasma
.
components
2.0
as
PlasmaComponents
MouseArea
{
id
:
root
width
:
applicationsView
.
cellWidth
height
:
width
onClicked
:
{
console
.
log
(
"
Clicked:
"
+
model
.
ApplicationStorageIdRole
)
appListModel
.
runApplication
(
model
.
ApplicationStorageIdRole
)
}
PlasmaCore.IconItem
{
id
:
icon
anchors.centerIn
:
parent
width
:
units
.
iconSizes
.
large
height
:
width
source
:
model
.
ApplicationIconRole
}
PlasmaComponents.Label
{
visible
:
text
.
length
>
0
anchors
{
top
:
icon
.
bottom
left
:
icon
.
left
right
:
icon
.
right
}
wrapMode
:
Text
.
WordWrap
horizontalAlignment
:
Qt
.
AlignHCenter
verticalAlignment
:
Qt
.
AlignVCenter
text
:
model
.
ApplicationNameRole
font.pixelSize
:
theme
.
smallestFont
.
pixelSize
color
:
PlasmaCore
.
ColorScope
.
textColor
}
}
containments/homescreen/contents/ui/HomeLauncherSvg.qml
0 → 100644
View file @
62ff6312
import
QtQuick
2.0
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
Item
{
id
:
root
width
:
parent
.
width
/
parent
.
columns
height
:
parent
.
buttonHeight
property
var
callback
property
string
text
property
string
sub
property
alias
svg
:
icon
.
svg
property
alias
elementId
:
icon
.
elementId
PlasmaCore.SvgItem
{
id
:
icon
width
:
units
.
iconSizes
.
medium
height
:
width
anchors.centerIn
:
parent
}
MouseArea
{
anchors.fill
:
parent
propagateComposedEvents
:
true
onClicked
:
{
if
(
callback
)
{
callback
();
}
else
{
addNumber
(
parent
.
text
);
}
}
}
}
containments/homescreen/contents/ui/SatelliteStripe.qml
0 → 100644
View file @
62ff6312
import
QtQuick
2.0
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
Item
{
PlasmaCore.FrameSvgItem
{
z
:
-
1
imagePath
:
"
widgets/background
"
enabledBorders
:
PlasmaCore
.
FrameSvgItem
.
TopBorder
|
PlasmaCore
.
FrameSvgItem
.
BottomBorder
anchors
{
fill
:
parent
topMargin
:
-
margins
.
top
bottomMargin
:
-
margins
.
bottom
}
}
opacity
:
0.6
height
:
Math
.
max
(
100
,
units
.
gridUnit
*
2.5
)
width
:
parent
.
width
y
:
parent
.
height
/
2
-
height
/
2
x
:
0
}
containments/homescreen/contents/ui/main.qml
0 → 100644
View file @
62ff6312
/*
* Copyright 2015 Marco Martin <mart@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
*/
import
QtQuick
2.1
import
org
.
kde
.
plasma
.
plasmoid
2.0
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
2.0
as
PlasmaComponents
import
org
.
kde
.
satellite
.
components
0.1
as
SatelliteComponents
Item
{
id
:
root
width
:
640
height
:
480
property
Item
toolBox
property
alias
appletsSpace
:
applicationsView
.
headerItem
property
int
buttonHeight
:
width
/
4
Containment.onAppletAdded
:
{
var
container
=
appletContainerComponent
.
createObject
(
appletsSpace
)
container
.
visible
=
true
print
(
"
Applet added:
"
+
applet
)
applet
.
parent
=
container
container
.
applet
=
applet
applet
.
anchors
.
fill
=
applet
.
parent
applet
.
visible
=
true
container
.
width
=
500
container
.
height
=
500
}
Component
{
id
:
appletContainerComponent
Item
{
property
Item
applet
}
}
Rectangle
{
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0.9
*
(
Math
.
min
(
applicationsView
.
contentY
+
root
.
height
,
root
.
height
)
/
root
.
height
))
anchors.fill
:
parent
}
PlasmaCore.ColorScope
{
anchors.fill
:
parent
colorGroup
:
PlasmaCore
.
Theme
.
ComplementaryColorGroup
GridView
{
id
:
applicationsView
anchors
{
top
:
parent
.
top
bottom
:
parent
.
bottom
left
:
parent
.
left
right
:
parent
.
right
}
z
:
1
cellWidth
:
root
.
buttonHeight
cellHeight
:
cellWidth
model
:
SatelliteComponents.ApplicationListModel
{
id
:
appListModel
}
snapMode
:
GridView
.
SnapToRow
//clip: true
delegate
:
HomeLauncher
{}
header
:
MouseArea
{
z
:
999
width
:
root
.
width
height
:
root
.
height
-
units
.
iconSizes
.
medium
onPressAndHold
:
{
containment
.
action
(
"
configure
"
).
trigger
();
}
/*SatelliteStripe {
id: stripe
z: 99
y: Math.max(applications.contentY + parent.height, parent.height - height)
PlasmaCore.Svg {
id: stripeIcons
imagePath: Qt.resolvedUrl("../images/homescreenicons.svg")
}
Row {
anchors.fill: parent
property int columns: 4
property alias buttonHeight: stripe.height
HomeLauncherSvg {
id: phoneIcon
svg: stripeIcons
elementId: "phone"
callback: function() {
dialerOverlay.open()
}
}
HomeLauncherSvg {
id: messagingIcon
svg: stripeIcons
elementId: "messaging"
callback: function() { console.log("Start messaging") }
}
HomeLauncherSvg {
id: emailIcon
svg: stripeIcons
elementId: "email"
callback: function() { console.log("Start email") }
}
HomeLauncherSvg {
id: webIcon
svg: stripeIcons
elementId: "web"
callback: function() { console.log("Start web") }
}
}
}*/
}
}
}
Component.onCompleted
:
{
print
(
"
root Containment loaded
"
)
}
}
\ No newline at end of file
containments/homescreen/metadata.desktop
0 → 100644
View file @
62ff6312
[Desktop Entry]
Encoding=UTF-8
Keywords=
Name=Phone Homescreen
Type=Service
X-KDE-ServiceTypes=Plasma/Applet,Plasma/Containment
X-Plasma-API=declarativeappletscript
X-KDE-ParentApp=
X-KDE-PluginInfo-Author=Marco Martin
X-KDE-PluginInfo-Category=
X-KDE-PluginInfo-Email=mart@kde.org
X-KDE-PluginInfo-License=GPLv2+
X-KDE-PluginInfo-Name=org.kde.phone.homescreen
X-KDE-PluginInfo-Version=
X-KDE-PluginInfo-Website=
X-Plasma-MainScript=ui/main.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