Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zolotopupov Volodymyr
PowerDevil
Commits
983f8609
Commit
983f8609
authored
Oct 19, 2021
by
Méven Car
Browse files
A few code cleanups
parent
fb9b2afe
Changes
4
Hide whitespace changes
Inline
Side-by-side
daemon/actions/bundled/brightnesscontrol.h
View file @
983f8609
...
...
@@ -48,17 +48,17 @@ protected:
public:
bool
loadAction
(
const
KConfigGroup
&
config
)
override
;
int
brightness
()
const
;
int
brightnessMax
()
const
;
int
brightnessSteps
()
const
;
public
Q_SLOTS
:
// DBus export
void
increaseBrightness
();
void
decreaseBrightness
();
int
brightness
()
const
;
int
brightnessMax
()
const
;
void
setBrightness
(
int
percent
);
void
setBrightnessSilent
(
int
percent
);
int
brightnessSteps
()
const
;
private
Q_SLOTS
:
void
onBrightnessChangedFromBackend
(
const
BrightnessLogic
::
BrightnessInfo
&
brightnessInfo
,
BackendInterface
::
BrightnessControlType
type
);
...
...
daemon/actions/bundled/keyboardbrightnesscontrol.h
View file @
983f8609
...
...
@@ -48,6 +48,10 @@ protected:
public:
bool
loadAction
(
const
KConfigGroup
&
config
)
override
;
int
keyboardBrightness
()
const
;
int
keyboardBrightnessMax
()
const
;
int
keyboardBrightnessSteps
()
const
;
public
Q_SLOTS
:
void
onBrightnessChangedFromBackend
(
const
BrightnessLogic
::
BrightnessInfo
&
brightnessInfo
,
BackendInterface
::
BrightnessControlType
type
);
...
...
@@ -56,13 +60,9 @@ public Q_SLOTS:
void
decreaseKeyboardBrightness
();
void
toggleKeyboardBacklight
();
int
keyboardBrightness
()
const
;
int
keyboardBrightnessMax
()
const
;
void
setKeyboardBrightness
(
int
value
);
void
setKeyboardBrightnessSilent
(
int
value
);
int
keyboardBrightnessSteps
()
const
;
Q_SIGNALS:
void
keyboardBrightnessChanged
(
int
value
);
void
keyboardBrightnessMaxChanged
(
int
valueMax
);
...
...
daemon/backends/upower/powerdevilupowerbackend.h
View file @
983f8609
...
...
@@ -92,11 +92,11 @@ private:
// upower devices
QMap
<
QString
,
OrgFreedesktopUPowerDeviceInterface
*>
m_devices
;
OrgFreedesktopUPowerDeviceInterface
*
m_displayDevice
;
OrgFreedesktopUPowerDeviceInterface
*
m_displayDevice
=
nullptr
;
// brightness
QMap
<
BrightnessControlType
,
int
>
m_cachedBrightnessMap
;
DDCutilBrightness
*
m_ddcBrightnessControl
;
DDCutilBrightness
*
m_ddcBrightnessControl
=
nullptr
;
OrgFreedesktopUPowerInterface
*
m_upowerInterface
;
OrgFreedesktopUPowerKbdBacklightInterface
*
m_kbdBacklight
;
...
...
kcmodule/profiles/EditPage.cpp
View file @
983f8609
...
...
@@ -56,7 +56,7 @@ K_PLUGIN_FACTORY(PowerDevilProfilesKCMFactory,
)
EditPage
::
EditPage
(
QWidget
*
parent
,
const
QVariantList
&
args
)
:
KCModule
(
nullptr
,
parent
,
args
)
:
KCModule
(
parent
,
args
)
{
setButtons
(
Apply
|
Help
|
Default
);
...
...
@@ -85,7 +85,7 @@ EditPage::EditPage(QWidget *parent, const QVariantList &args)
m_profilesConfig
->
reparseConfiguration
();
}
qCDebug
(
POWERDEVIL
)
<<
m_profilesConfig
.
data
()
->
groupList
()
<<
m_profilesConfig
.
data
()
->
entryMap
().
keys
();
qCDebug
(
POWERDEVIL
)
<<
"loaded profiles"
<<
m_profilesConfig
.
data
()
->
groupList
()
<<
m_profilesConfig
.
data
()
->
entryMap
().
keys
();
// Create widgets for each profile
ActionEditWidget
*
editWidget
=
new
ActionEditWidget
(
"AC"
,
tabWidget
);
...
...
Write
Preview
Supports
Markdown
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