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

GroupingDesktop

  • sources
  • kde-4.14
  • workspace
  • kdeplasma-addons
  • containments
  • groupingdesktop
  • lib
groupingcontainment.h
Go to the documentation of this file.
1 /*
2  * Copyright 2009-2010 by Giulio Camuffo <giuliocamuffo@gmail.com>
3  *
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.
8  *
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
13  *
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.
18  */
19 
20 #ifndef GROUPINGCONTAINMENT_H
21 #define GROUPINGCONTAINMENT_H
22 
23 #include <Plasma/Containment>
24 
25 #include "groupingcontainment_export.h"
26 
27 class AbstractGroup;
28 class GroupingContainmentPrivate;
29 
38 class PLASMA_GROUPINGCONTAINMENT_EXPORT GroupingContainment: public Plasma::Containment
39 {
40  Q_OBJECT
41  Q_PROPERTY(AbstractGroup *mainGroup READ mainGroup WRITE setMainGroup)
42 
43  public:
47  GroupingContainment(QObject *parent, const QVariantList &args);
48 
52  virtual ~GroupingContainment();
53 
57  void init();
58 
62  QList<QAction *> contextualActions();
63 
76  AbstractGroup *addGroup(const QString &plugin, const QPointF &pos = QPointF(0, 0), int id = 0);
77 
87  void addGroup(AbstractGroup *group, const QPointF &pos);
88 
94  QList<AbstractGroup *> groups() const;
95 
103  void setMovingWidget(QGraphicsWidget *widget);
104 
109  QGraphicsWidget *movingWidget() const;
110 
114  void raise(QGraphicsWidget *widget);
115 
116  protected Q_SLOTS:
122  virtual void layoutMainGroup();
123 
124  protected:
128  virtual void constraintsEvent(Plasma::Constraints constraints);
129 
133  virtual bool eventFilter(QObject *obj, QEvent *event);
134 
138  virtual bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
139 
143  virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
144 
148  virtual void dropEvent(QGraphicsSceneDragDropEvent *event);
149 
153  virtual void saveContents(KConfigGroup &group) const;
154 
158  virtual void restoreContents(KConfigGroup &group);
159 
174  void useMainGroup(const QString &type);
175 
186  void setMainGroup(AbstractGroup *group);
187 
194  AbstractGroup *mainGroup() const;
195 
196  signals:
205  void groupAdded(AbstractGroup *group, const QPointF &pos);
206 
214  void groupRemoved(AbstractGroup *group);
215 
216  private:
217  Q_PRIVATE_SLOT(d, void handleDisappeared(Handle *handle))
218  Q_PRIVATE_SLOT(d, void onGroupRemoved(AbstractGroup *group))
219  Q_PRIVATE_SLOT(d, void onAppletRemoved(Plasma::Applet *applet))
220  Q_PRIVATE_SLOT(d, void manageApplet(Plasma::Applet *applet, const QPointF &pos))
221  Q_PRIVATE_SLOT(d, void newGroupClicked())
222  Q_PRIVATE_SLOT(d, void deleteGroup())
223  Q_PRIVATE_SLOT(d, void configureGroup())
224  Q_PRIVATE_SLOT(d, void onAppletRemovedFromGroup(Plasma::Applet *applet, AbstractGroup *group))
225  Q_PRIVATE_SLOT(d, void onSubGroupRemovedFromGroup(AbstractGroup *subGroup, AbstractGroup *group))
226  Q_PRIVATE_SLOT(d, void onWidgetMoved(QGraphicsWidget *widget))
227  Q_PRIVATE_SLOT(d, void onImmutabilityChanged(Plasma::ImmutabilityType immutability))
228  Q_PRIVATE_SLOT(d, void restoreGroups())
229  Q_PRIVATE_SLOT(d, void prepareWidgetToMove())
230  Q_PRIVATE_SLOT(d, void widgetMovedAnimationComplete())
231 
232  GroupingContainmentPrivate *const d;
233 
234  friend class GroupingContainmentPrivate;
235 };
236 
237 #endif // GROUPINGCONTAINMENT_H
QEvent
QGraphicsItem
Handle
Definition: handle.h:41
PLASMA_GROUPINGCONTAINMENT_EXPORT
#define PLASMA_GROUPINGCONTAINMENT_EXPORT
Definition: groupingcontainment_export.h:32
QPointF
QObject
groupingcontainment_export.h
QGraphicsWidget
QGraphicsSceneContextMenuEvent
QString
QList
GroupingContainment
The base Containment class.
Definition: groupingcontainment.h:38
QGraphicsSceneDragDropEvent
AbstractGroup
The base Group class.
Definition: abstractgroup.h:43
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