Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qmimemagicrulematcher_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
#
ifndef
QMIMEMAGICRULEMATCHER_P_H
5
#
define
QMIMEMAGICRULEMATCHER_P_H
6
7
//
8
// W A R N I N G
9
// -------------
10
//
11
// This file is not part of the Qt API. It exists purely as an
12
// implementation detail. This header file may change from version to
13
// version without notice, or even be removed.
14
//
15
// We mean it.
16
//
17
18
#
include
"qmimemagicrule_p.h"
19
20
QT_REQUIRE_CONFIG(mimetype);
21
22
#
include
<
QtCore
/
qbytearray
.
h
>
23
#
include
<
QtCore
/
qlist
.
h
>
24
#
include
<
QtCore
/
qstring
.
h
>
25
26
QT_BEGIN_NAMESPACE
27
28
class
QMimeMagicRuleMatcher
29
{
30
public
:
31
explicit
QMimeMagicRuleMatcher(
const
QString &mime,
unsigned
priority = 65535);
32
33
void
swap(QMimeMagicRuleMatcher &other)
noexcept
34
{
35
qSwap(m_list, other.m_list);
36
qSwap(m_priority, other.m_priority);
37
qSwap(m_mimetype, other.m_mimetype);
38
}
39
40
bool
operator==(
const
QMimeMagicRuleMatcher &other)
const
;
41
42
void
addRule(
const
QMimeMagicRule &rule);
43
void
addRules(
const
QList<QMimeMagicRule> &rules);
44
QList<QMimeMagicRule> magicRules()
const
;
45
46
bool
matches(
const
QByteArray &data)
const
;
47
48
unsigned
priority()
const
;
49
50
QString mimetype()
const
{
return
m_mimetype; }
51
52
private
:
53
QList<QMimeMagicRule> m_list;
54
unsigned
m_priority;
55
QString m_mimetype;
56
};
57
Q_DECLARE_SHARED(QMimeMagicRuleMatcher)
58
59
QT_END_NAMESPACE
60
61
#
endif
// QMIMEMAGICRULEMATCHER_P_H
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
qtbase
src
corelib
mimetypes
qmimemagicrulematcher_p.h
Generated on Mon Mar 10 2025 00:39:49 for Qt by
1.13.2