Adding upstream version 0.9.0+20150914.
This commit is contained in:
parent
fe3d3c1489
commit
b27039f629
@ -1,9 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
* File: Settings.h
|
* Copyright (c) 2014 Christian Surlykke
|
||||||
* Author: christian
|
*
|
||||||
*
|
* This file is part of the LXQt project. <http://lxqt.org>
|
||||||
* Created on 15. februar 2014, 11:44
|
* It is distributed under the LGPL 2.1 or later license.
|
||||||
*/
|
* Please refer to the LICENSE file for a copy of the license.
|
||||||
|
*/
|
||||||
#ifndef POWER_MANAGEMENT_SETTINGS_H
|
#ifndef POWER_MANAGEMENT_SETTINGS_H
|
||||||
#define POWER_MANAGEMENT_SETTINGS_H
|
#define POWER_MANAGEMENT_SETTINGS_H
|
||||||
|
|
||||||
|
@ -6,6 +6,6 @@ Comment=Various settings regarding Power Management like battery or idleness wat
|
|||||||
Exec=lxqt-config-powermanagement
|
Exec=lxqt-config-powermanagement
|
||||||
Icon=preferences-system-power-management
|
Icon=preferences-system-power-management
|
||||||
Categories=Settings;DesktopSettings;Qt;LXQt;
|
Categories=Settings;DesktopSettings;Qt;LXQt;
|
||||||
OnlyShowIn=LXQt;LXDE;
|
OnlyShowIn=LXQt;
|
||||||
|
|
||||||
#TRANSLATIONS_DIR=translations
|
#TRANSLATIONS_DIR=translations
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2014 Christian Surlykke
|
||||||
|
*
|
||||||
|
* This file is part of the LXQt project. <http://lxqt.org>
|
||||||
|
* It is distributed under the LGPL 2.1 or later license.
|
||||||
|
* Please refer to the LICENSE file for a copy of the license.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "batteryinfodialog.h"
|
#include "batteryinfodialog.h"
|
||||||
#include "ui_batteryinfodialog.h"
|
#include "ui_batteryinfodialog.h"
|
||||||
|
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2014 Christian Surlykke
|
||||||
|
*
|
||||||
|
* This file is part of the LXQt project. <http://lxqt.org>
|
||||||
|
* It is distributed under the LGPL 2.1 or later license.
|
||||||
|
* Please refer to the LICENSE file for a copy of the license.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef BATTERYINFODIALOG_H
|
#ifndef BATTERYINFODIALOG_H
|
||||||
#define BATTERYINFODIALOG_H
|
#define BATTERYINFODIALOG_H
|
||||||
|
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2014, 2015 Christian Surlykke, Paulo Lieuthier
|
||||||
|
*
|
||||||
|
* This file is part of the LXQt project. <http://lxqt.org>
|
||||||
|
* It is distributed under the LGPL 2.1 or later license.
|
||||||
|
* Please refer to the LICENSE file for a copy of the license.
|
||||||
|
*/
|
||||||
#include "iconproducer.h"
|
#include "iconproducer.h"
|
||||||
#include <LXQt/Settings>
|
#include <LXQt/Settings>
|
||||||
#include <XdgIcon>
|
#include <XdgIcon>
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2014 Christian Surlykke
|
||||||
|
*
|
||||||
|
* This file is part of the LXQt project. <http://lxqt.org>
|
||||||
|
* It is distributed under the LGPL 2.1 or later license.
|
||||||
|
* Please refer to the LICENSE file for a copy of the license.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef ICONPRODUCER_H
|
#ifndef ICONPRODUCER_H
|
||||||
#define ICONPRODUCER_H
|
#define ICONPRODUCER_H
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
32
src/lid.cpp
32
src/lid.cpp
@ -34,22 +34,25 @@
|
|||||||
|
|
||||||
Lid::Lid()
|
Lid::Lid()
|
||||||
{
|
{
|
||||||
mUPowerInterface = new QDBusInterface("org.freedesktop.UPower", "/org/freedesktop/UPower", "org.freedesktop.UPower",
|
mUPowerInterface = new QDBusInterface("org.freedesktop.UPower",
|
||||||
QDBusConnection::systemBus(), this);
|
"/org/freedesktop/UPower",
|
||||||
mUPowerPropertiesInterface = new QDBusInterface("org.freedesktop.UPower", "/org/freedesktop/UPower", "org.freedesktop.DBus.Properties",
|
"org.freedesktop.UPower",
|
||||||
QDBusConnection::systemBus(), this);
|
QDBusConnection::systemBus(), this);
|
||||||
if (! connect(mUPowerInterface, SIGNAL(Changed()), this, SLOT(uPowerChange())))
|
|
||||||
{
|
|
||||||
qDebug() << "Could not connect to org.freedesktop.UPower.changed(), connecting to org.freedesktop.DBus.Properties.PropertiesChanged(..) instead";
|
|
||||||
QDBusConnection::systemBus().connect("org.freedesktop.UPower",
|
|
||||||
"/org/freedesktop/UPower",
|
|
||||||
"org.freedesktop.DBus.Properties",
|
|
||||||
"PropertiesChanged",
|
|
||||||
this,
|
|
||||||
SLOT(uPowerChange()));
|
|
||||||
}
|
|
||||||
|
|
||||||
mIsClosed = mUPowerPropertiesInterface->property("LidIsClosed").toBool();
|
mUPowerPropertiesInterface = new QDBusInterface("org.freedesktop.UPower",
|
||||||
|
"/org/freedesktop/UPower",
|
||||||
|
"org.freedesktop.DBus.Properties",
|
||||||
|
QDBusConnection::systemBus(), this);
|
||||||
|
|
||||||
|
if (!QDBusConnection::systemBus().connect("org.freedesktop.UPower",
|
||||||
|
"/org/freedesktop/UPower",
|
||||||
|
"org.freedesktop.DBus.Properties",
|
||||||
|
"PropertiesChanged",
|
||||||
|
this,
|
||||||
|
SLOT(uPowerChange())))
|
||||||
|
qDebug() << "Could not connect to org.freedesktop.DBus.Properties.PropertiesChanged()";
|
||||||
|
|
||||||
|
mIsClosed = mUPowerPropertiesInterface->property("LidIsClosed").toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Lid::haveLid()
|
bool Lid::haveLid()
|
||||||
@ -62,7 +65,6 @@ bool Lid::onBattery()
|
|||||||
return mUPowerInterface->property("OnBattery").toBool();
|
return mUPowerInterface->property("OnBattery").toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Lid::uPowerChange()
|
void Lid::uPowerChange()
|
||||||
{
|
{
|
||||||
bool newIsClosed = mUPowerInterface->property("LidIsClosed").toBool();
|
bool newIsClosed = mUPowerInterface->property("LidIsClosed").toBool();
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
* File: powermanagementd.h
|
* Copyright (c) 2014 Christian Surlykke
|
||||||
* Author: Christian Surlykke
|
*
|
||||||
*
|
* This file is part of the LXQt project. <http://lxqt.org>
|
||||||
* Created on 9. februar 2014, 16:15
|
* It is distributed under the LGPL 2.1 or later license.
|
||||||
*/
|
* Please refer to the LICENSE file for a copy of the license.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef POWERMANAGEMENTD_H
|
#ifndef POWERMANAGEMENTD_H
|
||||||
#define POWERMANAGEMENTD_H
|
#define POWERMANAGEMENTD_H
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2014,2015 Christian Surlykke, Paulo Lieuthier
|
||||||
|
*
|
||||||
|
* This file is part of the LXQt project. <http://lxqt.org>
|
||||||
|
* It is distributed under the LGPL 2.1 or later license.
|
||||||
|
* Please refer to the LICENSE file for a copy of the license.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef WATCHER_H
|
#ifndef WATCHER_H
|
||||||
#define WATCHER_H
|
#define WATCHER_H
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user