/*
 * This file was generated by qdbusxml2cpp version 0.8
 * Command line was: qdbusxml2cpp ./dde-api-proxy/file/dbus/v0/system/com.deepin.system.Power.xml -a ./dde-api-proxy/toolGenerate/qdbusxml2cpp/com.deepin.system.PowerAdaptor -i ./dde-api-proxy/toolGenerate/qdbusxml2cpp/com.deepin.system.Power.h
 *
 * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd.
 *
 * This is an auto-generated file.
 * Do not edit! All changes made to it will be lost.
 */

#include "./dde-api-proxy/toolGenerate/qdbusxml2cpp/com.deepin.system.PowerAdaptor.h"
#include <QtCore/QMetaObject>
#include <QtCore/QByteArray>
#include <QtCore/QList>
#include <QtCore/QMap>
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QVariant>

/*
 * Implementation of adaptor class PowerAdaptor
 */

PowerAdaptor::PowerAdaptor(QObject *parent)
    : QDBusAbstractAdaptor(parent)
{
    // constructor
    setAutoRelaySignals(true);
}

PowerAdaptor::~PowerAdaptor()
{
    // destructor
}

double PowerAdaptor::batteryPercentage() const
{
    // get the value of property BatteryPercentage
    return qvariant_cast< double >(parent()->property("BatteryPercentage"));
}

uint PowerAdaptor::batteryStatus() const
{
    // get the value of property BatteryStatus
    return qvariant_cast< uint >(parent()->property("BatteryStatus"));
}

qulonglong PowerAdaptor::batteryTimeToEmpty() const
{
    // get the value of property BatteryTimeToEmpty
    return qvariant_cast< qulonglong >(parent()->property("BatteryTimeToEmpty"));
}

qulonglong PowerAdaptor::batteryTimeToFull() const
{
    // get the value of property BatteryTimeToFull
    return qvariant_cast< qulonglong >(parent()->property("BatteryTimeToFull"));
}

bool PowerAdaptor::hasBattery() const
{
    // get the value of property HasBattery
    return qvariant_cast< bool >(parent()->property("HasBattery"));
}

bool PowerAdaptor::hasLidSwitch() const
{
    // get the value of property HasLidSwitch
    return qvariant_cast< bool >(parent()->property("HasLidSwitch"));
}

bool PowerAdaptor::isHighPerformanceSupported() const
{
    // get the value of property IsHighPerformanceSupported
    return qvariant_cast< bool >(parent()->property("IsHighPerformanceSupported"));
}

QString PowerAdaptor::mode() const
{
    // get the value of property Mode
    return qvariant_cast< QString >(parent()->property("Mode"));
}

bool PowerAdaptor::onBattery() const
{
    // get the value of property OnBattery
    return qvariant_cast< bool >(parent()->property("OnBattery"));
}

bool PowerAdaptor::powerSavingModeAuto() const
{
    // get the value of property PowerSavingModeAuto
    return qvariant_cast< bool >(parent()->property("PowerSavingModeAuto"));
}

void PowerAdaptor::setPowerSavingModeAuto(bool value)
{
    // set the value of property PowerSavingModeAuto
    parent()->setProperty("PowerSavingModeAuto", QVariant::fromValue(value));
}

bool PowerAdaptor::powerSavingModeAutoWhenBatteryLow() const
{
    // get the value of property PowerSavingModeAutoWhenBatteryLow
    return qvariant_cast< bool >(parent()->property("PowerSavingModeAutoWhenBatteryLow"));
}

void PowerAdaptor::setPowerSavingModeAutoWhenBatteryLow(bool value)
{
    // set the value of property PowerSavingModeAutoWhenBatteryLow
    parent()->setProperty("PowerSavingModeAutoWhenBatteryLow", QVariant::fromValue(value));
}

uint PowerAdaptor::powerSavingModeBrightnessDropPercent() const
{
    // get the value of property PowerSavingModeBrightnessDropPercent
    return qvariant_cast< uint >(parent()->property("PowerSavingModeBrightnessDropPercent"));
}

void PowerAdaptor::setPowerSavingModeBrightnessDropPercent(uint value)
{
    // set the value of property PowerSavingModeBrightnessDropPercent
    parent()->setProperty("PowerSavingModeBrightnessDropPercent", QVariant::fromValue(value));
}

bool PowerAdaptor::powerSavingModeEnabled() const
{
    // get the value of property PowerSavingModeEnabled
    return qvariant_cast< bool >(parent()->property("PowerSavingModeEnabled"));
}

void PowerAdaptor::setPowerSavingModeEnabled(bool value)
{
    // set the value of property PowerSavingModeEnabled
    parent()->setProperty("PowerSavingModeEnabled", QVariant::fromValue(value));
}

bool PowerAdaptor::powerSystemAutoToSleepWhenFree() const
{
    // get the value of property PowerSystemAutoToSleepWhenFree
    return qvariant_cast< bool >(parent()->property("PowerSystemAutoToSleepWhenFree"));
}

void PowerAdaptor::setPowerSystemAutoToSleepWhenFree(bool value)
{
    // set the value of property PowerSystemAutoToSleepWhenFree
    parent()->setProperty("PowerSystemAutoToSleepWhenFree", QVariant::fromValue(value));
}

QList<QDBusObjectPath> PowerAdaptor::GetBatteries()
{
    // handle method call com.deepin.system.Power.GetBatteries
    QList<QDBusObjectPath> batteries;
    QMetaObject::invokeMethod(parent(), "GetBatteries", Q_RETURN_ARG(QList<QDBusObjectPath>, batteries));
    return batteries;
}

void PowerAdaptor::Refresh()
{
    // handle method call com.deepin.system.Power.Refresh
    QMetaObject::invokeMethod(parent(), "Refresh");
}

void PowerAdaptor::RefreshBatteries()
{
    // handle method call com.deepin.system.Power.RefreshBatteries
    QMetaObject::invokeMethod(parent(), "RefreshBatteries");
}

void PowerAdaptor::RefreshMains()
{
    // handle method call com.deepin.system.Power.RefreshMains
    QMetaObject::invokeMethod(parent(), "RefreshMains");
}

void PowerAdaptor::SetMode(const QString &mode)
{
    // handle method call com.deepin.system.Power.SetMode
    QMetaObject::invokeMethod(parent(), "SetMode", Q_ARG(QString, mode));
}

