Applets
system-monitor.h
Go to the documentation of this file.00001 /* 00002 * Copyright (C) 2007 Petri Damsten <damu@iki.fi> 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU Library General Public License version 2 as 00006 * published by the Free Software Foundation 00007 * 00008 * This program 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 00011 * GNU General Public License for more details 00012 * 00013 * You should have received a copy of the GNU Library General Public 00014 * License along with this program; if not, write to the 00015 * Free Software Foundation, Inc., 00016 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #ifndef SYSTEM_MONITOR_HEADER 00020 #define SYSTEM_MONITOR_HEADER 00021 00022 #include <Plasma/PopupApplet> 00023 #include <Plasma/DataEngine> 00024 00025 namespace SM { 00026 class Applet; 00027 } 00028 00029 class QGraphicsLinearLayout; 00030 00031 class SystemMonitor : public Plasma::PopupApplet 00032 { 00033 Q_OBJECT 00034 public: 00035 SystemMonitor(QObject *parent, const QVariantList &args); 00036 virtual ~SystemMonitor(); 00037 00038 void init(); 00039 virtual QList<QAction*> contextualActions(); 00040 virtual QGraphicsWidget *graphicsWidget(); 00041 00042 public slots: 00043 void checkGeometry(); 00044 00045 protected slots: 00046 void toggled(bool toggled); 00047 void appletRemoved(QObject *object); 00048 00049 protected: 00050 void addApplet(const QString &name); 00051 void removeApplet(const QString &name); 00052 00053 private: 00054 QGraphicsLinearLayout *m_layout; 00055 QGraphicsLinearLayout *m_buttons; 00056 QList<SM::Applet *> m_applets; 00057 QGraphicsWidget *m_widget; 00058 }; 00059 00060 K_EXPORT_PLASMA_APPLET(system-monitor_applet, SystemMonitor) 00061 00062 #endif