• 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
groupfactory.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 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 #include "groupfactory_p.h"
21 
22 #include "abstractgroup.h"
23 
24 K_GLOBAL_STATIC(GroupFactory, s_instance)
25 
26 GroupFactory *GroupFactory::instance()
27 {
28  return s_instance;
29 }
30 
31 AbstractGroup *GroupFactory::load(const QString &name, QGraphicsItem *parent)
32 {
33  GroupInfo gi(name);
34  CreatorFunction creator = m_groups.value(gi);
35  if (creator) {
36  return (creator)(parent);
37  }
38 
39  return 0;
40 }
41 
42 QList<GroupInfo> GroupFactory::groupInfos()
43 {
44  return m_groups.keys();
45 }
QGraphicsItem
abstractgroup.h
QString
QList
GroupInfo
Definition: groupinfo.h:30
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: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