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

KIO

  • kio
  • kio
kfilemetainfo.h
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2
3 Copyright (c) 2001,2002 Carsten Pfeiffer <pfeiffer@kde.org>
4 2007 Jos van den Oever <jos@vandenoever.info>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License (LGPL) as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
21#ifndef KFILEMETAINFO_H
22#define KFILEMETAINFO_H
23
24#include "predicateproperties.h"
25#include "kfilemetainfoitem.h"
26#include <QtCore/QList>
27#include <QtCore/QStringList>
28class KUrl;
29
30typedef QList<KFileMetaInfoItem> KFileMetaInfoItemList;
31
32class KFileMetaInfoGroupPrivate;
33class KIO_EXPORT KFileMetaInfoGroup {
34public:
35 KFileMetaInfoGroup();
36 KFileMetaInfoGroup(const KFileMetaInfoGroup&);
37 ~KFileMetaInfoGroup();
38 const KFileMetaInfoGroup& operator=(const KFileMetaInfoGroup&);
39 KFileMetaInfoItemList items() const;
40 const QString& name() const;
41 const QStringList& keys() const;
42private:
43 QSharedDataPointer<KFileMetaInfoGroupPrivate> d;
44};
45
46typedef QList<KFileMetaInfoGroup> KFileMetaInfoGroupList;
47
48class KFileMetaInfoPrivate;
56class KIO_EXPORT KFileMetaInfo {
57public:
64 enum What
65 {
66 Fastest = 0x1,
69// Deprecated
70// DontCare = 0x2, ///< let the plugin decide what to read.
71
72 TechnicalInfo = 0x4,
75 ContentInfo = 0x8,
77 ExternalSources = 0x10,
81 Thumbnail = 0x20,
83// Deprecated
84// Preferred = 0x40, ///< get at least the preferred items
85 LinkedData = 0x80, //< extract linked/related files like html links, source #include etc
86 Everything = 0xffff
87
88 };
89 Q_DECLARE_FLAGS(WhatFlags, What)
90
91
97 explicit KFileMetaInfo(const QString& path, const QString& mimetype = QString(),
98 WhatFlags w = Everything);
104 KFileMetaInfo(const KUrl& url);
108 KFileMetaInfo();
112 KFileMetaInfo(const KFileMetaInfo&);
116 ~KFileMetaInfo();
120 KFileMetaInfo& operator=(KFileMetaInfo const& kfmi);
124 bool applyChanges();
128 const QHash<QString, KFileMetaInfoItem>& items() const;
129 KFileMetaInfoItem& item(const QString& key);
130 const KFileMetaInfoItem& item(const QString& key) const;
131 bool isValid() const;
135 QStringList preferredKeys() const;
139 QStringList supportedKeys() const;
140 KIO_EXPORT friend QDataStream& operator >>(QDataStream& s, KFileMetaInfo& )
141;
142 KIO_EXPORT friend QDataStream& operator <<(QDataStream& s, const KFileMetaInfo&);
146#ifndef KDE_NO_DEPRECATED
147 KDE_DEPRECATED KFileMetaInfoGroupList preferredGroups() const;
148#endif
152#ifndef KDE_NO_DEPRECATED
153 KDE_DEPRECATED KFileMetaInfoGroupList supportedGroups() const;
154#endif
155 KFileMetaInfoGroupList groups() const;
156 QStringList keys() const;
157 const KUrl& url() const;
158
159private:
160 QSharedDataPointer<KFileMetaInfoPrivate> d;
161};
162
163Q_DECLARE_OPERATORS_FOR_FLAGS(KFileMetaInfo::WhatFlags)
164
165
166#endif
KFileMetaInfoGroup
Definition: kfilemetainfo.h:33
KFileMetaInfoGroup::operator=
const KFileMetaInfoGroup & operator=(const KFileMetaInfoGroup &)
KFileMetaInfoGroup::keys
const QStringList & keys() const
KFileMetaInfoGroup::KFileMetaInfoGroup
KFileMetaInfoGroup()
KFileMetaInfoItem
Definition: kfilemetainfoitem.h:34
KFileMetaInfo
KFileMetaInfo provides metadata extracted from a file or other resource.
Definition: kfilemetainfo.h:56
KFileMetaInfo::groups
KFileMetaInfoGroupList groups() const
KFileMetaInfo::What
What
This is used to specify what a KFileMetaInfo object should read, so you can specify if you want to re...
Definition: kfilemetainfo.h:65
KUrl
QHash
QList
KFileMetaInfoGroupList
QList< KFileMetaInfoGroup > KFileMetaInfoGroupList
Definition: kfilemetainfo.h:46
KFileMetaInfoItemList
QList< KFileMetaInfoItem > KFileMetaInfoItemList
Definition: kfilemetainfo.h:30
kfilemetainfoitem.h
name
const char * name(StandardAction id)
predicateproperties.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.

KIO

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