kmilo
pb_monitor.h
Go to the documentation of this file.00001 // -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: t; tab-width: 2; -*- 00002 /* 00003 This file is part of the KDE project 00004 00005 Copyright (c) 2003 Zack Rusin <staikos@kde.org> 00006 Pretty much ripped of from : 00007 George Staikos <staikos@kde.org> :) 00008 00009 This library is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU Library General Public 00011 License as published by the Free Software Foundation; either 00012 version 2 of the License, or (at your option) any later version. 00013 00014 This library is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 Library General Public License for more details. 00018 00019 You should have received a copy of the GNU Library General Public License 00020 along with this library; see the file COPYING.LIB. If not, write to 00021 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00022 Boston, MA 02110-1301, USA. 00023 00024 */ 00025 #ifndef _PBMONITOR_H_ 00026 #define _PBMONITOR_H_ 00027 00028 #include "monitor.h" 00029 00030 struct tagitem; 00031 00032 namespace KMilo { 00033 00034 class PowerBookMonitor : public KMilo::Monitor 00035 { 00036 public: 00037 PowerBookMonitor(QObject *parent, const char *name, const QStringList&); 00038 virtual ~PowerBookMonitor(); 00039 00040 virtual bool init(); 00041 virtual DisplayType poll(); 00042 virtual int progress() const; 00043 virtual QString message() const; 00044 00045 private: 00046 struct tagitem* readMessage(); 00047 private: 00048 int m_progress; 00049 QString m_message; 00050 bool m_sleep; 00051 }; 00052 00053 } 00054 00055 #endif
KDE 4.0 API Reference