• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • workspace API Reference
  • KDE Home
  • Contact Us
 

GroupingDesktop

Signals | Public Member Functions | Protected Slots | Protected Member Functions | Properties | List of all members
GroupingContainment Class Reference

#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.

GroupingContainment::~GroupingContainment ( )
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
pluginthe name of the type of Group
posthe position where it should be created
idthe identifier for the Group. Passing 0 will set a unique one
Returns
the newly created Group
See also
addGroup
groups

Definition at line 592 of file groupingcontainment.cpp.

void GroupingContainment::addGroup ( AbstractGroup *  group,
const QPointF &  pos 
)

Adds a new Group to this Containment.

Parameters
groupthe Group to be added
posthe position where it should be added
See also
addGroup
groups

Definition at line 597 of file groupingcontainment.cpp.

void GroupingContainment::constraintsEvent ( Plasma::Constraints  constraints)
protectedvirtual

Reimplemented from Plasma::Applet.

Definition at line 585 of file groupingcontainment.cpp.

void GroupingContainment::contextMenuEvent ( QGraphicsSceneContextMenuEvent *  event)
protectedvirtual

Reimplemented from QGraphicsItem.

Definition at line 922 of file groupingcontainment.cpp.

QList< QAction * > GroupingContainment::contextualActions ( )

Reimplemented from Plasma::Applet.

Definition at line 643 of file groupingcontainment.cpp.

void GroupingContainment::dropEvent ( QGraphicsSceneDragDropEvent *  event)
protectedvirtual

Reimplemented from QGraphicsItem.

Definition at line 955 of file groupingcontainment.cpp.

bool GroupingContainment::eventFilter ( QObject *  obj,
QEvent *  event 
)
protectedvirtual

Reimplemented from QObject.

Definition at line 740 of file groupingcontainment.cpp.

void GroupingContainment::groupAdded ( AbstractGroup *  group,
const QPointF &  pos 
)
signal

Emitted when a new Group is added to this Containment.

Parameters
groupthe newly added Group
posthe position where it has been added
See also
groupRemoved
void GroupingContainment::groupRemoved ( AbstractGroup *  group)
signal

Emitted when a Group is removed from this Containment.

Parameters
groupthe 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.

void GroupingContainment::layoutMainGroup ( )
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.

AbstractGroup* GroupingContainment::mainGroup ( ) const
protected

Returns the Main Group of this Containment.

See also
useMainGroup
AbstractGroup::isMainGroup
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.

void GroupingContainment::restoreContents ( KConfigGroup &  group)
protectedvirtual

Reimplemented from Plasma::Containment.

Definition at line 869 of file groupingcontainment.cpp.

void GroupingContainment::saveContents ( KConfigGroup &  group) const
protectedvirtual

Reimplemented from Plasma::Containment.

Definition at line 858 of file groupingcontainment.cpp.

bool GroupingContainment::sceneEventFilter ( QGraphicsItem *  watched,
QEvent *  event 
)
protectedvirtual

Reimplemented from QGraphicsItem.

Definition at line 686 of file groupingcontainment.cpp.

void GroupingContainment::setMainGroup ( AbstractGroup *  group)
protected

Sets a Main Group for this Containment.

Normally you will use useMainGroup instead of this.

Parameters
groupthe group to be set Main Group
See also
useMainGroup
mainGroup
AbstractGroup::isMainGroup

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
widgetthe Applet or Group to be monitored

Definition at line 969 of file groupingcontainment.cpp.

void GroupingContainment::useMainGroup ( const QString &  type)
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
typethe type of the wanted Main Group
See also
setMainGroup
mainGroup
AbstractGroup::isMainGroup

Definition at line 650 of file groupingcontainment.cpp.

Property Documentation

AbstractGroup * GroupingContainment::mainGroup
readwrite

Definition at line 41 of file groupingcontainment.h.


The documentation for this class was generated from the following files:
  • groupingcontainment.h
  • groupingcontainment.cpp
This file is part of the KDE documentation.
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.

GroupingDesktop

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

workspace API Reference

Skip menu "workspace API Reference"
  • kdeplasma-addons
  •       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