KUtils
abstractsystempoller.h
Go to the documentation of this file.
00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2009 Dario Freddi <drf at 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 #ifndef ABSTRACTSYSTEMPOLLER_H 00020 #define ABSTRACTSYSTEMPOLLER_H 00021 00022 #include <QWidget> 00023 00024 class AbstractSystemPoller : public QWidget 00025 { 00026 Q_OBJECT 00027 00028 public: 00029 00030 AbstractSystemPoller(QWidget *parent = 0); 00031 virtual ~AbstractSystemPoller(); 00032 00033 virtual bool isAvailable() = 0; 00034 virtual bool setUpPoller() = 0; 00035 virtual void unloadPoller() = 0; 00036 00037 public slots: 00038 virtual void addTimeout(int nextTimeout) = 0; 00039 virtual void removeTimeout(int nextTimeout) = 0; 00040 virtual QList<int> timeouts() const = 0; 00041 virtual int forcePollRequest() = 0; 00042 virtual void catchIdleEvent() = 0; 00043 virtual void stopCatchingIdleEvents() = 0; 00044 virtual void simulateUserActivity() = 0; 00045 00046 signals: 00047 void resumingFromIdle(); 00048 void timeoutReached(int msec); 00049 00050 }; 00051 00052 #endif /* ABSTRACTSYSTEMPOLLER_H */
KDE 4.6 API Reference