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

KDECore

  • sources
  • kde-4.14
  • kdelibs
  • 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 
25 class QByteArray;
26 class QString;
27 class KAboutData;
28 class KStandardDirs;
29 class KComponentDataPrivate;
30 
46 class KDECORE_EXPORT KComponentData // krazy:exclude=dpointer (implicitly shared)
47 {
48 public:
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 
174 protected:
175  friend class KApplicationPrivate;
176 
181  void setConfigName(const QString &name);
182 
184  virtual void virtual_hook( int id, void* data );
185 
186 private:
187  // Ref-counted data
188  KComponentDataPrivate* d;
189  friend class KComponentDataPrivate;
190 };
191 
192 #endif // KCOMPONENTDATA_H
KSharedPtr
Can be used to control the lifetime of an object that has derived QSharedData.
Definition: kconfiggroup.h:38
KComponentData::operator!=
bool operator!=(const KComponentData &rhs) const
Returns whether two KComponentData objects do not reference the same data.
Definition: kcomponentdata.h:82
kdecore_export.h
QByteArray
KGlobal::dirs
KStandardDirs * dirs()
Returns the application standard dirs object.
KGlobal::config
KSharedConfigPtr config()
Returns the general config object.
Definition: kglobal.cpp:139
operator==
bool operator==(const KEntry &k1, const KEntry &k2)
Definition: kconfigdata.h:72
KComponentDataPrivate
Definition: kcomponentdata_p.h:33
KStandardDirs
Site-independent access to standard KDE directories.
Definition: kstandarddirs.h:171
KComponentData::RegisterAsMainComponent
Definition: kcomponentdata.h:85
KAboutData
This class is used to store information about a program.
Definition: kaboutdata.h:192
ksharedconfig.h
QString
KComponentData::MainComponentRegistration
MainComponentRegistration
Definition: kcomponentdata.h:84
KComponentData
Per component data.
Definition: kcomponentdata.h:46
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:10 by doxygen 1.8.7 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 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