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

KDECore

  • kdecore
  • services
kmimetype_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 * 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#ifndef __kmimetype_p_h__
20#define __kmimetype_p_h__
21
22#include "kservicetype_p.h"
23
24class KMimeTypePrivate: public KServiceTypePrivate
25{
26public:
27 K_SYCOCATYPE( KST_KMimeType, KServiceTypePrivate )
28
29 KMimeTypePrivate(const QString &path) : KServiceTypePrivate(path), m_xmlDataLoaded(false)
30 {}
31 KMimeTypePrivate(QDataStream &_str, int offset)
32 : KServiceTypePrivate(_str, offset), m_xmlDataLoaded(false)
33 {
34 }
35
36 virtual void save(QDataStream &s);
37
38 virtual QVariant property(const QString &name ) const;
39
40 virtual QStringList propertyNames() const;
41
42 virtual QString comment(const KUrl & = KUrl()) const
43 {
44 ensureXmlDataLoaded();
45 return m_strComment;
46 }
47
48 QStringList patterns() const
49 {
50 ensureXmlDataLoaded();
51 return m_lstPatterns;
52 }
53
54 // virtual because reimplemented in KFolderMimeType
55 virtual QString iconName(const KUrl &) const;
56
57 bool inherits(const QString& mime) const;
58 void ensureXmlDataLoaded() const;
59 virtual int serviceOffersOffset() const;
60
61 mutable QStringList m_lstPatterns;
62 mutable QString m_iconName; // user-specified
63 mutable bool m_xmlDataLoaded;
64};
65
66#endif // __kmimetype_p_h__
KMimeTypePrivate
Definition: kmimetype_p.h:25
KMimeTypePrivate::iconName
virtual QString iconName(const KUrl &) const
Definition: kmimetype.cpp:785
KMimeTypePrivate::m_lstPatterns
QStringList m_lstPatterns
Definition: kmimetype_p.h:61
KMimeTypePrivate::property
virtual QVariant property(const QString &name) const
Definition: kmimetype.cpp:436
KMimeTypePrivate::comment
virtual QString comment(const KUrl &=KUrl()) const
Definition: kmimetype_p.h:42
KMimeTypePrivate::inherits
bool inherits(const QString &mime) const
Definition: kmimetype.cpp:541
KMimeTypePrivate::ensureXmlDataLoaded
void ensureXmlDataLoaded() const
Definition: kmimetype.cpp:617
KMimeTypePrivate::patterns
QStringList patterns() const
Definition: kmimetype_p.h:48
KMimeTypePrivate::serviceOffersOffset
virtual int serviceOffersOffset() const
Definition: kmimetype.cpp:780
KMimeTypePrivate::KMimeTypePrivate
KMimeTypePrivate(QDataStream &_str, int offset)
Definition: kmimetype_p.h:31
KMimeTypePrivate::m_xmlDataLoaded
bool m_xmlDataLoaded
Definition: kmimetype_p.h:63
KMimeTypePrivate::save
virtual void save(QDataStream &s)
Definition: kmimetype.cpp:428
KMimeTypePrivate::propertyNames
virtual QStringList propertyNames() const
Definition: kmimetype.cpp:448
KMimeTypePrivate::m_iconName
QString m_iconName
Definition: kmimetype_p.h:62
KServiceTypePrivate
Definition: kservicetype_p.h:29
KServiceTypePrivate::name
virtual QString name() const
Definition: kservicetype_p.h:49
KServiceTypePrivate::m_strComment
QString m_strComment
Definition: kservicetype_p.h:70
KSycocaEntryPrivate::path
QString path
Definition: ksycocaentry_p.h:77
KSycocaEntryPrivate::offset
int offset
Definition: ksycocaentry_p.h:75
KUrl
Represents and parses a URL.
Definition: kurl.h:112
QStringList
QString
QVariant
kservicetype_p.h
K_SYCOCATYPE
#define K_SYCOCATYPE(type, baseclass)
Definition: ksycocaentry_p.h:24
KST_KMimeType
@ KST_KMimeType
Definition: ksycocatype.h:31
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