Changeset View
Changeset View
Standalone View
Standalone View
daemon/powerdevilcore.h
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | 90 | Q_SIGNALS: | |||
---|---|---|---|---|---|
92 | void profileChanged(const QString &newProfile); | 92 | void profileChanged(const QString &newProfile); | ||
93 | void configurationReloaded(); | 93 | void configurationReloaded(); | ||
94 | void batteryRemainingTimeChanged(qulonglong time); | 94 | void batteryRemainingTimeChanged(qulonglong time); | ||
95 | void lidClosedChanged(bool closed); | 95 | void lidClosedChanged(bool closed); | ||
96 | 96 | | |||
97 | private: | 97 | private: | ||
98 | void registerActionTimeout(Action *action, int timeout); | 98 | void registerActionTimeout(Action *action, int timeout); | ||
99 | void unregisterActionTimeouts(Action *action); | 99 | void unregisterActionTimeouts(Action *action); | ||
100 | void handleLowBattery(int percent); | ||||
100 | void handleCriticalBattery(int percent); | 101 | void handleCriticalBattery(int percent); | ||
101 | 102 | | |||
102 | /** | 103 | /** | ||
103 | * Computes the current global charge percentage. | 104 | * Computes the current global charge percentage. | ||
104 | * Sum of all battery charges. | 105 | * Sum of all battery charges. | ||
105 | */ | 106 | */ | ||
106 | int currentChargePercent() const; | 107 | int currentChargePercent() const; | ||
107 | 108 | | |||
Show All 9 Lines | |||||
117 | KSharedConfigPtr m_profilesConfig; | 118 | KSharedConfigPtr m_profilesConfig; | ||
118 | 119 | | |||
119 | QString m_currentProfile; | 120 | QString m_currentProfile; | ||
120 | 121 | | |||
121 | QHash<QString, int> m_batteriesPercent; | 122 | QHash<QString, int> m_batteriesPercent; | ||
122 | QHash<QString, int> m_peripheralBatteriesPercent; | 123 | QHash<QString, int> m_peripheralBatteriesPercent; | ||
123 | QHash<QString, bool> m_batteriesCharged; | 124 | QHash<QString, bool> m_batteriesCharged; | ||
124 | 125 | | |||
126 | QPointer<KNotification> m_lowBatteryNotification; | ||||
125 | QTimer *m_criticalBatteryTimer; | 127 | QTimer *m_criticalBatteryTimer; | ||
126 | QPointer<KNotification> m_criticalBatteryNotification; | 128 | QPointer<KNotification> m_criticalBatteryNotification; | ||
127 | 129 | | |||
128 | KActivities::Consumer *m_activityConsumer; | 130 | KActivities::Consumer *m_activityConsumer; | ||
129 | 131 | | |||
130 | // Idle time management | 132 | // Idle time management | ||
131 | QHash< Action*, QList< int > > m_registeredActionTimeouts; | 133 | QHash< Action*, QList< int > > m_registeredActionTimeouts; | ||
132 | QSet<Action *> m_pendingResumeFromIdleActions; | 134 | QSet<Action *> m_pendingResumeFromIdleActions; | ||
Show All 26 Lines |