2
* Copyright 2009 Marco Martin <notmart@gmail.com>
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Library General Public License as
6
* published by the Free Software Foundation; either version 2, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details
14
* You should have received a copy of the GNU Library General Public
15
* License along with this program; if not, write to the
16
* Free Software Foundation, Inc.,
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
#ifndef LINEARAPPLETOVERLAY_H
21
#define LINEARAPPLETOVERLAY_H
24
#include <QGraphicsWidget>
33
class AppletMoveSpacer;
34
class QGraphicsLinearLayout;
37
class LinearAppletOverlay : public QGraphicsWidget
41
friend class AppletMoveSpacer;
44
explicit LinearAppletOverlay(Plasma::Containment *parent = 0, QGraphicsLinearLayout *layout = 0);
45
~LinearAppletOverlay();
47
void showSpacer(const QPointF &pos);
50
void appletDestroyed();
51
void spacerRequestedDrop(QGraphicsSceneDragDropEvent *event);
54
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0);
55
void mousePressEvent(QGraphicsSceneMouseEvent *event);
56
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
57
void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
58
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
59
void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
60
void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
61
void dropEvent(QGraphicsSceneDragDropEvent *event);
64
void dropRequested(QGraphicsSceneDragDropEvent *event);
67
Plasma::Applet *m_applet;
68
Plasma::Containment *m_containment;
69
QGraphicsLinearLayout *m_layout;
71
AppletMoveSpacer *m_spacer;