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

Applets

applet.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   applet.h                                                              *
00003  *                                                                         *
00004  *   Copyright (C) 2008 Jason Stubbs <jasonbstubbs@gmail.com>              *
00005  *                                                                         *
00006  *   This program is free software; you can redistribute it and/or modify  *
00007  *   it under the terms of the GNU General Public License as published by  *
00008  *   the Free Software Foundation; either version 2 of the License, or     *
00009  *   (at your option) any later version.                                   *
00010  *                                                                         *
00011  *   This program is distributed in the hope that it will be useful,       *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU General Public License for more details.                          *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU General Public License     *
00017  *   along with this program; if not, write to the                         *
00018  *   Free Software Foundation, Inc.,                                       *
00019  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA .        *
00020  ***************************************************************************/
00021 
00022 #ifndef APPLET_H
00023 #define APPLET_H
00024 
00025 #include <plasma/popupapplet.h>
00026 
00027 namespace SystemTray
00028 {
00029 
00030 class Job;
00031 class Manager;
00032 class Notification;
00033 
00034 class Applet : public Plasma::PopupApplet
00035 {
00036     Q_OBJECT
00037 
00038 public:
00039     explicit Applet(QObject *parent, const QVariantList &arguments = QVariantList());
00040     ~Applet();
00041 
00042     void init();
00043     void constraintsEvent(Plasma::Constraints constraints);
00044     void setGeometry(const QRectF &rect);
00045     Manager *manager()const;
00046 
00047 protected:
00048     void paintInterface(QPainter *painter, const QStyleOptionGraphicsItem *option, const QRect &contentsRect);
00049     void createConfigurationInterface(KConfigDialog *parent);
00050     void initExtenderItem(Plasma::ExtenderItem *extenderItem);
00051 
00052     void mousePressEvent(QGraphicsSceneMouseEvent *event) { Q_UNUSED(event); }
00053     void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { Q_UNUSED(event); }
00054     void hoverEnterEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event); }
00055     void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event); }
00056 
00057     void popupEvent(bool show);
00058 
00059 private slots:
00060     void configAccepted();
00061     void propogateSizeHintChange(Qt::SizeHint which);
00062     void checkSizes();
00063     void addNotification(SystemTray::Notification *notification);
00064     void addJob(SystemTray::Job *job);
00065     void hidePopupIfEmpty();
00066 
00067 private:
00068     class Private;
00069     Private* const d;
00070 };
00071 
00072 }
00073 
00074 
00075 #endif

Applets

Skip menu "Applets"
  • 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
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.7
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