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

KNewStuff

  • sources
  • kde-4.14
  • kdelibs
  • knewstuff
  • knewstuff2
  • core
category.cpp
Go to the documentation of this file.
1 /*
2  This file is part of KNewStuff2.
3  Copyright (c) 2006, 2007 Josef Spillner <spillner@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #include "category.h"
20 
21 using namespace KNS;
22 
23 struct KNS::CategoryPrivate {
24  KTranslatable mName;
25  KTranslatable mDescription;
26  KUrl mIcon;
27  QString mId;
28 };
29 
30 Category::Category()
31  : d(new CategoryPrivate)
32 {
33 }
34 
35 Category::~Category()
36 {
37  delete d;
38 }
39 
40 void Category::setId(const QString& id)
41 {
42  d->mId = id;
43 }
44 
45 QString Category::id() const
46 {
47  return d->mId;
48 }
49 
50 void Category::setName(const KTranslatable& name)
51 {
52  d->mName = name;
53 }
54 
55 KTranslatable Category::name() const
56 {
57  return d->mName;
58 }
59 
60 void Category::setDescription(const KTranslatable &description)
61 {
62  d->mDescription = description;
63 }
64 
65 KTranslatable Category::description() const
66 {
67  return d->mDescription;
68 }
69 
70 void Category::setIcon(const KUrl& icon)
71 {
72  d->mIcon = icon;
73 }
74 
75 KUrl Category::icon() const
76 {
77  return d->mIcon;
78 }
79 
category.h
KNS::Category::setDescription
void setDescription(const KTranslatable &type)
Sets the category description.
Definition: category.cpp:60
KNS::KTranslatable
String class with multiple localized representations.
Definition: ktranslatable.h:41
KNS::Category::setId
void setId(const QString &id)
Sets the unique id for this category.
Definition: category.cpp:40
KNS::Category::description
KTranslatable description() const
Retrieve the description of the category.
Definition: category.cpp:65
KUrl
KNS::Category::Category
Category()
Constructor.
Definition: category.cpp:30
QString
KNS::Category::setName
void setName(const KTranslatable &name)
Sets the name for this category.
Definition: category.cpp:50
KNS::Category::setIcon
void setIcon(const KUrl &icon)
Sets the icon.
Definition: category.cpp:70
KNS::Category::id
QString id() const
Retrieve the unique id of the category.
Definition: category.cpp:45
KNS::Category::~Category
~Category()
Destructor.
Definition: category.cpp:35
KNS::Category::name
KTranslatable name() const
Retrieve the name of the category.
Definition: category.cpp:55
KNS::Category::icon
KUrl icon() const
Retrieve the icon of the category.
Definition: category.cpp:75
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:25:43 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KNewStuff

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

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