Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Plasma
Plasma Phone Components
Commits
f6419fc9
Commit
f6419fc9
authored
Oct 27, 2015
by
Marco Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove quicksettings applet
not used anymore since ages
parent
e0636b46
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
0 additions
and
422 deletions
+0
-422
applets/CMakeLists.txt
applets/CMakeLists.txt
+0
-1
applets/quicksettings/CMakeLists.txt
applets/quicksettings/CMakeLists.txt
+0
-19
applets/quicksettings/Messages.sh
applets/quicksettings/Messages.sh
+0
-4
applets/quicksettings/package/contents/ui/BrightnessDelegate.qml
.../quicksettings/package/contents/ui/BrightnessDelegate.qml
+0
-75
applets/quicksettings/package/contents/ui/Delegate.qml
applets/quicksettings/package/contents/ui/Delegate.qml
+0
-85
applets/quicksettings/package/contents/ui/main.qml
applets/quicksettings/package/contents/ui/main.qml
+0
-130
applets/quicksettings/package/metadata.desktop
applets/quicksettings/package/metadata.desktop
+0
-22
applets/quicksettings/quicksettings.cpp
applets/quicksettings/quicksettings.cpp
+0
-43
applets/quicksettings/quicksettings.h
applets/quicksettings/quicksettings.h
+0
-43
No files found.
applets/CMakeLists.txt
View file @
f6419fc9
...
...
@@ -3,4 +3,3 @@ plasma_install_package(clock org.kde.phone.clock)
plasma_install_package
(
notifications org.kde.phone.notifications
)
add_subdirectory
(
battery
)
add_subdirectory
(
quicksettings
)
applets/quicksettings/CMakeLists.txt
deleted
100644 → 0
View file @
e0636b46
set
(
quicksettings_SRCS
quicksettings.cpp
)
add_library
(
plasma_applet_quicksettings MODULE
${
quicksettings_SRCS
}
)
kcoreaddons_desktop_to_json
(
plasma_applet_quicksettings package/metadata.desktop
)
target_link_libraries
(
plasma_applet_quicksettings
Qt5::Gui
KF5::Plasma
KF5::I18n
)
install
(
TARGETS plasma_applet_quicksettings DESTINATION
${
KDE_INSTALL_PLUGINDIR
}
/plasma/applets
)
#install(FILES plasma-quicksettings-default.desktop DESTINATION ${SERVICES_INSTALL_DIR})
plasma_install_package
(
package org.kde.phone.quicksettings
)
applets/quicksettings/Messages.sh
deleted
100755 → 0
View file @
e0636b46
#! /usr/bin/env bash
$EXTRACTRC
`
find
.
-name
\*
.rc
-o
-name
\*
.ui
-o
-name
\*
.kcfg
`
>>
rc.cpp
$XGETTEXT
`
find
.
-name
\*
.js
-o
-name
\*
.qml
-o
-name
\*
.cpp
`
-o
$podir
/plasma_applet_org.kde.phone.quicksettings.pot
rm
-f
rc.cpp
applets/quicksettings/package/contents/ui/BrightnessDelegate.qml
deleted
100644 → 0
View file @
e0636b46
/*
* Copyright 2015 Marco Martin <notmart@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, 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 Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import
QtQuick
2.4
import
QtQuick
.
Layouts
1.1
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
2.0
as
PlasmaComponents
Item
{
id
:
delegateRoot
implicitWidth
:
delegate
.
implicitWidth
implicitHeight
:
delegate
.
implicitHeight
+
(
slider
.
opacity
>
0
?
slider
.
height
:
0
)
property
int
screenBrightness
readonly
property
int
maximumScreenBrightness
:
pmSource
.
data
[
"
PowerDevil
"
]
?
pmSource
.
data
[
"
PowerDevil
"
][
"
Maximum Screen Brightness
"
]
||
0
:
0
PlasmaCore.DataSource
{
id
:
pmSource
engine
:
"
powermanagement
"
connectedSources
:
[
"
PowerDevil
"
]
onDataChanged
:
{
delegateRoot
.
screenBrightness
=
source
.
data
[
"
PowerDevil
"
][
"
Screen Brightness
"
];
}
}
Delegate
{
id
:
delegate
toggled
:
slider
.
opacity
>
0
function
toggle
()
{
slider
.
opacity
=
slider
.
opacity
>
0
?
0
:
1
;
}
}
PlasmaComponents.Slider
{
id
:
slider
anchors.top
:
delegate
.
bottom
width
:
flow
.
width
opacity
:
0
x
:
-
delegateRoot
.
parent
.
x
value
:
screenBrightness
minimumValue
:
maximumValue
>
100
?
1
:
0
maximumValue
:
delegateRoot
.
maximumScreenBrightness
Behavior
on
opacity
{
OpacityAnimator
{
duration
:
units
.
shortDuration
easing.type
:
Easing
.
InOutQuad
}
}
}
onScreenBrightnessChanged
:
{
var
service
=
pmSource
.
serviceForSource
(
"
PowerDevil
"
);
var
operation
=
service
.
operationDescription
(
"
setBrightness
"
);
operation
.
brightness
=
slider
.
value
;
operation
.
silent
=
true
service
.
startOperationCall
(
operation
);
}
}
applets/quicksettings/package/contents/ui/Delegate.qml
deleted
100644 → 0
View file @
e0636b46
/*
* Copyright 2015 Marco Martin <notmart@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, 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 Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import
QtQuick
2.1
import
QtQuick
.
Layouts
1.1
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
2.0
as
PlasmaComponents
RowLayout
{
id
:
delegateRoot
property
bool
toggled
:
model
.
enabled
spacing
:
units
.
smallSpacing
implicitWidth
:
flow
.
width
/
2
-
units
.
largeSpacing
/
2
Rectangle
{
Layout.minimumWidth
:
units
.
iconSizes
.
large
Layout.minimumHeight
:
width
color
:
toggled
?
Qt
.
rgba
(
PlasmaCore
.
ColorScope
.
highlightColor
.
r
,
PlasmaCore
.
ColorScope
.
highlightColor
.
g
,
PlasmaCore
.
ColorScope
.
highlightColor
.
b
,
iconMouseArea
.
pressed
?
0.5
:
0.3
)
:
Qt
.
rgba
(
PlasmaCore
.
ColorScope
.
textColor
.
r
,
PlasmaCore
.
ColorScope
.
textColor
.
g
,
PlasmaCore
.
ColorScope
.
textColor
.
b
,
iconMouseArea
.
pressed
?
0.5
:
0.2
)
PlasmaCore.IconItem
{
colorGroup
:
PlasmaCore
.
ColorScope
.
colorGroup
anchors
{
fill
:
parent
margins
:
units
.
smallSpacing
}
source
:
model
.
icon
MouseArea
{
id
:
iconMouseArea
anchors.fill
:
parent
onClicked
:
{
if
(
delegateRoot
.
toggle
)
{
delegateRoot
.
toggle
();
}
else
if
(
model
.
toggleFunction
)
{
root
[
model
.
toggleFunction
]();
}
else
if
(
model
.
settingsCommand
)
{
plasmoid
.
nativeInterface
.
executeCommand
(
model
.
settingsCommand
);
}
}
}
}
}
Rectangle
{
Layout.fillWidth
:
true
Layout.fillHeight
:
true
color
:
Qt
.
rgba
(
PlasmaCore
.
ColorScope
.
textColor
.
r
,
PlasmaCore
.
ColorScope
.
textColor
.
g
,
PlasmaCore
.
ColorScope
.
textColor
.
b
,
labelMouseArea
.
pressed
?
0.5
:
0.2
)
PlasmaComponents.Label
{
anchors
{
fill
:
parent
margins
:
units
.
smallSpacing
}
text
:
model
.
text
elide
:
Text
.
ElideRight
verticalAlignment
:
Text
.
AlignVCenter
MouseArea
{
id
:
labelMouseArea
anchors.fill
:
parent
onClicked
:
{
if
(
model
.
settingsCommand
)
{
plasmoid
.
nativeInterface
.
executeCommand
(
model
.
settingsCommand
);
}
else
if
(
model
.
toggleFunction
)
{
root
[
model
.
toggleFunction
]();
}
}
}
}
}
}
applets/quicksettings/package/contents/ui/main.qml
deleted
100644 → 0
View file @
e0636b46
/*
* Copyright 2015 Marco Martin <notmart@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, 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 Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import
QtQuick
2.1
import
QtQuick
.
Layouts
1.1
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
2.0
as
PlasmaComponents
import
org
.
kde
.
plasma
.
plasmoid
2.0
Item
{
id
:
root
function
toggleAirplane
()
{
print
(
"
toggle airplane mode
"
)
}
Plasmoid.preferredRepresentation
:
plasmoid
.
fullRepresentation
Layout.minimumHeight
:
flow
.
implicitHeight
+
units
.
largeSpacing
*
2
ListModel
{
id
:
settingsModel
ListElement
{
text
:
"
Settings
"
icon
:
"
configure
"
enabled
:
false
settingsCommand
:
"
active-settings
"
toggleFunction
:
""
delegate
:
""
}
ListElement
{
text
:
"
Mobile network
"
icon
:
"
network-mobile-80
"
enabled
:
true
settingsCommand
:
""
}
ListElement
{
text
:
"
Airplane mode
"
icon
:
"
flightmode-on
"
enabled
:
false
settingsCommand
:
""
toggleFunction
:
"
toggleAirplane
"
}
ListElement
{
text
:
"
Bluetooth
"
icon
:
"
preferences-system-bluetooth
"
enabled
:
false
settingsCommand
:
""
}
ListElement
{
text
:
"
Wireless
"
icon
:
"
network-wireless-on
"
enabled
:
true
settingsCommand
:
"
active-settings -m org.kde.plasma.phone.settings.wifi
"
}
ListElement
{
text
:
"
Alarms
"
icon
:
"
korgac
"
enabled
:
false
settingsCommand
:
""
}
ListElement
{
text
:
"
Notifications
"
icon
:
"
preferences-desktop-notification
"
enabled
:
true
settingsCommand
:
""
}
ListElement
{
text
:
"
Brightness
"
icon
:
"
video-display-brightness
"
enabled
:
false
settingsCommand
:
"
active-settings -m org.kde.active.settings.powermanagement
"
delegate
:
"
BrightnessDelegate
"
}
ListElement
{
text
:
"
Flashlight
"
icon
:
"
package_games_puzzle
"
enabled
:
false
settingsCommand
:
""
}
ListElement
{
text
:
"
Location
"
icon
:
"
plasmaapplet-location
"
enabled
:
false
settingsCommand
:
""
}
}
Flow
{
id
:
flow
anchors
{
fill
:
parent
margins
:
units
.
largeSpacing
}
spacing
:
units
.
largeSpacing
Repeater
{
model
:
settingsModel
delegate
:
Loader
{
width
:
item
?
item
.
implicitWidth
:
0
height
:
item
?
item
.
implicitHeight
:
0
source
:
Qt
.
resolvedUrl
((
model
.
delegate
?
model
.
delegate
:
"
Delegate
"
)
+
"
.qml
"
)
}
}
move
:
Transition
{
NumberAnimation
{
duration
:
units
.
shortDuration
easing.type
:
Easing
.
InOutQuad
properties
:
"
x,y
"
}
}
}
}
applets/quicksettings/package/metadata.desktop
deleted
100644 → 0
View file @
e0636b46
[Desktop Entry]
Encoding=UTF-8
Name=Quick Settings
Comment=A panel to quickly access most important settings
Icon=systemsettings
Type=Service
X-KDE-ParentApp=
X-KDE-PluginInfo-Author=Marco Martin
X-KDE-PluginInfo-Email=mart@kde.org
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-Name=org.kde.phone.quicksettings
X-KDE-Library=plasma_applet_quicksettings
X-KDE-PluginInfo-Version=1.0
X-KDE-PluginInfo-Website=plasma.kde.org
X-KDE-ServiceTypes=Plasma/Applet
X-Plasma-API=declarativeappletscript
X-KDE-PluginInfo-Category=Settings
X-Plasma-MainScript=ui/main.qml
X-Plasma-RemoteLocation=
applets/quicksettings/quicksettings.cpp
deleted
100644 → 0
View file @
e0636b46
/***************************************************************************
* Copyright (C) 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 02110-1301 USA . *
***************************************************************************/
#include "quicksettings.h"
#include <QDebug>
#include <QProcess>
QuickSettings
::
QuickSettings
(
QObject
*
parent
,
const
QVariantList
&
args
)
:
Plasma
::
Applet
(
parent
,
args
)
{
setHasConfigurationInterface
(
true
);
}
QuickSettings
::~
QuickSettings
()
{
}
void
QuickSettings
::
executeCommand
(
const
QString
&
command
)
{
qWarning
()
<<
"Executing"
<<
command
;
QProcess
::
startDetached
(
command
);
}
K_EXPORT_PLASMA_APPLET_WITH_JSON
(
quicksettings
,
QuickSettings
,
"metadata.json"
)
#include "quicksettings.moc"
applets/quicksettings/quicksettings.h
deleted
100644 → 0
View file @
e0636b46
/***************************************************************************
* Copyright (C) 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 02110-1301 USA . *
***************************************************************************/
#ifndef QUICKSETTINGS_H
#define QUICKSETTINGS_H
#include <Plasma/Applet>
class
QuickSettings
:
public
Plasma
::
Applet
{
Q_OBJECT
public:
QuickSettings
(
QObject
*
parent
,
const
QVariantList
&
args
);
~
QuickSettings
();
public
Q_SLOTS
:
void
executeCommand
(
const
QString
&
command
);
private:
};
#endif
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