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
KInfoCenter
Commits
77fc7495
Commit
77fc7495
authored
Apr 08, 2015
by
David Edmundson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Review comments
parent
c5bfb7b8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
22 deletions
+16
-22
CMakeLists.txt
CMakeLists.txt
+3
-5
Modules/energy/CMakeLists.txt
Modules/energy/CMakeLists.txt
+2
-7
Modules/energy/kcm.cpp
Modules/energy/kcm.cpp
+0
-3
Modules/energy/package/contents/ui/main.qml
Modules/energy/package/contents/ui/main.qml
+5
-1
Modules/energy/package/metadata.desktop
Modules/energy/package/metadata.desktop
+1
-1
Modules/energy/wakeupmodel.cpp
Modules/energy/wakeupmodel.cpp
+2
-2
Modules/energy/wakeupmodel.h
Modules/energy/wakeupmodel.h
+3
-3
No files found.
CMakeLists.txt
View file @
77fc7495
...
...
@@ -12,7 +12,7 @@ include(KDECMakeSettings)
include
(
KDECompilerSettings
)
include
(
FeatureSummary
)
find_package
(
Qt5
${
QT_MIN_VERSION
}
CONFIG REQUIRED COMPONENTS Core Gui Widgets
QuickWidgets
)
find_package
(
Qt5
${
QT_MIN_VERSION
}
CONFIG REQUIRED COMPONENTS Core Gui Widgets
)
find_package
(
KF5 REQUIRED COMPONENTS
Completion
...
...
@@ -31,10 +31,8 @@ find_package(KF5 REQUIRED COMPONENTS
WidgetsAddons
XmlGui
Declarative
Package
# (make optional)
Plasma
# MAKE OPTIONAL
PlasmaQuick
# MAKE OPTIONAL
Solid
# MAKE OPTIONAL
Package
Solid
)
if
(
${
Qt5Gui_OPENGL_IMPLEMENTATION
}
STREQUAL
"GL"
)
...
...
Modules/energy/CMakeLists.txt
View file @
77fc7495
...
...
@@ -13,19 +13,14 @@ set(kcm_energyinfo_SRCS
add_library
(
kcm_energyinfo MODULE
${
kcm_energyinfo_SRCS
}
)
target_link_libraries
(
kcm_energyinfo
Qt5::DBus
Qt5::Widgets
KF5::KIOWidgets
KF5::CoreAddons
KF5::KCMUtils
KF5::I18n
KF5::Solid
#KF5::Plasma
#KF5::PlasmaQuick
KF5::QuickAddons
#KF5::KDELibs4Support
Qt5::DBus
Qt5::Widgets
Qt5::QuickWidgets
)
kcoreaddons_desktop_to_json
(
kcm_energyinfo
"kcm_energyinfo.desktop"
)
...
...
Modules/energy/kcm.cpp
View file @
77fc7495
...
...
@@ -25,8 +25,6 @@
#include <KAboutData>
#include <QDebug>
#include <QStandardPaths>
#include <QQuickWidget>
#include <QQuickView>
#include <QtQml>
#include <QQmlEngine>
...
...
@@ -38,7 +36,6 @@
#include <Solid/Battery>
#include <KLocalizedString>
#include <Plasma/PluginLoader>
#include "batterymodel.h"
#include "wakeupmodel.h"
...
...
Modules/energy/package/contents/ui/main.qml
View file @
77fc7495
...
...
@@ -41,6 +41,8 @@ Rectangle {
}
}
SystemPalette
{
id
:
sysPal
;
colorGroup
:
SystemPalette
.
Active
}
property
bool
showWakeUps
:
true
property
int
historyType
:
HistoryModel
.
ChargeType
...
...
@@ -297,6 +299,7 @@ Rectangle {
PlasmaExtras.Heading
{
Layout.fillWidth
:
true
Layout.columnSpan
:
2
color
:
sysPal
.
text
level
:
4
text
:
i18n
(
"
Application Energy Consumption
"
)
}
...
...
@@ -381,7 +384,7 @@ Rectangle {
Rectangle
{
Layout.fillWidth
:
true
height
:
1
// FIXME dpi
height
:
1
color
:
"
#ccc
"
// FIXME palette
visible
:
wakeUpsGrid
.
visible
}
...
...
@@ -402,6 +405,7 @@ Rectangle {
PlasmaExtras.Heading
{
level
:
4
color
:
sysPal
.
text
text
:
modelData
.
title
}
...
...
Modules/energy/package/metadata.desktop
View file @
77fc7495
...
...
@@ -12,7 +12,7 @@ X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-Name=kcm_energyinfo
X-KDE-PluginInfo-Version=
X-KDE-PluginInfo-Website=
X-KDE-ServiceTypes=Plasma/Generic
X-KDE-ServiceTypes=Plasma/Generic
Qml
X-Plasma-API=declarativeappletscript
X-Plasma-MainScript=ui/main.qml
...
...
Modules/energy/wakeupmodel.cpp
View file @
77fc7495
...
...
@@ -131,8 +131,8 @@ void WakeUpModel::reload()
}
else
{
KService
::
Ptr
service
=
KService
::
serviceByStorageId
(
name
+
".desktop"
);
if
(
service
)
{
(
*
it
).
prettyName
=
service
->
property
(
"Name"
,
QVariant
::
Invalid
).
toString
();
(
*
it
).
iconName
=
service
->
icon
();
it
->
prettyName
=
service
->
property
(
"Name"
,
QVariant
::
Invalid
).
toString
();
it
->
iconName
=
service
->
icon
();
m_applicationInfo
.
insert
(
name
,
qMakePair
((
*
it
).
prettyName
,
(
*
it
).
iconName
));
}
else
{
...
...
Modules/energy/wakeupmodel.h
View file @
77fc7495
...
...
@@ -61,9 +61,9 @@ public:
qreal
total
()
const
{
return
m_total
;
}
QVariant
data
(
const
QModelIndex
&
index
,
int
role
)
const
;
int
rowCount
(
const
QModelIndex
&
parent
=
QModelIndex
())
const
;
QHash
<
int
,
QByteArray
>
roleNames
()
const
;
QVariant
data
(
const
QModelIndex
&
index
,
int
role
)
const
Q_DECL_OVERRIDE
;
int
rowCount
(
const
QModelIndex
&
parent
=
QModelIndex
())
const
Q_DECL_OVERRIDE
;
QHash
<
int
,
QByteArray
>
roleNames
()
const
Q_DECL_OVERRIDE
;
public
slots
:
void
reload
();
...
...
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