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

KDECore

  • kdecore
  • sycoca
ksycoca.h
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2 * Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
3 * Copyright (C) 2005-2008 David Faure <faure@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
20#ifndef KSYCOCA_H
21#define KSYCOCA_H
22
23#include <kdecore_export.h>
24#include <ksycocatype.h>
25
26#include <QtCore/QObject>
27#include <QtCore/QStringList>
28
29class QDataStream;
30class KSycocaFactory;
31class KSycocaFactoryList;
32class KSycocaPrivate;
33
37#define KBUILDSYCOCA_EXENAME "kbuildsycoca4"
38
43class KDECORE_EXPORT KSycoca : public QObject
44{
45 Q_OBJECT
46 //Q_CLASSINFO("D-Bus Interface", "org.kde.KSycoca")
47
48protected:
53 explicit KSycoca( bool /* buildDatabase */ );
54
55public:
60 typedef enum { LocalDatabase, GlobalDatabase } DatabaseType;
61
65 KSycoca();
66
70 static KSycoca *self();
71
72 virtual ~KSycoca();
73
77 static int version();
78
84 static bool isAvailable();
85
90 QDataStream *findEntry(int offset, KSycocaType &type);
95 QDataStream *findFactory(KSycocaFactoryId id);
99 QString kfsstnd_prefixes();
109 static QString absoluteFilePath(DatabaseType type=LocalDatabase);
113 QString language();
114
121 quint32 timeStamp();
122
132 quint32 updateSignature();
133
138 QStringList allResourceDirs();
139
143 void addFactory( KSycocaFactory * );
144
149 virtual bool isBuilding();
150
154 static void disableAutoRebuild();
155
164#ifndef KDE_NO_DEPRECATED
165 static KDE_DEPRECATED bool isChanged(const char *type);
166#endif
167
172 static void flagError();
173
175#ifndef KDE_NO_DEPRECATED
176 static KDE_DEPRECATED bool readError();
177#endif
178
179Q_SIGNALS:
184#ifndef KDE_NO_DEPRECATED
185 QT_MOC_COMPAT void databaseChanged(); // KDE5 TODO: remove
186#endif
187
199 void databaseChanged(const QStringList& changedResources);
200
201protected:
202 // @internal used by kbuildsycoca
203 KSycocaFactoryList* factories();
204
205 // @internal was for kbuildsycoca
206#ifndef KDE_NO_DEPRECATED
207 QDataStream *m_str_deprecated; // KDE5: REMOVE
208#endif
209 // @internal used by factories and kbuildsycoca
210 QDataStream*& stream();
211 friend class KSycocaFactory;
212 friend class KSycocaDict;
213
214private Q_SLOTS:
218 void notifyDatabaseChanged(const QStringList &);
219
220private:
225 static void clearCaches();
226 friend class KBuildSycoca;
227 friend class Kded;
228
229 Q_DISABLE_COPY(KSycoca)
230 friend class KSycocaPrivate;
231 KSycocaPrivate * const d;
232};
233
234#endif
235
KSycocaDict
Definition: ksycocadict_p.h:37
KSycocaFactoryList
This, instead of a typedef, allows to declare "class ..." in header files.
Definition: ksycocafactory.h:149
KSycocaFactory
Definition: ksycocafactory.h:37
KSycocaPrivate
Definition: ksycoca_p.h:31
KSycoca
Definition: ksycoca.h:44
KSycoca::databaseChanged
void databaseChanged(const QStringList &changedResources)
Connect to this to get notified when the database changes Example: when mimetype definitions have cha...
KSycoca::databaseChanged
QT_MOC_COMPAT void databaseChanged()
Connect to this to get notified when the database changes.
KSycoca::m_str_deprecated
QDataStream * m_str_deprecated
Definition: ksycoca.h:207
QObject
QStringList
QString
quint32
factories
static factoryMap factories
Definition: k3socketdevice.cpp:875
kdecore_export.h
ksycocatype.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