• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

SolidModules

solid-powermanagement.h

Go to the documentation of this file.
00001 /*  This file is part of the KDE project
00002     Copyright (C) 2006 Kevin Ottens <ervin@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License version 2 as published by the Free Software Foundation.
00007 
00008     This library is distributed in the hope that it will be useful,
00009     but WITHOUT ANY WARRANTY; without even the implied warranty of
00010     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011     Library General Public License for more details.
00012 
00013     You should have received a copy of the GNU Library General Public License
00014     along with this library; see the file COPYING.LIB.  If not, write to
00015     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016     Boston, MA 02110-1301, USA.
00017 
00018 */
00019 
00020 #ifndef MAIN_H
00021 #define MAIN_H
00022 
00023 #include <QCoreApplication>
00024 #include <QEventLoop>
00025 
00026 #include <solid/storageaccess.h>
00027 #include <solid/opticaldrive.h>
00028 
00029 class KJob;
00030 
00031 namespace Solid {
00032 namespace Control {
00033     class Authentication;
00034 }
00035 }
00036 
00037 class SolidPowermanagement : public QCoreApplication
00038 {
00039     Q_OBJECT
00040 public:
00041     SolidPowermanagement(int &argc, char **argv) : QCoreApplication(argc, argv), m_error(0) {}
00042 
00043     static bool doIt();
00044 
00045     bool powerQuerySuspendMethods();
00046     bool powerSuspend(const QString &method);
00047 
00048     bool powerQuerySchemes();
00049     bool powerChangeScheme(const QString &schemeName);
00050 
00051     bool powerQueryCpuPolicies();
00052     bool powerChangeCpuPolicy(const QString &policyName);
00053 
00054     int powerGetBrightness();
00055     bool powerSetBrightness(int brightness);
00056 
00057 private:
00058     void connectJob(KJob *job);
00059 
00060     QEventLoop m_loop;
00061     int m_error;
00062     QString m_errorString;
00063 private slots:
00064     void slotStorageResult(Solid::ErrorType error, const QVariant &errorData);
00065     void slotResult(KJob *job);
00066     void slotPercent(KJob *job, unsigned long percent);
00067     void slotInfoMessage(KJob *job, const QString &message);
00068 };
00069 
00070 
00071 #endif

SolidModules

Skip menu "SolidModules"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal