• 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
groupinfo.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 "groupinfo.h"
21 
22 class GroupInfoPrivate
23 {
24  public:
25  GroupInfoPrivate()
26  {
27  formFactors << Plasma::Planar << Plasma::MediaCenter;
28  }
29 
30  ~GroupInfoPrivate()
31  {}
32 
33  QString name;
34  QString prettyName;
35  QSet<Plasma::FormFactor> formFactors;
36  QString icon;
37 };
38 
39 GroupInfo::GroupInfo(const QString &name, const QString &prettyName)
40  : d(new GroupInfoPrivate())
41 {
42  d->name = name;
43  d->prettyName = prettyName;
44 }
45 
46 GroupInfo::GroupInfo(const GroupInfo &other)
47  : d(new GroupInfoPrivate())
48 {
49  *d = *other.d;
50 }
51 
52 GroupInfo::~GroupInfo()
53 {
54  delete d;
55 }
56 
57 void GroupInfo::setFormFactors(QSet<Plasma::FormFactor> formFactors)
58 {
59  d->formFactors = formFactors;
60 }
61 
62 void GroupInfo::setIcon(const QString &icon)
63 {
64  d->icon = icon;
65 }
66 
67 QString GroupInfo::name() const
68 {
69  return d->name;
70 }
71 
72 QString GroupInfo::prettyName() const
73 {
74  return d->prettyName;
75 }
76 
77 QSet<Plasma::FormFactor> GroupInfo::formFactors() const
78 {
79  return d->formFactors;
80 }
81 
82 QString GroupInfo::icon() const
83 {
84  return d->icon;
85 }
86 
87 GroupInfo &GroupInfo::operator=(const GroupInfo &gi)
88 {
89  if (this != &gi) {
90  *d = *gi.d;
91  }
92  return *this;
93 }
94 
95 bool GroupInfo::operator==(const GroupInfo &gi) const
96 {
97  return (gi.name() == d->name);
98 }
99 
100 bool GroupInfo::operator<(const GroupInfo &gi) const
101 {
102  return (gi.name() < d->name);
103 }
GroupInfo::icon
QString icon() const
Definition: groupinfo.cpp:82
GroupInfo::setFormFactors
void setFormFactors(QSet< Plasma::FormFactor > formFactors)
Definition: groupinfo.cpp:57
GroupInfo::formFactors
QSet< Plasma::FormFactor > formFactors() const
Definition: groupinfo.cpp:77
GroupInfo::GroupInfo
GroupInfo(const QString &name, const QString &prettyName=QString())
Definition: groupinfo.cpp:39
GroupInfo::~GroupInfo
~GroupInfo()
Definition: groupinfo.cpp:52
QSet< Plasma::FormFactor >
QString
GroupInfo::prettyName
QString prettyName() const
Definition: groupinfo.cpp:72
GroupInfo::operator=
GroupInfo & operator=(const GroupInfo &gi)
Definition: groupinfo.cpp:87
GroupInfo::operator<
bool operator<(const GroupInfo &gi) const
Definition: groupinfo.cpp:100
groupinfo.h
GroupInfo::setIcon
void setIcon(const QString &icon)
Definition: groupinfo.cpp:62
GroupInfo::name
QString name() const
Definition: groupinfo.cpp:67
GroupInfo
Definition: groupinfo.h:30
GroupInfo::operator==
bool operator==(const GroupInfo &gi) const
Definition: groupinfo.cpp:95
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