• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeplasma-addons API Reference
  • KDE Home
  • Contact Us
 

GroupingDesktop

  • sources
  • kde-4.14
  • kdeplasma-addons
  • containments
  • groupingdesktop
  • lib
handle.h
Go to the documentation of this file.
1 /*
2  * Copyright 2007 by Kevin Ottens <ervin@kde.org>
3  * Copyright 2009-2010 by Giulio Camuffo <giuliocamuffo@gmail.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU Library General Public License as
7  * published by the Free Software Foundation; either version 2, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this program; if not, write to the
17  * Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef HANDLE_P_H
22 #define HANDLE_P_H
23 
24 #include <QtCore/QObject>
25 #include <QtGui/QGraphicsObject>
26 
27 #include <Plasma/Animator>
28 #include <Plasma/Svg>
29 
30 class QGraphicsView;
31 
32 namespace Plasma
33 {
34  class Applet;
35  class View;
36 }
37 
38 class AbstractGroup;
39 class GroupingContainment;
40 
41 class Handle : public QGraphicsObject
42 {
43  Q_OBJECT
44  Q_INTERFACES(QGraphicsItem)
45  public:
46  enum ButtonType {
47  NoButton,
48  MoveButton,
49  RotateButton,
50  ConfigureButton,
51  RemoveButton,
52  ResizeButton,
53  MaximizeButton
54  };
55 
56  Handle(GroupingContainment *parent, Plasma::Applet *applet);
57  Handle(GroupingContainment *parent, AbstractGroup *group);
58  virtual ~Handle();
59 
60  virtual void detachWidget();
61 
62  Plasma::Applet *applet() const;
63  AbstractGroup *group() const;
64  QGraphicsWidget *widget() const;
65  GroupingContainment *containment() const;
66  QGraphicsView *currentView() const;
67 
68  virtual void setHoverPos(const QPointF &hoverPos);
69 
70  protected:
76  void switchContainment(GroupingContainment *containment, const QPointF &pos);
77  bool leaveCurrentView(const QPoint &pos) const;
78 
79  Q_SIGNALS:
80  void disappearDone(Handle *self);
81  void widgetMoved(QGraphicsWidget *widget);
82 
83  private Q_SLOTS:
84  void widgetDestroyed();
85 
86  private:
87  GroupingContainment *m_containment;
88  Plasma::Applet *m_applet;
89  AbstractGroup *m_group;
90  QGraphicsWidget *m_widget;
91  QGraphicsView *m_currentView;
92 };
93 
94 #endif // multiple inclusion guard
Handle::disappearDone
void disappearDone(Handle *self)
Handle::detachWidget
virtual void detachWidget()
Definition: handle.cpp:105
Handle::ButtonType
ButtonType
Definition: handle.h:46
Handle::setHoverPos
virtual void setHoverPos(const QPointF &hoverPos)
Definition: handle.cpp:173
QGraphicsItem
Handle
Definition: handle.h:41
QPoint
Handle::RemoveButton
Definition: handle.h:51
Handle::containment
GroupingContainment * containment() const
Definition: handle.cpp:95
QPointF
Handle::applet
Plasma::Applet * applet() const
Definition: handle.cpp:85
Handle::currentView
QGraphicsView * currentView() const
Definition: handle.cpp:100
Handle::MaximizeButton
Definition: handle.h:53
QGraphicsItem::pos
QPointF pos() const
Handle::group
AbstractGroup * group() const
Definition: handle.cpp:90
Handle::ResizeButton
Definition: handle.h:52
Handle::switchContainment
void switchContainment(GroupingContainment *containment, const QPointF &pos)
move our widget to another containment
Definition: handle.cpp:140
Handle::Handle
Handle(GroupingContainment *parent, Plasma::Applet *applet)
Definition: handle.cpp:51
QGraphicsWidget
Handle::widget
QGraphicsWidget * widget() const
Definition: handle.cpp:80
QGraphicsObject
Handle::ConfigureButton
Definition: handle.h:50
Handle::RotateButton
Definition: handle.h:49
Handle::leaveCurrentView
bool leaveCurrentView(const QPoint &pos) const
Definition: handle.cpp:124
GroupingContainment
The base Containment class.
Definition: groupingcontainment.h:38
Handle::NoButton
Definition: handle.h:47
Handle::~Handle
virtual ~Handle()
Definition: handle.cpp:75
AbstractGroup
The base Group class.
Definition: abstractgroup.h:43
QObject::parent
QObject * parent() const
QGraphicsView
Handle::widgetMoved
void widgetMoved(QGraphicsWidget *widget)
Handle::MoveButton
Definition: handle.h:48
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:39:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

GroupingDesktop

Skip menu "GroupingDesktop"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeplasma-addons API Reference

Skip menu "kdeplasma-addons API Reference"
  •     GroupingDesktop
  •   liblancelot

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal