27 lines
647 B
C++
27 lines
647 B
C++
#include "powermonitor_base.h"
|
|
#include <QDebug>
|
|
|
|
PowerMonitorBase::PowerMonitorBase(QObject *parent)
|
|
: QObject(parent)
|
|
{
|
|
}
|
|
|
|
PowerMonitorBase::~PowerMonitorBase()
|
|
{
|
|
}
|
|
|
|
void PowerMonitorBase::emitAboutToSleep()
|
|
{
|
|
qDebug() << "=================================================";
|
|
qDebug() << "\n📥 系统即将进入睡眠(休眠/待机)";
|
|
emit aboutToSleep();
|
|
emit powerStateChanged(true);
|
|
}
|
|
|
|
void PowerMonitorBase::emitAboutToWakeUp()
|
|
{
|
|
qDebug() << "📤 系统已从睡眠中唤醒\n";
|
|
qDebug() << "=================================================";
|
|
emit aboutToWakeUp();
|
|
emit powerStateChanged(false);
|
|
} |