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

klaptopdaemon

battery.h

Go to the documentation of this file.
00001 /*
00002  * battery.h
00003  *
00004  * Copyright (c) 1999 Paul Campbell <paul@taniwha.com>
00005  * Copyright (c) 2002 Marc Mutz <mutz@kde.org>
00006  *
00007  * Requires the Qt widget libraries, available at no cost at
00008  * http://www.troll.no/
00009  *
00010  *  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version.
00014  *
00015  *  This program is distributed in the hope that it will be useful,
00016  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  *  GNU General Public License for more details.
00019  *
00020  *  You should have received a copy of the GNU General Public License
00021  *  along with this program; if not, write to the Free Software
00022  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00023  */
00024 
00025 
00026 #ifndef __BATTERYCONFIG_H__
00027 #define __BATTERYCONFIG_H__
00028 
00029 #include <kcmodule.h>
00030 
00031 #include <qpixmap.h>
00032 #include <q3ptrlist.h>
00033 //Added by qt3to4:
00034 #include <QLabel>
00035 #include <QTimerEvent>
00036 
00037 class QWidget;
00038 class QSpinBox;
00039 class KConfig;
00040 class QCheckBox;
00041 class KIconLoader;
00042 class KIconButton;
00043 class QPushButton;
00044 class QLabel;
00045 
00046 
00047 class BatteryConfig : public KCModule
00048 {
00049   Q_OBJECT
00050 public:
00051   BatteryConfig( const KComponentData &inst,QWidget *parent=0);
00052   ~BatteryConfig( );     
00053 
00054   void save( void );
00055   void load();
00056   void defaults();
00057 
00058   virtual QString quickHelp() const;
00059 
00060 private slots:
00061 
00062   void configChanged();
00063   void slotStartMonitor();
00064   void iconChanged();
00065   void BatteryStateUpdate();
00066 
00067 private:
00068     void timerEvent(QTimerEvent *);
00069     void ConvertIcon(int percent, QPixmap &pm, QPixmap &result);
00070     KConfig *config;
00071 
00072         QSpinBox* editPoll;
00073         QCheckBox* runMonitor;
00074         QCheckBox* notifyMe;
00075     QCheckBox* blankSaver;
00076         bool            enablemonitor;
00077         bool            enablequitmenu;
00078     bool        useblanksaver;
00079     bool        notifyme;
00080 
00081     KIconLoader *iconloader;
00082 
00083         KIconButton *buttonNoBattery;
00084         KIconButton *buttonNoCharge;
00085         KIconButton *buttonCharge;
00086         QString nobattery, nochargebattery, chargebattery;
00087     QPushButton *startMonitor;
00088         bool    apm;
00089         int poll_time;       
00090 
00091     Q3PtrList<QLabel> batt_label_1, batt_label_2, batt_label_3;
00092     QPixmap battery_pm, battery_nopm;
00093 
00094         KComponentData instance;
00095 };
00096 
00097 #endif
00098 

klaptopdaemon

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

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdelirc
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • kjots
  • klaptopdaemon
  • kmilo
  • ksim
  • ktimer
  • kwallet
  • superkaramba
Generated for kdeutils 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