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

KNewStuff

  • 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
21using namespace KNS;
22
23struct KNS::CategoryPrivate {
24 KTranslatable mName;
25 KTranslatable mDescription;
26 KUrl mIcon;
27 QString mId;
28};
29
30Category::Category()
31 : d(new CategoryPrivate)
32{
33}
34
35Category::~Category()
36{
37 delete d;
38}
39
40void Category::setId(const QString& id)
41{
42 d->mId = id;
43}
44
45QString Category::id() const
46{
47 return d->mId;
48}
49
50void Category::setName(const KTranslatable& name)
51{
52 d->mName = name;
53}
54
55KTranslatable Category::name() const
56{
57 return d->mName;
58}
59
60void Category::setDescription(const KTranslatable &description)
61{
62 d->mDescription = description;
63}
64
65KTranslatable Category::description() const
66{
67 return d->mDescription;
68}
69
70void Category::setIcon(const KUrl& icon)
71{
72 d->mIcon = icon;
73}
74
75KUrl Category::icon() const
76{
77 return d->mIcon;
78}
79
category.h
KNS::Category::setIcon
void setIcon(const KUrl &icon)
Sets the icon.
Definition: category.cpp:70
KNS::Category::name
KTranslatable name() const
Retrieve the name of the category.
Definition: category.cpp:55
KNS::Category::setName
void setName(const KTranslatable &name)
Sets the name for this category.
Definition: category.cpp:50
KNS::Category::~Category
~Category()
Destructor.
Definition: category.cpp:35
KNS::Category::id
QString id() const
Retrieve the unique id of the category.
Definition: category.cpp:45
KNS::Category::description
KTranslatable description() const
Retrieve the description of the category.
Definition: category.cpp:65
KNS::Category::Category
Category()
Constructor.
Definition: category.cpp:30
KNS::Category::icon
KUrl icon() const
Retrieve the icon of the category.
Definition: category.cpp:75
KNS::Category::setDescription
void setDescription(const KTranslatable &type)
Sets the category description.
Definition: category.cpp:60
KNS::Category::setId
void setId(const QString &id)
Sets the unique id for this category.
Definition: category.cpp:40
KNS::KTranslatable
String class with multiple localized representations.
Definition: ktranslatable.h:42
KUrl
KNS
Definition: knewstuff2/core/author.h:27
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
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