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

KDECore

  • sources
  • kde-4.12
  • kdelibs
  • kdecore
  • sycoca
ksycocaentry_p.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  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License version 2 as published by the Free Software Foundation;
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Library General Public License for more details.
12  *
13  * You should have received a copy of the GNU Library General Public License
14  * along with this library; see the file COPYING.LIB. If not, write to
15  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  * Boston, MA 02110-1301, USA.
17  **/
18 
19 #ifndef KSYCOCAENTRYPRIVATE_H
20 #define KSYCOCAENTRYPRIVATE_H
21 
22 #include "ksycocaentry.h"
23 
24 #define K_SYCOCATYPE( type, baseclass ) \
25  virtual bool isType(KSycocaType t) const { if (t == type) return true; return baseclass::isType(t);} \
26  virtual KSycocaType sycocaType() const { return type; }
27 
28 
29 class KSycocaEntryPrivate
30 {
31 public:
32  KSycocaEntryPrivate(const QString &path_)
33  : offset( 0 ),
34  deleted( false ), path(path_)
35  {}
36 
37  KSycocaEntryPrivate(QDataStream &_str, int iOffset);
38 
39  virtual ~KSycocaEntryPrivate() {}
40 
41  // Don't forget to call the parent class
42  // first if you override this function.
43  virtual void save(QDataStream &s);
44 
45  virtual bool isType(KSycocaType t) const
46  {
47  return (t == KST_KSycocaEntry);
48  }
49 
50  virtual KSycocaType sycocaType() const
51  {
52  return KST_KSycocaEntry;
53  }
54 
55  virtual bool isValid() const
56  {
57  return !name().isEmpty();
58  }
59 
60  virtual QVariant property(const QString &name) const
61  {
62  Q_UNUSED(name)
63  return QVariant();
64  }
65 
66  virtual QStringList propertyNames() const
67  {
68  return QStringList();
69  }
70 
71  virtual QString name() const = 0;
72 
73  virtual QString storageId() const { return name(); }
74 
75  int offset;
76  bool deleted;
77  QString path;
78 };
79 
80 
81 
82 #endif
QVariant
KSycocaEntryPrivate::~KSycocaEntryPrivate
virtual ~KSycocaEntryPrivate()
Definition: ksycocaentry_p.h:39
KSycocaEntryPrivate::storageId
virtual QString storageId() const
Definition: ksycocaentry_p.h:73
QString
KSycocaEntryPrivate::path
QString path
Definition: ksycocaentry_p.h:77
KSycocaEntryPrivate::save
virtual void save(QDataStream &s)
Definition: ksycocaentry.cpp:139
KSycocaEntryPrivate::isType
virtual bool isType(KSycocaType t) const
Definition: ksycocaentry_p.h:45
KSycocaEntryPrivate::KSycocaEntryPrivate
KSycocaEntryPrivate(const QString &path_)
Definition: ksycocaentry_p.h:32
QStringList
KSycocaEntryPrivate::offset
int offset
Definition: ksycocaentry_p.h:75
KSycocaEntryPrivate::propertyNames
virtual QStringList propertyNames() const
Definition: ksycocaentry_p.h:66
KSycocaEntryPrivate::sycocaType
virtual KSycocaType sycocaType() const
Definition: ksycocaentry_p.h:50
ksycocaentry.h
KSycocaEntryPrivate::deleted
bool deleted
Definition: ksycocaentry_p.h:76
KST_KSycocaEntry
Definition: ksycocatype.h:31
KSycocaEntryPrivate::isValid
virtual bool isValid() const
Definition: ksycocaentry_p.h:55
KSycocaEntryPrivate
Definition: ksycocaentry_p.h:29
KSycocaEntryPrivate::property
virtual QVariant property(const QString &name) const
Definition: ksycocaentry_p.h:60
KSycocaEntryPrivate::name
virtual QString name() const =0
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:09 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • 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