GroupingDesktop
#include <groupingcontainment.h>
Inherits Containment.
Signals | |
void | groupAdded (AbstractGroup *group, const QPointF &pos) |
void | groupRemoved (AbstractGroup *group) |
Public Member Functions | |
GroupingContainment (QObject *parent, const QVariantList &args) | |
virtual | ~GroupingContainment () |
AbstractGroup * | addGroup (const QString &plugin, const QPointF &pos=QPointF(0, 0), int id=0) |
void | addGroup (AbstractGroup *group, const QPointF &pos) |
QList< QAction * > | contextualActions () |
QList< AbstractGroup * > | groups () const |
void | init () |
QGraphicsWidget * | movingWidget () const |
void | raise (QGraphicsWidget *widget) |
void | setMovingWidget (QGraphicsWidget *widget) |
Protected Slots | |
virtual void | layoutMainGroup () |
Protected Member Functions | |
virtual void | constraintsEvent (Plasma::Constraints constraints) |
virtual void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) |
virtual void | dropEvent (QGraphicsSceneDragDropEvent *event) |
virtual bool | eventFilter (QObject *obj, QEvent *event) |
AbstractGroup * | mainGroup () const |
virtual void | restoreContents (KConfigGroup &group) |
virtual void | saveContents (KConfigGroup &group) const |
virtual bool | sceneEventFilter (QGraphicsItem *watched, QEvent *event) |
void | setMainGroup (AbstractGroup *group) |
void | useMainGroup (const QString &type) |
Properties | |
AbstractGroup | mainGroup |
Detailed Description
The base Containment class.
GroupingContainment manages all the Groups and must be subclassed to create a new Containment with grouping support.
Definition at line 38 of file groupingcontainment.h.
Constructor & Destructor Documentation
GroupingContainment::GroupingContainment | ( | QObject * | parent, |
const QVariantList & | args | ||
) |
Default constructor.
Definition at line 559 of file groupingcontainment.cpp.
|
virtual |
Default destructor.
Definition at line 567 of file groupingcontainment.cpp.
Member Function Documentation
AbstractGroup * GroupingContainment::addGroup | ( | const QString & | plugin, |
const QPointF & | pos = QPointF(0, 0) , |
||
int | id = 0 |
||
) |
Creates a new Group and it adds it to this Containment.
- Parameters
-
plugin the name of the type of Group pos the position where it should be created id the identifier for the Group. Passing 0 will set a unique one
- Returns
- the newly created Group
Definition at line 592 of file groupingcontainment.cpp.
void GroupingContainment::addGroup | ( | AbstractGroup * | group, |
const QPointF & | pos | ||
) |
Adds a new Group to this Containment.
- Parameters
-
group the Group to be added pos the position where it should be added
Definition at line 597 of file groupingcontainment.cpp.
|
protectedvirtual |
Reimplemented from Plasma::Applet.
Definition at line 585 of file groupingcontainment.cpp.
|
protectedvirtual |
Reimplemented from QGraphicsItem.
Definition at line 922 of file groupingcontainment.cpp.
Reimplemented from Plasma::Applet.
Definition at line 643 of file groupingcontainment.cpp.
|
protectedvirtual |
Reimplemented from QGraphicsItem.
Definition at line 955 of file groupingcontainment.cpp.
Reimplemented from QObject.
Definition at line 740 of file groupingcontainment.cpp.
|
signal |
Emitted when a new Group is added to this Containment.
- Parameters
-
group the newly added Group pos the position where it has been added
- See also
- groupRemoved
|
signal |
Emitted when a Group is removed from this Containment.
- Parameters
-
group the group which was removed
- See also
- groupAdded
QList< AbstractGroup * > GroupingContainment::groups | ( | ) | const |
Returns a list of all the Groups contained in this Containment.
- See also
- addGroup
Definition at line 638 of file groupingcontainment.cpp.
void GroupingContainment::init | ( | ) |
Reimplemented from Plasma::Applet.
Definition at line 572 of file groupingcontainment.cpp.
|
protectedvirtualslot |
Lays out the Main Group.
The default implementation makes it as big as the Containment. You may want to reimplement this in subclasses if you want other behaviours.
Definition at line 672 of file groupingcontainment.cpp.
|
protected |
Returns the Main Group of this Containment.
QGraphicsWidget * GroupingContainment::movingWidget | ( | ) | const |
Returns the widget that is currently being moved by the user, or 0 if there is not any.
Definition at line 991 of file groupingcontainment.cpp.
void GroupingContainment::raise | ( | QGraphicsWidget * | widget | ) |
Raises a widget above all the other Applets or Groups.
Definition at line 996 of file groupingcontainment.cpp.
|
protectedvirtual |
Reimplemented from Plasma::Containment.
Definition at line 869 of file groupingcontainment.cpp.
|
protectedvirtual |
Reimplemented from Plasma::Containment.
Definition at line 858 of file groupingcontainment.cpp.
|
protectedvirtual |
Reimplemented from QGraphicsItem.
Definition at line 686 of file groupingcontainment.cpp.
|
protected |
Sets a Main Group for this Containment.
Normally you will use useMainGroup instead of this.
- Parameters
-
group the group to be set Main Group
Definition at line 657 of file groupingcontainment.cpp.
void GroupingContainment::setMovingWidget | ( | QGraphicsWidget * | widget | ) |
Call this function when an Applet or a Group is being moved by the user.
It will be monitored to see if it is placed in a Group. Typically this method will be called by an handle.
- Parameters
-
widget the Applet or Group to be monitored
Definition at line 969 of file groupingcontainment.cpp.
|
protected |
Tells the Containment to use a Main Group of the given type.
It will overlap to the Containment, so it will be the root of the Groups hierarchy.
- Warning
- every sub class of this MUST set a Main Group, or it will encounter breackages. GroupingContainment sets by default a FloatingGroup.
- Parameters
-
type the type of the wanted Main Group
Definition at line 650 of file groupingcontainment.cpp.
Property Documentation
|
readwrite |
Definition at line 41 of file groupingcontainment.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.