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

Plasma

appletoverlay.h

Go to the documentation of this file.
00001 /*
00002  *   Copyright 2009 Marco Martin <notmart@gmail.com>
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 as
00006  *   published by the Free Software Foundation; either version 2, or
00007  *   (at your option) any later version.
00008  *
00009  *   This program is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *   GNU General Public License for more details
00013  *
00014  *   You should have received a copy of the GNU Library General Public
00015  *   License along with this program; if not, write to the
00016  *   Free Software Foundation, Inc.,
00017  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018  */
00019 
00020 #ifndef APPLETOVERLAY_H
00021 #define APPLETOVERLAY_H
00022 
00023 
00024 #include <QGraphicsWidget>
00025 
00026 namespace Plasma
00027 {
00028     class Applet;
00029     class Svg;
00030 }
00031 
00032 class Newspaper;
00033 class AppletMoveSpacer;
00034 class QGraphicsLinearLayout;
00035 class QTimer;
00036 
00037 class AppletOverlay : public QGraphicsWidget
00038 {
00039     Q_OBJECT
00040 
00041     friend class AppletMoveSpacer;
00042 
00043 public:
00044     explicit AppletOverlay(QGraphicsWidget *parent = 0, Newspaper *newspaper = 0);
00045     ~AppletOverlay();
00046 
00047     void showSpacer(const QPointF &pos);
00048 
00049 protected:
00050     void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0);
00051     void mousePressEvent(QGraphicsSceneMouseEvent *event);
00052     void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
00053     void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
00054     void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
00055     void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
00056     void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
00057     void dropEvent(QGraphicsSceneDragDropEvent *event);
00058 
00059 protected Q_SLOTS:
00060     void scrollTimeout();
00061     void appletDestroyed();
00062     void spacerRequestedDrop(QGraphicsSceneDragDropEvent *event);
00063 
00064 private:
00065     Plasma::Applet *m_applet;
00066     Newspaper *m_newspaper;
00067     AppletMoveSpacer *m_spacer;
00068     Plasma::Svg *m_icons;
00069     QGraphicsLinearLayout *m_spacerLayout;
00070     int m_spacerIndex;
00071     QTimer *m_scrollTimer;
00072     bool m_scrollDown;
00073     bool m_clickDrag;
00074     QPointF m_origin;
00075 };
00076 
00077 #endif

Plasma

Skip menu "Plasma"
  • 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
  • System Settings
  •   SystemSettingsView
Generated for API Reference by doxygen 1.5.9-20090814
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