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

KDECore

  • kdecore
  • kernel
kcomponentdata.h
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2 Copyright (C) 1999 Torben Weis <weis@kde.org>
3 Copyright (C) 2007 Matthias Kretz <kretz@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
8
9 This library 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 GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19#ifndef KCOMPONENTDATA_H
20#define KCOMPONENTDATA_H
21
22#include <kdecore_export.h>
23#include <ksharedconfig.h>
24
25class QByteArray;
26class QString;
27class KAboutData;
28class KStandardDirs;
29class KComponentDataPrivate;
30
46class KDECORE_EXPORT KComponentData // krazy:exclude=dpointer (implicitly shared)
47{
48public:
54 KComponentData();
55
61 KComponentData(const KComponentData&);
62
72 KComponentData &operator=(const KComponentData&);
73
77 bool operator==(const KComponentData&) const;
78
82 bool operator!=(const KComponentData &rhs) const { return !operator==(rhs); }
83
84 enum MainComponentRegistration {
85 RegisterAsMainComponent,
86 SkipMainComponentRegistration
87 };
88
100 explicit KComponentData(const QByteArray &componentName, const QByteArray &catalogName = QByteArray(),
101 MainComponentRegistration registerAsMain = RegisterAsMainComponent);
102
116 explicit KComponentData(const KAboutData &aboutData, MainComponentRegistration registerAsMain = RegisterAsMainComponent);
117 explicit KComponentData(const KAboutData *aboutData, MainComponentRegistration registerAsMain = RegisterAsMainComponent);
118
122 virtual ~KComponentData();
123
130 bool isValid() const;
131
136 KStandardDirs *dirs() const;
137
142 const KSharedConfig::Ptr &config() const; //krazy:exclude=constref
143
151 const KAboutData *aboutData() const;
152
158 void setAboutData(const KAboutData &aboutData);
159
165 QString componentName() const;
166
172 QString catalogName() const;
173
174protected:
175 friend class KApplicationPrivate;
176
181 void setConfigName(const QString &name);
182
184 virtual void virtual_hook( int id, void* data );
185
186private:
187 // Ref-counted data
188 KComponentDataPrivate* d;
189 friend class KComponentDataPrivate;
190};
191
192#endif // KCOMPONENTDATA_H
KAboutData
This class is used to store information about a program.
Definition: kaboutdata.h:193
KComponentDataPrivate
Definition: kcomponentdata_p.h:34
KComponentData
Per component data.
Definition: kcomponentdata.h:47
KComponentData::MainComponentRegistration
MainComponentRegistration
Definition: kcomponentdata.h:84
KComponentData::RegisterAsMainComponent
@ RegisterAsMainComponent
Definition: kcomponentdata.h:85
KComponentData::operator!=
bool operator!=(const KComponentData &rhs) const
Returns whether two KComponentData objects do not reference the same data.
Definition: kcomponentdata.h:82
KSharedPtr< KSharedConfig >
KStandardDirs
Site-independent access to standard KDE directories.
Definition: kstandarddirs.h:172
QString
operator==
bool operator==(const KEntry &k1, const KEntry &k2)
Definition: kconfigdata.h:72
kdecore_export.h
ksharedconfig.h
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.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • 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