migrated the codebase to Qt6 and fixed some compatibility issues
* used a Qt6 ported version of SortFilterProxyModel * used an updated Qt6 compatible version of QXZing * added a flag to windows linker to avoid WinMain problem of MSVCRTD * renamed utils.cpp to utilities.cpp for avoiding confusion with the same file name in SortFilterProxyModel
This commit is contained in:
parent
050d987d3b
commit
8c20a67cfa
140 changed files with 5924 additions and 214 deletions
|
@ -151,7 +151,7 @@ quint32 AbstractSshPacket::minPacketSize() const
|
||||||
void AbstractSshPacket::setLengthField(QByteArray &data)
|
void AbstractSshPacket::setLengthField(QByteArray &data)
|
||||||
{
|
{
|
||||||
const quint32 length = qToBigEndian(data.size() - 4);
|
const quint32 length = qToBigEndian(data.size() - 4);
|
||||||
data.replace(0, 4, reinterpret_cast<const char *>(&length), 4);
|
data.replace(qsizetype(0), 4, reinterpret_cast<const char *>(&length), 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|
|
@ -107,7 +107,7 @@ SshX11InfoRetriever::SshX11InfoRetriever(const QString &displayName, QObject *pa
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (dotIndex != -1) {
|
if (dotIndex != -1) {
|
||||||
displayInfo.screen = m_displayName.midRef(dotIndex + 1).toInt(&ok);
|
displayInfo.screen = m_displayName.mid(dotIndex + 1).toInt(&ok);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
emitFailure(tr("Invalid display name \"%1\"").arg(m_displayName));
|
emitFailure(tr("Invalid display name \"%1\"").arg(m_displayName));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.14)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
find_package(Qt5 REQUIRED
|
find_package(Qt6 REQUIRED COMPONENTS
|
||||||
Core
|
Core
|
||||||
Qml
|
Qml
|
||||||
)
|
)
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON) # This is to find generated *.moc and *.h files in build dir
|
set(CMAKE_INCLUDE_CURRENT_DIR ON) # This is to find generated *.moc and *.h files in build dir
|
||||||
|
@ -40,10 +40,22 @@ add_library(SortFilterProxyModel OBJECT
|
||||||
proxyroles/regexprole.cpp
|
proxyroles/regexprole.cpp
|
||||||
sorters/filtersorter.cpp
|
sorters/filtersorter.cpp
|
||||||
proxyroles/filterrole.cpp
|
proxyroles/filterrole.cpp
|
||||||
)
|
utils/utils.cpp
|
||||||
|
utils/utils.h
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(SortFilterProxyModel
|
||||||
|
PRIVATE
|
||||||
|
Qt6::Core
|
||||||
|
Qt6::Qml
|
||||||
|
)
|
||||||
|
|
||||||
|
if ((MSVC) AND (MSVC_VERSION GREATER_EQUAL 1914))
|
||||||
|
target_compile_options(SortFilterProxyModel PUBLIC "/Zc:__cplusplus")
|
||||||
|
endif()
|
||||||
|
|
||||||
target_include_directories(SortFilterProxyModel PUBLIC
|
target_include_directories(SortFilterProxyModel PUBLIC
|
||||||
${CMAKE_CURRENT_LIST_DIR}
|
${CMAKE_CURRENT_LIST_DIR}
|
||||||
$<TARGET_PROPERTY:Qt5::Core,INTERFACE_INCLUDE_DIRECTORIES>
|
$<TARGET_PROPERTY:Qt6::Core,INTERFACE_INCLUDE_DIRECTORIES>
|
||||||
$<TARGET_PROPERTY:Qt5::Qml,INTERFACE_INCLUDE_DIRECTORIES>
|
$<TARGET_PROPERTY:Qt6::Qml,INTERFACE_INCLUDE_DIRECTORIES>
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
!contains( CONFIG, c\+\+1[14] ): warning("SortFilterProxyModel needs at least c++11, add CONFIG += c++11 to your .pro")
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD
|
INCLUDEPATH += $$PWD
|
||||||
|
|
||||||
HEADERS += $$PWD/qqmlsortfilterproxymodel.h \
|
HEADERS += $$PWD/qqmlsortfilterproxymodel.h \
|
||||||
|
@ -25,7 +27,8 @@ HEADERS += $$PWD/qqmlsortfilterproxymodel.h \
|
||||||
$$PWD/proxyroles/singlerole.h \
|
$$PWD/proxyroles/singlerole.h \
|
||||||
$$PWD/proxyroles/regexprole.h \
|
$$PWD/proxyroles/regexprole.h \
|
||||||
$$PWD/sorters/filtersorter.h \
|
$$PWD/sorters/filtersorter.h \
|
||||||
$$PWD/proxyroles/filterrole.h
|
$$PWD/proxyroles/filterrole.h \
|
||||||
|
$$PWD/utils/utils.h
|
||||||
|
|
||||||
SOURCES += $$PWD/qqmlsortfilterproxymodel.cpp \
|
SOURCES += $$PWD/qqmlsortfilterproxymodel.cpp \
|
||||||
$$PWD/filters/filter.cpp \
|
$$PWD/filters/filter.cpp \
|
||||||
|
@ -55,4 +58,5 @@ SOURCES += $$PWD/qqmlsortfilterproxymodel.cpp \
|
||||||
$$PWD/proxyroles/singlerole.cpp \
|
$$PWD/proxyroles/singlerole.cpp \
|
||||||
$$PWD/proxyroles/regexprole.cpp \
|
$$PWD/proxyroles/regexprole.cpp \
|
||||||
$$PWD/sorters/filtersorter.cpp \
|
$$PWD/sorters/filtersorter.cpp \
|
||||||
$$PWD/proxyroles/filterrole.cpp
|
$$PWD/proxyroles/filterrole.cpp \
|
||||||
|
$$PWD/utils/utils.cpp
|
||||||
|
|
65
client/3rd/SortFilterProxyModel/SortFilterProxyModel.qbs
Normal file
65
client/3rd/SortFilterProxyModel/SortFilterProxyModel.qbs
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
import qbs
|
||||||
|
|
||||||
|
Group {
|
||||||
|
name: "SortFilterProxyModel"
|
||||||
|
prefix: path + "/"
|
||||||
|
files: [
|
||||||
|
"filters/alloffilter.cpp",
|
||||||
|
"filters/alloffilter.h",
|
||||||
|
"filters/anyoffilter.cpp",
|
||||||
|
"filters/anyoffilter.h",
|
||||||
|
"filters/expressionfilter.cpp",
|
||||||
|
"filters/expressionfilter.h",
|
||||||
|
"filters/filter.cpp",
|
||||||
|
"filters/filter.h",
|
||||||
|
"filters/filtercontainer.cpp",
|
||||||
|
"filters/filtercontainer.h",
|
||||||
|
"filters/filtercontainerfilter.cpp",
|
||||||
|
"filters/filtercontainerfilter.h",
|
||||||
|
"filters/filtersqmltypes.cpp",
|
||||||
|
"filters/indexfilter.cpp",
|
||||||
|
"filters/indexfilter.h",
|
||||||
|
"filters/rangefilter.cpp",
|
||||||
|
"filters/rangefilter.h",
|
||||||
|
"filters/regexpfilter.cpp",
|
||||||
|
"filters/regexpfilter.h",
|
||||||
|
"filters/rolefilter.cpp",
|
||||||
|
"filters/rolefilter.h",
|
||||||
|
"filters/valuefilter.cpp",
|
||||||
|
"filters/valuefilter.h",
|
||||||
|
"proxyroles/expressionrole.cpp",
|
||||||
|
"proxyroles/expressionrole.h",
|
||||||
|
"proxyroles/filterrole.cpp",
|
||||||
|
"proxyroles/filterrole.h",
|
||||||
|
"proxyroles/joinrole.cpp",
|
||||||
|
"proxyroles/joinrole.h",
|
||||||
|
"proxyroles/proxyrole.cpp",
|
||||||
|
"proxyroles/proxyrole.h",
|
||||||
|
"proxyroles/proxyrolecontainer.cpp",
|
||||||
|
"proxyroles/proxyrolecontainer.h",
|
||||||
|
"proxyroles/proxyrolesqmltypes.cpp",
|
||||||
|
"proxyroles/regexprole.cpp",
|
||||||
|
"proxyroles/regexprole.h",
|
||||||
|
"proxyroles/singlerole.cpp",
|
||||||
|
"proxyroles/singlerole.h",
|
||||||
|
"proxyroles/switchrole.cpp",
|
||||||
|
"proxyroles/switchrole.h",
|
||||||
|
"sorters/expressionsorter.cpp",
|
||||||
|
"sorters/expressionsorter.h",
|
||||||
|
"sorters/filtersorter.cpp",
|
||||||
|
"sorters/filtersorter.h",
|
||||||
|
"sorters/rolesorter.cpp",
|
||||||
|
"sorters/rolesorter.h",
|
||||||
|
"sorters/sorter.cpp",
|
||||||
|
"sorters/sorter.h",
|
||||||
|
"sorters/sortercontainer.cpp",
|
||||||
|
"sorters/sortercontainer.h",
|
||||||
|
"sorters/sortersqmltypes.cpp",
|
||||||
|
"sorters/stringsorter.cpp",
|
||||||
|
"sorters/stringsorter.h",
|
||||||
|
"utils/utils.cpp",
|
||||||
|
"utils/utils.h",
|
||||||
|
"qqmlsortfilterproxymodel.cpp",
|
||||||
|
"qqmlsortfilterproxymodel.h"
|
||||||
|
]
|
||||||
|
}
|
65
client/3rd/SortFilterProxyModel/docs/index.html
Normal file
65
client/3rd/SortFilterProxyModel/docs/index.html
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- index.qdoc -->
|
||||||
|
<title>SortFilterProxyModel QML Module | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1 class="title">SortFilterProxyModel QML Module</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$index.html-description -->
|
||||||
|
<div class="descr"> <a name="details"></a>
|
||||||
|
<p><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html">SortFilterProxyModel</a> is an implementation of QSortFilterProxyModel conveniently exposed for QML. <div class="table"><table class="annotated">
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html">SortFilterProxyModel</a></p></td><td class="tblDescr"><p>Filters and sorts data coming from a source QAbstractItemModel</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</p>
|
||||||
|
<a name="filters"></a>
|
||||||
|
<h2 id="filters">Filters</h2>
|
||||||
|
<div class="table"><table class="annotated">
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-allof.html">AllOf</a></p></td><td class="tblDescr"><p>Filter container accepting rows accepted by all its child filters</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-anyof.html">AnyOf</a></p></td><td class="tblDescr"><p>Filter container accepting rows accepted by at least one of its child filters</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-expressionfilter.html">ExpressionFilter</a></p></td><td class="tblDescr"><p>Filters row with a custom filtering</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-filter.html">Filter</a></p></td><td class="tblDescr"><p>Base type for the SortFilterProxyModel filters</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-indexfilter.html">IndexFilter</a></p></td><td class="tblDescr"><p>Filters rows based on their source index</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-rangefilter.html">RangeFilter</a></p></td><td class="tblDescr"><p>Filters rows between boundary values</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-regexpfilter.html">RegExpFilter</a></p></td><td class="tblDescr"><p>Filters rows matching a regular expression</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-rolefilter.html">RoleFilter</a></p></td><td class="tblDescr"><p>Base type for filters based on a source model role</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-valuefilter.html">ValueFilter</a></p></td><td class="tblDescr"><p>Filters rows matching exactly a value</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
<a name="related-attached-types"></a>
|
||||||
|
<h3 id="related-attached-types">Related attached types</h3>
|
||||||
|
<div class="table"><table class="annotated">
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-filtercontainer.html">FilterContainer</a></p></td><td class="tblDescr"><p>Abstract interface for types containing Filters</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
<a name="sorters"></a>
|
||||||
|
<h2 id="sorters">Sorters</h2>
|
||||||
|
<div class="table"><table class="annotated">
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-expressionsorter.html">ExpressionSorter</a></p></td><td class="tblDescr"><p>Sorts row with a custom javascript expression</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-filtersorter.html">FilterSorter</a></p></td><td class="tblDescr"><p>Sorts rows based on if they match filters</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-rolesorter.html">RoleSorter</a></p></td><td class="tblDescr"><p>Sorts rows based on a source model role</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-sorter.html">Sorter</a></p></td><td class="tblDescr"><p>Base type for the SortFilterProxyModel sorters</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-stringsorter.html">StringSorter</a></p></td><td class="tblDescr"><p>Sorts rows based on a source model string role</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
<a name="related-attached-types"></a>
|
||||||
|
<h3 id="related-attached-types">Related attached types</h3>
|
||||||
|
<div class="table"><table class="annotated">
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-sortercontainer.html">SorterContainer</a></p></td><td class="tblDescr"><p>Abstract interface for types containing Sorters</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
<a name="proxyroles"></a>
|
||||||
|
<h2 id="proxyroles">ProxyRoles</h2>
|
||||||
|
<div class="table"><table class="annotated">
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-expressionrole.html">ExpressionRole</a></p></td><td class="tblDescr"><p>A custom role computed from a javascript expression</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-filterrole.html">FilterRole</a></p></td><td class="tblDescr"><p>A role resolving to true for rows matching all its filters</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-joinrole.html">JoinRole</a></p></td><td class="tblDescr"><p>Role made from concatenating other roles</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-proxyrole.html">ProxyRole</a></p></td><td class="tblDescr"><p>Base type for the SortFilterProxyModel proxy roles</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-regexprole.html">RegExpRole</a></p></td><td class="tblDescr"><p>A ProxyRole extracting data from a source role via a regular expression</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-singlerole.html">SingleRole</a></p></td><td class="tblDescr"><p>Base type for the SortFilterProxyModel proxy roles defining a single role</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-switchrole.html">SwitchRole</a></p></td><td class="tblDescr"><p>A role using Filter to conditionnaly compute its data</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div>
|
||||||
|
<!-- @@@index.html -->
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- alloffilter.cpp -->
|
||||||
|
<title>List of All Members for AllOf | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for AllOf</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-allof.html">AllOf</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-allof.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-allof.html#inverted-prop">inverted</a></b></b> : bool</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,67 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- alloffilter.cpp -->
|
||||||
|
<title>AllOf QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">AllOf QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$AllOf-brief -->
|
||||||
|
<p>Filter container accepting rows accepted by all its child filters. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@AllOf -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-filter.html">Filter</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-allof-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-allof.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-allof.html#inverted-prop">inverted</a></b></b> : bool</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$AllOf-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>The AllOf type is a <a href="qml-sortfilterproxymodel-filter.html">Filter</a> container that accepts rows if all of its contained (and enabled) filters accept them, or if it has no filter.</p>
|
||||||
|
<p>Using it as a top level filter has the same effect as putting all its child filters as top level filters. It can however be usefull to use an AllOf filter when nested in an <a href="qml-sortfilterproxymodel-anyof.html">AnyOf</a> filter.</p>
|
||||||
|
<p><b>See also </b><a href="qml-sortfilterproxymodel-filtercontainer.html">FilterContainer</a>.</p>
|
||||||
|
<!-- @@@AllOf -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$enabled -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the filter is enabled. A disabled filter will accept every rows unconditionally (even if it's inverted).</p>
|
||||||
|
<p>By default, filters are enabled.</p>
|
||||||
|
</div></div><!-- @@@enabled -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$inverted -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="inverted-prop"></a><span class="name">inverted</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the filter is inverted. When a filter is inverted, a row normally accepted would be rejected, and vice-versa.</p>
|
||||||
|
<p>By default, filters are not inverted.</p>
|
||||||
|
</div></div><!-- @@@inverted -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- anyoffilter.cpp -->
|
||||||
|
<title>List of All Members for AnyOf | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for AnyOf</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-anyof.html">AnyOf</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-anyof.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-anyof.html#inverted-prop">inverted</a></b></b> : bool</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,86 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- anyoffilter.cpp -->
|
||||||
|
<title>AnyOf QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">AnyOf QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$AnyOf-brief -->
|
||||||
|
<p>Filter container accepting rows accepted by at least one of its child filters. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@AnyOf -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-filter.html">Filter</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-anyof-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-anyof.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-anyof.html#inverted-prop">inverted</a></b></b> : bool</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$AnyOf-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>The AnyOf type is a <a href="qml-sortfilterproxymodel-filter.html">Filter</a> container that accepts rows if any of its contained (and enabled) filters accept them.</p>
|
||||||
|
<p>In the following example, only the rows where the <code>firstName</code> role or the <code>lastName</code> role match the text entered in the <code>nameTextField</code> will be accepted :</p>
|
||||||
|
<pre class="cpp">TextField {
|
||||||
|
id: nameTextField
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
sourceModel: contactModel
|
||||||
|
filters: AnyOf {
|
||||||
|
RegExpFilter {
|
||||||
|
roleName: <span class="string">"lastName"</span>
|
||||||
|
pattern: nameTextField<span class="operator">.</span>text
|
||||||
|
caseSensitivity: <span class="type">Qt</span><span class="operator">.</span>CaseInsensitive
|
||||||
|
}
|
||||||
|
RegExpFilter {
|
||||||
|
roleName: <span class="string">"firstName"</span>
|
||||||
|
pattern: nameTextField<span class="operator">.</span>text
|
||||||
|
caseSensitivity: <span class="type">Qt</span><span class="operator">.</span>CaseInsensitive
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}</pre>
|
||||||
|
<p><b>See also </b><a href="qml-sortfilterproxymodel-filtercontainer.html">FilterContainer</a>.</p>
|
||||||
|
<!-- @@@AnyOf -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$enabled -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the filter is enabled. A disabled filter will accept every rows unconditionally (even if it's inverted).</p>
|
||||||
|
<p>By default, filters are enabled.</p>
|
||||||
|
</div></div><!-- @@@enabled -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$inverted -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="inverted-prop"></a><span class="name">inverted</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the filter is inverted. When a filter is inverted, a row normally accepted would be rejected, and vice-versa.</p>
|
||||||
|
<p>By default, filters are not inverted.</p>
|
||||||
|
</div></div><!-- @@@inverted -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- expressionfilter.cpp -->
|
||||||
|
<title>List of All Members for ExpressionFilter | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for ExpressionFilter</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-expressionfilter.html">ExpressionFilter</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-expressionfilter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-expressionfilter.html#expression-prop">expression</a></b></b> : expression</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-expressionfilter.html#inverted-prop">inverted</a></b></b> : bool</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,78 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- expressionfilter.cpp -->
|
||||||
|
<title>ExpressionFilter QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">ExpressionFilter QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$ExpressionFilter-brief -->
|
||||||
|
<p>Filters row with a custom filtering. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@ExpressionFilter -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-filter.html">Filter</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-expressionfilter-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-expressionfilter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-expressionfilter.html#expression-prop">expression</a></b></b> : expression</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-expressionfilter.html#inverted-prop">inverted</a></b></b> : bool</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$ExpressionFilter-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>An ExpressionFilter is a <a href="qml-sortfilterproxymodel-filter.html">Filter</a> allowing to implement custom filtering based on a javascript expression.</p>
|
||||||
|
<!-- @@@ExpressionFilter -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$enabled -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the filter is enabled. A disabled filter will accept every rows unconditionally (even if it's inverted).</p>
|
||||||
|
<p>By default, filters are enabled.</p>
|
||||||
|
</div></div><!-- @@@enabled -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$expression -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="expression-prop"></a><span class="name">expression</span> : <span class="type">expression</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>An expression to implement custom filtering, it must evaluate to a boolean. It has the same syntax has a <a href="http://doc.qt.io/qt-5/qtqml-syntax-propertybinding.html">Property Binding</a> except it will be evaluated for each of the source model's rows. Rows that have their expression evaluating to <code>true</code> will be accepted by the model. Data for each row is exposed like for a delegate of a QML View.</p>
|
||||||
|
<p>This expression is reevaluated for a row every time its model data changes. When an external property (not <code>index</code> or in <code>model</code>) the expression depends on changes, the expression is reevaluated for every row of the source model. To capture the properties the expression depends on, the expression is first executed with invalid data and each property access is detected by the QML engine. This means that if a property is not accessed because of a conditional, it won't be captured and the expression won't be reevaluted when this property changes.</p>
|
||||||
|
<p>A workaround to this problem is to access all the properties the expressions depends unconditionally at the beggining of the expression.</p>
|
||||||
|
</div></div><!-- @@@expression -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$inverted -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="inverted-prop"></a><span class="name">inverted</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the filter is inverted. When a filter is inverted, a row normally accepted would be rejected, and vice-versa.</p>
|
||||||
|
<p>By default, filters are not inverted.</p>
|
||||||
|
</div></div><!-- @@@inverted -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- expressionrole.cpp -->
|
||||||
|
<title>List of All Members for ExpressionRole | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for ExpressionRole</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-expressionrole.html">ExpressionRole</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-expressionrole.html#expression-prop">expression</a></b></b> : expression</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-expressionrole.html#name-prop">name</a></b></b> : string</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,73 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- expressionrole.cpp -->
|
||||||
|
<title>ExpressionRole QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">ExpressionRole QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$ExpressionRole-brief -->
|
||||||
|
<p>A custom role computed from a javascript expression. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@ExpressionRole -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-singlerole.html">SingleRole</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-expressionrole-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-expressionrole.html#expression-prop">expression</a></b></b> : expression</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-expressionrole.html#name-prop">name</a></b></b> : string</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$ExpressionRole-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>An ExpressionRole is a <a href="qml-sortfilterproxymodel-proxyrole.html">ProxyRole</a> allowing to implement a custom role based on a javascript expression.</p>
|
||||||
|
<p>In the following example, the <code>c</code> role is computed by adding the <code>a</code> role and <code>b</code> role of the model :</p>
|
||||||
|
<pre class="cpp">SortFilterProxyModel {
|
||||||
|
sourceModel: numberModel
|
||||||
|
proxyRoles: ExpressionRole {
|
||||||
|
name: <span class="string">"c"</span>
|
||||||
|
expression: model<span class="operator">.</span>a <span class="operator">+</span> model<span class="operator">.</span>b
|
||||||
|
}
|
||||||
|
}</pre>
|
||||||
|
<!-- @@@ExpressionRole -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$expression -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="expression-prop"></a><span class="name">expression</span> : <span class="type">expression</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>An expression to implement a custom role. It has the same syntax has a <a href="http://doc.qt.io/qt-5/qtqml-syntax-propertybinding.html">Property Binding</a> except it will be evaluated for each of the source model's rows. The data for this role will be the retuned valued of the expression. Data for each row is exposed like for a delegate of a QML View.</p>
|
||||||
|
<p>This expression is reevaluated for a row every time its model data changes. When an external property (not <code>index</code> or in <code>model</code>) the expression depends on changes, the expression is reevaluated for every row of the source model. To capture the properties the expression depends on, the expression is first executed with invalid data and each property access is detected by the QML engine. This means that if a property is not accessed because of a conditional, it won't be captured and the expression won't be reevaluted when this property changes.</p>
|
||||||
|
<p>A workaround to this problem is to access all the properties the expressions depends unconditionally at the beggining of the expression.</p>
|
||||||
|
</div></div><!-- @@@expression -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$name -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="name-prop"></a><span class="name">name</span> : <span class="type">string</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the role name of the proxy role.</p>
|
||||||
|
</div></div><!-- @@@name -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- expressionsorter.cpp -->
|
||||||
|
<title>List of All Members for ExpressionSorter | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for ExpressionSorter</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-expressionsorter.html">ExpressionSorter</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-expressionsorter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-expressionsorter.html#expression-prop">expression</a></b></b> : expression</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-expressionsorter.html#priority-prop">priority</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-expressionsorter.html#sortOrder-prop">sortOrder</a></b></b> : Qt::SortOrder</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,101 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- expressionsorter.cpp -->
|
||||||
|
<title>ExpressionSorter QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">ExpressionSorter QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$ExpressionSorter-brief -->
|
||||||
|
<p>Sorts row with a custom javascript expression. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@ExpressionSorter -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-sorter.html">Sorter</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-expressionsorter-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-expressionsorter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-expressionsorter.html#expression-prop">expression</a></b></b> : expression</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-expressionsorter.html#priority-prop">priority</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-expressionsorter.html#sortOrder-prop">sortOrder</a></b></b> : Qt::SortOrder</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$ExpressionSorter-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>An ExpressionSorter is a <a href="qml-sortfilterproxymodel-sorter.html">Sorter</a> allowing to implement custom sorting based on a javascript expression.</p>
|
||||||
|
<!-- @@@ExpressionSorter -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$enabled -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the sorter is enabled. A disabled sorter will not change the order of the rows.</p>
|
||||||
|
<p>By default, sorters are enabled.</p>
|
||||||
|
</div></div><!-- @@@enabled -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$expression -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="expression-prop"></a><span class="name">expression</span> : <span class="type">expression</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>An expression to implement custom sorting. It must evaluate to a bool. It has the same syntax has a <a href="http://doc.qt.io/qt-5/qtqml-syntax-propertybinding.html">Property Binding</a>, except that it will be evaluated for each of the source model's rows. Model data is accessible for both rows with the <code>modelLeft</code>, and <code>modelRight</code> properties:</p>
|
||||||
|
<pre class="cpp">sorters: ExpressionSorter {
|
||||||
|
expression: {
|
||||||
|
<span class="keyword">return</span> modelLeft<span class="operator">.</span>someRole <span class="operator"><</span> modelRight<span class="operator">.</span>someRole;
|
||||||
|
}
|
||||||
|
}</pre>
|
||||||
|
<p>The <code>index</code> of the row is also available through <code>modelLeft</code> and <code>modelRight</code>.</p>
|
||||||
|
<p>The expression should return <code>true</code> if the value of the left item is less than the value of the right item, otherwise returns false.</p>
|
||||||
|
<p>This expression is reevaluated for a row every time its model data changes. When an external property (not <code>index*</code> or in <code>model*</code>) the expression depends on changes, the expression is reevaluated for every row of the source model. To capture the properties the expression depends on, the expression is first executed with invalid data and each property access is detected by the QML engine. This means that if a property is not accessed because of a conditional, it won't be captured and the expression won't be reevaluted when this property changes.</p>
|
||||||
|
<p>A workaround to this problem is to access all the properties the expressions depends unconditionally at the beggining of the expression.</p>
|
||||||
|
</div></div><!-- @@@expression -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$priority -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="priority-prop"></a><span class="name">priority</span> : <span class="type">int</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the sort priority of this sorter. Sorters with a higher priority are applied first. In case of equal priority, Sorters are ordered by their insertion order.</p>
|
||||||
|
<p>By default, the priority is 0.</p>
|
||||||
|
</div></div><!-- @@@priority -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$sortOrder -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="sortOrder-prop"></a><span class="name">sortOrder</span> : <span class="type">Qt::SortOrder</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the sort order of this sorter.</p>
|
||||||
|
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tbldscr">Description</th></tr>
|
||||||
|
<tr><td class="topAlign"><code>Qt.AscendingOrder</code></td><td class="topAlign">The items are sorted ascending e.g. starts with 'AAA' ends with 'ZZZ' in Latin-1 locales</td></tr>
|
||||||
|
<tr><td class="topAlign"><code>Qt.DescendingOrder</code></td><td class="topAlign">The items are sorted descending e.g. starts with 'ZZZ' ends with 'AAA' in Latin-1 locales</td></tr>
|
||||||
|
</table></div>
|
||||||
|
<p>By default, sorting is in ascending order.</p>
|
||||||
|
</div></div><!-- @@@sortOrder -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- filter.cpp -->
|
||||||
|
<title>List of All Members for Filter | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for Filter</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-filter.html">Filter</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-filter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-filter.html#inverted-prop">inverted</a></b></b> : bool</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,65 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- filter.cpp -->
|
||||||
|
<title>Filter QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">Filter QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$Filter-brief -->
|
||||||
|
<p>Base type for the <a href="qml-sortfilterproxymodel-sortfilterproxymodel.html">SortFilterProxyModel</a> filters. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@Filter -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-allof.html">AllOf</a>, <a href="qml-sortfilterproxymodel-anyof.html">AnyOf</a>, <a href="qml-sortfilterproxymodel-expressionfilter.html">ExpressionFilter</a>, <a href="qml-sortfilterproxymodel-indexfilter.html">IndexFilter</a>, and <a href="qml-sortfilterproxymodel-rolefilter.html">RoleFilter</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-filter-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-filter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-filter.html#inverted-prop">inverted</a></b></b> : bool</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$Filter-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>The Filter type cannot be used directly in a QML file. It exists to provide a set of common properties and methods, available across all the other filter types that inherit from it. Attempting to use the Filter type directly will result in an error.</p>
|
||||||
|
<!-- @@@Filter -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$enabled -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the filter is enabled. A disabled filter will accept every rows unconditionally (even if it's inverted).</p>
|
||||||
|
<p>By default, filters are enabled.</p>
|
||||||
|
</div></div><!-- @@@enabled -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$inverted -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="inverted-prop"></a><span class="name">inverted</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the filter is inverted. When a filter is inverted, a row normally accepted would be rejected, and vice-versa.</p>
|
||||||
|
<p>By default, filters are not inverted.</p>
|
||||||
|
</div></div><!-- @@@inverted -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- filtercontainer.cpp -->
|
||||||
|
<title>List of All Members for FilterContainer | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for FilterContainer</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-filtercontainer.html">FilterContainer</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-filtercontainer.html#container-attached-prop">container</a></b></b> : bool [attached]</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,61 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- filtercontainer.cpp -->
|
||||||
|
<title>FilterContainer QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#attached-properties">Attached Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
<li class="level2"><a href="#types-implementing-this-interface">Types implementing this interface:</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">FilterContainer QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$FilterContainer-brief -->
|
||||||
|
<p>Abstract interface for types containing <a href="qml-sortfilterproxymodel-filter.html">Filters</a>. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@FilterContainer -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-filtercontainer-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="attached-properties"></a>
|
||||||
|
<h2 id="attached-properties">Attached Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-filtercontainer.html#container-attached-prop">container</a></b></b> : bool</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$FilterContainer-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<a name="types-implementing-this-interface"></a>
|
||||||
|
<h3 id="types-implementing-this-interface">Types implementing this interface:</h3>
|
||||||
|
<div class="table"><table class="annotated">
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-allof.html">AllOf</a></p></td><td class="tblDescr"><p>Filter container accepting rows accepted by all its child filters</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-anyof.html">AnyOf</a></p></td><td class="tblDescr"><p>Filter container accepting rows accepted by at least one of its child filters</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-filterrole.html">FilterRole</a></p></td><td class="tblDescr"><p>A role resolving to true for rows matching all its filters</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-filtersorter.html">FilterSorter</a></p></td><td class="tblDescr"><p>Sorts rows based on if they match filters</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html">SortFilterProxyModel</a></p></td><td class="tblDescr"><p>Filters and sorts data coming from a source QAbstractItemModel</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-switchrole.html">SwitchRole</a></p></td><td class="tblDescr"><p>A role using Filter to conditionnaly compute its data</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
<!-- @@@FilterContainer -->
|
||||||
|
<h2>Attached Property Documentation</h2>
|
||||||
|
<!-- $$$container -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="container-attached-prop"></a><span class="name">FilterContainer.container</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This attached property allows you to include in a <a href="qml-sortfilterproxymodel-filtercontainer.html">FilterContainer</a> a <a href="qml-sortfilterproxymodel-filter.html">Filter</a> that has been instantiated outside of the <a href="qml-sortfilterproxymodel-filtercontainer.html">FilterContainer</a>, for example in an Instantiator.</p>
|
||||||
|
</div></div><!-- @@@container -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- filterrole.cpp -->
|
||||||
|
<title>List of All Members for FilterRole | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for FilterRole</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-filterrole.html">FilterRole</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-filterrole.html#filters-prop">filters</a></b></b> : list<Filter> [default]</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-filterrole.html#name-prop">name</a></b></b> : string</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,73 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- filterrole.cpp -->
|
||||||
|
<title>FilterRole QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">FilterRole QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$FilterRole-brief -->
|
||||||
|
<p>A role resolving to <code>true</code> for rows matching all its filters. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@FilterRole -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-singlerole.html">SingleRole</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-filterrole-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-filterrole.html#filters-prop">filters</a></b></b> : list<Filter></li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-filterrole.html#name-prop">name</a></b></b> : string</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$FilterRole-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>A FilterRole is a <a href="qml-sortfilterproxymodel-proxyrole.html">ProxyRole</a> that returns <code>true</code> for rows matching all its filters.</p>
|
||||||
|
<p>In the following example, the <code>isAdult</code> role will be equal to <code>true</code> if the <code>age</code> role is superior or equal to 18.</p>
|
||||||
|
<pre class="cpp">SortFilterProxyModel {
|
||||||
|
sourceModel: personModel
|
||||||
|
proxyRoles: FilterRole {
|
||||||
|
name: <span class="string">"isAdult"</span>
|
||||||
|
RangeFilter { roleName: <span class="string">"age"</span>; minimumValue: <span class="number">18</span>; minimumInclusive: <span class="keyword">true</span> }
|
||||||
|
}
|
||||||
|
}</pre>
|
||||||
|
<p><b>See also </b><a href="qml-sortfilterproxymodel-filtercontainer.html">FilterContainer</a>.</p>
|
||||||
|
<!-- @@@FilterRole -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$filters -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="filters-prop"></a><span class="qmldefault">[default] </span><span class="name">filters</span> : <span class="type">list</span><<span class="type"><a href="qml-sortfilterproxymodel-filter.html">Filter</a></span>></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the list of filters for this filter role. The data of this role will be equal to the <code>true</code> if all its filters match the model row, <code>false</code> otherwise.</p>
|
||||||
|
<p><b>See also </b><a href="qml-sortfilterproxymodel-filter.html">Filter</a> and <a href="qml-sortfilterproxymodel-filtercontainer.html">FilterContainer</a>.</p>
|
||||||
|
</div></div><!-- @@@filters -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$name -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="name-prop"></a><span class="name">name</span> : <span class="type">string</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the role name of the proxy role.</p>
|
||||||
|
</div></div><!-- @@@name -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- filtersorter.cpp -->
|
||||||
|
<title>List of All Members for FilterSorter | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for FilterSorter</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-filtersorter.html">FilterSorter</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-filtersorter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-filtersorter.html#filters-prop">filters</a></b></b> : list<Filter> [default]</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-filtersorter.html#priority-prop">priority</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-filtersorter.html#sortOrder-prop">sortOrder</a></b></b> : Qt::SortOrder</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,101 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- filtersorter.cpp -->
|
||||||
|
<title>FilterSorter QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">FilterSorter QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$FilterSorter-brief -->
|
||||||
|
<p>Sorts rows based on if they match filters. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@FilterSorter -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-sorter.html">Sorter</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-filtersorter-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-filtersorter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-filtersorter.html#filters-prop">filters</a></b></b> : list<Filter></li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-filtersorter.html#priority-prop">priority</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-filtersorter.html#sortOrder-prop">sortOrder</a></b></b> : Qt::SortOrder</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$FilterSorter-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>A FilterSorter is a <a href="qml-sortfilterproxymodel-sorter.html">Sorter</a> that orders row matching its filters before the rows not matching the filters.</p>
|
||||||
|
<p>In the following example, rows with their <code>favorite</code> role set to <code>true</code> will be ordered at the beginning :</p>
|
||||||
|
<pre class="cpp">SortFilterProxyModel {
|
||||||
|
sourceModel: contactModel
|
||||||
|
sorters: FilterSorter {
|
||||||
|
ValueFilter { roleName: <span class="string">"favorite"</span>; value: <span class="keyword">true</span> }
|
||||||
|
}
|
||||||
|
}</pre>
|
||||||
|
<p><b>See also </b><a href="qml-sortfilterproxymodel-filtercontainer.html">FilterContainer</a>.</p>
|
||||||
|
<!-- @@@FilterSorter -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$enabled -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the sorter is enabled. A disabled sorter will not change the order of the rows.</p>
|
||||||
|
<p>By default, sorters are enabled.</p>
|
||||||
|
</div></div><!-- @@@enabled -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$filters -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="filters-prop"></a><span class="qmldefault">[default] </span><span class="name">filters</span> : <span class="type">list</span><<span class="type"><a href="qml-sortfilterproxymodel-filter.html">Filter</a></span>></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the list of filters for this filter sorter. If a row match all this <a href="qml-sortfilterproxymodel-filtersorter.html">FilterSorter</a>'s filters, it will be ordered before rows not matching all the filters.</p>
|
||||||
|
<p><b>See also </b><a href="qml-sortfilterproxymodel-filter.html">Filter</a> and <a href="qml-sortfilterproxymodel-filtercontainer.html">FilterContainer</a>.</p>
|
||||||
|
</div></div><!-- @@@filters -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$priority -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="priority-prop"></a><span class="name">priority</span> : <span class="type">int</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the sort priority of this sorter. Sorters with a higher priority are applied first. In case of equal priority, Sorters are ordered by their insertion order.</p>
|
||||||
|
<p>By default, the priority is 0.</p>
|
||||||
|
</div></div><!-- @@@priority -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$sortOrder -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="sortOrder-prop"></a><span class="name">sortOrder</span> : <span class="type">Qt::SortOrder</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the sort order of this sorter.</p>
|
||||||
|
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tbldscr">Description</th></tr>
|
||||||
|
<tr><td class="topAlign"><code>Qt.AscendingOrder</code></td><td class="topAlign">The items are sorted ascending e.g. starts with 'AAA' ends with 'ZZZ' in Latin-1 locales</td></tr>
|
||||||
|
<tr><td class="topAlign"><code>Qt.DescendingOrder</code></td><td class="topAlign">The items are sorted descending e.g. starts with 'ZZZ' ends with 'AAA' in Latin-1 locales</td></tr>
|
||||||
|
</table></div>
|
||||||
|
<p>By default, sorting is in ascending order.</p>
|
||||||
|
</div></div><!-- @@@sortOrder -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- indexfilter.cpp -->
|
||||||
|
<title>List of All Members for IndexFilter | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for IndexFilter</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-indexfilter.html">IndexFilter</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-indexfilter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-indexfilter.html#inverted-prop">inverted</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-indexfilter.html#maximumIndex-prop">maximumIndex</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-indexfilter.html#minimumIndex-prop">minimumIndex</a></b></b> : int</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,104 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- indexfilter.cpp -->
|
||||||
|
<title>IndexFilter QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">IndexFilter QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$IndexFilter-brief -->
|
||||||
|
<p>Filters rows based on their source index. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@IndexFilter -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-filter.html">Filter</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-indexfilter-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-indexfilter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-indexfilter.html#inverted-prop">inverted</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-indexfilter.html#maximumIndex-prop">maximumIndex</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-indexfilter.html#minimumIndex-prop">minimumIndex</a></b></b> : int</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$IndexFilter-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>An IndexFilter is a filter allowing contents to be filtered based on their source model index.</p>
|
||||||
|
<p>In the following example, only the first row of the source model will be accepted:</p>
|
||||||
|
<pre class="cpp">SortFilterProxyModel {
|
||||||
|
sourceModel: contactModel
|
||||||
|
filters: IndexFilter {
|
||||||
|
maximumIndex: <span class="number">0</span>
|
||||||
|
}
|
||||||
|
}</pre>
|
||||||
|
<!-- @@@IndexFilter -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$enabled -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the filter is enabled. A disabled filter will accept every rows unconditionally (even if it's inverted).</p>
|
||||||
|
<p>By default, filters are enabled.</p>
|
||||||
|
</div></div><!-- @@@enabled -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$inverted -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="inverted-prop"></a><span class="name">inverted</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the filter is inverted. When a filter is inverted, a row normally accepted would be rejected, and vice-versa.</p>
|
||||||
|
<p>By default, filters are not inverted.</p>
|
||||||
|
</div></div><!-- @@@inverted -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$maximumIndex -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="maximumIndex-prop"></a><span class="name">maximumIndex</span> : <span class="type">int</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the maximumIndex of the filter. Rows with a source index higher than <code>maximumIndex</code> will be rejected.</p>
|
||||||
|
<p>If <code>maximumIndex</code> is negative, it is counted from the end of the source model, meaning that:</p>
|
||||||
|
<pre class="cpp">maximumIndex: <span class="operator">-</span><span class="number">1</span></pre>
|
||||||
|
<p>is equivalent to :</p>
|
||||||
|
<pre class="cpp">maximumIndex: sourceModel<span class="operator">.</span>count <span class="operator">-</span> <span class="number">1</span></pre>
|
||||||
|
<p>By default, no value is set.</p>
|
||||||
|
</div></div><!-- @@@maximumIndex -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$minimumIndex -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="minimumIndex-prop"></a><span class="name">minimumIndex</span> : <span class="type">int</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the minimumIndex of the filter. Rows with a source index lower than <code>minimumIndex</code> will be rejected.</p>
|
||||||
|
<p>If <code>minimumIndex</code> is negative, it is counted from the end of the source model, meaning that :</p>
|
||||||
|
<pre class="cpp">minimumIndex: <span class="operator">-</span><span class="number">1</span></pre>
|
||||||
|
<p>is equivalent to :</p>
|
||||||
|
<pre class="cpp">minimumIndex: sourceModel<span class="operator">.</span>count <span class="operator">-</span> <span class="number">1</span></pre>
|
||||||
|
<p>By default, no value is set.</p>
|
||||||
|
</div></div><!-- @@@minimumIndex -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- joinrole.cpp -->
|
||||||
|
<title>List of All Members for JoinRole | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for JoinRole</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-joinrole.html">JoinRole</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-joinrole.html#name-prop">name</a></b></b> : string</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-joinrole.html#roleNames-prop">roleNames</a></b></b> : list<string></li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-joinrole.html#separator-prop">separator</a></b></b> : string</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,83 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- joinrole.cpp -->
|
||||||
|
<title>JoinRole QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">JoinRole QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$JoinRole-brief -->
|
||||||
|
<p>a role made from concatenating other roles. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@JoinRole -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-singlerole.html">SingleRole</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-joinrole-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-joinrole.html#name-prop">name</a></b></b> : string</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-joinrole.html#roleNames-prop">roleNames</a></b></b> : list<string></li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-joinrole.html#separator-prop">separator</a></b></b> : string</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$JoinRole-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>A JoinRole is a simple <a href="qml-sortfilterproxymodel-proxyrole.html">ProxyRole</a> that concatenates other roles.</p>
|
||||||
|
<p>In the following example, the <code>fullName</code> role is computed by the concatenation of the <code>firstName</code> role and the <code>lastName</code> role separated by a space :</p>
|
||||||
|
<pre class="cpp">SortFilterProxyModel {
|
||||||
|
sourceModel: contactModel
|
||||||
|
proxyRoles: JoinRole {
|
||||||
|
name: <span class="string">"fullName"</span>
|
||||||
|
roleNames: <span class="operator">[</span><span class="string">"firstName"</span><span class="operator">,</span> <span class="string">"lastName"</span><span class="operator">]</span>
|
||||||
|
}
|
||||||
|
}</pre>
|
||||||
|
<!-- @@@JoinRole -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$name -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="name-prop"></a><span class="name">name</span> : <span class="type">string</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the role name of the proxy role.</p>
|
||||||
|
</div></div><!-- @@@name -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$roleNames -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="roleNames-prop"></a><span class="name">roleNames</span> : <span class="type">list</span><<span class="type">string</span>></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the role names that are joined by this role.</p>
|
||||||
|
</div></div><!-- @@@roleNames -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$separator -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="separator-prop"></a><span class="name">separator</span> : <span class="type">string</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the separator that is used to join the roles specified in <a href="qml-sortfilterproxymodel-joinrole.html#roleNames-prop">roleNames</a>.</p>
|
||||||
|
<p>By default, it's a space.</p>
|
||||||
|
</div></div><!-- @@@separator -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- proxyrole.cpp -->
|
||||||
|
<title>List of All Members for ProxyRole | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for ProxyRole</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-proxyrole.html">ProxyRole</a>, including inherited members.</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- proxyrole.cpp -->
|
||||||
|
<title>ProxyRole QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">ProxyRole QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$ProxyRole-brief -->
|
||||||
|
<p>Base type for the <a href="qml-sortfilterproxymodel-sortfilterproxymodel.html">SortFilterProxyModel</a> proxy roles. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@ProxyRole -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-regexprole.html">RegExpRole</a> and <a href="qml-sortfilterproxymodel-singlerole.html">SingleRole</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-proxyrole-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$ProxyRole-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>The ProxyRole type cannot be used directly in a QML file. It exists to provide a set of common properties and methods, available across all the other proxy role types that inherit from it. Attempting to use the ProxyRole type directly will result in an error.</p>
|
||||||
|
<!-- @@@ProxyRole -->
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- rangefilter.cpp -->
|
||||||
|
<title>List of All Members for RangeFilter | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for RangeFilter</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-rangefilter.html">RangeFilter</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rangefilter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rangefilter.html#inverted-prop">inverted</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rangefilter.html#maximumInclusive-prop">maximumInclusive</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rangefilter.html#maximumValue-prop">maximumValue</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rangefilter.html#minimumInclusive-prop">minimumInclusive</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rangefilter.html#minimumValue-prop">minimumValue</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rangefilter.html#roleName-prop">roleName</a></b></b> : string</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,141 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- rangefilter.cpp -->
|
||||||
|
<title>RangeFilter QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">RangeFilter QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$RangeFilter-brief -->
|
||||||
|
<p>Filters rows between boundary values. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@RangeFilter -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-rolefilter.html">RoleFilter</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-rangefilter-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rangefilter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rangefilter.html#inverted-prop">inverted</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rangefilter.html#maximumInclusive-prop">maximumInclusive</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rangefilter.html#maximumValue-prop">maximumValue</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rangefilter.html#minimumInclusive-prop">minimumInclusive</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rangefilter.html#minimumValue-prop">minimumValue</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rangefilter.html#roleName-prop">roleName</a></b></b> : string</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$RangeFilter-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>A RangeFilter is a <a href="qml-sortfilterproxymodel-rolefilter.html">RoleFilter</a> that accepts rows if their data is between the filter's minimum and maximum value.</p>
|
||||||
|
<p>In the following example, only rows with their <code>price</code> role set to a value between the tow boundary of the slider will be accepted :</p>
|
||||||
|
<pre class="cpp">RangeSlider {
|
||||||
|
id: priceRangeSlider
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
sourceModel: priceModel
|
||||||
|
filters: RangeFilter {
|
||||||
|
roleName: <span class="string">"price"</span>
|
||||||
|
minimumValue: priceRangeSlider<span class="operator">.</span>first<span class="operator">.</span>value
|
||||||
|
maximumValue: priceRangeSlider<span class="operator">.</span>second<span class="operator">.</span>value
|
||||||
|
}
|
||||||
|
}</pre>
|
||||||
|
<!-- @@@RangeFilter -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$enabled -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the filter is enabled. A disabled filter will accept every rows unconditionally (even if it's inverted).</p>
|
||||||
|
<p>By default, filters are enabled.</p>
|
||||||
|
</div></div><!-- @@@enabled -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$inverted -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="inverted-prop"></a><span class="name">inverted</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the filter is inverted. When a filter is inverted, a row normally accepted would be rejected, and vice-versa.</p>
|
||||||
|
<p>By default, filters are not inverted.</p>
|
||||||
|
</div></div><!-- @@@inverted -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$maximumInclusive -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="maximumInclusive-prop"></a><span class="name">maximumInclusive</span> : <span class="type">int</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the <a href="qml-sortfilterproxymodel-rangefilter.html#minimumValue-prop">minimumValue</a> is inclusive.</p>
|
||||||
|
<p>By default, the <a href="qml-sortfilterproxymodel-rangefilter.html#minimumValue-prop">minimumValue</a> is inclusive.</p>
|
||||||
|
<p><b>See also </b><a href="qml-sortfilterproxymodel-rangefilter.html#minimumValue-prop">minimumValue</a>.</p>
|
||||||
|
</div></div><!-- @@@maximumInclusive -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$maximumValue -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="maximumValue-prop"></a><span class="name">maximumValue</span> : <span class="type">int</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the maximumValue of the filter. Rows with a value higher than <code>maximumValue</code> will be rejected.</p>
|
||||||
|
<p>By default, no value is set.</p>
|
||||||
|
<p><b>See also </b><a href="qml-sortfilterproxymodel-rangefilter.html#maximumInclusive-prop">maximumInclusive</a>.</p>
|
||||||
|
</div></div><!-- @@@maximumValue -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$minimumInclusive -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="minimumInclusive-prop"></a><span class="name">minimumInclusive</span> : <span class="type">int</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the <a href="qml-sortfilterproxymodel-rangefilter.html#minimumValue-prop">minimumValue</a> is inclusive.</p>
|
||||||
|
<p>By default, the <a href="qml-sortfilterproxymodel-rangefilter.html#minimumValue-prop">minimumValue</a> is inclusive.</p>
|
||||||
|
<p><b>See also </b><a href="qml-sortfilterproxymodel-rangefilter.html#minimumValue-prop">minimumValue</a>.</p>
|
||||||
|
</div></div><!-- @@@minimumInclusive -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$minimumValue -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="minimumValue-prop"></a><span class="name">minimumValue</span> : <span class="type">int</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the minimumValue of the filter. Rows with a value lower than <code>minimumValue</code> will be rejected.</p>
|
||||||
|
<p>By default, no value is set.</p>
|
||||||
|
<p><b>See also </b><a href="qml-sortfilterproxymodel-rangefilter.html#minimumInclusive-prop">minimumInclusive</a>.</p>
|
||||||
|
</div></div><!-- @@@minimumValue -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$roleName -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="roleName-prop"></a><span class="name">roleName</span> : <span class="type">string</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the role name that the filter is using to query the source model's data when filtering items.</p>
|
||||||
|
</div></div><!-- @@@roleName -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- regexpfilter.cpp -->
|
||||||
|
<title>List of All Members for RegExpFilter | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for RegExpFilter</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-regexpfilter.html">RegExpFilter</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-regexpfilter.html#caseSensitivity-prop">caseSensitivity</a></b></b> : Qt::CaseSensitivity</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-regexpfilter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-regexpfilter.html#inverted-prop">inverted</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-regexpfilter.html#pattern-prop">pattern</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-regexpfilter.html#roleName-prop">roleName</a></b></b> : string</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-regexpfilter.html#syntax-prop">syntax</a></b></b> : enum</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,132 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- regexpfilter.cpp -->
|
||||||
|
<title>RegExpFilter QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">RegExpFilter QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$RegExpFilter-brief -->
|
||||||
|
<p>Filters rows matching a regular expression. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@RegExpFilter -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-rolefilter.html">RoleFilter</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-regexpfilter-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-regexpfilter.html#caseSensitivity-prop">caseSensitivity</a></b></b> : Qt::CaseSensitivity</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-regexpfilter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-regexpfilter.html#inverted-prop">inverted</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-regexpfilter.html#pattern-prop">pattern</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-regexpfilter.html#roleName-prop">roleName</a></b></b> : string</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-regexpfilter.html#syntax-prop">syntax</a></b></b> : enum</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$RegExpFilter-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>A RegExpFilter is a <a href="qml-sortfilterproxymodel-rolefilter.html">RoleFilter</a> that accepts rows matching a regular rexpression.</p>
|
||||||
|
<p>In the following example, only rows with their <code>lastName</code> role beggining with the content of textfield the will be accepted:</p>
|
||||||
|
<pre class="cpp">TextField {
|
||||||
|
id: nameTextField
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
sourceModel: contactModel
|
||||||
|
filters: RegExpFilter {
|
||||||
|
roleName: <span class="string">"lastName"</span>
|
||||||
|
pattern: <span class="string">"^"</span> <span class="operator">+</span> nameTextField<span class="operator">.</span>displayText
|
||||||
|
}
|
||||||
|
}</pre>
|
||||||
|
<!-- @@@RegExpFilter -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$caseSensitivity -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="caseSensitivity-prop"></a><span class="name">caseSensitivity</span> : <span class="type">Qt::CaseSensitivity</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the caseSensitivity of the filter.</p>
|
||||||
|
</div></div><!-- @@@caseSensitivity -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$enabled -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the filter is enabled. A disabled filter will accept every rows unconditionally (even if it's inverted).</p>
|
||||||
|
<p>By default, filters are enabled.</p>
|
||||||
|
</div></div><!-- @@@enabled -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$inverted -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="inverted-prop"></a><span class="name">inverted</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the filter is inverted. When a filter is inverted, a row normally accepted would be rejected, and vice-versa.</p>
|
||||||
|
<p>By default, filters are not inverted.</p>
|
||||||
|
</div></div><!-- @@@inverted -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$pattern -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="pattern-prop"></a><span class="name">pattern</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>The pattern used to filter the contents of the source model.</p>
|
||||||
|
<p><b>See also </b><a href="qml-sortfilterproxymodel-regexpfilter.html#syntax-prop">syntax</a>.</p>
|
||||||
|
</div></div><!-- @@@pattern -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$roleName -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="roleName-prop"></a><span class="name">roleName</span> : <span class="type">string</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the role name that the filter is using to query the source model's data when filtering items.</p>
|
||||||
|
</div></div><!-- @@@roleName -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$syntax -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="syntax-prop"></a><span class="name">syntax</span> : <span class="type">enum</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>The pattern used to filter the contents of the source model.</p>
|
||||||
|
<p>Only the source model's value having their <a href="qml-sortfilterproxymodel-regexpfilter.html#roleName-prop">RoleFilter::roleName</a> data matching this <a href="qml-sortfilterproxymodel-regexpfilter.html#pattern-prop">pattern</a> with the specified syntax will be kept.</p>
|
||||||
|
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tbldscr">Description</th></tr>
|
||||||
|
<tr><td class="topAlign"><code>RegExpFilter.RegExp</code></td><td class="topAlign">A rich Perl-like pattern matching syntax. This is the default.</td></tr>
|
||||||
|
<tr><td class="topAlign"><code>RegExpFilter.Wildcard</code></td><td class="topAlign">This provides a simple pattern matching syntax similar to that used by shells (command interpreters) for "file globbing".</td></tr>
|
||||||
|
<tr><td class="topAlign"><code>RegExpFilter.FixedString</code></td><td class="topAlign">The pattern is a fixed string. This is equivalent to using the RegExp pattern on a string in which all metacharacters are escaped.</td></tr>
|
||||||
|
<tr><td class="topAlign"><code>RegExpFilter.RegExp2</code></td><td class="topAlign">Like RegExp, but with greedy quantifiers.</td></tr>
|
||||||
|
<tr><td class="topAlign"><code>RegExpFilter.WildcardUnix</code></td><td class="topAlign">This is similar to Wildcard but with the behavior of a Unix shell. The wildcard characters can be escaped with the character "".</td></tr>
|
||||||
|
<tr><td class="topAlign"><code>RegExpFilter.W3CXmlSchema11</code></td><td class="topAlign">The pattern is a regular expression as defined by the W3C XML Schema 1.1 specification.</td></tr>
|
||||||
|
</table></div>
|
||||||
|
<p><b>See also </b><a href="qml-sortfilterproxymodel-regexpfilter.html#pattern-prop">pattern</a>.</p>
|
||||||
|
</div></div><!-- @@@syntax -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- regexprole.cpp -->
|
||||||
|
<title>List of All Members for RegExpRole | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for RegExpRole</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-regexprole.html">RegExpRole</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-regexprole.html#caseSensitivity-prop">caseSensitivity</a></b></b> : Qt::CaseSensitivity</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-regexprole.html#pattern-prop">pattern</a></b></b> : QString</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-regexprole.html#roleName-prop">roleName</a></b></b> : QString</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,82 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- regexprole.cpp -->
|
||||||
|
<title>RegExpRole QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">RegExpRole QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$RegExpRole-brief -->
|
||||||
|
<p>A <a href="qml-sortfilterproxymodel-proxyrole.html">ProxyRole</a> extracting data from a source role via a regular expression. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@RegExpRole -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-proxyrole.html">ProxyRole</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-regexprole-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-regexprole.html#caseSensitivity-prop">caseSensitivity</a></b></b> : Qt::CaseSensitivity</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-regexprole.html#pattern-prop">pattern</a></b></b> : QString</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-regexprole.html#roleName-prop">roleName</a></b></b> : QString</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$RegExpRole-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>A RegExpRole is a <a href="qml-sortfilterproxymodel-proxyrole.html">ProxyRole</a> that provides a role for each named capture group of its regular expression <a href="qml-sortfilterproxymodel-regexprole.html#pattern-prop">pattern</a>.</p>
|
||||||
|
<p>In the following example, the <code>date</code> role of the source model will be extracted in 3 roles in the proxy moodel: <code>year</code>, <code>month</code> and <code>day</code>.</p>
|
||||||
|
<pre class="cpp">SortFilterProxyModel {
|
||||||
|
sourceModel: eventModel
|
||||||
|
proxyRoles: RegExpRole {
|
||||||
|
roleName: <span class="string">"date"</span>
|
||||||
|
pattern: <span class="string">"(?<year>\\d{4})-(?<month>\\d{2})-(?<day>\\d{2})"</span>
|
||||||
|
}
|
||||||
|
}</pre>
|
||||||
|
<!-- @@@RegExpRole -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$caseSensitivity -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="caseSensitivity-prop"></a><span class="name">caseSensitivity</span> : <span class="type">Qt::CaseSensitivity</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the caseSensitivity of the regular expression.</p>
|
||||||
|
</div></div><!-- @@@caseSensitivity -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$pattern -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="pattern-prop"></a><span class="name">pattern</span> : <span class="type">QString</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the pattern of the regular expression of this <a href="qml-sortfilterproxymodel-regexprole.html">RegExpRole</a>. The <a href="qml-sortfilterproxymodel-regexprole.html">RegExpRole</a> will expose a role for each of the named capture group of the pattern.</p>
|
||||||
|
</div></div><!-- @@@pattern -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$roleName -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="roleName-prop"></a><span class="name">roleName</span> : <span class="type">QString</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the role name that the <a href="qml-sortfilterproxymodel-regexprole.html">RegExpRole</a> is using to query the source model's data to extract new roles from.</p>
|
||||||
|
</div></div><!-- @@@roleName -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- rolefilter.cpp -->
|
||||||
|
<title>List of All Members for RoleFilter | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for RoleFilter</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-rolefilter.html">RoleFilter</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rolefilter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rolefilter.html#inverted-prop">inverted</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rolefilter.html#roleName-prop">roleName</a></b></b> : string</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,77 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- rolefilter.cpp -->
|
||||||
|
<title>RoleFilter QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">RoleFilter QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$RoleFilter-brief -->
|
||||||
|
<p>Base type for filters based on a source model role. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@RoleFilter -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-filter.html">Filter</a></p>
|
||||||
|
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-rangefilter.html">RangeFilter</a>, <a href="qml-sortfilterproxymodel-regexpfilter.html">RegExpFilter</a>, and <a href="qml-sortfilterproxymodel-valuefilter.html">ValueFilter</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-rolefilter-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rolefilter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rolefilter.html#inverted-prop">inverted</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rolefilter.html#roleName-prop">roleName</a></b></b> : string</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$RoleFilter-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>The RoleFilter type cannot be used directly in a QML file. It exists to provide a set of common properties and methods, available across all the other filter types that inherit from it. Attempting to use the RoleFilter type directly will result in an error.</p>
|
||||||
|
<!-- @@@RoleFilter -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$enabled -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the filter is enabled. A disabled filter will accept every rows unconditionally (even if it's inverted).</p>
|
||||||
|
<p>By default, filters are enabled.</p>
|
||||||
|
</div></div><!-- @@@enabled -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$inverted -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="inverted-prop"></a><span class="name">inverted</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the filter is inverted. When a filter is inverted, a row normally accepted would be rejected, and vice-versa.</p>
|
||||||
|
<p>By default, filters are not inverted.</p>
|
||||||
|
</div></div><!-- @@@inverted -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$roleName -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="roleName-prop"></a><span class="name">roleName</span> : <span class="type">string</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the role name that the filter is using to query the source model's data when filtering items.</p>
|
||||||
|
</div></div><!-- @@@roleName -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- rolesorter.cpp -->
|
||||||
|
<title>List of All Members for RoleSorter | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for RoleSorter</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-rolesorter.html">RoleSorter</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rolesorter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rolesorter.html#priority-prop">priority</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rolesorter.html#roleName-prop">roleName</a></b></b> : string</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rolesorter.html#sortOrder-prop">sortOrder</a></b></b> : Qt::SortOrder</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,98 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- rolesorter.cpp -->
|
||||||
|
<title>RoleSorter QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">RoleSorter QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$RoleSorter-brief -->
|
||||||
|
<p>Sorts rows based on a source model role. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@RoleSorter -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-sorter.html">Sorter</a></p>
|
||||||
|
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-stringsorter.html">StringSorter</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-rolesorter-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rolesorter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rolesorter.html#priority-prop">priority</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rolesorter.html#roleName-prop">roleName</a></b></b> : string</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rolesorter.html#sortOrder-prop">sortOrder</a></b></b> : Qt::SortOrder</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$RoleSorter-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>A RoleSorter is a simple <a href="qml-sortfilterproxymodel-sorter.html">Sorter</a> that sorts rows based on a source model role.</p>
|
||||||
|
<p>In the following example, rows with be sorted by their <code>lastName</code> role :</p>
|
||||||
|
<pre class="cpp">SortFilterProxyModel {
|
||||||
|
sourceModel: contactModel
|
||||||
|
sorters: RoleSorter { roleName: <span class="string">"lastName"</span> }
|
||||||
|
}</pre>
|
||||||
|
<!-- @@@RoleSorter -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$enabled -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the sorter is enabled. A disabled sorter will not change the order of the rows.</p>
|
||||||
|
<p>By default, sorters are enabled.</p>
|
||||||
|
</div></div><!-- @@@enabled -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$priority -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="priority-prop"></a><span class="name">priority</span> : <span class="type">int</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the sort priority of this sorter. Sorters with a higher priority are applied first. In case of equal priority, Sorters are ordered by their insertion order.</p>
|
||||||
|
<p>By default, the priority is 0.</p>
|
||||||
|
</div></div><!-- @@@priority -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$roleName -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="roleName-prop"></a><span class="name">roleName</span> : <span class="type">string</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the role name that the sorter is using to query the source model's data when sorting items.</p>
|
||||||
|
</div></div><!-- @@@roleName -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$sortOrder -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="sortOrder-prop"></a><span class="name">sortOrder</span> : <span class="type">Qt::SortOrder</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the sort order of this sorter.</p>
|
||||||
|
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tbldscr">Description</th></tr>
|
||||||
|
<tr><td class="topAlign"><code>Qt.AscendingOrder</code></td><td class="topAlign">The items are sorted ascending e.g. starts with 'AAA' ends with 'ZZZ' in Latin-1 locales</td></tr>
|
||||||
|
<tr><td class="topAlign"><code>Qt.DescendingOrder</code></td><td class="topAlign">The items are sorted descending e.g. starts with 'ZZZ' ends with 'AAA' in Latin-1 locales</td></tr>
|
||||||
|
</table></div>
|
||||||
|
<p>By default, sorting is in ascending order.</p>
|
||||||
|
</div></div><!-- @@@sortOrder -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- singlerole.cpp -->
|
||||||
|
<title>List of All Members for SingleRole | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for SingleRole</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-singlerole.html">SingleRole</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-singlerole.html#name-prop">name</a></b></b> : string</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,53 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- singlerole.cpp -->
|
||||||
|
<title>SingleRole QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">SingleRole QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$SingleRole-brief -->
|
||||||
|
<p>Base type for the <a href="qml-sortfilterproxymodel-sortfilterproxymodel.html">SortFilterProxyModel</a> proxy roles defining a single role. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@SingleRole -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-proxyrole.html">ProxyRole</a></p>
|
||||||
|
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-expressionrole.html">ExpressionRole</a>, <a href="qml-sortfilterproxymodel-filterrole.html">FilterRole</a>, <a href="qml-sortfilterproxymodel-joinrole.html">JoinRole</a>, and <a href="qml-sortfilterproxymodel-switchrole.html">SwitchRole</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-singlerole-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-singlerole.html#name-prop">name</a></b></b> : string</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$SingleRole-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>SingleRole is a convenience base class for proxy roles who define a single role. It cannot be used directly in a QML file. It exists to provide a set of common properties and methods, available across all the other proxy role types that inherit from it. Attempting to use the SingleRole type directly will result in an error.</p>
|
||||||
|
<!-- @@@SingleRole -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$name -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="name-prop"></a><span class="name">name</span> : <span class="type">string</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the role name of the proxy role.</p>
|
||||||
|
</div></div><!-- @@@name -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- sorter.cpp -->
|
||||||
|
<title>List of All Members for Sorter | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for Sorter</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-sorter.html">Sorter</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sorter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sorter.html#priority-prop">priority</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sorter.html#sortOrder-prop">sortOrder</a></b></b> : Qt::SortOrder</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,81 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- sorter.cpp -->
|
||||||
|
<title>Sorter QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">Sorter QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$Sorter-brief -->
|
||||||
|
<p>Base type for the <a href="qml-sortfilterproxymodel-sortfilterproxymodel.html">SortFilterProxyModel</a> sorters. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@Sorter -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-expressionsorter.html">ExpressionSorter</a>, <a href="qml-sortfilterproxymodel-filtersorter.html">FilterSorter</a>, and <a href="qml-sortfilterproxymodel-rolesorter.html">RoleSorter</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-sorter-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sorter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sorter.html#priority-prop">priority</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sorter.html#sortOrder-prop">sortOrder</a></b></b> : Qt::SortOrder</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$Sorter-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>The Sorter type cannot be used directly in a QML file. It exists to provide a set of common properties and methods, available across all the other sorters types that inherit from it. Attempting to use the Sorter type directly will result in an error.</p>
|
||||||
|
<!-- @@@Sorter -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$enabled -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the sorter is enabled. A disabled sorter will not change the order of the rows.</p>
|
||||||
|
<p>By default, sorters are enabled.</p>
|
||||||
|
</div></div><!-- @@@enabled -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$priority -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="priority-prop"></a><span class="name">priority</span> : <span class="type">int</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the sort priority of this sorter. Sorters with a higher priority are applied first. In case of equal priority, Sorters are ordered by their insertion order.</p>
|
||||||
|
<p>By default, the priority is 0.</p>
|
||||||
|
</div></div><!-- @@@priority -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$sortOrder -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="sortOrder-prop"></a><span class="name">sortOrder</span> : <span class="type">Qt::SortOrder</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the sort order of this sorter.</p>
|
||||||
|
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tbldscr">Description</th></tr>
|
||||||
|
<tr><td class="topAlign"><code>Qt.AscendingOrder</code></td><td class="topAlign">The items are sorted ascending e.g. starts with 'AAA' ends with 'ZZZ' in Latin-1 locales</td></tr>
|
||||||
|
<tr><td class="topAlign"><code>Qt.DescendingOrder</code></td><td class="topAlign">The items are sorted descending e.g. starts with 'ZZZ' ends with 'AAA' in Latin-1 locales</td></tr>
|
||||||
|
</table></div>
|
||||||
|
<p>By default, sorting is in ascending order.</p>
|
||||||
|
</div></div><!-- @@@sortOrder -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- sortercontainer.cpp -->
|
||||||
|
<title>List of All Members for SorterContainer | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for SorterContainer</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-sortercontainer.html">SorterContainer</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sortercontainer.html#container-attached-prop">container</a></b></b> : bool [attached]</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,56 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- sortercontainer.cpp -->
|
||||||
|
<title>SorterContainer QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#attached-properties">Attached Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
<li class="level2"><a href="#types-implementing-this-interface">Types implementing this interface:</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">SorterContainer QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$SorterContainer-brief -->
|
||||||
|
<p>Abstract interface for types containing <a href="qml-sortfilterproxymodel-sorter.html">Sorters</a>. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@SorterContainer -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-sortercontainer-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="attached-properties"></a>
|
||||||
|
<h2 id="attached-properties">Attached Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sortercontainer.html#container-attached-prop">container</a></b></b> : bool</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$SorterContainer-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<a name="types-implementing-this-interface"></a>
|
||||||
|
<h3 id="types-implementing-this-interface">Types implementing this interface:</h3>
|
||||||
|
<div class="table"><table class="annotated">
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html">SortFilterProxyModel</a></p></td><td class="tblDescr"><p>Filters and sorts data coming from a source QAbstractItemModel</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
<!-- @@@SorterContainer -->
|
||||||
|
<h2>Attached Property Documentation</h2>
|
||||||
|
<!-- $$$container -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="container-attached-prop"></a><span class="name">SorterContainer.container</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This attached property allows you to include in a <a href="qml-sortfilterproxymodel-sortercontainer.html">SorterContainer</a> a <a href="qml-sortfilterproxymodel-sorter.html">Sorter</a> that has been instantiated outside of the <a href="qml-sortfilterproxymodel-sortercontainer.html">SorterContainer</a>, for example in an Instantiator.</p>
|
||||||
|
</div></div><!-- @@@container -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- qqmlsortfilterproxymodel.cpp -->
|
||||||
|
<title>List of All Members for SortFilterProxyModel | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for SortFilterProxyModel</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-sortfilterproxymodel.html">SortFilterProxyModel</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#count-prop">count</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#delayed-prop">delayed</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#filters-prop">filters</a></b></b> : list<Filter></li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#proxyRoles-prop">proxyRoles</a></b></b> : list<ProxyRole></li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#sortRoleName-prop">sortRoleName</a></b></b> : string</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#sorters-prop">sorters</a></b></b> : list<Sorter></li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#sourceModel-prop">sourceModel</a></b></b> : QAbstractItemModel*</li>
|
||||||
|
<li class="fn">variant <b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#get-method-1">get</a></b></b>(<i>row</i>, string <i>roleName</i>)</li>
|
||||||
|
<li class="fn">object <b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#get-method">get</a></b></b>(<i>row</i>)</li>
|
||||||
|
<li class="fn">int <b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#mapFromSource-method-1">mapFromSource</a></b></b>(<i>sourceRow</i>)</li>
|
||||||
|
<li class="fn">QModelIndex <b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#mapFromSource-method">mapFromSource</a></b></b>(<i>sourceIndex</i>)</li>
|
||||||
|
<li class="fn">int <b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#mapToSource-method-1">mapToSource</a></b></b>(<i>proxyRow</i>)</li>
|
||||||
|
<li class="fn">index <b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#mapToSource-method">mapToSource</a></b></b>(<i>proxyIndex</i>)</li>
|
||||||
|
<li class="fn">int <b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#roleForName-method">roleForName</a></b></b>(<i>roleName</i>)</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,206 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- qqmlsortfilterproxymodel.cpp -->
|
||||||
|
<title>SortFilterProxyModel QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#methods">Methods</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">SortFilterProxyModel QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$SortFilterProxyModel-brief -->
|
||||||
|
<p>Filters and sorts data coming from a source <a href="http://doc.qt.io/qt-5/qabstractitemmodel.html">QAbstractItemModel</a>. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@SortFilterProxyModel -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-sortfilterproxymodel-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#count-prop">count</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#delayed-prop">delayed</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#filters-prop">filters</a></b></b> : list<Filter></li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#proxyRoles-prop">proxyRoles</a></b></b> : list<ProxyRole></li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#sortRoleName-prop">sortRoleName</a></b></b> : string</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#sorters-prop">sorters</a></b></b> : list<Sorter></li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#sourceModel-prop">sourceModel</a></b></b> : QAbstractItemModel*</li>
|
||||||
|
</ul>
|
||||||
|
<a name="methods"></a>
|
||||||
|
<h2 id="methods">Methods</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn">variant <b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#get-method-1">get</a></b></b>(<i>row</i>, string <i>roleName</i>)</li>
|
||||||
|
<li class="fn">object <b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#get-method">get</a></b></b>(<i>row</i>)</li>
|
||||||
|
<li class="fn">int <b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#mapFromSource-method-1">mapFromSource</a></b></b>(<i>sourceRow</i>)</li>
|
||||||
|
<li class="fn">QModelIndex <b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#mapFromSource-method">mapFromSource</a></b></b>(<i>sourceIndex</i>)</li>
|
||||||
|
<li class="fn">int <b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#mapToSource-method-1">mapToSource</a></b></b>(<i>proxyRow</i>)</li>
|
||||||
|
<li class="fn">index <b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#mapToSource-method">mapToSource</a></b></b>(<i>proxyIndex</i>)</li>
|
||||||
|
<li class="fn">int <b><b><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#roleForName-method">roleForName</a></b></b>(<i>roleName</i>)</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$SortFilterProxyModel-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>The SortFilterProxyModel type provides support for filtering and sorting data coming from a source model.</p>
|
||||||
|
<p><b>See also </b><a href="qml-sortfilterproxymodel-filtercontainer.html">FilterContainer</a> and <a href="qml-sortfilterproxymodel-sortercontainer.html">SorterContainer</a>.</p>
|
||||||
|
<!-- @@@SortFilterProxyModel -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$count -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="count-prop"></a><span class="name">count</span> : <span class="type">int</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>The number of rows in the proxy model (not filtered out the source model)</p>
|
||||||
|
</div></div><!-- @@@count -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$delayed -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="delayed-prop"></a><span class="name">delayed</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>Delay the execution of filters, sorters and <a href="index.html#proxyroles">proxyRoles</a> until the next event loop. This can be used as an optimization when multiple filters, sorters or <a href="index.html#proxyroles">proxyRoles</a> are changed in a single event loop. They will be executed once in a single batch at the next event loop instead of being executed in multiple sequential batches.</p>
|
||||||
|
<p>By default, the <a href="qml-sortfilterproxymodel-sortfilterproxymodel.html">SortFilterProxyModel</a> is not delayed, unless the <code>SFPM_DELAYED</code> environment variable is defined at compile time.</p>
|
||||||
|
</div></div><!-- @@@delayed -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$filters -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="filters-prop"></a><span class="name">filters</span> : <span class="type">list</span><<span class="type"><a href="qml-sortfilterproxymodel-filter.html">Filter</a></span>></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the list of filters for this proxy model. To be included in the model, a row of the source model has to be accepted by all the top level filters of this list.</p>
|
||||||
|
<p><b>See also </b><a href="qml-sortfilterproxymodel-filter.html">Filter</a> and <a href="qml-sortfilterproxymodel-filtercontainer.html">FilterContainer</a>.</p>
|
||||||
|
</div></div><!-- @@@filters -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$proxyRoles -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="proxyRoles-prop"></a><span class="name">proxyRoles</span> : <span class="type">list</span><<span class="type"><a href="qml-sortfilterproxymodel-proxyrole.html">ProxyRole</a></span>></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the list of proxy roles for this proxy model. Each proxy role adds a new custom role to the model.</p>
|
||||||
|
<p><b>See also </b><a href="qml-sortfilterproxymodel-proxyrole.html">ProxyRole</a>.</p>
|
||||||
|
</div></div><!-- @@@proxyRoles -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$sortRoleName -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="sortRoleName-prop"></a><span class="name">sortRoleName</span> : <span class="type">string</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>The role name of the source model's data used for the sorting.</p>
|
||||||
|
<p><b>See also </b><a href="http://doc.qt.io/qt-5/qsortfilterproxymodel.html#sortRole-prop">sortRole</a> and <a href="qml-sortfilterproxymodel-sortfilterproxymodel.html#roleForName-method">roleForName</a>.</p>
|
||||||
|
</div></div><!-- @@@sortRoleName -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$sorters -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="sorters-prop"></a><span class="name">sorters</span> : <span class="type">list</span><<span class="type"><a href="qml-sortfilterproxymodel-sorter.html">Sorter</a></span>></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the list of sorters for this proxy model. The rows of the source model are sorted by the sorters of this list, in their order of insertion.</p>
|
||||||
|
<p><b>See also </b><a href="qml-sortfilterproxymodel-sorter.html">Sorter</a> and <a href="qml-sortfilterproxymodel-sortercontainer.html">SorterContainer</a>.</p>
|
||||||
|
</div></div><!-- @@@sorters -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$sourceModel -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="sourceModel-prop"></a><span class="name">sourceModel</span> : <span class="type">QAbstractItemModel</span>*</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>The source model of this proxy model</p>
|
||||||
|
</div></div><!-- @@@sourceModel -->
|
||||||
|
<br/>
|
||||||
|
<h2>Method Documentation</h2>
|
||||||
|
<!-- $$$get$$$getstring -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlFuncNode"><p>
|
||||||
|
<a name="get-method-1"></a><span class="type">variant</span> <span class="name">get</span>(<i>row</i>, <span class="type">string</span> <i>roleName</i>)</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>Return the data for the given <i>roleName</i> of the item at <i>row</i> in the proxy model. This allows the role data to be read (not modified) from JavaScript. This equivalent to calling <code>data(index(row, 0), roleForName(roleName))</code>.</p>
|
||||||
|
</div></div><!-- @@@get -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$get[overload1]$$$get -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlFuncNode"><p>
|
||||||
|
<a name="get-method"></a><span class="type">object</span> <span class="name">get</span>(<i>row</i>)</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>Return the item at <i>row</i> in the proxy model as a map of all its roles. This allows the item data to be read (not modified) from JavaScript.</p>
|
||||||
|
</div></div><!-- @@@get -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$mapFromSource$$$mapFromSource -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlFuncNode"><p>
|
||||||
|
<a name="mapFromSource-method-1"></a><span class="type">int</span> <span class="name">mapFromSource</span>(<i>sourceRow</i>)</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>Returns the row in the <a href="qml-sortfilterproxymodel-sortfilterproxymodel.html">SortFilterProxyModel</a> given the <i>sourceRow</i> from the source model. Returns -1 if there is no corresponding row.</p>
|
||||||
|
</div></div><!-- @@@mapFromSource -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$mapFromSource[overload1]$$$mapFromSource -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlFuncNode"><p>
|
||||||
|
<a name="mapFromSource-method"></a><span class="type">QModelIndex</span> <span class="name">mapFromSource</span>(<i>sourceIndex</i>)</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>Returns the model index in the <a href="qml-sortfilterproxymodel-sortfilterproxymodel.html">SortFilterProxyModel</a> given the <i>sourceIndex</i> from the source model.</p>
|
||||||
|
</div></div><!-- @@@mapFromSource -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$mapToSource$$$mapToSource -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlFuncNode"><p>
|
||||||
|
<a name="mapToSource-method-1"></a><span class="type">int</span> <span class="name">mapToSource</span>(<i>proxyRow</i>)</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>Returns the source model row corresponding to the given <i>proxyRow</i> from the <a href="qml-sortfilterproxymodel-sortfilterproxymodel.html">SortFilterProxyModel</a>. Returns -1 if there is no corresponding row.</p>
|
||||||
|
</div></div><!-- @@@mapToSource -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$mapToSource[overload1]$$$mapToSource -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlFuncNode"><p>
|
||||||
|
<a name="mapToSource-method"></a><span class="type">index</span> <span class="name">mapToSource</span>(<i>proxyIndex</i>)</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>Returns the source model index corresponding to the given <i>proxyIndex</i> from the <a href="qml-sortfilterproxymodel-sortfilterproxymodel.html">SortFilterProxyModel</a>.</p>
|
||||||
|
</div></div><!-- @@@mapToSource -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$roleForName[overload1]$$$roleForName -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlFuncNode"><p>
|
||||||
|
<a name="roleForName-method"></a><span class="type">int</span> <span class="name">roleForName</span>(<i>roleName</i>)</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>Returns the role number for the given <i>roleName</i>. If no role is found for this <i>roleName</i>, <code>-1</code> is returned.</p>
|
||||||
|
</div></div><!-- @@@roleForName -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- stringsorter.cpp -->
|
||||||
|
<title>List of All Members for StringSorter | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for StringSorter</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-stringsorter.html">StringSorter</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-stringsorter.html#caseSensitivity-prop">caseSensitivity</a></b></b> : Qt.CaseSensitivity</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-stringsorter.html#ignorePunctation-prop">ignorePunctation</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-stringsorter.html#locale-prop">locale</a></b></b> : Locale</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-stringsorter.html#numericMode-prop">numericMode</a></b></b> : bool</li>
|
||||||
|
</ul>
|
||||||
|
<p>The following members are inherited from <a href="qml-sortfilterproxymodel-rolesorter.html">RoleSorter</a>.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-stringsorter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-stringsorter.html#priority-prop">priority</a></b></b> : int</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-rolesorter.html#roleName-prop">roleName</a></b></b> : string</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-stringsorter.html#sortOrder-prop">sortOrder</a></b></b> : Qt::SortOrder</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,90 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- stringsorter.cpp -->
|
||||||
|
<title>StringSorter QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">StringSorter QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$StringSorter-brief -->
|
||||||
|
<p>Sorts rows based on a source model string role. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@StringSorter -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-rolesorter.html">RoleSorter</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-stringsorter-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-stringsorter.html#caseSensitivity-prop">caseSensitivity</a></b></b> : Qt.CaseSensitivity</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-stringsorter.html#ignorePunctation-prop">ignorePunctation</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-stringsorter.html#locale-prop">locale</a></b></b> : Locale</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-stringsorter.html#numericMode-prop">numericMode</a></b></b> : bool</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$StringSorter-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p><a href="qml-sortfilterproxymodel-stringsorter.html">StringSorter</a> is a specialized <a href="qml-sortfilterproxymodel-rolesorter.html">RoleSorter</a> that sorts rows based on a source model string role. <a href="qml-sortfilterproxymodel-stringsorter.html">StringSorter</a> compares strings according to a localized collation algorithm.</p>
|
||||||
|
<p>In the following example, rows with be sorted by their <code>lastName</code> role :</p>
|
||||||
|
<pre class="cpp">SortFilterProxyModel {
|
||||||
|
sourceModel: contactModel
|
||||||
|
sorters: StringSorter { roleName: <span class="string">"lastName"</span> }
|
||||||
|
}</pre>
|
||||||
|
<!-- @@@StringSorter -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$caseSensitivity -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="caseSensitivity-prop"></a><span class="name">caseSensitivity</span> : <span class="type">Qt</span>.<span class="type">CaseSensitivity</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the case sensitivity of the sorter.</p>
|
||||||
|
</div></div><!-- @@@caseSensitivity -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$ignorePunctation -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="ignorePunctation-prop"></a><span class="name">ignorePunctation</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the sorter ignores punctation. if <code>ignorePunctuation</code> is <code>true</code>, punctuation characters and symbols are ignored when determining sort order.</p>
|
||||||
|
<p><b>Note: </b>This property is not currently supported on Apple platforms or if Qt is configured to not use ICU on Linux.</p></div></div><!-- @@@ignorePunctation -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$locale -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="locale-prop"></a><span class="name">locale</span> : <span class="type">Locale</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the locale of the sorter.</p>
|
||||||
|
</div></div><!-- @@@locale -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$numericMode -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="numericMode-prop"></a><span class="name">numericMode</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the numeric mode of the sorter is enabled. This will enable proper sorting of numeric digits, so that e.g. 100 sorts after 99. By default this mode is off.</p>
|
||||||
|
</div></div><!-- @@@numericMode -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- switchrole.cpp -->
|
||||||
|
<title>List of All Members for SwitchRole | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for SwitchRole</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-switchrole.html">SwitchRole</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-switchrole.html#defaultRoleName-prop">defaultRoleName</a></b></b> : string</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-switchrole.html#defaultValue-prop">defaultValue</a></b></b> : var</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-switchrole.html#filters-prop">filters</a></b></b> : list<Filter> [default]</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-switchrole.html#name-prop">name</a></b></b> : string</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-switchrole.html#value-attached-prop">value</a></b></b> : var [attached]</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,117 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- switchrole.cpp -->
|
||||||
|
<title>SwitchRole QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#attached-properties">Attached Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">SwitchRole QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$SwitchRole-brief -->
|
||||||
|
<p>A role using <a href="qml-sortfilterproxymodel-filter.html">Filter</a> to conditionnaly compute its data. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@SwitchRole -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-singlerole.html">SingleRole</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-switchrole-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-switchrole.html#defaultRoleName-prop">defaultRoleName</a></b></b> : string</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-switchrole.html#defaultValue-prop">defaultValue</a></b></b> : var</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-switchrole.html#filters-prop">filters</a></b></b> : list<Filter></li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-switchrole.html#name-prop">name</a></b></b> : string</li>
|
||||||
|
</ul>
|
||||||
|
<a name="attached-properties"></a>
|
||||||
|
<h2 id="attached-properties">Attached Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-switchrole.html#value-attached-prop">value</a></b></b> : var</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$SwitchRole-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>A SwitchRole is a <a href="qml-sortfilterproxymodel-proxyrole.html">ProxyRole</a> that computes its data with the help of <a href="qml-sortfilterproxymodel-filter.html">Filter</a>. Each top level filters specified in the <a href="qml-sortfilterproxymodel-switchrole.html">SwitchRole</a> is evaluated on the rows of the model, if a <a href="qml-sortfilterproxymodel-filter.html">Filter</a> evaluates to true, the data of the <a href="qml-sortfilterproxymodel-switchrole.html">SwitchRole</a> for this row will be the one of the attached <a href="qml-sortfilterproxymodel-switchrole.html#value-attached-prop">SwitchRole.value</a> property. If no top level filters evaluate to true, the data will default to the one of the <a href="qml-sortfilterproxymodel-switchrole.html#defaultRoleName-prop">defaultRoleName</a> (or the <a href="qml-sortfilterproxymodel-switchrole.html#defaultValue-prop">defaultValue</a> if no <a href="qml-sortfilterproxymodel-switchrole.html#defaultRoleName-prop">defaultRoleName</a> is specified).</p>
|
||||||
|
<p>In the following example, the <code>favoriteOrFirstNameSection</code> role is equal to <code>*</code> if the <code>favorite</code> role of a row is true, otherwise it's the same as the <code>firstName</code> role :</p>
|
||||||
|
<pre class="cpp">SortFilterProxyModel {
|
||||||
|
sourceModel: contactModel
|
||||||
|
proxyRoles: SwitchRole {
|
||||||
|
name: <span class="string">"favoriteOrFirstNameSection"</span>
|
||||||
|
filters: ValueFilter {
|
||||||
|
roleName: <span class="string">"favorite"</span>
|
||||||
|
value: <span class="keyword">true</span>
|
||||||
|
SwitchRole<span class="operator">.</span>value: <span class="string">"*"</span>
|
||||||
|
}
|
||||||
|
defaultRoleName: <span class="string">"firstName"</span>
|
||||||
|
}
|
||||||
|
}</pre>
|
||||||
|
<p><b>See also </b><a href="qml-sortfilterproxymodel-filtercontainer.html">FilterContainer</a>.</p>
|
||||||
|
<!-- @@@SwitchRole -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$defaultRoleName -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="defaultRoleName-prop"></a><span class="name">defaultRoleName</span> : <span class="type">string</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the default role name of the role. If no filter match a row, the data of this role will be the data of the role whose name is <code>defaultRoleName</code>.</p>
|
||||||
|
</div></div><!-- @@@defaultRoleName -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$defaultValue -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="defaultValue-prop"></a><span class="name">defaultValue</span> : <span class="type">var</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the default value of the role. If no filter match a row, and no <a href="qml-sortfilterproxymodel-switchrole.html#defaultRoleName-prop">defaultRoleName</a> is set, the data of this role will be <code>defaultValue</code>.</p>
|
||||||
|
</div></div><!-- @@@defaultValue -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$filters -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="filters-prop"></a><span class="qmldefault">[default] </span><span class="name">filters</span> : <span class="type">list</span><<span class="type"><a href="qml-sortfilterproxymodel-filter.html">Filter</a></span>></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the list of filters for this proxy role. The data of this role will be equal to the attached <a href="qml-sortfilterproxymodel-switchrole.html#value-attached-prop">SwitchRole.value</a> property of the first filter that matches the model row.</p>
|
||||||
|
<p><b>See also </b><a href="qml-sortfilterproxymodel-filter.html">Filter</a> and <a href="qml-sortfilterproxymodel-filtercontainer.html">FilterContainer</a>.</p>
|
||||||
|
</div></div><!-- @@@filters -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$name -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="name-prop"></a><span class="name">name</span> : <span class="type">string</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the role name of the proxy role.</p>
|
||||||
|
</div></div><!-- @@@name -->
|
||||||
|
<br/>
|
||||||
|
<h2>Attached Property Documentation</h2>
|
||||||
|
<!-- $$$value -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="value-attached-prop"></a><span class="name">SwitchRole.value</span> : <span class="type">var</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property attaches a value to a <a href="qml-sortfilterproxymodel-filter.html">Filter</a>.</p>
|
||||||
|
</div></div><!-- @@@value -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- valuefilter.cpp -->
|
||||||
|
<title>List of All Members for ValueFilter | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">List of All Members for ValueFilter</h1>
|
||||||
|
<p>This is the complete list of members for <a href="qml-sortfilterproxymodel-valuefilter.html">ValueFilter</a>, including inherited members.</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-valuefilter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-valuefilter.html#inverted-prop">inverted</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-valuefilter.html#roleName-prop">roleName</a></b></b> : string</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-valuefilter.html#value-prop">value</a></b></b> : variant</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,100 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- valuefilter.cpp -->
|
||||||
|
<title>ValueFilter QML Type | SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="toc">
|
||||||
|
<h3><a name="toc">Contents</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li class="level1"><a href="#properties">Properties</a></li>
|
||||||
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<h1 class="title">ValueFilter QML Type</h1>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$ValueFilter-brief -->
|
||||||
|
<p>Filters rows matching exactly a value. <a href="#details">More...</a></p>
|
||||||
|
<!-- @@@ValueFilter -->
|
||||||
|
<div class="table"><table class="alignedsummary">
|
||||||
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import SortFilterProxyModel .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-sortfilterproxymodel-rolefilter.html">RoleFilter</a></p>
|
||||||
|
</td></tr></table></div><ul>
|
||||||
|
<li><a href="qml-sortfilterproxymodel-valuefilter-members.html">List of all members, including inherited members</a></li>
|
||||||
|
</ul>
|
||||||
|
<a name="properties"></a>
|
||||||
|
<h2 id="properties">Properties</h2>
|
||||||
|
<ul>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-valuefilter.html#enabled-prop">enabled</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-valuefilter.html#inverted-prop">inverted</a></b></b> : bool</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-valuefilter.html#roleName-prop">roleName</a></b></b> : string</li>
|
||||||
|
<li class="fn"><b><b><a href="qml-sortfilterproxymodel-valuefilter.html#value-prop">value</a></b></b> : variant</li>
|
||||||
|
</ul>
|
||||||
|
<!-- $$$ValueFilter-description -->
|
||||||
|
<a name="details"></a>
|
||||||
|
<h2 id="details">Detailed Description</h2>
|
||||||
|
<p>A ValueFilter is a simple <a href="qml-sortfilterproxymodel-rolefilter.html">RoleFilter</a> that accepts rows matching exactly the filter's value</p>
|
||||||
|
<p>In the following example, only rows with their <code>favorite</code> role set to <code>true</code> will be accepted when the checkbox is checked :</p>
|
||||||
|
<pre class="cpp">CheckBox {
|
||||||
|
id: showOnlyFavoriteCheckBox
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
sourceModel: contactModel
|
||||||
|
filters: ValueFilter {
|
||||||
|
roleName: <span class="string">"favorite"</span>
|
||||||
|
value: <span class="keyword">true</span>
|
||||||
|
enabled: showOnlyFavoriteCheckBox<span class="operator">.</span>checked
|
||||||
|
}
|
||||||
|
}</pre>
|
||||||
|
<!-- @@@ValueFilter -->
|
||||||
|
<h2>Property Documentation</h2>
|
||||||
|
<!-- $$$enabled -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the filter is enabled. A disabled filter will accept every rows unconditionally (even if it's inverted).</p>
|
||||||
|
<p>By default, filters are enabled.</p>
|
||||||
|
</div></div><!-- @@@enabled -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$inverted -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="inverted-prop"></a><span class="name">inverted</span> : <span class="type">bool</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds whether the filter is inverted. When a filter is inverted, a row normally accepted would be rejected, and vice-versa.</p>
|
||||||
|
<p>By default, filters are not inverted.</p>
|
||||||
|
</div></div><!-- @@@inverted -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$roleName -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="roleName-prop"></a><span class="name">roleName</span> : <span class="type">string</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the role name that the filter is using to query the source model's data when filtering items.</p>
|
||||||
|
</div></div><!-- @@@roleName -->
|
||||||
|
<br/>
|
||||||
|
<!-- $$$value -->
|
||||||
|
<div class="qmlitem"><div class="qmlproto">
|
||||||
|
<div class="table"><table class="qmlname">
|
||||||
|
<tr valign="top" class="odd" id="">
|
||||||
|
<td class="tblQmlPropNode"><p>
|
||||||
|
<a name="value-prop"></a><span class="name">value</span> : <span class="type">variant</span></p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</div><div class="qmldoc"><p>This property holds the value used to filter the contents of the source model.</p>
|
||||||
|
</div></div><!-- @@@value -->
|
||||||
|
<br/>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<!-- index.qdoc -->
|
||||||
|
<title>SortFilterProxyModel</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/offline.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
|
||||||
|
<span class="subtitle"></span>
|
||||||
|
<!-- $$$SortFilterProxyModel-description -->
|
||||||
|
<div class="descr"> <a name="details"></a>
|
||||||
|
</div>
|
||||||
|
<!-- @@@SortFilterProxyModel -->
|
||||||
|
<div class="table"><table class="annotated">
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-allof.html">AllOf</a></p></td><td class="tblDescr"><p>Filter container accepting rows accepted by all its child filters</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-anyof.html">AnyOf</a></p></td><td class="tblDescr"><p>Filter container accepting rows accepted by at least one of its child filters</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-expressionfilter.html">ExpressionFilter</a></p></td><td class="tblDescr"><p>Filters row with a custom filtering</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-expressionrole.html">ExpressionRole</a></p></td><td class="tblDescr"><p>A custom role computed from a javascript expression</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-expressionsorter.html">ExpressionSorter</a></p></td><td class="tblDescr"><p>Sorts row with a custom javascript expression</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-filter.html">Filter</a></p></td><td class="tblDescr"><p>Base type for the SortFilterProxyModel filters</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-filtercontainer.html">FilterContainer</a></p></td><td class="tblDescr"><p>Abstract interface for types containing Filters</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-filterrole.html">FilterRole</a></p></td><td class="tblDescr"><p>A role resolving to true for rows matching all its filters</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-filtersorter.html">FilterSorter</a></p></td><td class="tblDescr"><p>Sorts rows based on if they match filters</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-indexfilter.html">IndexFilter</a></p></td><td class="tblDescr"><p>Filters rows based on their source index</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-joinrole.html">JoinRole</a></p></td><td class="tblDescr"><p>Role made from concatenating other roles</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-proxyrole.html">ProxyRole</a></p></td><td class="tblDescr"><p>Base type for the SortFilterProxyModel proxy roles</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-rangefilter.html">RangeFilter</a></p></td><td class="tblDescr"><p>Filters rows between boundary values</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-regexpfilter.html">RegExpFilter</a></p></td><td class="tblDescr"><p>Filters rows matching a regular expression</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-regexprole.html">RegExpRole</a></p></td><td class="tblDescr"><p>A ProxyRole extracting data from a source role via a regular expression</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-rolefilter.html">RoleFilter</a></p></td><td class="tblDescr"><p>Base type for filters based on a source model role</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-rolesorter.html">RoleSorter</a></p></td><td class="tblDescr"><p>Sorts rows based on a source model role</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-singlerole.html">SingleRole</a></p></td><td class="tblDescr"><p>Base type for the SortFilterProxyModel proxy roles defining a single role</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-sortfilterproxymodel.html">SortFilterProxyModel</a></p></td><td class="tblDescr"><p>Filters and sorts data coming from a source QAbstractItemModel</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-sorter.html">Sorter</a></p></td><td class="tblDescr"><p>Base type for the SortFilterProxyModel sorters</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-sortercontainer.html">SorterContainer</a></p></td><td class="tblDescr"><p>Abstract interface for types containing Sorters</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-stringsorter.html">StringSorter</a></p></td><td class="tblDescr"><p>Sorts rows based on a source model string role</p></td></tr>
|
||||||
|
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-switchrole.html">SwitchRole</a></p></td><td class="tblDescr"><p>A role using Filter to conditionnaly compute its data</p></td></tr>
|
||||||
|
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel-valuefilter.html">ValueFilter</a></p></td><td class="tblDescr"><p>Filters rows matching exactly a value</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
156
client/3rd/SortFilterProxyModel/docs/sortfilterproxymodel.index
Normal file
156
client/3rd/SortFilterProxyModel/docs/sortfilterproxymodel.index
Normal file
|
@ -0,0 +1,156 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE QDOCINDEX>
|
||||||
|
<INDEX url="" title="SortFilterProxyModel Reference Documentation" version="" project="SortFilterProxyModel">
|
||||||
|
<namespace name="" status="active" access="public" module="sortfilterproxymodel">
|
||||||
|
<qmlclass name="AnyOf" qml-module-name="SortFilterProxyModel" qml-base-type="SortFilterProxyModel::Filter" fullname="SortFilterProxyModel.AnyOf" href="qml-sortfilterproxymodel-anyof.html" status="active" access="public" documented="true" title="AnyOf" fulltitle="AnyOf" subtitle="" groups="Filters,FilterContainer" brief="Filter container accepting rows accepted by at least one of its child filters"/>
|
||||||
|
<qmlclass name="SwitchRole" qml-module-name="SortFilterProxyModel" qml-base-type="SortFilterProxyModel::SingleRole" fullname="SortFilterProxyModel.SwitchRole" href="qml-sortfilterproxymodel-switchrole.html" status="active" access="public" documented="true" title="SwitchRole" fulltitle="SwitchRole" subtitle="" groups="ProxyRoles,FilterContainer" brief="A role using Filter to conditionnaly compute its data">
|
||||||
|
<qmlproperty name="value" fullname="SortFilterProxyModel.SwitchRole.value" href="qml-sortfilterproxymodel-switchrole.html#value-attached-prop" status="active" access="public" documented="true" type="var" attached="true" writable="true"/>
|
||||||
|
<qmlproperty name="defaultRoleName" fullname="SortFilterProxyModel.SwitchRole.defaultRoleName" href="qml-sortfilterproxymodel-switchrole.html#defaultRoleName-prop" status="active" access="public" documented="true" type="string" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="defaultValue" fullname="SortFilterProxyModel.SwitchRole.defaultValue" href="qml-sortfilterproxymodel-switchrole.html#defaultValue-prop" status="active" access="public" documented="true" type="var" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="filters" fullname="SortFilterProxyModel.SwitchRole.filters" href="qml-sortfilterproxymodel-switchrole.html#filters-prop" status="active" access="public" documented="true" type="list<Filter>" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="AllOf" qml-module-name="SortFilterProxyModel" qml-base-type="SortFilterProxyModel::Filter" fullname="SortFilterProxyModel.AllOf" href="qml-sortfilterproxymodel-allof.html" status="active" access="public" documented="true" title="AllOf" fulltitle="AllOf" subtitle="" groups="Filters,FilterContainer" brief="Filter container accepting rows accepted by all its child filters"/>
|
||||||
|
<qmlclass name="ExpressionFilter" qml-module-name="SortFilterProxyModel" qml-base-type="SortFilterProxyModel::Filter" fullname="SortFilterProxyModel.ExpressionFilter" href="qml-sortfilterproxymodel-expressionfilter.html" status="active" access="public" documented="true" title="ExpressionFilter" fulltitle="ExpressionFilter" subtitle="" groups="Filters" brief="Filters row with a custom filtering">
|
||||||
|
<qmlproperty name="expression" fullname="SortFilterProxyModel.ExpressionFilter.expression" href="qml-sortfilterproxymodel-expressionfilter.html#expression-prop" status="active" access="public" documented="true" type="expression" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="IndexFilter" qml-module-name="SortFilterProxyModel" qml-base-type="SortFilterProxyModel::Filter" fullname="SortFilterProxyModel.IndexFilter" href="qml-sortfilterproxymodel-indexfilter.html" status="active" access="public" documented="true" title="IndexFilter" fulltitle="IndexFilter" subtitle="" groups="Filters" brief="Filters rows based on their source index">
|
||||||
|
<qmlproperty name="minimumIndex" fullname="SortFilterProxyModel.IndexFilter.minimumIndex" href="qml-sortfilterproxymodel-indexfilter.html#minimumIndex-prop" status="active" access="public" documented="true" type="int" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="maximumIndex" fullname="SortFilterProxyModel.IndexFilter.maximumIndex" href="qml-sortfilterproxymodel-indexfilter.html#maximumIndex-prop" status="active" access="public" documented="true" type="int" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="Filter" qml-module-name="SortFilterProxyModel" fullname="SortFilterProxyModel.Filter" href="qml-sortfilterproxymodel-filter.html" status="active" access="public" abstract="true" documented="true" title="Filter" fulltitle="Filter" subtitle="" groups="Filters" brief="Base type for the SortFilterProxyModel filters">
|
||||||
|
<qmlproperty name="inverted" fullname="SortFilterProxyModel.Filter.inverted" status="active" access="public" documented="true" type="bool" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="enabled" fullname="SortFilterProxyModel.Filter.enabled" status="active" access="public" documented="true" type="bool" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="FilterContainer" qml-module-name="SortFilterProxyModel" fullname="SortFilterProxyModel.FilterContainer" href="qml-sortfilterproxymodel-filtercontainer.html" status="active" access="public" abstract="true" documented="true" title="FilterContainer" fulltitle="FilterContainer" subtitle="" groups="FilterAttached" brief="Abstract interface for types containing Filters">
|
||||||
|
<contents name="types-implementing-this-interface" title="Types implementing this interface:" level="2"/>
|
||||||
|
<qmlproperty name="container" fullname="SortFilterProxyModel.FilterContainer.container" status="active" access="public" documented="true" type="bool" attached="true" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="RangeFilter" qml-module-name="SortFilterProxyModel" qml-base-type="SortFilterProxyModel::RoleFilter" fullname="SortFilterProxyModel.RangeFilter" href="qml-sortfilterproxymodel-rangefilter.html" status="active" access="public" documented="true" title="RangeFilter" fulltitle="RangeFilter" subtitle="" groups="Filters" brief="Filters rows between boundary values">
|
||||||
|
<qmlproperty name="minimumValue" fullname="SortFilterProxyModel.RangeFilter.minimumValue" href="qml-sortfilterproxymodel-rangefilter.html#minimumValue-prop" status="active" access="public" documented="true" type="int" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="minimumInclusive" fullname="SortFilterProxyModel.RangeFilter.minimumInclusive" href="qml-sortfilterproxymodel-rangefilter.html#minimumInclusive-prop" status="active" access="public" documented="true" type="int" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="maximumValue" fullname="SortFilterProxyModel.RangeFilter.maximumValue" href="qml-sortfilterproxymodel-rangefilter.html#maximumValue-prop" status="active" access="public" documented="true" type="int" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="maximumInclusive" fullname="SortFilterProxyModel.RangeFilter.maximumInclusive" href="qml-sortfilterproxymodel-rangefilter.html#maximumInclusive-prop" status="active" access="public" documented="true" type="int" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="SortFilterProxyModel" qml-module-name="SortFilterProxyModel" fullname="SortFilterProxyModel.SortFilterProxyModel" href="qml-sortfilterproxymodel-sortfilterproxymodel.html" status="active" access="public" documented="true" title="SortFilterProxyModel" fulltitle="SortFilterProxyModel" subtitle="" groups="SortFilterProxyModel,FilterContainer,SorterContainer" brief="Filters and sorts data coming from a source QAbstractItemModel">
|
||||||
|
<function name="get" fullname="SortFilterProxyModel.SortFilterProxyModel.get" href="qml-sortfilterproxymodel-sortfilterproxymodel.html#get-method" status="active" access="public" documented="true" meta="qmlmethod"/>
|
||||||
|
<function name="get" fullname="SortFilterProxyModel.SortFilterProxyModel.get" href="qml-sortfilterproxymodel-sortfilterproxymodel.html#get-method" status="active" access="public" documented="true" meta="qmlmethod"/>
|
||||||
|
<function name="mapFromSource" fullname="SortFilterProxyModel.SortFilterProxyModel.mapFromSource" href="qml-sortfilterproxymodel-sortfilterproxymodel.html#mapFromSource-method" status="active" access="public" documented="true" meta="qmlmethod"/>
|
||||||
|
<function name="mapFromSource" fullname="SortFilterProxyModel.SortFilterProxyModel.mapFromSource" href="qml-sortfilterproxymodel-sortfilterproxymodel.html#mapFromSource-method" status="active" access="public" documented="true" meta="qmlmethod"/>
|
||||||
|
<function name="mapToSource" fullname="SortFilterProxyModel.SortFilterProxyModel.mapToSource" href="qml-sortfilterproxymodel-sortfilterproxymodel.html#mapToSource-method" status="active" access="public" documented="true" meta="qmlmethod"/>
|
||||||
|
<function name="mapToSource" fullname="SortFilterProxyModel.SortFilterProxyModel.mapToSource" href="qml-sortfilterproxymodel-sortfilterproxymodel.html#mapToSource-method" status="active" access="public" documented="true" meta="qmlmethod"/>
|
||||||
|
<function name="roleForName" fullname="SortFilterProxyModel.SortFilterProxyModel.roleForName" href="qml-sortfilterproxymodel-sortfilterproxymodel.html#roleForName-method" status="active" access="public" documented="true" meta="qmlmethod"/>
|
||||||
|
<qmlproperty name="count" fullname="SortFilterProxyModel.SortFilterProxyModel.count" href="qml-sortfilterproxymodel-sortfilterproxymodel.html#count-prop" status="active" access="public" documented="true" type="int" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="proxyRoles" fullname="SortFilterProxyModel.SortFilterProxyModel.proxyRoles" href="qml-sortfilterproxymodel-sortfilterproxymodel.html#proxyRoles-prop" status="active" access="public" documented="true" type="list<ProxyRole>" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="sourceModel" fullname="SortFilterProxyModel.SortFilterProxyModel.sourceModel" href="qml-sortfilterproxymodel-sortfilterproxymodel.html#sourceModel-prop" status="active" access="public" documented="true" type="QAbstractItemModel*" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="sorters" fullname="SortFilterProxyModel.SortFilterProxyModel.sorters" href="qml-sortfilterproxymodel-sortfilterproxymodel.html#sorters-prop" status="active" access="public" documented="true" type="list<Sorter>" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="filters" fullname="SortFilterProxyModel.SortFilterProxyModel.filters" href="qml-sortfilterproxymodel-sortfilterproxymodel.html#filters-prop" status="active" access="public" documented="true" type="list<Filter>" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="sortRoleName" fullname="SortFilterProxyModel.SortFilterProxyModel.sortRoleName" href="qml-sortfilterproxymodel-sortfilterproxymodel.html#sortRoleName-prop" status="active" access="public" documented="true" type="string" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="delayed" fullname="SortFilterProxyModel.SortFilterProxyModel.delayed" href="qml-sortfilterproxymodel-sortfilterproxymodel.html#delayed-prop" status="active" access="public" documented="true" type="bool" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="RegExpFilter" qml-module-name="SortFilterProxyModel" qml-base-type="SortFilterProxyModel::RoleFilter" fullname="SortFilterProxyModel.RegExpFilter" href="qml-sortfilterproxymodel-regexpfilter.html" status="active" access="public" documented="true" title="RegExpFilter" fulltitle="RegExpFilter" subtitle="" groups="Filters" brief="Filters rows matching a regular expression">
|
||||||
|
<qmlproperty name="syntax" fullname="SortFilterProxyModel.RegExpFilter.syntax" href="qml-sortfilterproxymodel-regexpfilter.html#syntax-prop" status="active" access="public" documented="true" type="enum" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="pattern" fullname="SortFilterProxyModel.RegExpFilter.pattern" href="qml-sortfilterproxymodel-regexpfilter.html#pattern-prop" status="active" access="public" documented="true" type="bool" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="caseSensitivity" fullname="SortFilterProxyModel.RegExpFilter.caseSensitivity" href="qml-sortfilterproxymodel-regexpfilter.html#caseSensitivity-prop" status="active" access="public" documented="true" type="Qt::CaseSensitivity" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="ExpressionSorter" qml-module-name="SortFilterProxyModel" qml-base-type="SortFilterProxyModel::Sorter" fullname="SortFilterProxyModel.ExpressionSorter" href="qml-sortfilterproxymodel-expressionsorter.html" status="active" access="public" documented="true" title="ExpressionSorter" fulltitle="ExpressionSorter" subtitle="" groups="Sorters" brief="Sorts row with a custom javascript expression">
|
||||||
|
<qmlproperty name="expression" fullname="SortFilterProxyModel.ExpressionSorter.expression" href="qml-sortfilterproxymodel-expressionsorter.html#expression-prop" status="active" access="public" documented="true" type="expression" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="FilterSorter" qml-module-name="SortFilterProxyModel" qml-base-type="SortFilterProxyModel::Sorter" fullname="SortFilterProxyModel.FilterSorter" href="qml-sortfilterproxymodel-filtersorter.html" status="active" access="public" documented="true" title="FilterSorter" fulltitle="FilterSorter" subtitle="" groups="Sorters,FilterContainer" brief="Sorts rows based on if they match filters">
|
||||||
|
<qmlproperty name="filters" fullname="SortFilterProxyModel.FilterSorter.filters" href="qml-sortfilterproxymodel-filtersorter.html#filters-prop" status="active" access="public" documented="true" type="list<Filter>" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="RoleSorter" qml-module-name="SortFilterProxyModel" qml-base-type="SortFilterProxyModel::Sorter" fullname="SortFilterProxyModel.RoleSorter" href="qml-sortfilterproxymodel-rolesorter.html" status="active" access="public" documented="true" title="RoleSorter" fulltitle="RoleSorter" subtitle="" groups="Sorters" brief="Sorts rows based on a source model role">
|
||||||
|
<qmlproperty name="roleName" fullname="SortFilterProxyModel.RoleSorter.roleName" href="qml-sortfilterproxymodel-rolesorter.html#roleName-prop" status="active" access="public" documented="true" type="string" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="Sorter" qml-module-name="SortFilterProxyModel" fullname="SortFilterProxyModel.Sorter" href="qml-sortfilterproxymodel-sorter.html" status="active" access="public" abstract="true" documented="true" title="Sorter" fulltitle="Sorter" subtitle="" groups="Sorters" brief="Base type for the SortFilterProxyModel sorters">
|
||||||
|
<qmlproperty name="enabled" fullname="SortFilterProxyModel.Sorter.enabled" status="active" access="public" documented="true" type="bool" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="sortOrder" fullname="SortFilterProxyModel.Sorter.sortOrder" status="active" access="public" documented="true" type="Qt::SortOrder" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="priority" fullname="SortFilterProxyModel.Sorter.priority" status="active" access="public" documented="true" type="int" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="SorterContainer" qml-module-name="SortFilterProxyModel" fullname="SortFilterProxyModel.SorterContainer" href="qml-sortfilterproxymodel-sortercontainer.html" status="active" access="public" abstract="true" documented="true" title="SorterContainer" fulltitle="SorterContainer" subtitle="" groups="SorterAttached" brief="Abstract interface for types containing Sorters">
|
||||||
|
<contents name="types-implementing-this-interface" title="Types implementing this interface:" level="2"/>
|
||||||
|
<qmlproperty name="container" fullname="SortFilterProxyModel.SorterContainer.container" status="active" access="public" documented="true" type="bool" attached="true" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="tst_builtins" qml-module-name="tst_builtins" href="qml-tst-builtins.html" status="internal" access="private" location="tst_builtins.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_builtins.qml" lineno="6" title="tst_builtins" fulltitle="tst_builtins" subtitle=""/>
|
||||||
|
<qmlclass name="tst_expressionrole" qml-module-name="tst_expressionrole" href="qml-tst-expressionrole.html" status="internal" access="private" location="tst_expressionrole.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_expressionrole.qml" lineno="7" title="tst_expressionrole" fulltitle="tst_expressionrole" subtitle="">
|
||||||
|
<qmlproperty name="c" fullname="tst_expressionrole::c" href="qml-tst-expressionrole.html#c-prop" status="internal" access="private" location="tst_expressionrole.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_expressionrole.qml" lineno="8" type="int" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="tst_delayed" qml-module-name="tst_delayed" href="qml-tst-delayed.html" status="internal" access="private" location="tst_delayed.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_delayed.qml" lineno="7" title="tst_delayed" fulltitle="tst_delayed" subtitle=""/>
|
||||||
|
<qmlclass name="StringSorter" qml-module-name="SortFilterProxyModel" qml-base-type="SortFilterProxyModel::RoleSorter" fullname="SortFilterProxyModel.StringSorter" href="qml-sortfilterproxymodel-stringsorter.html" status="active" access="public" documented="true" title="StringSorter" fulltitle="StringSorter" subtitle="" groups="Sorters" brief="Sorts rows based on a source model string role">
|
||||||
|
<qmlproperty name="caseSensitivity" fullname="SortFilterProxyModel.StringSorter.caseSensitivity" href="qml-sortfilterproxymodel-stringsorter.html#caseSensitivity-prop" status="active" access="public" documented="true" type="Qt.CaseSensitivity" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="ignorePunctation" fullname="SortFilterProxyModel.StringSorter.ignorePunctation" href="qml-sortfilterproxymodel-stringsorter.html#ignorePunctation-prop" status="active" access="public" documented="true" type="bool" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="locale" fullname="SortFilterProxyModel.StringSorter.locale" href="qml-sortfilterproxymodel-stringsorter.html#locale-prop" status="active" access="public" documented="true" type="Locale" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="numericMode" fullname="SortFilterProxyModel.StringSorter.numericMode" href="qml-sortfilterproxymodel-stringsorter.html#numericMode-prop" status="active" access="public" documented="true" type="bool" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="tst_filtercontainerattached" qml-module-name="tst_filtercontainerattached" href="qml-tst-filtercontainerattached.html" status="internal" access="private" location="tst_filtercontainerattached.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_filtercontainerattached.qml" lineno="7" title="tst_filtercontainerattached" fulltitle="tst_filtercontainerattached" subtitle=""/>
|
||||||
|
<qmlclass name="tst_filtercontainers" qml-module-name="tst_filtercontainers" href="qml-tst-filtercontainers.html" status="internal" access="private" location="tst_filtercontainers.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_filtercontainers.qml" lineno="6" title="tst_filtercontainers" fulltitle="tst_filtercontainers" subtitle="">
|
||||||
|
<qmlproperty name="filters" fullname="tst_filtercontainers::filters" href="qml-tst-filtercontainers.html#filters-prop" status="internal" access="private" location="tst_filtercontainers.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_filtercontainers.qml" lineno="7" type="Filter" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="tst_filterrole" qml-module-name="tst_filterrole" href="qml-tst-filterrole.html" status="internal" access="private" location="tst_filterrole.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_filterrole.qml" lineno="7" title="tst_filterrole" fulltitle="tst_filterrole" subtitle=""/>
|
||||||
|
<qmlclass name="tst_filtersorter" qml-module-name="tst_filtersorter" href="qml-tst-filtersorter.html" status="internal" access="private" location="tst_filtersorter.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_filtersorter.qml" lineno="7" title="tst_filtersorter" fulltitle="tst_filtersorter" subtitle=""/>
|
||||||
|
<qmlclass name="tst_helpers" qml-module-name="tst_helpers" href="qml-tst-helpers.html" status="internal" access="private" location="tst_helpers.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_helpers.qml" lineno="7" title="tst_helpers" fulltitle="tst_helpers" subtitle=""/>
|
||||||
|
<qmlclass name="tst_indexfilter" qml-module-name="tst_indexfilter" href="qml-tst-indexfilter.html" status="internal" access="private" location="tst_indexfilter.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_indexfilter.qml" lineno="6" title="tst_indexfilter" fulltitle="tst_indexfilter" subtitle="">
|
||||||
|
<qmlproperty name="filters" fullname="tst_indexfilter::filters" href="qml-tst-indexfilter.html#filters-prop" status="internal" access="private" location="tst_indexfilter.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_indexfilter.qml" lineno="7" type="IndexFilter" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="tst_joinrole" qml-module-name="tst_joinrole" href="qml-tst-joinrole.html" status="internal" access="private" location="tst_joinrole.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_joinrole.qml" lineno="7" title="tst_joinrole" fulltitle="tst_joinrole" subtitle=""/>
|
||||||
|
<qmlclass name="tst_proxyroles" qml-module-name="tst_proxyroles" href="qml-tst-proxyroles.html" status="internal" access="private" location="tst_proxyroles.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_proxyroles.qml" lineno="8" title="tst_proxyroles" fulltitle="tst_proxyroles" subtitle=""/>
|
||||||
|
<qmlclass name="tst_rangefilter" qml-module-name="tst_rangefilter" href="qml-tst-rangefilter.html" status="internal" access="private" location="tst_rangefilter.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_rangefilter.qml" lineno="6" title="tst_rangefilter" fulltitle="tst_rangefilter" subtitle="">
|
||||||
|
<qmlproperty name="filters" fullname="tst_rangefilter::filters" href="qml-tst-rangefilter.html#filters-prop" status="internal" access="private" location="tst_rangefilter.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_rangefilter.qml" lineno="7" type="RangeFilter" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="tst_regexprole" qml-module-name="tst_regexprole" href="qml-tst-regexprole.html" status="internal" access="private" location="tst_regexprole.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_regexprole.qml" lineno="7" title="tst_regexprole" fulltitle="tst_regexprole" subtitle=""/>
|
||||||
|
<qmlclass name="tst_sorters" qml-module-name="tst_sorters" href="qml-tst-sorters.html" status="internal" access="private" location="tst_sorters.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_sorters.qml" lineno="7" title="tst_sorters" fulltitle="tst_sorters" subtitle="">
|
||||||
|
<qmlproperty name="tieSorters" fullname="tst_sorters::tieSorters" href="qml-tst-sorters.html#tieSorters-prop" status="internal" access="private" location="tst_sorters.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_sorters.qml" lineno="72" type="RoleSorter" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="sorters" fullname="tst_sorters::sorters" href="qml-tst-sorters.html#sorters-prop" status="internal" access="private" location="tst_sorters.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_sorters.qml" lineno="20" type="QtObject" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="sortersWithPriority" fullname="tst_sorters::sortersWithPriority" href="qml-tst-sorters.html#sortersWithPriority-prop" status="internal" access="private" location="tst_sorters.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_sorters.qml" lineno="77" type="RoleSorter" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="tst_stringsorter" qml-module-name="tst_stringsorter" href="qml-tst-stringsorter.html" status="internal" access="private" location="tst_stringsorter.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_stringsorter.qml" lineno="6" title="tst_stringsorter" fulltitle="tst_stringsorter" subtitle="">
|
||||||
|
<qmlproperty name="sorters" fullname="tst_stringsorter::sorters" href="qml-tst-stringsorter.html#sorters-prop" status="internal" access="private" location="tst_stringsorter.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_stringsorter.qml" lineno="7" type="StringSorter" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="tst_sourceroles" qml-module-name="tst_sourceroles" href="qml-tst-sourceroles.html" status="internal" access="private" location="tst_sourceroles.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_sourceroles.qml" lineno="6" title="tst_sourceroles" fulltitle="tst_sourceroles" subtitle=""/>
|
||||||
|
<qmlclass name="tst_switchrole" qml-module-name="tst_switchrole" href="qml-tst-switchrole.html" status="internal" access="private" location="tst_switchrole.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_switchrole.qml" lineno="7" title="tst_switchrole" fulltitle="tst_switchrole" subtitle=""/>
|
||||||
|
<page name="index.html" href="index.html" status="active" location="index.qdoc" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/index.qdoc" lineno="1" documented="true" subtype="page" title="SortFilterProxyModel QML Module" fulltitle="SortFilterProxyModel QML Module" subtitle="" module="SortFilterProxyModel">
|
||||||
|
<contents name="filters" title="Filters" level="1"/>
|
||||||
|
<contents name="related-attached-types" title="Related attached types" level="2"/>
|
||||||
|
<contents name="sorters" title="Sorters" level="1"/>
|
||||||
|
<contents name="related-attached-types" title="Related attached types" level="2"/>
|
||||||
|
<contents name="proxyroles" title="ProxyRoles" level="1"/>
|
||||||
|
</page>
|
||||||
|
<qmlclass name="RoleFilter" qml-module-name="SortFilterProxyModel" qml-base-type="SortFilterProxyModel::Filter" fullname="SortFilterProxyModel.RoleFilter" href="qml-sortfilterproxymodel-rolefilter.html" status="active" access="public" abstract="true" documented="true" title="RoleFilter" fulltitle="RoleFilter" subtitle="" groups="Filters" brief="Base type for filters based on a source model role">
|
||||||
|
<qmlproperty name="roleName" fullname="SortFilterProxyModel.RoleFilter.roleName" status="active" access="public" documented="true" type="string" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="ValueFilter" qml-module-name="SortFilterProxyModel" qml-base-type="SortFilterProxyModel::RoleFilter" fullname="SortFilterProxyModel.ValueFilter" href="qml-sortfilterproxymodel-valuefilter.html" status="active" access="public" documented="true" title="ValueFilter" fulltitle="ValueFilter" subtitle="" groups="Filters" brief="Filters rows matching exactly a value">
|
||||||
|
<qmlproperty name="value" fullname="SortFilterProxyModel.ValueFilter.value" href="qml-sortfilterproxymodel-valuefilter.html#value-prop" status="active" access="public" documented="true" type="variant" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="FilterRole" qml-module-name="SortFilterProxyModel" qml-base-type="SortFilterProxyModel::SingleRole" fullname="SortFilterProxyModel.FilterRole" href="qml-sortfilterproxymodel-filterrole.html" status="active" access="public" documented="true" title="FilterRole" fulltitle="FilterRole" subtitle="" groups="ProxyRoles,FilterContainer" brief="A role resolving to true for rows matching all its filters">
|
||||||
|
<qmlproperty name="filters" fullname="SortFilterProxyModel.FilterRole.filters" href="qml-sortfilterproxymodel-filterrole.html#filters-prop" status="active" access="public" documented="true" type="list<Filter>" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="ExpressionRole" qml-module-name="SortFilterProxyModel" qml-base-type="SortFilterProxyModel::SingleRole" fullname="SortFilterProxyModel.ExpressionRole" href="qml-sortfilterproxymodel-expressionrole.html" status="active" access="public" documented="true" title="ExpressionRole" fulltitle="ExpressionRole" subtitle="" groups="ProxyRoles" brief="A custom role computed from a javascript expression">
|
||||||
|
<qmlproperty name="expression" fullname="SortFilterProxyModel.ExpressionRole.expression" href="qml-sortfilterproxymodel-expressionrole.html#expression-prop" status="active" access="public" documented="true" type="expression" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="ProxyRole" qml-module-name="SortFilterProxyModel" fullname="SortFilterProxyModel.ProxyRole" href="qml-sortfilterproxymodel-proxyrole.html" status="active" access="public" documented="true" title="ProxyRole" fulltitle="ProxyRole" subtitle="" groups="ProxyRoles" brief="Base type for the SortFilterProxyModel proxy roles"/>
|
||||||
|
<qmlclass name="JoinRole" qml-module-name="SortFilterProxyModel" qml-base-type="SortFilterProxyModel::SingleRole" fullname="SortFilterProxyModel.JoinRole" href="qml-sortfilterproxymodel-joinrole.html" status="active" access="public" documented="true" title="JoinRole" fulltitle="JoinRole" subtitle="" groups="ProxyRoles" brief="Role made from concatenating other roles">
|
||||||
|
<qmlproperty name="roleNames" fullname="SortFilterProxyModel.JoinRole.roleNames" href="qml-sortfilterproxymodel-joinrole.html#roleNames-prop" status="active" access="public" documented="true" type="list<string>" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="separator" fullname="SortFilterProxyModel.JoinRole.separator" href="qml-sortfilterproxymodel-joinrole.html#separator-prop" status="active" access="public" documented="true" type="string" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="tst_sortercontainerattached" qml-module-name="tst_sortercontainerattached" href="qml-tst-sortercontainerattached.html" status="internal" access="private" location="tst_sortercontainerattached.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_sortercontainerattached.qml" lineno="7" title="tst_sortercontainerattached" fulltitle="tst_sortercontainerattached" subtitle=""/>
|
||||||
|
<qmlclass name="SingleRole" qml-module-name="SortFilterProxyModel" qml-base-type="SortFilterProxyModel::ProxyRole" fullname="SortFilterProxyModel.SingleRole" href="qml-sortfilterproxymodel-singlerole.html" status="active" access="public" abstract="true" documented="true" title="SingleRole" fulltitle="SingleRole" subtitle="" groups="ProxyRoles" brief="Base type for the SortFilterProxyModel proxy roles defining a single role">
|
||||||
|
<qmlproperty name="name" fullname="SortFilterProxyModel.SingleRole.name" status="active" access="public" documented="true" type="string" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="RegExpRole" qml-module-name="SortFilterProxyModel" qml-base-type="SortFilterProxyModel::ProxyRole" fullname="SortFilterProxyModel.RegExpRole" href="qml-sortfilterproxymodel-regexprole.html" status="active" access="public" documented="true" title="RegExpRole" fulltitle="RegExpRole" subtitle="" groups="ProxyRoles" brief="A ProxyRole extracting data from a source role via a regular expression">
|
||||||
|
<qmlproperty name="roleName" fullname="SortFilterProxyModel.RegExpRole.roleName" href="qml-sortfilterproxymodel-regexprole.html#roleName-prop" status="active" access="public" documented="true" type="QString" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="pattern" fullname="SortFilterProxyModel.RegExpRole.pattern" href="qml-sortfilterproxymodel-regexprole.html#pattern-prop" status="active" access="public" documented="true" type="QString" attached="false" writable="true"/>
|
||||||
|
<qmlproperty name="caseSensitivity" fullname="SortFilterProxyModel.RegExpRole.caseSensitivity" href="qml-sortfilterproxymodel-regexprole.html#caseSensitivity-prop" status="active" access="public" documented="true" type="Qt::CaseSensitivity" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<qmlclass name="tst_rolesorter" qml-module-name="tst_rolesorter" href="qml-tst-rolesorter.html" status="internal" access="private" location="tst_rolesorter.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_rolesorter.qml" lineno="6" title="tst_rolesorter" fulltitle="tst_rolesorter" subtitle="">
|
||||||
|
<qmlproperty name="sorters" fullname="tst_rolesorter::sorters" href="qml-tst-rolesorter.html#sorters-prop" status="internal" access="private" location="tst_rolesorter.qml" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/tests/tst_rolesorter.qml" lineno="7" type="RoleSorter" attached="false" writable="true"/>
|
||||||
|
</qmlclass>
|
||||||
|
<group name="FilterAttached" href="filterattached.html" status="internal" seen="false" title="" members="FilterContainer"/>
|
||||||
|
<group name="FilterContainer" href="filtercontainer.html" status="internal" seen="false" title="" members="AllOf,AnyOf,FilterRole,SwitchRole,SortFilterProxyModel,FilterSorter"/>
|
||||||
|
<group name="Filters" href="filters.html" status="internal" seen="false" title="" members="AllOf,AnyOf,ExpressionFilter,Filter,IndexFilter,RangeFilter,RegExpFilter,RoleFilter,ValueFilter"/>
|
||||||
|
<group name="ProxyRoles" href="proxyroles.html" status="internal" seen="false" title="" members="ExpressionRole,FilterRole,JoinRole,ProxyRole,RegExpRole,SingleRole,SwitchRole"/>
|
||||||
|
<group name="SortFilterProxyModel" href="sortfilterproxymodel.html" status="internal" seen="false" title="" members="SortFilterProxyModel"/>
|
||||||
|
<group name="SorterAttached" href="sorterattached.html" status="internal" seen="false" title="" members="SorterContainer"/>
|
||||||
|
<group name="SorterContainer" href="sortercontainer.html" status="internal" seen="false" title="" members="SortFilterProxyModel"/>
|
||||||
|
<group name="Sorters" href="sorters.html" status="internal" seen="false" title="" members="ExpressionSorter,FilterSorter,RoleSorter,Sorter,StringSorter"/>
|
||||||
|
<qmlmodule name="SortFilterProxyModel" qml-module-name="SortFilterProxyModel" qml-module-version="." href="sortfilterproxymodel-qmlmodule.html" status="active" location="index.qdoc" filepath="D:/coding/MeetupSFPMMap/vendor/SortFilterProxyModel/index.qdoc" lineno="25" documented="true" seen="true" title="" module="SortFilterProxyModel" members="AllOf,AnyOf,ExpressionFilter,Filter,FilterContainer,IndexFilter,RangeFilter,RegExpFilter,RoleFilter,ValueFilter,ExpressionRole,FilterRole,JoinRole,ProxyRole,RegExpRole,SingleRole,SwitchRole,SortFilterProxyModel,ExpressionSorter,FilterSorter,RoleSorter,Sorter,SorterContainer,StringSorter"/>
|
||||||
|
</namespace>
|
||||||
|
</INDEX>
|
805
client/3rd/SortFilterProxyModel/docs/style/offline.css
Normal file
805
client/3rd/SortFilterProxyModel/docs/style/offline.css
Normal file
|
@ -0,0 +1,805 @@
|
||||||
|
body {
|
||||||
|
font: normal 400 14px/1.2 Arial;
|
||||||
|
margin-top: 85px;
|
||||||
|
font-family: Arial, Helvetica;
|
||||||
|
text-align: left;
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-right: 5px;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
line-height: 20px
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
margin-left: 0px;
|
||||||
|
max-width: 800px;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content .border img {
|
||||||
|
box-shadow:3px 3px 8px 3px rgba(200,200,200,0.5)
|
||||||
|
}
|
||||||
|
|
||||||
|
.content .border .player {
|
||||||
|
box-shadow:3px 3px 8px 3px rgba(200,200,200,0.5)
|
||||||
|
}
|
||||||
|
|
||||||
|
.content .indexboxcont li {
|
||||||
|
font: normal bold 13px/1 Verdana
|
||||||
|
}
|
||||||
|
|
||||||
|
.content .normallist li {
|
||||||
|
font: normal 13px/1 Verdana
|
||||||
|
}
|
||||||
|
|
||||||
|
.descr {
|
||||||
|
margin-top: 35px;
|
||||||
|
margin-bottom: 45px;
|
||||||
|
margin-left: 5px;
|
||||||
|
text-align: left;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.name {
|
||||||
|
max-width: 75%;
|
||||||
|
font-weight: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
tt {
|
||||||
|
text-align: left
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
-----------
|
||||||
|
links
|
||||||
|
-----------
|
||||||
|
*/
|
||||||
|
|
||||||
|
a:link {
|
||||||
|
color: #007330;
|
||||||
|
text-decoration: none;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.qa-mark:target:before {
|
||||||
|
content: "***";
|
||||||
|
color: #ff0000;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: #44a51c;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:visited {
|
||||||
|
color: #007330;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:visited:hover {
|
||||||
|
color: #44a51c;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
-----------
|
||||||
|
offline viewing: HTML links display an icon
|
||||||
|
-----------
|
||||||
|
*/
|
||||||
|
|
||||||
|
a[href*="http://"], a[href*="ftp://"], a[href*="https://"] {
|
||||||
|
text-decoration: none;
|
||||||
|
background-image: url(../images/ico_out.png);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: left;
|
||||||
|
padding-left: 20px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flags {
|
||||||
|
text-decoration: none;
|
||||||
|
text-height: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flags:target {
|
||||||
|
background-color: #FFFFD6;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
-------------------------------
|
||||||
|
NOTE styles
|
||||||
|
-------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
.notetitle, .tiptitle, .fastpathtitle {
|
||||||
|
font-weight: bold
|
||||||
|
}
|
||||||
|
|
||||||
|
.attentiontitle, .cautiontitle, .dangertitle, .importanttitle, .remembertitle, .restrictiontitle {
|
||||||
|
font-weight: bold
|
||||||
|
}
|
||||||
|
|
||||||
|
.note, .tip, .fastpath {
|
||||||
|
background: #F2F2F2 url(../images/ico_note.png);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: top left;
|
||||||
|
padding: 5px;
|
||||||
|
padding-left: 40px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
border: #999 1px dotted;
|
||||||
|
color: #666666;
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.attention, .caution, .danger, .important, .remember, .restriction {
|
||||||
|
background: #F2F2F2 url(../images/ico_note_attention.png);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: top left;
|
||||||
|
padding: 5px;
|
||||||
|
padding-left: 40px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
border: #999 1px dotted;
|
||||||
|
color: #666666;
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
-------------------------------
|
||||||
|
Top navigation
|
||||||
|
-------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
.qtref {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
height: 15px;
|
||||||
|
z-index: 1;
|
||||||
|
font-size: 11px;
|
||||||
|
padding-right: 10px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.naviNextPrevious {
|
||||||
|
clear: both;
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
text-align: right;
|
||||||
|
top: -47px;
|
||||||
|
float: right;
|
||||||
|
height: 20px;
|
||||||
|
z-index: 1;
|
||||||
|
padding-right: 10px;
|
||||||
|
padding-top: 2px;
|
||||||
|
vertical-align: top;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.naviNextPrevious > a:first-child {
|
||||||
|
background-image: url(../images/btn_prev.png);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: left;
|
||||||
|
padding-left: 20px;
|
||||||
|
height: 20px;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.naviNextPrevious > a:last-child {
|
||||||
|
background-image: url(../images/btn_next.png);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: right;
|
||||||
|
padding-right: 20px;
|
||||||
|
height: 20px;
|
||||||
|
margin-left: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.naviSeparator { display: none }
|
||||||
|
/*
|
||||||
|
-----------
|
||||||
|
footer and license
|
||||||
|
-----------
|
||||||
|
*/
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
text-align: left;
|
||||||
|
padding-top: 45px;
|
||||||
|
padding-left: 5px;
|
||||||
|
margin-top: 45px;
|
||||||
|
margin-bottom: 45px;
|
||||||
|
font-size: 10px;
|
||||||
|
border-top: 1px solid #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer p {
|
||||||
|
line-height: 14px;
|
||||||
|
font-size: 11px;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer a[href*="http://"], a[href*="ftp://"], a[href*="https://"] {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerNavi {
|
||||||
|
width: auto;
|
||||||
|
text-align: right;
|
||||||
|
margin-top: 50px;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navigationbar {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
top: -20px;
|
||||||
|
border-top: 1px solid #cecece;
|
||||||
|
border-bottom: 1px solid #cecece;
|
||||||
|
background-color: #F2F2F2;
|
||||||
|
z-index: 1;
|
||||||
|
height: 20px;
|
||||||
|
padding-left: 7px;
|
||||||
|
margin: 0px;
|
||||||
|
padding-top: 2px;
|
||||||
|
margin-left: -5px;
|
||||||
|
margin-right: -5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navigationbar .first {
|
||||||
|
background: url(../images/home.png);
|
||||||
|
background-position: left;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navigationbar ul {
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navigationbar ul li {
|
||||||
|
list-style-type: none;
|
||||||
|
padding-top: 2px;
|
||||||
|
padding-left: 4px;
|
||||||
|
margin: 0;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navigationbar li {
|
||||||
|
float: left
|
||||||
|
}
|
||||||
|
|
||||||
|
.navigationbar li a, .navigationbar td a {
|
||||||
|
display: block;
|
||||||
|
text-decoration: none;
|
||||||
|
background: url(../images/arrow_bc.png);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: right;
|
||||||
|
padding-right: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.buildversion {
|
||||||
|
float: right;
|
||||||
|
margin-top: -18px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navigationbar table {
|
||||||
|
border-radius: 0;
|
||||||
|
border: 0 none;
|
||||||
|
background-color: #F2F2F2;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navigationbar table td {
|
||||||
|
padding: 0;
|
||||||
|
border: 0 none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#buildversion {
|
||||||
|
font-style: italic;
|
||||||
|
font-size: small;
|
||||||
|
float: right;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
/* table of content
|
||||||
|
no display
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
-----------
|
||||||
|
headers
|
||||||
|
-----------
|
||||||
|
*/
|
||||||
|
|
||||||
|
@media screen {
|
||||||
|
.title {
|
||||||
|
color: #313131;
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: normal;
|
||||||
|
left: 0;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-top: 20px;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
background-color: #E6E6E6;
|
||||||
|
border-bottom: 1px #CCC solid;
|
||||||
|
border-top: 2px #CCC solid;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-left: 0px;
|
||||||
|
margin-right: 0px;
|
||||||
|
}
|
||||||
|
.subtitle, .small-subtitle {
|
||||||
|
display: block;
|
||||||
|
clear: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
margin: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
h2, p.h2 {
|
||||||
|
font: 500 16px/1.2 Arial;
|
||||||
|
font-weight: 100;
|
||||||
|
background-color: #F2F3F4;
|
||||||
|
padding: 4px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
margin-top: 30px;
|
||||||
|
border-top: #E0E0DE 1px solid;
|
||||||
|
border-bottom: #E0E0DE 1px solid;
|
||||||
|
max-width: 99%;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2:target {
|
||||||
|
background-color: #F2F3D4;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font: 500 14px/1.2 Arial;
|
||||||
|
font-weight: 100;
|
||||||
|
text-decoration: underline;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3.fn, span.fn {
|
||||||
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #E6E6E6;
|
||||||
|
-moz-border-radius: 7px 7px 7px 7px;
|
||||||
|
-webkit-border-radius: 7px 7px 7px 7px;
|
||||||
|
border-radius: 7px 7px 7px 7px;
|
||||||
|
background-color: #F6F6F6;
|
||||||
|
word-spacing: 3px;
|
||||||
|
padding: 5px 5px;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: bold;
|
||||||
|
max-width: 75%;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 0px;
|
||||||
|
margin-top: 45px;
|
||||||
|
}
|
||||||
|
.fngroup h3.fngroupitem {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
h3.fn code {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
h3.fn:target {
|
||||||
|
background-color: #F6F6D6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.name {
|
||||||
|
color: #1A1A1A
|
||||||
|
}
|
||||||
|
|
||||||
|
.type {
|
||||||
|
color: #808080
|
||||||
|
}
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
.title {
|
||||||
|
color: #0066CB;
|
||||||
|
font-family: Arial, Helvetica;
|
||||||
|
font-size: 32px;
|
||||||
|
font-weight: normal;
|
||||||
|
left: 0;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
-----------------
|
||||||
|
table styles
|
||||||
|
-----------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
.table img {
|
||||||
|
border: none;
|
||||||
|
margin-left: 0px;
|
||||||
|
-moz-box-shadow: 0px 0px 0px #fff;
|
||||||
|
-webkit-box-shadow: 0px 0px 0px #fff;
|
||||||
|
box-shadow: 0px 0px 0px #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* table with border alternative colours*/
|
||||||
|
|
||||||
|
table, pre, .LegaleseLeft {
|
||||||
|
-moz-border-radius: 7px 7px 7px 7px;
|
||||||
|
-webkit-border-radius: 7px 7px 7px 7px;
|
||||||
|
border-radius: 7px 7px 7px 7px;
|
||||||
|
background-color: #F6F6F6;
|
||||||
|
border: 1px solid #E6E6E6;
|
||||||
|
border-collapse: separate;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
margin-left: 15px;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr.even {
|
||||||
|
background-color: white;
|
||||||
|
color: #66666E;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr.odd {
|
||||||
|
background-color: #F6F6F6;
|
||||||
|
color: #66666E;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr:target {
|
||||||
|
background-color: #F6F6D6;
|
||||||
|
}
|
||||||
|
|
||||||
|
table thead {
|
||||||
|
text-align: left;
|
||||||
|
padding-left: 20px;
|
||||||
|
background-color: #e1e0e0;
|
||||||
|
border-left: none;
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
table thead th {
|
||||||
|
padding-top: 5px;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
border-bottom: 2px solid #D1D1D1;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table th {
|
||||||
|
text-align: left;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table td {
|
||||||
|
padding: 3px 15px 3px 20px;
|
||||||
|
border-bottom: #CCC dotted 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table p {
|
||||||
|
margin: 0px
|
||||||
|
}
|
||||||
|
|
||||||
|
.LegaleseLeft {
|
||||||
|
font-family: monospace;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
/* table bodless & white*/
|
||||||
|
|
||||||
|
.borderless {
|
||||||
|
border-radius: 0px 0px 0px 0px;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.borderless tr {
|
||||||
|
background-color: #FFF;
|
||||||
|
color: #66666E;
|
||||||
|
}
|
||||||
|
|
||||||
|
.borderless td {
|
||||||
|
border: none;
|
||||||
|
border-bottom: #fff dotted 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
-----------
|
||||||
|
List
|
||||||
|
-----------
|
||||||
|
*/
|
||||||
|
|
||||||
|
ul {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
padding-left: 8px;
|
||||||
|
list-style: outside;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul > li {
|
||||||
|
list-style-type: square;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol {
|
||||||
|
margin: 10px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol.A > li {
|
||||||
|
list-style-type: upper-alpha;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol.a > li{
|
||||||
|
list-style-type: lower-alpha;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol > li {
|
||||||
|
margin-left: 30px;
|
||||||
|
padding-left: 8px;
|
||||||
|
list-style: decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.centerAlign {
|
||||||
|
text-align: left
|
||||||
|
}
|
||||||
|
|
||||||
|
.cpp, .LegaleseLeft {
|
||||||
|
display: block;
|
||||||
|
margin: 10px;
|
||||||
|
overflow: auto;
|
||||||
|
padding: 20px 20px 20px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.js {
|
||||||
|
display: block;
|
||||||
|
margin: 10px;
|
||||||
|
overflow: auto;
|
||||||
|
padding: 20px 20px 20px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.memItemLeft {
|
||||||
|
padding-right: 3px
|
||||||
|
}
|
||||||
|
|
||||||
|
.memItemRight {
|
||||||
|
padding: 3px 15px 3px 0
|
||||||
|
}
|
||||||
|
|
||||||
|
.qml {
|
||||||
|
display: block;
|
||||||
|
margin: 10px;
|
||||||
|
overflow: auto;
|
||||||
|
padding: 20px 20px 20px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qmldefault {
|
||||||
|
padding-left: 5px;
|
||||||
|
float: right;
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qmlreadonly {
|
||||||
|
padding-left: 5px;
|
||||||
|
float: right;
|
||||||
|
color: #254117;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rightAlign {
|
||||||
|
padding: 3px 5px 3px 10px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qmldoc {
|
||||||
|
margin-left: 15px
|
||||||
|
}
|
||||||
|
|
||||||
|
.flowList {
|
||||||
|
padding: 25px
|
||||||
|
}
|
||||||
|
.flowList dd {
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 10px;
|
||||||
|
width: 255px;
|
||||||
|
line-height: 1.15em;
|
||||||
|
overflow-x: hidden;
|
||||||
|
text-overflow: ellipsis
|
||||||
|
}
|
||||||
|
.alphaChar {
|
||||||
|
font-size: 2em;
|
||||||
|
position: relative
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
-----------
|
||||||
|
Content table
|
||||||
|
-----------
|
||||||
|
*/
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
.toc {
|
||||||
|
float: right;
|
||||||
|
clear: right;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
padding-top: 50px;
|
||||||
|
width: 100%;
|
||||||
|
background-image: url(../images/bgrContent.png);
|
||||||
|
background-position: top;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen {
|
||||||
|
.toc {
|
||||||
|
float: right;
|
||||||
|
clear: right;
|
||||||
|
vertical-align: top;
|
||||||
|
-moz-border-radius: 7px 7px 7px 7px;
|
||||||
|
-webkit-border-radius: 7px 7px 7px 7px;
|
||||||
|
border-radius: 7px 7px 7px 7px;
|
||||||
|
background: #FFF url('../images/bgrContent.png');
|
||||||
|
background-position: top;
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border: 1px solid #E6E6E6;
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
height: auto;
|
||||||
|
width: 200px;
|
||||||
|
text-align: left;
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.toc h3 {
|
||||||
|
text-decoration: none
|
||||||
|
}
|
||||||
|
|
||||||
|
.toc h3 {
|
||||||
|
font: 500 14px/1.2 Arial;
|
||||||
|
font-weight: 100;
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
padding-top: 5px;
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toc ul {
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toc ul li {
|
||||||
|
margin-left: 15px;
|
||||||
|
list-style-image: url(../images/bullet_dn.png);
|
||||||
|
marker-offset: 0px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
padding-left: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toc .level1 {
|
||||||
|
border: none
|
||||||
|
}
|
||||||
|
|
||||||
|
.toc .level2 {
|
||||||
|
border: none;
|
||||||
|
margin-left: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.level3 {
|
||||||
|
border: none;
|
||||||
|
margin-left: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clearfix {
|
||||||
|
clear: both
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
-----------
|
||||||
|
Landing page
|
||||||
|
-----------
|
||||||
|
*/
|
||||||
|
|
||||||
|
.col-group {
|
||||||
|
white-space: nowrap;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.landing h2 {
|
||||||
|
background-color: transparent;
|
||||||
|
border: none;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.landing a, .landing li {
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-1 {
|
||||||
|
display: inline-block;
|
||||||
|
white-space: normal;
|
||||||
|
width: 70%;
|
||||||
|
height: 100%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-2 {
|
||||||
|
display: inline-block;
|
||||||
|
white-space: normal;
|
||||||
|
width: 20%;
|
||||||
|
margin-left: 5%;
|
||||||
|
position: relative;
|
||||||
|
top: -20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-1 h1 {
|
||||||
|
margin: 20px 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-1 h2 {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.landingicons {
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icons1of3 {
|
||||||
|
display: inline-block;
|
||||||
|
width: 33.3333%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icons1of3 h2, .doc-column h2 {
|
||||||
|
font-size: 15px;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.multi-column {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.multi-column div {
|
||||||
|
display: -moz-inline-box;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
margin-top: 1em;
|
||||||
|
margin-right: 4em;
|
||||||
|
width: 24em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mainContent .video {
|
||||||
|
width:40%;
|
||||||
|
max-width:640px;
|
||||||
|
margin: 15px 0 0 15px;
|
||||||
|
position:relative;
|
||||||
|
display:table
|
||||||
|
}
|
||||||
|
|
||||||
|
.mainContent .video > .vspan {
|
||||||
|
padding-top:60%;
|
||||||
|
display:block
|
||||||
|
}
|
||||||
|
.mainContent .video iframe {
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
position:absolute;
|
||||||
|
top:0;
|
||||||
|
left:0
|
||||||
|
}
|
|
@ -56,13 +56,13 @@ void FilterContainer::append_filter(QQmlListProperty<Filter>* list, Filter* filt
|
||||||
that->appendFilter(filter);
|
that->appendFilter(filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
int FilterContainer::count_filter(QQmlListProperty<Filter>* list)
|
qsizetype FilterContainer::count_filter(QQmlListProperty<Filter>* list)
|
||||||
{
|
{
|
||||||
QList<Filter*>* filters = static_cast<QList<Filter*>*>(list->data);
|
QList<Filter*>* filters = static_cast<QList<Filter*>*>(list->data);
|
||||||
return filters->count();
|
return filters->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
Filter* FilterContainer::at_filter(QQmlListProperty<Filter>* list, int index)
|
Filter* FilterContainer::at_filter(QQmlListProperty<Filter>* list, qsizetype index)
|
||||||
{
|
{
|
||||||
QList<Filter*>* filters = static_cast<QList<Filter*>*>(list->data);
|
QList<Filter*>* filters = static_cast<QList<Filter*>*>(list->data);
|
||||||
return filters->at(index);
|
return filters->at(index);
|
||||||
|
|
|
@ -31,8 +31,8 @@ private:
|
||||||
virtual void onFiltersCleared() = 0;
|
virtual void onFiltersCleared() = 0;
|
||||||
|
|
||||||
static void append_filter(QQmlListProperty<Filter>* list, Filter* filter);
|
static void append_filter(QQmlListProperty<Filter>* list, Filter* filter);
|
||||||
static int count_filter(QQmlListProperty<Filter>* list);
|
static qsizetype count_filter(QQmlListProperty<Filter>* list);
|
||||||
static Filter* at_filter(QQmlListProperty<Filter>* list, int index);
|
static Filter* at_filter(QQmlListProperty<Filter>* list, qsizetype index);
|
||||||
static void clear_filters(QQmlListProperty<Filter>* list);
|
static void clear_filters(QQmlListProperty<Filter>* list);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "rangefilter.h"
|
#include "rangefilter.h"
|
||||||
|
#include "../utils/utils.h"
|
||||||
|
|
||||||
namespace qqsfpm {
|
namespace qqsfpm {
|
||||||
|
|
||||||
|
@ -128,7 +129,7 @@ void RangeFilter::setMaximumInclusive(bool maximumInclusive)
|
||||||
|
|
||||||
bool RangeFilter::filterRow(const QModelIndex& sourceIndex, const QQmlSortFilterProxyModel& proxyModel) const
|
bool RangeFilter::filterRow(const QModelIndex& sourceIndex, const QQmlSortFilterProxyModel& proxyModel) const
|
||||||
{
|
{
|
||||||
QVariant value = sourceData(sourceIndex, proxyModel);
|
const QVariant value = sourceData(sourceIndex, proxyModel);
|
||||||
bool lessThanMin = m_minimumValue.isValid() &&
|
bool lessThanMin = m_minimumValue.isValid() &&
|
||||||
(m_minimumInclusive ? value < m_minimumValue : value <= m_minimumValue);
|
(m_minimumInclusive ? value < m_minimumValue : value <= m_minimumValue);
|
||||||
bool moreThanMax = m_maximumValue.isValid() &&
|
bool moreThanMax = m_maximumValue.isValid() &&
|
||||||
|
|
|
@ -35,6 +35,12 @@ namespace qqsfpm {
|
||||||
|
|
||||||
\sa syntax
|
\sa syntax
|
||||||
*/
|
*/
|
||||||
|
RegExpFilter::RegExpFilter() :
|
||||||
|
m_caseSensitivity(m_regExp.patternOptions().testFlag(
|
||||||
|
QRegularExpression::CaseInsensitiveOption) ? Qt::CaseInsensitive : Qt::CaseSensitive)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
QString RegExpFilter::pattern() const
|
QString RegExpFilter::pattern() const
|
||||||
{
|
{
|
||||||
return m_pattern;
|
return m_pattern;
|
||||||
|
@ -51,38 +57,6 @@ void RegExpFilter::setPattern(const QString& pattern)
|
||||||
invalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
\qmlproperty enum RegExpFilter::syntax
|
|
||||||
|
|
||||||
The pattern used to filter the contents of the source model.
|
|
||||||
|
|
||||||
Only the source model's value having their \l RoleFilter::roleName data matching this \l pattern with the specified \l syntax will be kept.
|
|
||||||
|
|
||||||
\value RegExpFilter.RegExp A rich Perl-like pattern matching syntax. This is the default.
|
|
||||||
\value RegExpFilter.Wildcard This provides a simple pattern matching syntax similar to that used by shells (command interpreters) for "file globbing".
|
|
||||||
\value RegExpFilter.FixedString The pattern is a fixed string. This is equivalent to using the RegExp pattern on a string in which all metacharacters are escaped.
|
|
||||||
\value RegExpFilter.RegExp2 Like RegExp, but with greedy quantifiers.
|
|
||||||
\value RegExpFilter.WildcardUnix This is similar to Wildcard but with the behavior of a Unix shell. The wildcard characters can be escaped with the character "\".
|
|
||||||
\value RegExpFilter.W3CXmlSchema11 The pattern is a regular expression as defined by the W3C XML Schema 1.1 specification.
|
|
||||||
|
|
||||||
\sa pattern
|
|
||||||
*/
|
|
||||||
RegExpFilter::PatternSyntax RegExpFilter::syntax() const
|
|
||||||
{
|
|
||||||
return m_syntax;
|
|
||||||
}
|
|
||||||
|
|
||||||
void RegExpFilter::setSyntax(RegExpFilter::PatternSyntax syntax)
|
|
||||||
{
|
|
||||||
if (m_syntax == syntax)
|
|
||||||
return;
|
|
||||||
|
|
||||||
m_syntax = syntax;
|
|
||||||
m_regExp.setPatternSyntax(static_cast<QRegExp::PatternSyntax>(syntax));
|
|
||||||
Q_EMIT syntaxChanged();
|
|
||||||
invalidate();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty Qt::CaseSensitivity RegExpFilter::caseSensitivity
|
\qmlproperty Qt::CaseSensitivity RegExpFilter::caseSensitivity
|
||||||
|
|
||||||
|
@ -99,15 +73,18 @@ void RegExpFilter::setCaseSensitivity(Qt::CaseSensitivity caseSensitivity)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_caseSensitivity = caseSensitivity;
|
m_caseSensitivity = caseSensitivity;
|
||||||
m_regExp.setCaseSensitivity(caseSensitivity);
|
QRegularExpression::PatternOptions patternOptions = m_regExp.patternOptions();
|
||||||
|
if (caseSensitivity == Qt::CaseInsensitive)
|
||||||
|
patternOptions.setFlag(QRegularExpression::CaseInsensitiveOption);
|
||||||
|
m_regExp.setPatternOptions(patternOptions);
|
||||||
Q_EMIT caseSensitivityChanged();
|
Q_EMIT caseSensitivityChanged();
|
||||||
invalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RegExpFilter::filterRow(const QModelIndex& sourceIndex, const QQmlSortFilterProxyModel& proxyModel) const
|
bool RegExpFilter::filterRow(const QModelIndex& sourceIndex, const QQmlSortFilterProxyModel& proxyModel) const
|
||||||
{
|
{
|
||||||
QString string = sourceData(sourceIndex, proxyModel).toString();
|
const QString string = sourceData(sourceIndex, proxyModel).toString();
|
||||||
return m_regExp.indexIn(string) != -1;
|
return m_regExp.match(string).hasMatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,32 +3,23 @@
|
||||||
|
|
||||||
#include "rolefilter.h"
|
#include "rolefilter.h"
|
||||||
|
|
||||||
|
#include <QRegularExpression>
|
||||||
|
|
||||||
namespace qqsfpm {
|
namespace qqsfpm {
|
||||||
|
|
||||||
class RegExpFilter : public RoleFilter {
|
class RegExpFilter : public RoleFilter {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QString pattern READ pattern WRITE setPattern NOTIFY patternChanged)
|
Q_PROPERTY(QString pattern READ pattern WRITE setPattern NOTIFY patternChanged)
|
||||||
Q_PROPERTY(PatternSyntax syntax READ syntax WRITE setSyntax NOTIFY syntaxChanged)
|
|
||||||
Q_PROPERTY(Qt::CaseSensitivity caseSensitivity READ caseSensitivity WRITE setCaseSensitivity NOTIFY caseSensitivityChanged)
|
Q_PROPERTY(Qt::CaseSensitivity caseSensitivity READ caseSensitivity WRITE setCaseSensitivity NOTIFY caseSensitivityChanged)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum PatternSyntax {
|
|
||||||
RegExp = QRegExp::RegExp,
|
|
||||||
Wildcard = QRegExp::Wildcard,
|
|
||||||
FixedString = QRegExp::FixedString,
|
|
||||||
RegExp2 = QRegExp::RegExp2,
|
|
||||||
WildcardUnix = QRegExp::WildcardUnix,
|
|
||||||
W3CXmlSchema11 = QRegExp::W3CXmlSchema11 };
|
|
||||||
Q_ENUMS(PatternSyntax)
|
|
||||||
|
|
||||||
using RoleFilter::RoleFilter;
|
using RoleFilter::RoleFilter;
|
||||||
|
|
||||||
|
RegExpFilter();
|
||||||
|
|
||||||
QString pattern() const;
|
QString pattern() const;
|
||||||
void setPattern(const QString& pattern);
|
void setPattern(const QString& pattern);
|
||||||
|
|
||||||
PatternSyntax syntax() const;
|
|
||||||
void setSyntax(PatternSyntax syntax);
|
|
||||||
|
|
||||||
Qt::CaseSensitivity caseSensitivity() const;
|
Qt::CaseSensitivity caseSensitivity() const;
|
||||||
void setCaseSensitivity(Qt::CaseSensitivity caseSensitivity);
|
void setCaseSensitivity(Qt::CaseSensitivity caseSensitivity);
|
||||||
|
|
||||||
|
@ -37,13 +28,11 @@ protected:
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void patternChanged();
|
void patternChanged();
|
||||||
void syntaxChanged();
|
|
||||||
void caseSensitivityChanged();
|
void caseSensitivityChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QRegExp m_regExp;
|
QRegularExpression m_regExp;
|
||||||
Qt::CaseSensitivity m_caseSensitivity = m_regExp.caseSensitivity();
|
Qt::CaseSensitivity m_caseSensitivity;
|
||||||
PatternSyntax m_syntax = static_cast<PatternSyntax>(m_regExp.patternSyntax());
|
|
||||||
QString m_pattern = m_regExp.pattern();
|
QString m_pattern = m_regExp.pattern();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -43,13 +43,13 @@ void ProxyRoleContainer::append_proxyRole(QQmlListProperty<ProxyRole>* list, Pro
|
||||||
that->appendProxyRole(proxyRole);
|
that->appendProxyRole(proxyRole);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ProxyRoleContainer::count_proxyRole(QQmlListProperty<ProxyRole>* list)
|
qsizetype ProxyRoleContainer::count_proxyRole(QQmlListProperty<ProxyRole>* list)
|
||||||
{
|
{
|
||||||
QList<ProxyRole*>* ProxyRoles = static_cast<QList<ProxyRole*>*>(list->data);
|
QList<ProxyRole*>* ProxyRoles = static_cast<QList<ProxyRole*>*>(list->data);
|
||||||
return ProxyRoles->count();
|
return ProxyRoles->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
ProxyRole* ProxyRoleContainer::at_proxyRole(QQmlListProperty<ProxyRole>* list, int index)
|
ProxyRole* ProxyRoleContainer::at_proxyRole(QQmlListProperty<ProxyRole>* list, qsizetype index)
|
||||||
{
|
{
|
||||||
QList<ProxyRole*>* ProxyRoles = static_cast<QList<ProxyRole*>*>(list->data);
|
QList<ProxyRole*>* ProxyRoles = static_cast<QList<ProxyRole*>*>(list->data);
|
||||||
return ProxyRoles->at(index);
|
return ProxyRoles->at(index);
|
||||||
|
|
|
@ -29,8 +29,8 @@ private:
|
||||||
virtual void onProxyRolesCleared() = 0;
|
virtual void onProxyRolesCleared() = 0;
|
||||||
|
|
||||||
static void append_proxyRole(QQmlListProperty<ProxyRole>* list, ProxyRole* proxyRole);
|
static void append_proxyRole(QQmlListProperty<ProxyRole>* list, ProxyRole* proxyRole);
|
||||||
static int count_proxyRole(QQmlListProperty<ProxyRole>* list);
|
static qsizetype count_proxyRole(QQmlListProperty<ProxyRole>* list);
|
||||||
static ProxyRole* at_proxyRole(QQmlListProperty<ProxyRole>* list, int index);
|
static ProxyRole* at_proxyRole(QQmlListProperty<ProxyRole>* list, qsizetype index);
|
||||||
static void clear_proxyRoles(QQmlListProperty<ProxyRole>* list);
|
static void clear_proxyRoles(QQmlListProperty<ProxyRole>* list);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
22
client/3rd/SortFilterProxyModel/qpm.json
Normal file
22
client/3rd/SortFilterProxyModel/qpm.json
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"name": "fr.grecko.sortfilterproxymodel",
|
||||||
|
"description": "A nicely exposed QSortFilterProxyModel for QML",
|
||||||
|
"author": {
|
||||||
|
"name": "Pierre-Yves Siret",
|
||||||
|
"email": "gr3cko@gmail.com"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "GITHUB",
|
||||||
|
"url": "https://github.com/oKcerG/SortFilterProxyModel.git"
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"label": "0.1.0",
|
||||||
|
"revision": "",
|
||||||
|
"fingerprint": ""
|
||||||
|
},
|
||||||
|
"dependencies": [
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"pri_filename": "SortFilterProxyModel.pri",
|
||||||
|
"webpage": ""
|
||||||
|
}
|
|
@ -92,37 +92,20 @@ void QQmlSortFilterProxyModel::setFilterRoleName(const QString& filterRoleName)
|
||||||
|
|
||||||
QString QQmlSortFilterProxyModel::filterPattern() const
|
QString QQmlSortFilterProxyModel::filterPattern() const
|
||||||
{
|
{
|
||||||
return filterRegExp().pattern();
|
return filterRegularExpression().pattern();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QQmlSortFilterProxyModel::setFilterPattern(const QString& filterPattern)
|
void QQmlSortFilterProxyModel::setFilterPattern(const QString& filterPattern)
|
||||||
{
|
{
|
||||||
QRegExp regExp = filterRegExp();
|
QRegularExpression regExp = filterRegularExpression();
|
||||||
if (regExp.pattern() == filterPattern)
|
if (regExp.pattern() == filterPattern)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
regExp.setPattern(filterPattern);
|
regExp.setPattern(filterPattern);
|
||||||
QSortFilterProxyModel::setFilterRegExp(regExp);
|
QSortFilterProxyModel::setFilterRegularExpression(regExp);
|
||||||
Q_EMIT filterPatternChanged();
|
Q_EMIT filterPatternChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
QQmlSortFilterProxyModel::PatternSyntax QQmlSortFilterProxyModel::filterPatternSyntax() const
|
|
||||||
{
|
|
||||||
return static_cast<PatternSyntax>(filterRegExp().patternSyntax());
|
|
||||||
}
|
|
||||||
|
|
||||||
void QQmlSortFilterProxyModel::setFilterPatternSyntax(QQmlSortFilterProxyModel::PatternSyntax patternSyntax)
|
|
||||||
{
|
|
||||||
QRegExp regExp = filterRegExp();
|
|
||||||
QRegExp::PatternSyntax patternSyntaxTmp = static_cast<QRegExp::PatternSyntax>(patternSyntax);
|
|
||||||
if (regExp.patternSyntax() == patternSyntaxTmp)
|
|
||||||
return;
|
|
||||||
|
|
||||||
regExp.setPatternSyntax(patternSyntaxTmp);
|
|
||||||
QSortFilterProxyModel::setFilterRegExp(regExp);
|
|
||||||
Q_EMIT filterPatternSyntaxChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
const QVariant& QQmlSortFilterProxyModel::filterValue() const
|
const QVariant& QQmlSortFilterProxyModel::filterValue() const
|
||||||
{
|
{
|
||||||
return m_filterValue;
|
return m_filterValue;
|
||||||
|
|
|
@ -26,7 +26,6 @@ class QQmlSortFilterProxyModel : public QSortFilterProxyModel,
|
||||||
|
|
||||||
Q_PROPERTY(QString filterRoleName READ filterRoleName WRITE setFilterRoleName NOTIFY filterRoleNameChanged)
|
Q_PROPERTY(QString filterRoleName READ filterRoleName WRITE setFilterRoleName NOTIFY filterRoleNameChanged)
|
||||||
Q_PROPERTY(QString filterPattern READ filterPattern WRITE setFilterPattern NOTIFY filterPatternChanged)
|
Q_PROPERTY(QString filterPattern READ filterPattern WRITE setFilterPattern NOTIFY filterPatternChanged)
|
||||||
Q_PROPERTY(PatternSyntax filterPatternSyntax READ filterPatternSyntax WRITE setFilterPatternSyntax NOTIFY filterPatternSyntaxChanged)
|
|
||||||
Q_PROPERTY(QVariant filterValue READ filterValue WRITE setFilterValue NOTIFY filterValueChanged)
|
Q_PROPERTY(QVariant filterValue READ filterValue WRITE setFilterValue NOTIFY filterValueChanged)
|
||||||
|
|
||||||
Q_PROPERTY(QString sortRoleName READ sortRoleName WRITE setSortRoleName NOTIFY sortRoleNameChanged)
|
Q_PROPERTY(QString sortRoleName READ sortRoleName WRITE setSortRoleName NOTIFY sortRoleNameChanged)
|
||||||
|
@ -37,15 +36,6 @@ class QQmlSortFilterProxyModel : public QSortFilterProxyModel,
|
||||||
Q_PROPERTY(QQmlListProperty<qqsfpm::ProxyRole> proxyRoles READ proxyRolesListProperty)
|
Q_PROPERTY(QQmlListProperty<qqsfpm::ProxyRole> proxyRoles READ proxyRolesListProperty)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum PatternSyntax {
|
|
||||||
RegExp = QRegExp::RegExp,
|
|
||||||
Wildcard = QRegExp::Wildcard,
|
|
||||||
FixedString = QRegExp::FixedString,
|
|
||||||
RegExp2 = QRegExp::RegExp2,
|
|
||||||
WildcardUnix = QRegExp::WildcardUnix,
|
|
||||||
W3CXmlSchema11 = QRegExp::W3CXmlSchema11 };
|
|
||||||
Q_ENUMS(PatternSyntax)
|
|
||||||
|
|
||||||
QQmlSortFilterProxyModel(QObject* parent = 0);
|
QQmlSortFilterProxyModel(QObject* parent = 0);
|
||||||
|
|
||||||
int count() const;
|
int count() const;
|
||||||
|
@ -59,9 +49,6 @@ public:
|
||||||
QString filterPattern() const;
|
QString filterPattern() const;
|
||||||
void setFilterPattern(const QString& filterPattern);
|
void setFilterPattern(const QString& filterPattern);
|
||||||
|
|
||||||
PatternSyntax filterPatternSyntax() const;
|
|
||||||
void setFilterPatternSyntax(PatternSyntax patternSyntax);
|
|
||||||
|
|
||||||
const QVariant& filterValue() const;
|
const QVariant& filterValue() const;
|
||||||
void setFilterValue(const QVariant& filterValue);
|
void setFilterValue(const QVariant& filterValue);
|
||||||
|
|
||||||
|
@ -97,7 +84,6 @@ Q_SIGNALS:
|
||||||
void delayedChanged();
|
void delayedChanged();
|
||||||
|
|
||||||
void filterRoleNameChanged();
|
void filterRoleNameChanged();
|
||||||
void filterPatternSyntaxChanged();
|
|
||||||
void filterPatternChanged();
|
void filterPatternChanged();
|
||||||
void filterValueChanged();
|
void filterValueChanged();
|
||||||
|
|
||||||
|
@ -109,7 +95,7 @@ protected:
|
||||||
bool lessThan(const QModelIndex& source_left, const QModelIndex& source_right) const override;
|
bool lessThan(const QModelIndex& source_left, const QModelIndex& source_right) const override;
|
||||||
|
|
||||||
protected Q_SLOTS:
|
protected Q_SLOTS:
|
||||||
void resetInternalData();
|
void resetInternalData() override;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void queueInvalidateFilter();
|
void queueInvalidateFilter();
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "rolesorter.h"
|
#include "rolesorter.h"
|
||||||
#include "qqmlsortfilterproxymodel.h"
|
#include "qqmlsortfilterproxymodel.h"
|
||||||
|
#include "../utils/utils.h"
|
||||||
|
|
||||||
namespace qqsfpm {
|
namespace qqsfpm {
|
||||||
|
|
||||||
|
@ -56,14 +57,8 @@ QPair<QVariant, QVariant> RoleSorter::sourceData(const QModelIndex &sourceLeft,
|
||||||
|
|
||||||
int RoleSorter::compare(const QModelIndex &sourceLeft, const QModelIndex& sourceRight, const QQmlSortFilterProxyModel& proxyModel) const
|
int RoleSorter::compare(const QModelIndex &sourceLeft, const QModelIndex& sourceRight, const QQmlSortFilterProxyModel& proxyModel) const
|
||||||
{
|
{
|
||||||
QPair<QVariant, QVariant> pair = sourceData(sourceLeft, sourceRight, proxyModel);
|
const QPair<QVariant, QVariant> pair = sourceData(sourceLeft, sourceRight, proxyModel);
|
||||||
QVariant leftValue = pair.first;
|
return compareVariants(pair.first, pair.second);
|
||||||
QVariant rightValue = pair.second;
|
|
||||||
if (leftValue < rightValue)
|
|
||||||
return -1;
|
|
||||||
if (leftValue > rightValue)
|
|
||||||
return 1;
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,13 +56,13 @@ void SorterContainer::append_sorter(QQmlListProperty<Sorter>* list, Sorter* sort
|
||||||
that->appendSorter(sorter);
|
that->appendSorter(sorter);
|
||||||
}
|
}
|
||||||
|
|
||||||
int SorterContainer::count_sorter(QQmlListProperty<Sorter>* list)
|
qsizetype SorterContainer::count_sorter(QQmlListProperty<Sorter>* list)
|
||||||
{
|
{
|
||||||
QList<Sorter*>* sorters = static_cast<QList<Sorter*>*>(list->data);
|
QList<Sorter*>* sorters = static_cast<QList<Sorter*>*>(list->data);
|
||||||
return sorters->count();
|
return sorters->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
Sorter* SorterContainer::at_sorter(QQmlListProperty<Sorter>* list, int index)
|
Sorter* SorterContainer::at_sorter(QQmlListProperty<Sorter>* list, qsizetype index)
|
||||||
{
|
{
|
||||||
QList<Sorter*>* sorters = static_cast<QList<Sorter*>*>(list->data);
|
QList<Sorter*>* sorters = static_cast<QList<Sorter*>*>(list->data);
|
||||||
return sorters->at(index);
|
return sorters->at(index);
|
||||||
|
|
|
@ -31,8 +31,8 @@ private:
|
||||||
virtual void onSortersCleared() = 0;
|
virtual void onSortersCleared() = 0;
|
||||||
|
|
||||||
static void append_sorter(QQmlListProperty<Sorter>* list, Sorter* sorter);
|
static void append_sorter(QQmlListProperty<Sorter>* list, Sorter* sorter);
|
||||||
static int count_sorter(QQmlListProperty<Sorter>* list);
|
static qsizetype count_sorter(QQmlListProperty<Sorter>* list);
|
||||||
static Sorter* at_sorter(QQmlListProperty<Sorter>* list, int index);
|
static Sorter* at_sorter(QQmlListProperty<Sorter>* list, qsizetype index);
|
||||||
static void clear_sorters(QQmlListProperty<Sorter>* list);
|
static void clear_sorters(QQmlListProperty<Sorter>* list);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
2
client/3rd/SortFilterProxyModel/tests/BLACKLIST
Normal file
2
client/3rd/SortFilterProxyModel/tests/BLACKLIST
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
[StringSorterTests::test_stringSorters:doNotIgnorePunctuation]
|
||||||
|
macos
|
|
@ -0,0 +1,36 @@
|
||||||
|
TEMPLATE = app
|
||||||
|
TARGET = tst_sortfilterproxymodel
|
||||||
|
QT += qml quick
|
||||||
|
CONFIG += c++11 warn_on qmltestcase qml_debug no_keywords
|
||||||
|
|
||||||
|
include(../SortFilterProxyModel.pri)
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
indexsorter.h \
|
||||||
|
testroles.h
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
tst_sortfilterproxymodel.cpp \
|
||||||
|
indexsorter.cpp \
|
||||||
|
testroles.cpp
|
||||||
|
|
||||||
|
OTHER_FILES += \
|
||||||
|
tst_rangefilter.qml \
|
||||||
|
tst_indexfilter.qml \
|
||||||
|
tst_sourceroles.qml \
|
||||||
|
tst_sorters.qml \
|
||||||
|
tst_helpers.qml \
|
||||||
|
tst_builtins.qml \
|
||||||
|
tst_rolesorter.qml \
|
||||||
|
tst_stringsorter.qml \
|
||||||
|
tst_proxyroles.qml \
|
||||||
|
tst_joinrole.qml \
|
||||||
|
tst_switchrole.qml \
|
||||||
|
tst_expressionrole.qml \
|
||||||
|
tst_filtercontainerattached.qml \
|
||||||
|
tst_filtercontainers.qml \
|
||||||
|
tst_regexprole.qml \
|
||||||
|
tst_filtersorter.qml \
|
||||||
|
tst_filterrole.qml \
|
||||||
|
tst_delayed.qml \
|
||||||
|
tst_sortercontainerattached.qml
|
21
client/3rd/SortFilterProxyModel/tests/indexsorter.cpp
Normal file
21
client/3rd/SortFilterProxyModel/tests/indexsorter.cpp
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#include "indexsorter.h"
|
||||||
|
#include <QtQml>
|
||||||
|
|
||||||
|
int IndexSorter::compare(const QModelIndex &sourceLeft, const QModelIndex &sourceRight, const qqsfpm::QQmlSortFilterProxyModel& proxyModel) const
|
||||||
|
{
|
||||||
|
Q_UNUSED(proxyModel)
|
||||||
|
return sourceLeft.row() - sourceRight.row();
|
||||||
|
}
|
||||||
|
|
||||||
|
int ReverseIndexSorter::compare(const QModelIndex &sourceLeft, const QModelIndex &sourceRight, const qqsfpm::QQmlSortFilterProxyModel& proxyModel) const
|
||||||
|
{
|
||||||
|
Q_UNUSED(proxyModel)
|
||||||
|
return sourceRight.row() - sourceLeft.row();
|
||||||
|
}
|
||||||
|
|
||||||
|
void registerIndexSorterTypes() {
|
||||||
|
qmlRegisterType<IndexSorter>("SortFilterProxyModel.Test", 0, 2, "IndexSorter");
|
||||||
|
qmlRegisterType<ReverseIndexSorter>("SortFilterProxyModel.Test", 0, 2, "ReverseIndexSorter");
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_COREAPP_STARTUP_FUNCTION(registerIndexSorterTypes)
|
20
client/3rd/SortFilterProxyModel/tests/indexsorter.h
Normal file
20
client/3rd/SortFilterProxyModel/tests/indexsorter.h
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#ifndef INDEXSORTER_H
|
||||||
|
#define INDEXSORTER_H
|
||||||
|
|
||||||
|
#include "sorters/sorter.h"
|
||||||
|
|
||||||
|
class IndexSorter : public qqsfpm::Sorter
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
using qqsfpm::Sorter::Sorter;
|
||||||
|
int compare(const QModelIndex& sourceLeft, const QModelIndex& sourceRight, const qqsfpm::QQmlSortFilterProxyModel& proxyModel) const override;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ReverseIndexSorter : public qqsfpm::Sorter
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
using qqsfpm::Sorter::Sorter;
|
||||||
|
int compare(const QModelIndex& sourceLeft, const QModelIndex& sourceRight, const qqsfpm::QQmlSortFilterProxyModel& proxyModel) const override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // INDEXSORTER_H
|
48
client/3rd/SortFilterProxyModel/tests/testroles.cpp
Normal file
48
client/3rd/SortFilterProxyModel/tests/testroles.cpp
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
#include "testroles.h"
|
||||||
|
#include <QtQml>
|
||||||
|
|
||||||
|
QVariant StaticRole::value() const
|
||||||
|
{
|
||||||
|
return m_value;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StaticRole::setValue(const QVariant& value)
|
||||||
|
{
|
||||||
|
if (m_value == value)
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_value = value;
|
||||||
|
Q_EMIT valueChanged();
|
||||||
|
invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
QVariant StaticRole::data(const QModelIndex& sourceIndex, const qqsfpm::QQmlSortFilterProxyModel& proxyModel)
|
||||||
|
{
|
||||||
|
Q_UNUSED(sourceIndex)
|
||||||
|
Q_UNUSED(proxyModel)
|
||||||
|
return m_value;
|
||||||
|
}
|
||||||
|
|
||||||
|
QVariant SourceIndexRole::data(const QModelIndex& sourceIndex, const qqsfpm::QQmlSortFilterProxyModel& proxyModel)
|
||||||
|
{
|
||||||
|
Q_UNUSED(proxyModel)
|
||||||
|
return sourceIndex.row();
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList MultiRole::names()
|
||||||
|
{
|
||||||
|
return {"role1", "role2"};
|
||||||
|
}
|
||||||
|
|
||||||
|
QVariant MultiRole::data(const QModelIndex&, const qqsfpm::QQmlSortFilterProxyModel&, const QString& name)
|
||||||
|
{
|
||||||
|
return "data for " + name;
|
||||||
|
}
|
||||||
|
|
||||||
|
void registerTestRolesTypes() {
|
||||||
|
qmlRegisterType<StaticRole>("SortFilterProxyModel.Test", 0, 2, "StaticRole");
|
||||||
|
qmlRegisterType<SourceIndexRole>("SortFilterProxyModel.Test", 0, 2, "SourceIndexRole");
|
||||||
|
qmlRegisterType<MultiRole>("SortFilterProxyModel.Test", 0, 2, "MultiRole");
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_COREAPP_STARTUP_FUNCTION(registerTestRolesTypes)
|
47
client/3rd/SortFilterProxyModel/tests/testroles.h
Normal file
47
client/3rd/SortFilterProxyModel/tests/testroles.h
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
#ifndef TESTROLES_H
|
||||||
|
#define TESTROLES_H
|
||||||
|
|
||||||
|
#include "proxyroles/singlerole.h"
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
|
class StaticRole : public qqsfpm::SingleRole
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged)
|
||||||
|
public:
|
||||||
|
using qqsfpm::SingleRole::SingleRole;
|
||||||
|
|
||||||
|
QVariant value() const;
|
||||||
|
void setValue(const QVariant& value);
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
void valueChanged();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
QVariant data(const QModelIndex& sourceIndex, const qqsfpm::QQmlSortFilterProxyModel& proxyModel) override;
|
||||||
|
QVariant m_value;
|
||||||
|
};
|
||||||
|
|
||||||
|
class SourceIndexRole : public qqsfpm::SingleRole
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
using qqsfpm::SingleRole::SingleRole;
|
||||||
|
|
||||||
|
private:
|
||||||
|
QVariant data(const QModelIndex& sourceIndex, const qqsfpm::QQmlSortFilterProxyModel& proxyModel) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
class MultiRole : public qqsfpm::ProxyRole
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
using qqsfpm::ProxyRole::ProxyRole;
|
||||||
|
|
||||||
|
QStringList names() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
QVariant data(const QModelIndex &sourceIndex, const qqsfpm::QQmlSortFilterProxyModel &proxyModel, const QString &name) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // TESTROLES_H
|
54
client/3rd/SortFilterProxyModel/tests/tst_builtins.qml
Normal file
54
client/3rd/SortFilterProxyModel/tests/tst_builtins.qml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import QtQml 2.2
|
||||||
|
import QtTest 1.1
|
||||||
|
import SortFilterProxyModel 0.2
|
||||||
|
|
||||||
|
Item {
|
||||||
|
ListModel {
|
||||||
|
id: testModel
|
||||||
|
ListElement{role1: 1; role2: 1}
|
||||||
|
ListElement{role1: 2; role2: 1}
|
||||||
|
ListElement{role1: 3; role2: 2}
|
||||||
|
ListElement{role1: 4; role2: 2}
|
||||||
|
}
|
||||||
|
ListModel {
|
||||||
|
id: noRolesFirstTestModel
|
||||||
|
function initModel() {
|
||||||
|
noRolesFirstTestModel.append({role1: 1, role2: 1 })
|
||||||
|
noRolesFirstTestModel.append({role1: 2, role2: 1 })
|
||||||
|
noRolesFirstTestModel.append({role1: 3, role2: 2 })
|
||||||
|
noRolesFirstTestModel.append({role1: 4, role2: 2 })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testProxyModel
|
||||||
|
property string tag: "testProxyModel"
|
||||||
|
sourceModel: testModel
|
||||||
|
filterRoleName: "role2"
|
||||||
|
filterValue: 2
|
||||||
|
property var expectedData: ([{role1: 3, role2: 2}, {role1: 4, role2: 2}])
|
||||||
|
}
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: noRolesFirstTestProxyModel
|
||||||
|
property string tag: "noRolesFirstTestProxyModel"
|
||||||
|
sourceModel: noRolesFirstTestModel
|
||||||
|
filterRoleName: "role2"
|
||||||
|
filterValue: 2
|
||||||
|
property var expectedData: ([{role1: 3, role2: 2}, {role1: 4, role2: 2}])
|
||||||
|
}
|
||||||
|
TestCase {
|
||||||
|
name: "BuiltinsFilterTests"
|
||||||
|
function test_filterValue_data() {
|
||||||
|
return [testProxyModel, noRolesFirstTestProxyModel];
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_filterValue(proxyModel) {
|
||||||
|
if (proxyModel.sourceModel.initModel)
|
||||||
|
proxyModel.sourceModel.initModel()
|
||||||
|
var data = [];
|
||||||
|
for (var i = 0; i < proxyModel.count; i++)
|
||||||
|
data.push(proxyModel.get(i));
|
||||||
|
compare(data, proxyModel.expectedData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
209
client/3rd/SortFilterProxyModel/tests/tst_delayed.qml
Normal file
209
client/3rd/SortFilterProxyModel/tests/tst_delayed.qml
Normal file
|
@ -0,0 +1,209 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import QtQml 2.2
|
||||||
|
import QtTest 1.1
|
||||||
|
import SortFilterProxyModel 0.2
|
||||||
|
import SortFilterProxyModel.Test 0.2
|
||||||
|
|
||||||
|
Item {
|
||||||
|
ListModel {
|
||||||
|
id: testModel1
|
||||||
|
ListElement{ role1: 1 }
|
||||||
|
}
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testFilterProxyModel
|
||||||
|
sourceModel: testModel1
|
||||||
|
property int foo: 1
|
||||||
|
filters: [
|
||||||
|
ExpressionFilter {
|
||||||
|
id: expressionFilter
|
||||||
|
property var w: ({count : 0}) // wrap count in a js object so modifying it doesn't bind it in the expression
|
||||||
|
expression: {
|
||||||
|
++w.count;
|
||||||
|
testFilterProxyModel.foo;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ValueFilter {
|
||||||
|
roleName: "role1"
|
||||||
|
value: testFilterProxyModel.foo
|
||||||
|
},
|
||||||
|
ValueFilter {
|
||||||
|
roleName: "role1"
|
||||||
|
value: testFilterProxyModel.foo
|
||||||
|
}
|
||||||
|
]
|
||||||
|
sorters: RoleSorter {
|
||||||
|
roleName: "role1"
|
||||||
|
sortOrder: testFilterProxyModel.foo === 1 ? Qt.AscendingOrder : Qt.DescendingOrder
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
id: testModel2
|
||||||
|
ListElement{ role1: 1 }
|
||||||
|
ListElement{ role1: 2 }
|
||||||
|
}
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testSorterProxyModel
|
||||||
|
sourceModel: testModel2
|
||||||
|
property bool foo: true
|
||||||
|
sorters: [
|
||||||
|
ExpressionSorter {
|
||||||
|
id: expressionSorter
|
||||||
|
property var w: ({count : 0}) // wrap count in a js object so modifying it doesn't bind it in the expression
|
||||||
|
expression: {
|
||||||
|
++w.count;
|
||||||
|
testSorterProxyModel.foo;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
RoleSorter {
|
||||||
|
roleName: "role1"
|
||||||
|
sortOrder: testSorterProxyModel.foo ? Qt.AscendingOrder : Qt.DescendingOrder
|
||||||
|
},
|
||||||
|
RoleSorter {
|
||||||
|
roleName: "role1"
|
||||||
|
sortOrder: testSorterProxyModel.foo ? Qt.AscendingOrder : Qt.DescendingOrder
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testRolesProxyModel
|
||||||
|
sourceModel: testModel1
|
||||||
|
property bool foo: true
|
||||||
|
proxyRoles: [
|
||||||
|
StaticRole {
|
||||||
|
name: "display"
|
||||||
|
value: 5
|
||||||
|
},
|
||||||
|
ExpressionRole {
|
||||||
|
id: expressionRole
|
||||||
|
name: "expressionRole"
|
||||||
|
property var w: ({count : 0}) // wrap count in a js object so modifying it doesn't bind it in the expression
|
||||||
|
expression: {
|
||||||
|
++w.count;
|
||||||
|
return testRolesProxyModel.foo;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
StaticRole {
|
||||||
|
name: "role1"
|
||||||
|
value: testRolesProxyModel.foo
|
||||||
|
},
|
||||||
|
StaticRole {
|
||||||
|
name: "role2"
|
||||||
|
value: testRolesProxyModel.foo
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
SignalSpy {
|
||||||
|
id: dataChangedSpy
|
||||||
|
target: testRolesProxyModel
|
||||||
|
signalName: "dataChanged"
|
||||||
|
}
|
||||||
|
|
||||||
|
Instantiator {
|
||||||
|
id: instantiator
|
||||||
|
model: testRolesProxyModel
|
||||||
|
delegate: QtObject { property bool foo: model.expressionRole; property bool foo2: model.expressionRole }
|
||||||
|
}
|
||||||
|
|
||||||
|
TestCase {
|
||||||
|
name: "DelayedTest"
|
||||||
|
|
||||||
|
function test_directFilters() {
|
||||||
|
testFilterProxyModel.delayed = false;
|
||||||
|
expressionFilter.w.count = 0;
|
||||||
|
testFilterProxyModel.foo = 2;
|
||||||
|
compare(testFilterProxyModel.count, 0);
|
||||||
|
verify(expressionFilter.w.count > 1);
|
||||||
|
var lastEvaluationCount = expressionFilter.w.count;
|
||||||
|
wait(0);
|
||||||
|
compare(testFilterProxyModel.count, 0);
|
||||||
|
compare(expressionFilter.w.count, lastEvaluationCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_delayedFilters() {
|
||||||
|
testFilterProxyModel.delayed = false;
|
||||||
|
testFilterProxyModel.foo = 2;
|
||||||
|
compare(testFilterProxyModel.count, 0);
|
||||||
|
testFilterProxyModel.delayed = true;
|
||||||
|
expressionFilter.w.count = 0;
|
||||||
|
testFilterProxyModel.foo = 0;
|
||||||
|
testFilterProxyModel.foo = 1;
|
||||||
|
compare(testFilterProxyModel.count, 0);
|
||||||
|
compare(expressionFilter.w.count, 0);
|
||||||
|
wait(0);
|
||||||
|
compare(testFilterProxyModel.count, 1);
|
||||||
|
compare(expressionFilter.w.count, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_directSorters() {
|
||||||
|
testSorterProxyModel.delayed = false;
|
||||||
|
testSorterProxyModel.foo = true;
|
||||||
|
compare(testSorterProxyModel.get(0).role1, 1);
|
||||||
|
expressionSorter.w.count = 0;
|
||||||
|
testSorterProxyModel.foo = false;
|
||||||
|
compare(testSorterProxyModel.get(0).role1, 2);
|
||||||
|
verify(expressionSorter.w.count > 1);
|
||||||
|
var lastEvaluationCount = expressionSorter.w.count
|
||||||
|
wait(0);
|
||||||
|
compare(testSorterProxyModel.get(0).role1, 2);
|
||||||
|
compare(expressionSorter.w.count, lastEvaluationCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_delayedSorters() {
|
||||||
|
testSorterProxyModel.delayed = false;
|
||||||
|
testSorterProxyModel.foo = true;
|
||||||
|
compare(testSorterProxyModel.get(0).role1, 1);
|
||||||
|
testSorterProxyModel.delayed = true;
|
||||||
|
expressionSorter.w.count = 0;
|
||||||
|
testSorterProxyModel.foo = false;
|
||||||
|
testSorterProxyModel.foo = true;
|
||||||
|
testSorterProxyModel.foo = false;
|
||||||
|
compare(testSorterProxyModel.get(0).role1, 1);
|
||||||
|
compare(expressionSorter.w.count, 0);
|
||||||
|
wait(0);
|
||||||
|
compare(testSorterProxyModel.get(0).role1, 2);
|
||||||
|
compare(expressionSorter.w.count, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_proxyRoles() {
|
||||||
|
// init not delayed
|
||||||
|
testRolesProxyModel.delayed = false;
|
||||||
|
testRolesProxyModel.foo = true;
|
||||||
|
compare(instantiator.object.foo, true);
|
||||||
|
expressionRole.w.count = 0;
|
||||||
|
dataChangedSpy.clear();
|
||||||
|
|
||||||
|
// test not delayed
|
||||||
|
testRolesProxyModel.foo = false;
|
||||||
|
compare(instantiator.object.foo, false);
|
||||||
|
compare(dataChangedSpy.count, 3);
|
||||||
|
var notDelayedCount = expressionRole.w.count; // why is it 12 and not just 3 ?
|
||||||
|
wait(0);
|
||||||
|
compare(instantiator.object.foo, false);
|
||||||
|
compare(dataChangedSpy.count, 3);
|
||||||
|
compare(expressionRole.w.count, notDelayedCount);
|
||||||
|
|
||||||
|
// init delayed
|
||||||
|
testRolesProxyModel.delayed = true;
|
||||||
|
expressionRole.w.count = 0;
|
||||||
|
dataChangedSpy.clear();
|
||||||
|
|
||||||
|
// test delayed
|
||||||
|
testRolesProxyModel.foo = true;
|
||||||
|
testRolesProxyModel.foo = false;
|
||||||
|
testRolesProxyModel.foo = true;
|
||||||
|
compare(instantiator.object.foo, false);
|
||||||
|
compare(dataChangedSpy.count, 0);
|
||||||
|
compare(expressionRole.w.count, 0);
|
||||||
|
wait(0);
|
||||||
|
compare(instantiator.object.foo, true);
|
||||||
|
compare(dataChangedSpy.count, 1);
|
||||||
|
var expectedDelayedCount = notDelayedCount / 3;
|
||||||
|
compare(expressionRole.w.count, expectedDelayedCount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
43
client/3rd/SortFilterProxyModel/tests/tst_expressionrole.qml
Normal file
43
client/3rd/SortFilterProxyModel/tests/tst_expressionrole.qml
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import QtQml 2.2
|
||||||
|
import QtTest 1.1
|
||||||
|
import SortFilterProxyModel 0.2
|
||||||
|
import QtQml 2.2
|
||||||
|
|
||||||
|
Item {
|
||||||
|
property int c: 0
|
||||||
|
ListModel {
|
||||||
|
id: listModel
|
||||||
|
ListElement { a: 1; b: 2 }
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testModel
|
||||||
|
sourceModel: listModel
|
||||||
|
|
||||||
|
proxyRoles: ExpressionRole {
|
||||||
|
name: "expressionRole"
|
||||||
|
expression: a + model.b + c
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Instantiator {
|
||||||
|
id: instantiator
|
||||||
|
model: testModel
|
||||||
|
QtObject {
|
||||||
|
property string expressionRole: model.expressionRole
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TestCase {
|
||||||
|
name: "ExpressionRole"
|
||||||
|
|
||||||
|
function test_expressionRole() {
|
||||||
|
fuzzyCompare(instantiator.object.expressionRole, 3, 1e-7);
|
||||||
|
listModel.setProperty(0, "b", 9);
|
||||||
|
fuzzyCompare(instantiator.object.expressionRole, 10, 1e-7);
|
||||||
|
c = 1327;
|
||||||
|
fuzzyCompare(instantiator.object.expressionRole, 1337, 1e-7);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,57 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import SortFilterProxyModel 0.2
|
||||||
|
import QtQml.Models 2.2
|
||||||
|
import QtQml 2.2
|
||||||
|
import QtTest 1.1
|
||||||
|
|
||||||
|
Item {
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
id: dataModel
|
||||||
|
ListElement { a: 0; b: 0; c: 0 }
|
||||||
|
ListElement { a: 0; b: 0; c: 1 }
|
||||||
|
ListElement { a: 0; b: 1; c: 0 }
|
||||||
|
ListElement { a: 0; b: 1; c: 1 }
|
||||||
|
ListElement { a: 1; b: 0; c: 0 }
|
||||||
|
ListElement { a: 1; b: 0; c: 1 }
|
||||||
|
ListElement { a: 1; b: 1; c: 0 }
|
||||||
|
ListElement { a: 1; b: 1; c: 1 }
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testModel
|
||||||
|
sourceModel: dataModel
|
||||||
|
}
|
||||||
|
|
||||||
|
Instantiator {
|
||||||
|
id: filterInstantiator
|
||||||
|
model: ["a", "b", "c"]
|
||||||
|
delegate: ValueFilter {
|
||||||
|
FilterContainer.container: testModel
|
||||||
|
roleName: modelData
|
||||||
|
value: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TestCase {
|
||||||
|
name: "FilterContainerAttached"
|
||||||
|
|
||||||
|
function modelValues() {
|
||||||
|
var modelValues = [];
|
||||||
|
|
||||||
|
for (var i = 0; i < testModel.count; i++)
|
||||||
|
modelValues.push(testModel.get(i));
|
||||||
|
|
||||||
|
return modelValues;
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_filterContainers() {
|
||||||
|
compare(filterInstantiator.count, 3);
|
||||||
|
compare(modelValues(), [ { a: 1, b: 1, c: 1 }]);
|
||||||
|
filterInstantiator.model = ["a", "b"];
|
||||||
|
wait(0);
|
||||||
|
compare(filterInstantiator.count, 2)
|
||||||
|
compare(modelValues(), [ { a: 1, b: 1, c: 0 }, { a: 1, b: 1, c: 1 }]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
103
client/3rd/SortFilterProxyModel/tests/tst_filtercontainers.qml
Normal file
103
client/3rd/SortFilterProxyModel/tests/tst_filtercontainers.qml
Normal file
|
@ -0,0 +1,103 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import SortFilterProxyModel 0.2
|
||||||
|
import QtQml.Models 2.2
|
||||||
|
import QtTest 1.1
|
||||||
|
|
||||||
|
Item {
|
||||||
|
property list<Filter> filters: [
|
||||||
|
AllOf {
|
||||||
|
property string tag: "allOf"
|
||||||
|
property var expectedValues: [{a: 0, b: false}]
|
||||||
|
ValueFilter {
|
||||||
|
roleName: "a"
|
||||||
|
value: "0"
|
||||||
|
}
|
||||||
|
ValueFilter {
|
||||||
|
roleName: "b"
|
||||||
|
value: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
AllOf {
|
||||||
|
property string tag: "allOfOneDisabled"
|
||||||
|
property var expectedValues: [{a: 0, b: true}, {a: 0, b: false}]
|
||||||
|
ValueFilter {
|
||||||
|
roleName: "a"
|
||||||
|
value: "0"
|
||||||
|
}
|
||||||
|
ValueFilter {
|
||||||
|
enabled: false
|
||||||
|
roleName: "b"
|
||||||
|
value: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
AnyOf {
|
||||||
|
property string tag: "anyOf"
|
||||||
|
property var expectedValues: [{a: 0, b: true}, {a: 0, b: false}, {a: 1, b: false}]
|
||||||
|
ValueFilter {
|
||||||
|
roleName: "a"
|
||||||
|
value: "0"
|
||||||
|
}
|
||||||
|
ValueFilter {
|
||||||
|
roleName: "b"
|
||||||
|
value: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
AllOf {
|
||||||
|
id: outerFilter
|
||||||
|
ValueFilter {
|
||||||
|
roleName: "a"
|
||||||
|
value: "0"
|
||||||
|
}
|
||||||
|
ValueFilter {
|
||||||
|
id: innerFilter
|
||||||
|
roleName: "b"
|
||||||
|
value: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
id: dataModel
|
||||||
|
ListElement { a: 0; b: true }
|
||||||
|
ListElement { a: 0; b: false }
|
||||||
|
ListElement { a: 1; b: true }
|
||||||
|
ListElement { a: 1; b: false }
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testModel
|
||||||
|
sourceModel: dataModel
|
||||||
|
}
|
||||||
|
|
||||||
|
TestCase {
|
||||||
|
name:"RangeFilterTests"
|
||||||
|
|
||||||
|
function modelValues() {
|
||||||
|
var modelValues = [];
|
||||||
|
|
||||||
|
for (var i = 0; i < testModel.count; i++)
|
||||||
|
modelValues.push(testModel.get(i));
|
||||||
|
|
||||||
|
return modelValues;
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_filterContainers_data() {
|
||||||
|
return filters;
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_filterContainers(filter) {
|
||||||
|
testModel.filters = filter;
|
||||||
|
compare(JSON.stringify(modelValues()), JSON.stringify(filter.expectedValues));
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_changeInnerFilter() {
|
||||||
|
testModel.filters = outerFilter;
|
||||||
|
compare(JSON.stringify(modelValues()), JSON.stringify([{a: 0, b: false}]));
|
||||||
|
innerFilter.value = true;
|
||||||
|
compare(JSON.stringify(modelValues()), JSON.stringify([{a: 0, b: true}]));
|
||||||
|
innerFilter.enabled = false;
|
||||||
|
compare(JSON.stringify(modelValues()), JSON.stringify([{a: 0, b: true}, {a: 0, b: false}]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
47
client/3rd/SortFilterProxyModel/tests/tst_filterrole.qml
Normal file
47
client/3rd/SortFilterProxyModel/tests/tst_filterrole.qml
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import QtQml 2.2
|
||||||
|
import QtTest 1.1
|
||||||
|
import SortFilterProxyModel 0.2
|
||||||
|
import QtQml 2.2
|
||||||
|
|
||||||
|
Item {
|
||||||
|
ListModel {
|
||||||
|
id: listModel
|
||||||
|
ListElement { name: "1"; age: 18 }
|
||||||
|
ListElement { name: "2"; age: 22 }
|
||||||
|
ListElement { name: "3"; age: 45 }
|
||||||
|
ListElement { name: "4"; age: 10 }
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testModel
|
||||||
|
sourceModel: listModel
|
||||||
|
|
||||||
|
proxyRoles: FilterRole {
|
||||||
|
name: "isOldEnough"
|
||||||
|
RangeFilter {
|
||||||
|
id: ageFilter
|
||||||
|
roleName: "age"
|
||||||
|
minimumInclusive: true
|
||||||
|
minimumValue: 18
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
TestCase {
|
||||||
|
name: "FilterRole"
|
||||||
|
|
||||||
|
function test_filterRole() {
|
||||||
|
compare(testModel.get(0, "isOldEnough"), true);
|
||||||
|
compare(testModel.get(1, "isOldEnough"), true);
|
||||||
|
compare(testModel.get(2, "isOldEnough"), true);
|
||||||
|
compare(testModel.get(3, "isOldEnough"), false);
|
||||||
|
|
||||||
|
ageFilter.minimumValue = 21;
|
||||||
|
|
||||||
|
compare(testModel.get(0, "isOldEnough"), false);
|
||||||
|
compare(testModel.get(1, "isOldEnough"), true);
|
||||||
|
compare(testModel.get(2, "isOldEnough"), true);
|
||||||
|
compare(testModel.get(3, "isOldEnough"), false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
45
client/3rd/SortFilterProxyModel/tests/tst_filtersorter.qml
Normal file
45
client/3rd/SortFilterProxyModel/tests/tst_filtersorter.qml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import QtQml 2.2
|
||||||
|
import QtTest 1.1
|
||||||
|
import SortFilterProxyModel 0.2
|
||||||
|
import QtQml 2.2
|
||||||
|
|
||||||
|
Item {
|
||||||
|
ListModel {
|
||||||
|
id: listModel
|
||||||
|
ListElement { name: "1"; favorite: true }
|
||||||
|
ListElement { name: "2"; favorite: false }
|
||||||
|
ListElement { name: "3"; favorite: false }
|
||||||
|
ListElement { name: "4"; favorite: true }
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testModel
|
||||||
|
sourceModel: listModel
|
||||||
|
|
||||||
|
sorters: FilterSorter {
|
||||||
|
ValueFilter {
|
||||||
|
id: favoriteFilter
|
||||||
|
roleName: "favorite"
|
||||||
|
value: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
TestCase {
|
||||||
|
name: "FilterSorter"
|
||||||
|
|
||||||
|
function test_filterSorter() {
|
||||||
|
compare(testModel.get(0, "name"), "1");
|
||||||
|
compare(testModel.get(1, "name"), "4");
|
||||||
|
compare(testModel.get(2, "name"), "2");
|
||||||
|
compare(testModel.get(3, "name"), "3");
|
||||||
|
|
||||||
|
favoriteFilter.value = false;
|
||||||
|
|
||||||
|
compare(testModel.get(0, "name"), "2");
|
||||||
|
compare(testModel.get(1, "name"), "3");
|
||||||
|
compare(testModel.get(2, "name"), "1");
|
||||||
|
compare(testModel.get(3, "name"), "4");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
111
client/3rd/SortFilterProxyModel/tests/tst_helpers.qml
Normal file
111
client/3rd/SortFilterProxyModel/tests/tst_helpers.qml
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import QtQml 2.2
|
||||||
|
import QtTest 1.1
|
||||||
|
import SortFilterProxyModel 0.2
|
||||||
|
import SortFilterProxyModel.Test 0.2
|
||||||
|
|
||||||
|
Item {
|
||||||
|
ListModel {
|
||||||
|
id: dataModel
|
||||||
|
ListElement {
|
||||||
|
firstName: "Tupac"
|
||||||
|
lastName: "Shakur"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
firstName: "Charles"
|
||||||
|
lastName: "Aznavour"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
firstName: "Frank"
|
||||||
|
lastName: "Sinatra"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
firstName: "Laurent"
|
||||||
|
lastName: "Garnier"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
firstName: "Phillipe"
|
||||||
|
lastName: "Risoli"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testModel
|
||||||
|
sourceModel: dataModel
|
||||||
|
}
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testModel2
|
||||||
|
sourceModel: dataModel
|
||||||
|
filters: ValueFilter {
|
||||||
|
inverted: true
|
||||||
|
roleName: "lastName"
|
||||||
|
value: "Sinatra"
|
||||||
|
}
|
||||||
|
sorters: [
|
||||||
|
RoleSorter { roleName: "lastName"},
|
||||||
|
RoleSorter { roleName: "firstName"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
TestCase {
|
||||||
|
name: "Helper functions"
|
||||||
|
|
||||||
|
function test_getWithRoleName() {
|
||||||
|
compare(testModel.get(0, "lastName"), "Shakur");
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_getWithoutRoleName() {
|
||||||
|
compare(testModel.get(1), { firstName: "Charles", lastName: "Aznavour"});
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_roleForName() {
|
||||||
|
compare(testModel.data(testModel.index(0, 0), testModel.roleForName("firstName")), "Tupac");
|
||||||
|
compare(testModel.data(testModel.index(1, 0), testModel.roleForName("lastName")), "Aznavour");
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_mapToSource() {
|
||||||
|
compare(testModel2.mapToSource(3), 0);
|
||||||
|
compare(testModel2.mapToSource(4), -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_mapToSourceLoop() {
|
||||||
|
for (var i = 0; i < testModel2.count; ++i) {
|
||||||
|
var sourceRow = testModel2.mapToSource(i);
|
||||||
|
compare(testModel2.get(i).lastName, dataModel.get(sourceRow).lastName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_mapToSourceLoop_index() {
|
||||||
|
for (var i = 0; i < testModel2.count; ++i) {
|
||||||
|
var proxyIndex = testModel2.index(i, 0);
|
||||||
|
var sourceIndex = testModel2.mapToSource(proxyIndex);
|
||||||
|
var roleNumber = testModel2.roleForName("lastName");
|
||||||
|
compare(testModel2.data(proxyIndex, roleNumber), dataModel.data(sourceIndex, roleNumber));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_mapFromSource() {
|
||||||
|
compare(testModel2.mapFromSource(1), 0);
|
||||||
|
compare(testModel2.mapFromSource(2), -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_mapFromSourceLoop() {
|
||||||
|
for (var i = 0; i < dataModel.count; ++i) {
|
||||||
|
var proxyRow = testModel2.mapFromSource(i);
|
||||||
|
if (proxyRow !== -1) {
|
||||||
|
compare(dataModel.get(i).lastName, testModel2.get(proxyRow).lastName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_mapFromSourceLoop_index() {
|
||||||
|
for (var i = 0; i < dataModel.count; ++i) {
|
||||||
|
var sourceIndex = dataModel.index(i, 0);
|
||||||
|
var proxyIndex = testModel2.mapFromSource(sourceIndex);
|
||||||
|
var roleNumber = testModel2.roleForName("lastName");
|
||||||
|
if (proxyIndex.valid)
|
||||||
|
compare(testModel2.data(proxyIndex, roleNumber), dataModel.data(sourceIndex, roleNumber));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
104
client/3rd/SortFilterProxyModel/tests/tst_indexfilter.qml
Normal file
104
client/3rd/SortFilterProxyModel/tests/tst_indexfilter.qml
Normal file
|
@ -0,0 +1,104 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import SortFilterProxyModel 0.2
|
||||||
|
import QtQml.Models 2.2
|
||||||
|
import QtTest 1.1
|
||||||
|
|
||||||
|
Item {
|
||||||
|
property list<IndexFilter> filters: [
|
||||||
|
IndexFilter {
|
||||||
|
property string tag: "basicUsage"
|
||||||
|
property var expectedValues: [3, 1, 2]
|
||||||
|
minimumIndex: 1; maximumIndex: 3
|
||||||
|
},
|
||||||
|
IndexFilter {
|
||||||
|
property string tag: "outOfBounds"
|
||||||
|
property var expectedValues: []
|
||||||
|
minimumIndex: 3; maximumIndex: 1
|
||||||
|
},
|
||||||
|
IndexFilter {
|
||||||
|
property string tag: "0to0Inverted"
|
||||||
|
property var expectedValues: [3,1,2,4]
|
||||||
|
minimumIndex: 0; maximumIndex: 0; inverted: true
|
||||||
|
},
|
||||||
|
IndexFilter {
|
||||||
|
property string tag: "0to0" // bug / issue #15
|
||||||
|
property var expectedValues: [5]
|
||||||
|
minimumIndex: 0; maximumIndex: 0
|
||||||
|
},
|
||||||
|
IndexFilter {
|
||||||
|
property string tag: "basicUsageInverted"
|
||||||
|
property var expectedValues: [5,4]
|
||||||
|
minimumIndex: 1; maximumIndex: 3; inverted: true
|
||||||
|
},
|
||||||
|
IndexFilter {
|
||||||
|
property string tag: "last"
|
||||||
|
property var expectedValues: [4]
|
||||||
|
minimumIndex: -1
|
||||||
|
},
|
||||||
|
IndexFilter {
|
||||||
|
property string tag: "fromEnd"
|
||||||
|
property var expectedValues: [2, 4]
|
||||||
|
minimumIndex: -2
|
||||||
|
},
|
||||||
|
IndexFilter {
|
||||||
|
property string tag: "fromEndRange"
|
||||||
|
property var expectedValues: [1, 2]
|
||||||
|
minimumIndex: -3
|
||||||
|
maximumIndex: -2
|
||||||
|
},
|
||||||
|
IndexFilter {
|
||||||
|
property string tag: "mixedSignRange"
|
||||||
|
property var expectedValues: [3, 1, 2]
|
||||||
|
minimumIndex: 1
|
||||||
|
maximumIndex: -2
|
||||||
|
},
|
||||||
|
IndexFilter {
|
||||||
|
property string tag: "toBigFilter"
|
||||||
|
property var expectedValues: []
|
||||||
|
minimumIndex: 5
|
||||||
|
},
|
||||||
|
IndexFilter {
|
||||||
|
property string tag: "noFilter"
|
||||||
|
property var expectedValues: [5, 3, 1, 2, 4]
|
||||||
|
},
|
||||||
|
IndexFilter {
|
||||||
|
property string tag: "undefinedFilter"
|
||||||
|
property var expectedValues: [5, 3, 1, 2, 4]
|
||||||
|
minimumIndex: undefined
|
||||||
|
maximumIndex: null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
id: dataModel
|
||||||
|
ListElement { value: 5 }
|
||||||
|
ListElement { value: 3 }
|
||||||
|
ListElement { value: 1 }
|
||||||
|
ListElement { value: 2 }
|
||||||
|
ListElement { value: 4 }
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testModel
|
||||||
|
// FIXME: Crashes/fails with error if I define ListModel directly within sourceModel
|
||||||
|
sourceModel: dataModel
|
||||||
|
}
|
||||||
|
|
||||||
|
TestCase {
|
||||||
|
name: "IndexFilterTests"
|
||||||
|
|
||||||
|
function test_minMax_data() {
|
||||||
|
return filters;
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_minMax(filter) {
|
||||||
|
testModel.filters = filter;
|
||||||
|
|
||||||
|
var actualValues = [];
|
||||||
|
for (var i = 0; i < testModel.count; i++)
|
||||||
|
actualValues.push(testModel.data(testModel.index(i, 0)));
|
||||||
|
|
||||||
|
compare(actualValues, filter.expectedValues);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
45
client/3rd/SortFilterProxyModel/tests/tst_joinrole.qml
Normal file
45
client/3rd/SortFilterProxyModel/tests/tst_joinrole.qml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import QtQml 2.2
|
||||||
|
import QtTest 1.1
|
||||||
|
import SortFilterProxyModel 0.2
|
||||||
|
import QtQml 2.2
|
||||||
|
|
||||||
|
Item {
|
||||||
|
ListModel {
|
||||||
|
id: listModel
|
||||||
|
ListElement { firstName: "Justin"; lastName: "Timberlake" }
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testModel
|
||||||
|
sourceModel: listModel
|
||||||
|
|
||||||
|
proxyRoles: JoinRole {
|
||||||
|
id: joinRole
|
||||||
|
name: "fullName"
|
||||||
|
roleNames: ["firstName", "lastName"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Instantiator {
|
||||||
|
id: instantiator
|
||||||
|
model: testModel
|
||||||
|
QtObject {
|
||||||
|
property string fullName: model.fullName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TestCase {
|
||||||
|
name: "JoinRole"
|
||||||
|
|
||||||
|
function test_joinRole() {
|
||||||
|
compare(instantiator.object.fullName, "Justin Timberlake");
|
||||||
|
listModel.setProperty(0, "lastName", "Bieber");
|
||||||
|
compare(instantiator.object.fullName, "Justin Bieber");
|
||||||
|
joinRole.roleNames = ["lastName", "firstName"];
|
||||||
|
compare(instantiator.object.fullName, "Bieber Justin");
|
||||||
|
joinRole.separator = " - ";
|
||||||
|
compare(instantiator.object.fullName, "Bieber - Justin");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
126
client/3rd/SortFilterProxyModel/tests/tst_proxyroles.qml
Normal file
126
client/3rd/SortFilterProxyModel/tests/tst_proxyroles.qml
Normal file
|
@ -0,0 +1,126 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import QtQml 2.2
|
||||||
|
import QtTest 1.1
|
||||||
|
import SortFilterProxyModel 0.2
|
||||||
|
import SortFilterProxyModel.Test 0.2
|
||||||
|
import QtQml 2.2
|
||||||
|
|
||||||
|
Item {
|
||||||
|
ListModel {
|
||||||
|
id: listModel
|
||||||
|
ListElement { test: "first"; keep: true }
|
||||||
|
ListElement { test: "second"; keep: true }
|
||||||
|
ListElement { test: "third"; keep: true }
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testModel
|
||||||
|
sourceModel: listModel
|
||||||
|
filters: [
|
||||||
|
ValueFilter {
|
||||||
|
roleName: "keep"
|
||||||
|
value: true
|
||||||
|
},
|
||||||
|
ValueFilter {
|
||||||
|
inverted: true
|
||||||
|
roleName: "staticRole"
|
||||||
|
value: "filterMe"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
proxyRoles: [
|
||||||
|
StaticRole {
|
||||||
|
id: staticRole
|
||||||
|
name: "staticRole"
|
||||||
|
value: "foo"
|
||||||
|
},
|
||||||
|
StaticRole {
|
||||||
|
id: renameRole
|
||||||
|
name: "renameMe"
|
||||||
|
value: "test"
|
||||||
|
},
|
||||||
|
SourceIndexRole {
|
||||||
|
name: "sourceIndexRole"
|
||||||
|
},
|
||||||
|
MultiRole {}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
Instantiator {
|
||||||
|
id: instantiator
|
||||||
|
model: testModel
|
||||||
|
QtObject {
|
||||||
|
property string staticRole: model.staticRole
|
||||||
|
property int sourceIndexRole: model.sourceIndexRole
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
id: singleRowModel
|
||||||
|
ListElement {
|
||||||
|
changingRole: "Change me"
|
||||||
|
otherRole: "I don't change"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: noProxyRolesProxyModel
|
||||||
|
sourceModel: singleRowModel
|
||||||
|
}
|
||||||
|
|
||||||
|
Instantiator {
|
||||||
|
id: outerInstantiator
|
||||||
|
model: noProxyRolesProxyModel
|
||||||
|
QtObject {
|
||||||
|
property var counter: ({ count : 0 })
|
||||||
|
property string changingRole: model.changingRole
|
||||||
|
property string otherRole: {
|
||||||
|
++counter.count;
|
||||||
|
return model.otherRole;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TestCase {
|
||||||
|
name: "ProxyRoles"
|
||||||
|
|
||||||
|
function test_resetAfterNameChange() {
|
||||||
|
var oldObject = instantiator.object;
|
||||||
|
renameRole.name = "foobarRole";
|
||||||
|
var newObject = instantiator.object;
|
||||||
|
verify(newObject !== oldObject, "Instantiator object should have been reinstantiated");
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_proxyRoleInvalidation() {
|
||||||
|
compare(instantiator.object.staticRole, "foo");
|
||||||
|
staticRole.value = "bar";
|
||||||
|
compare(instantiator.object.staticRole, "bar");
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_proxyRoleGetDataFromSource() {
|
||||||
|
compare(instantiator.object.sourceIndexRole, 0);
|
||||||
|
compare(testModel.get(1, "sourceIndexRole"), 1);
|
||||||
|
listModel.setProperty(1, "keep", false);
|
||||||
|
compare(testModel.get(1, "sourceIndexRole"), 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_filterFromProxyRole() {
|
||||||
|
staticRole.value = "filterMe";
|
||||||
|
compare(testModel.count, 0);
|
||||||
|
staticRole.value = "foo";
|
||||||
|
compare(testModel.count, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_multiRole() {
|
||||||
|
compare(testModel.get(0, "role1"), "data for role1");
|
||||||
|
compare(testModel.get(0, "role2"), "data for role2");
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_ProxyRolesDataChanged() {
|
||||||
|
outerInstantiator.object.counter.count = 0;
|
||||||
|
singleRowModel.setProperty(0, "changingRole", "Changed")
|
||||||
|
compare(outerInstantiator.object.changingRole, "Changed");
|
||||||
|
compare(outerInstantiator.object.counter.count, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
99
client/3rd/SortFilterProxyModel/tests/tst_rangefilter.qml
Normal file
99
client/3rd/SortFilterProxyModel/tests/tst_rangefilter.qml
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import SortFilterProxyModel 0.2
|
||||||
|
import QtQml.Models 2.2
|
||||||
|
import QtTest 1.1
|
||||||
|
|
||||||
|
Item {
|
||||||
|
property list<RangeFilter> filters: [
|
||||||
|
RangeFilter {
|
||||||
|
property string tag: "inclusive"
|
||||||
|
property int expectedModelCount: 3
|
||||||
|
property var expectedValues: [3, 2, 4]
|
||||||
|
property QtObject dataModel: dataModel0
|
||||||
|
roleName: "value"; minimumValue: 2; maximumValue: 4
|
||||||
|
},
|
||||||
|
RangeFilter {
|
||||||
|
property string tag: "explicitInclusive"
|
||||||
|
property int expectedModelCount: 3
|
||||||
|
property var expectedValues: [3, 2, 4]
|
||||||
|
property QtObject dataModel: dataModel0
|
||||||
|
roleName: "value"; minimumValue: 2; maximumValue: 4; minimumInclusive: true; maximumInclusive: true
|
||||||
|
},
|
||||||
|
RangeFilter {
|
||||||
|
property string tag: "inclusiveMinExclusiveMax"
|
||||||
|
property int expectedModelCount: 2
|
||||||
|
property var expectedValues: [2, 3]
|
||||||
|
property QtObject dataModel: dataModel1
|
||||||
|
roleName: "value"; minimumValue: 2; maximumValue: 4; minimumInclusive: true; maximumInclusive: false
|
||||||
|
},
|
||||||
|
RangeFilter {
|
||||||
|
property string tag: "exclusiveMinInclusiveMax"
|
||||||
|
property int expectedModelCount: 2
|
||||||
|
property var expectedValues: [3, 4]
|
||||||
|
property QtObject dataModel: dataModel1
|
||||||
|
roleName: "value"; minimumValue: 2; maximumValue: 4; minimumInclusive: false; maximumInclusive: true
|
||||||
|
},
|
||||||
|
RangeFilter {
|
||||||
|
property string tag: "exclusive"
|
||||||
|
property int expectedModelCount: 1
|
||||||
|
property var expectedValues: [3]
|
||||||
|
property QtObject dataModel: dataModel1
|
||||||
|
roleName: "value"; minimumValue: 2; maximumValue: 4; minimumInclusive: false; maximumInclusive: false
|
||||||
|
},
|
||||||
|
RangeFilter {
|
||||||
|
property string tag: "outOfBoundsRange"
|
||||||
|
property var expectedValues: []
|
||||||
|
property QtObject dataModel: dataModel1
|
||||||
|
roleName: "value"; minimumValue: 4; maximumValue: 2
|
||||||
|
},
|
||||||
|
RangeFilter {
|
||||||
|
objectName: tag
|
||||||
|
property string tag: "noMinimum"
|
||||||
|
property var expectedValues: [3, 1, 2]
|
||||||
|
property QtObject dataModel: dataModel0
|
||||||
|
roleName: "value"; maximumValue: 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
id: dataModel0
|
||||||
|
ListElement { value: 5 }
|
||||||
|
ListElement { value: 3 }
|
||||||
|
ListElement { value: 1 }
|
||||||
|
ListElement { value: 2 }
|
||||||
|
ListElement { value: 4 }
|
||||||
|
}
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
id: dataModel1
|
||||||
|
ListElement { value: 5 }
|
||||||
|
ListElement { value: 2 }
|
||||||
|
ListElement { value: 3 }
|
||||||
|
ListElement { value: 1 }
|
||||||
|
ListElement { value: 4 }
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel { id: testModel }
|
||||||
|
|
||||||
|
TestCase {
|
||||||
|
name:"RangeFilterTests"
|
||||||
|
|
||||||
|
function test_minMax_data() {
|
||||||
|
return filters;
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_minMax(filter) {
|
||||||
|
testModel.sourceModel = filter.dataModel;
|
||||||
|
testModel.filters = filter;
|
||||||
|
|
||||||
|
verify(testModel.count === filter.expectedValues.length,
|
||||||
|
"Expected count " + filter.expectedValues.length + ", actual count: " + testModel.count);
|
||||||
|
for (var i = 0; i < testModel.count; i++)
|
||||||
|
{
|
||||||
|
var modelValue = testModel.get(i, filter.roleName);
|
||||||
|
verify(modelValue === filter.expectedValues[i],
|
||||||
|
"Expected testModel value " + filter.expectedValues[i] + ", actual: " + modelValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
54
client/3rd/SortFilterProxyModel/tests/tst_regexprole.qml
Normal file
54
client/3rd/SortFilterProxyModel/tests/tst_regexprole.qml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import QtQml 2.2
|
||||||
|
import QtTest 1.1
|
||||||
|
import SortFilterProxyModel 0.2
|
||||||
|
import QtQml 2.2
|
||||||
|
|
||||||
|
Item {
|
||||||
|
ListModel {
|
||||||
|
id: listModel
|
||||||
|
ListElement { dummyRole: false; compoundRole: "0 - zero"; unusedRole: "" }
|
||||||
|
ListElement { dummyRole: false; compoundRole: "1 - one"; unusedRole: "" }
|
||||||
|
ListElement { dummyRole: false; compoundRole: "2 - two"; unusedRole: "" }
|
||||||
|
ListElement { dummyRole: false; compoundRole: "3 - three"; unusedRole: "" }
|
||||||
|
ListElement { dummyRole: false; compoundRole: "four"; unusedRole: "" }
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testModel
|
||||||
|
sourceModel: listModel
|
||||||
|
|
||||||
|
proxyRoles: [
|
||||||
|
RegExpRole {
|
||||||
|
id: regExpRole
|
||||||
|
roleName: "compoundRole"
|
||||||
|
pattern: "(?<id>\\d+) - (?<name>.+)"
|
||||||
|
},
|
||||||
|
RegExpRole {
|
||||||
|
id: caseSensitiveRole
|
||||||
|
roleName: "compoundRole"
|
||||||
|
pattern: "\\d+ - (?<nameCS>[A-Z]+)"
|
||||||
|
caseSensitivity: Qt.CaseSensitive
|
||||||
|
},
|
||||||
|
RegExpRole {
|
||||||
|
id: caseInsensitiveRole
|
||||||
|
roleName: "compoundRole"
|
||||||
|
pattern: "\\d+ - (?<nameCIS>[A-Z]+)"
|
||||||
|
caseSensitivity: Qt.CaseInsensitive
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
TestCase {
|
||||||
|
name: "RegExpRole"
|
||||||
|
|
||||||
|
function test_regExpRole() {
|
||||||
|
compare(testModel.get(0, "id"), "0");
|
||||||
|
compare(testModel.get(1, "id"), "1");
|
||||||
|
compare(testModel.get(0, "name"), "zero");
|
||||||
|
compare(testModel.get(4, "id"), undefined);
|
||||||
|
compare(testModel.get(0, "nameCS"), undefined);
|
||||||
|
compare(testModel.get(0, "nameCIS"), "zero");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
70
client/3rd/SortFilterProxyModel/tests/tst_rolesorter.qml
Normal file
70
client/3rd/SortFilterProxyModel/tests/tst_rolesorter.qml
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import SortFilterProxyModel 0.2
|
||||||
|
import QtQml.Models 2.2
|
||||||
|
import QtTest 1.1
|
||||||
|
|
||||||
|
Item {
|
||||||
|
property list<RoleSorter> sorters: [
|
||||||
|
RoleSorter {
|
||||||
|
property string tag: "intRole"
|
||||||
|
property var expectedValues: [1, 2, 3, 4, 5]
|
||||||
|
roleName: "intRole"
|
||||||
|
},
|
||||||
|
RoleSorter {
|
||||||
|
property string tag: "intRoleDescending"
|
||||||
|
property var expectedValues: [5, 4, 3, 2, 1]
|
||||||
|
roleName: "intRole"
|
||||||
|
sortOrder: Qt.DescendingOrder
|
||||||
|
},
|
||||||
|
RoleSorter {
|
||||||
|
property string tag: "stringRole"
|
||||||
|
property var expectedValues: ["a", "b", "c", "d", "e"]
|
||||||
|
roleName: "stringRole"
|
||||||
|
},
|
||||||
|
RoleSorter {
|
||||||
|
property string tag: "stringRoleDescending"
|
||||||
|
property var expectedValues: ["e", "d", "c", "b", "a"]
|
||||||
|
roleName: "stringRole"
|
||||||
|
sortOrder: Qt.DescendingOrder
|
||||||
|
},
|
||||||
|
RoleSorter {
|
||||||
|
property string tag: "mixedCaseStringRole"
|
||||||
|
property var expectedValues: ["A", "b", "C", "D", "e"]
|
||||||
|
roleName: "mixedCaseStringRole"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
id: dataModel
|
||||||
|
ListElement { intRole: 5; stringRole: "c"; mixedCaseStringRole: "C" }
|
||||||
|
ListElement { intRole: 3; stringRole: "e"; mixedCaseStringRole: "e" }
|
||||||
|
ListElement { intRole: 1; stringRole: "d"; mixedCaseStringRole: "D" }
|
||||||
|
ListElement { intRole: 2; stringRole: "a"; mixedCaseStringRole: "A" }
|
||||||
|
ListElement { intRole: 4; stringRole: "b"; mixedCaseStringRole: "b" }
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testModel
|
||||||
|
sourceModel: dataModel
|
||||||
|
}
|
||||||
|
|
||||||
|
TestCase {
|
||||||
|
name: "RoleSorterTests"
|
||||||
|
|
||||||
|
function test_roleSorters_data() {
|
||||||
|
return sorters;
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_roleSorters(sorter) {
|
||||||
|
testModel.sorters = sorter;
|
||||||
|
|
||||||
|
verify(testModel.count === sorter.expectedValues.length,
|
||||||
|
"Expected count " + sorter.expectedValues.length + ", actual count: " + testModel.count);
|
||||||
|
let actualValues = [];
|
||||||
|
for (var i = 0; i < testModel.count; i++) {
|
||||||
|
actualValues.push(testModel.get(i, sorter.roleName));
|
||||||
|
}
|
||||||
|
compare(actualValues, sorter.expectedValues);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,131 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import SortFilterProxyModel 0.2
|
||||||
|
import QtQml.Models 2.2
|
||||||
|
import QtQml 2.2
|
||||||
|
import QtTest 1.1
|
||||||
|
|
||||||
|
Item {
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
id: dataModel
|
||||||
|
ListElement { a: 3; b: 2; c: 9 }
|
||||||
|
ListElement { a: 3; b: 5; c: 0 }
|
||||||
|
ListElement { a: 3; b: 2; c: 8 }
|
||||||
|
ListElement { a: 2; b: 9; c: 1 }
|
||||||
|
ListElement { a: 2; b: 1; c: 7 }
|
||||||
|
ListElement { a: 2; b: 6; c: 2 }
|
||||||
|
ListElement { a: 1; b: 8; c: 6 }
|
||||||
|
ListElement { a: 1; b: 7; c: 3 }
|
||||||
|
ListElement { a: 1; b: 8; c: 5 }
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testModel
|
||||||
|
sourceModel: dataModel
|
||||||
|
}
|
||||||
|
ListModel {
|
||||||
|
id: sorterRoleModel
|
||||||
|
ListElement { roleName: "a" }
|
||||||
|
ListElement { roleName: "b" }
|
||||||
|
ListElement { roleName: "c" }
|
||||||
|
}
|
||||||
|
Instantiator {
|
||||||
|
id: sorterInstantiator
|
||||||
|
model: sorterRoleModel
|
||||||
|
delegate: RoleSorter {
|
||||||
|
SorterContainer.container: testModel
|
||||||
|
roleName: model.roleName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testModelPriority
|
||||||
|
sourceModel: dataModel
|
||||||
|
}
|
||||||
|
ListModel {
|
||||||
|
id: sorterRoleModelPriority
|
||||||
|
ListElement { roleName: "a" }
|
||||||
|
ListElement { roleName: "b" }
|
||||||
|
ListElement { roleName: "c" }
|
||||||
|
}
|
||||||
|
Instantiator {
|
||||||
|
id: sorterInstantiatorPriority
|
||||||
|
model: sorterRoleModelPriority
|
||||||
|
delegate: RoleSorter {
|
||||||
|
SorterContainer.container: testModelPriority
|
||||||
|
roleName: model.roleName
|
||||||
|
priority: -model.index
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TestCase {
|
||||||
|
name: "SorterContainerAttached"
|
||||||
|
|
||||||
|
function modelValues(model) {
|
||||||
|
var modelValues = [];
|
||||||
|
|
||||||
|
for (var i = 0; i < model.count; i++)
|
||||||
|
modelValues.push(model.get(i));
|
||||||
|
|
||||||
|
return modelValues;
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_sorterContainers() {
|
||||||
|
compare(sorterInstantiator.count, 3);
|
||||||
|
compare(modelValues(testModel), [
|
||||||
|
{ a: 1, b: 7, c: 3 },
|
||||||
|
{ a: 1, b: 8, c: 5 },
|
||||||
|
{ a: 1, b: 8, c: 6 },
|
||||||
|
{ a: 2, b: 1, c: 7 },
|
||||||
|
{ a: 2, b: 6, c: 2 },
|
||||||
|
{ a: 2, b: 9, c: 1 },
|
||||||
|
{ a: 3, b: 2, c: 8 },
|
||||||
|
{ a: 3, b: 2, c: 9 },
|
||||||
|
{ a: 3, b: 5, c: 0 }
|
||||||
|
]);
|
||||||
|
sorterRoleModel.remove(0); // a, b, c --> b, c
|
||||||
|
wait(0);
|
||||||
|
compare(sorterInstantiator.count, 2);
|
||||||
|
compare(JSON.stringify(modelValues(testModel)), JSON.stringify([
|
||||||
|
{ a: 2, b: 1, c: 7 },
|
||||||
|
{ a: 3, b: 2, c: 8 },
|
||||||
|
{ a: 3, b: 2, c: 9 },
|
||||||
|
{ a: 3, b: 5, c: 0 },
|
||||||
|
{ a: 2, b: 6, c: 2 },
|
||||||
|
{ a: 1, b: 7, c: 3 },
|
||||||
|
{ a: 1, b: 8, c: 5 },
|
||||||
|
{ a: 1, b: 8, c: 6 },
|
||||||
|
{ a: 2, b: 9, c: 1 },
|
||||||
|
]));
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_sorterContainersPriority() {
|
||||||
|
compare(sorterInstantiatorPriority.count, 3);
|
||||||
|
compare(JSON.stringify(modelValues(testModelPriority)), JSON.stringify([
|
||||||
|
{ a: 1, b: 7, c: 3 },
|
||||||
|
{ a: 1, b: 8, c: 5 },
|
||||||
|
{ a: 1, b: 8, c: 6 },
|
||||||
|
{ a: 2, b: 1, c: 7 },
|
||||||
|
{ a: 2, b: 6, c: 2 },
|
||||||
|
{ a: 2, b: 9, c: 1 },
|
||||||
|
{ a: 3, b: 2, c: 8 },
|
||||||
|
{ a: 3, b: 2, c: 9 },
|
||||||
|
{ a: 3, b: 5, c: 0 }
|
||||||
|
]));
|
||||||
|
sorterRoleModelPriority.move(0, 1, 1); // a, b, c --> b, a, c
|
||||||
|
wait(0);
|
||||||
|
compare(sorterInstantiatorPriority.count, 3);
|
||||||
|
compare(JSON.stringify(modelValues(testModelPriority)), JSON.stringify([
|
||||||
|
{ a: 2, b: 1, c: 7 },
|
||||||
|
{ a: 3, b: 2, c: 8 },
|
||||||
|
{ a: 3, b: 2, c: 9 },
|
||||||
|
{ a: 3, b: 5, c: 0 },
|
||||||
|
{ a: 2, b: 6, c: 2 },
|
||||||
|
{ a: 1, b: 7, c: 3 },
|
||||||
|
{ a: 1, b: 8, c: 5 },
|
||||||
|
{ a: 1, b: 8, c: 6 },
|
||||||
|
{ a: 2, b: 9, c: 1 }
|
||||||
|
]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
158
client/3rd/SortFilterProxyModel/tests/tst_sorters.qml
Normal file
158
client/3rd/SortFilterProxyModel/tests/tst_sorters.qml
Normal file
|
@ -0,0 +1,158 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import QtQml 2.2
|
||||||
|
import QtTest 1.1
|
||||||
|
import SortFilterProxyModel 0.2
|
||||||
|
import SortFilterProxyModel.Test 0.2
|
||||||
|
|
||||||
|
Item {
|
||||||
|
ListModel {
|
||||||
|
id: listModel
|
||||||
|
ListElement { test: "first"; test2: "c"; test3: 1 }
|
||||||
|
ListElement { test: "second"; test2: "a"; test3: 0 }
|
||||||
|
ListElement { test: "third"; test2: "b"; test3: 2}
|
||||||
|
ListElement { test: "fourth"; test2: "b"; test3: 3 }
|
||||||
|
}
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
id: noRolesFirstListModel
|
||||||
|
}
|
||||||
|
|
||||||
|
property list<QtObject> sorters: [
|
||||||
|
QtObject {
|
||||||
|
property string tag: "no sorter"
|
||||||
|
property bool notASorter: true
|
||||||
|
property var expectedValues: ["first", "second", "third", "fourth"]
|
||||||
|
},
|
||||||
|
IndexSorter {
|
||||||
|
property string tag: "Dummy IndexSorter"
|
||||||
|
property var expectedValues: ["first", "second", "third", "fourth"]
|
||||||
|
},
|
||||||
|
ReverseIndexSorter {
|
||||||
|
property string tag: "Dummy ReverseIndexSorter"
|
||||||
|
property var expectedValues: ["fourth", "third", "second", "first"]
|
||||||
|
},
|
||||||
|
IndexSorter {
|
||||||
|
property string tag: "Disabled dummy IndexSorter"
|
||||||
|
enabled: false
|
||||||
|
property var expectedValues: ["first", "second", "third", "fourth"]
|
||||||
|
},
|
||||||
|
ReverseIndexSorter {
|
||||||
|
property string tag: "Disabled dummy ReverseIndexSorter"
|
||||||
|
enabled: false
|
||||||
|
property var expectedValues: ["first", "second", "third", "fourth"]
|
||||||
|
},
|
||||||
|
IndexSorter {
|
||||||
|
property string tag: "Descending dummy IndexSorter"
|
||||||
|
ascendingOrder: false
|
||||||
|
property var expectedValues: ["fourth", "third", "second", "first"]
|
||||||
|
},
|
||||||
|
ReverseIndexSorter {
|
||||||
|
property string tag: "Descending dummy ReverseIndexSorter"
|
||||||
|
ascendingOrder: false
|
||||||
|
property var expectedValues: ["first", "second", "third", "fourth"]
|
||||||
|
},
|
||||||
|
IndexSorter {
|
||||||
|
property string tag: "Disabled descending dummy IndexSorter"
|
||||||
|
enabled: false
|
||||||
|
ascendingOrder: false
|
||||||
|
property var expectedValues: ["first", "second", "third", "fourth"]
|
||||||
|
},
|
||||||
|
ReverseIndexSorter {
|
||||||
|
property string tag: "Disabled descending dummy ReverseIndexSorter"
|
||||||
|
enabled: false
|
||||||
|
ascendingOrder: false
|
||||||
|
property var expectedValues: ["first", "second", "third", "fourth"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
ReverseIndexSorter {
|
||||||
|
id: reverseIndexSorter
|
||||||
|
}
|
||||||
|
|
||||||
|
property list<RoleSorter> tieSorters: [
|
||||||
|
RoleSorter { roleName: "test2" },
|
||||||
|
RoleSorter { roleName: "test" }
|
||||||
|
]
|
||||||
|
|
||||||
|
property list<RoleSorter> sortersWithPriority: [
|
||||||
|
RoleSorter { roleName: "test3" },
|
||||||
|
RoleSorter { roleName: "test" },
|
||||||
|
RoleSorter { roleName: "test2"; priority: 1 }
|
||||||
|
]
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testModel
|
||||||
|
sourceModel: listModel
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: noRolesFirstProxyModel
|
||||||
|
sourceModel: noRolesFirstListModel
|
||||||
|
sorters: RoleSorter { roleName: "test" }
|
||||||
|
}
|
||||||
|
|
||||||
|
TestCase {
|
||||||
|
name: "SortersTests"
|
||||||
|
|
||||||
|
function test_indexOrder_data() {
|
||||||
|
return sorters;
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_indexOrder(sorter) {
|
||||||
|
testModel.sorters = sorter;
|
||||||
|
verifyModelValues(testModel, sorter.expectedValues);
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_enablingSorter() {
|
||||||
|
reverseIndexSorter.enabled = false;
|
||||||
|
testModel.sorters = reverseIndexSorter;
|
||||||
|
var expectedValuesBeforeEnabling = ["first", "second", "third", "fourth"];
|
||||||
|
var expectedValuesAfterEnabling = ["fourth", "third", "second", "first"];
|
||||||
|
verifyModelValues(testModel, expectedValuesBeforeEnabling);
|
||||||
|
reverseIndexSorter.enabled = true;
|
||||||
|
verifyModelValues(testModel, expectedValuesAfterEnabling);
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_disablingSorter() {
|
||||||
|
reverseIndexSorter.enabled = true;
|
||||||
|
testModel.sorters = reverseIndexSorter;
|
||||||
|
var expectedValuesBeforeDisabling = ["fourth", "third", "second", "first"];
|
||||||
|
var expectedValuesAfterDisabling = ["first", "second", "third", "fourth"];
|
||||||
|
verifyModelValues(testModel, expectedValuesBeforeDisabling);
|
||||||
|
reverseIndexSorter.enabled = false;
|
||||||
|
verifyModelValues(testModel, expectedValuesAfterDisabling);
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_tieSorters() {
|
||||||
|
testModel.sorters = tieSorters;
|
||||||
|
var expectedValues = ["second", "fourth", "third", "first"];
|
||||||
|
verifyModelValues(testModel, expectedValues);
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_sortersWithPriority() {
|
||||||
|
testModel.sorters = sortersWithPriority;
|
||||||
|
var expectedValues = ["second", "third", "fourth", "first"];
|
||||||
|
verifyModelValues(testModel, expectedValues);
|
||||||
|
testModel.sorters[0].priority = 2;
|
||||||
|
expectedValues = ["second", "first", "third", "fourth"];
|
||||||
|
verifyModelValues(testModel, expectedValues);
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_noRolesFirstModel() {
|
||||||
|
noRolesFirstListModel.append([{test: "b"}, {test: "a"}]);
|
||||||
|
var expectedValues = ["a", "b"];
|
||||||
|
verifyModelValues(noRolesFirstProxyModel, expectedValues);
|
||||||
|
}
|
||||||
|
|
||||||
|
function verifyModelValues(model, expectedValues) {
|
||||||
|
verify(model.count === expectedValues.length,
|
||||||
|
"Expected count " + expectedValues.length + ", actual count: " + model.count);
|
||||||
|
for (var i = 0; i < model.count; i++)
|
||||||
|
{
|
||||||
|
var modelValue = model.get(i, "test");
|
||||||
|
verify(modelValue === expectedValues[i],
|
||||||
|
"Expected testModel value " + expectedValues[i] + ", actual: " + modelValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
#include <QtQuickTest/quicktest.h>
|
||||||
|
QUICK_TEST_MAIN(SortFilterProxyModel)
|
49
client/3rd/SortFilterProxyModel/tests/tst_sourceroles.qml
Normal file
49
client/3rd/SortFilterProxyModel/tests/tst_sourceroles.qml
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import QtTest 1.1
|
||||||
|
import QtQml 2.2
|
||||||
|
import SortFilterProxyModel 0.2
|
||||||
|
|
||||||
|
Item {
|
||||||
|
ListModel {
|
||||||
|
id: nonEmptyFirstModel
|
||||||
|
ListElement {
|
||||||
|
test: "test"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: nonEmptyFirstProxyModel
|
||||||
|
sourceModel: nonEmptyFirstModel
|
||||||
|
}
|
||||||
|
Instantiator {
|
||||||
|
id: nonEmptyFirstInstantiator
|
||||||
|
model: nonEmptyFirstProxyModel
|
||||||
|
QtObject { property var test: model.test }
|
||||||
|
}
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
id: emptyFirstModel
|
||||||
|
}
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: emptyFirstProxyModel
|
||||||
|
sourceModel: emptyFirstModel
|
||||||
|
}
|
||||||
|
Instantiator {
|
||||||
|
id: emptyFirstInstantiator
|
||||||
|
model: emptyFirstProxyModel
|
||||||
|
QtObject { property var test: model.test }
|
||||||
|
}
|
||||||
|
|
||||||
|
TestCase {
|
||||||
|
name: "RoleTests"
|
||||||
|
|
||||||
|
function test_nonEmptyFirst() {
|
||||||
|
compare(nonEmptyFirstInstantiator.object.test, "test");
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_emptyFirst() {
|
||||||
|
emptyFirstModel.append({test: "test"});
|
||||||
|
compare(emptyFirstProxyModel.get(0), {test: "test"});
|
||||||
|
compare(emptyFirstInstantiator.object.test, "test");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
85
client/3rd/SortFilterProxyModel/tests/tst_stringsorter.qml
Normal file
85
client/3rd/SortFilterProxyModel/tests/tst_stringsorter.qml
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import SortFilterProxyModel 0.2
|
||||||
|
import QtQml.Models 2.2
|
||||||
|
import QtTest 1.1
|
||||||
|
|
||||||
|
Item {
|
||||||
|
property list<StringSorter> sorters: [
|
||||||
|
StringSorter {
|
||||||
|
property string tag: "normal"
|
||||||
|
property var expectedValues: ["haha", "hähä", "hehe", "héhé", "hihi", "huhu"]
|
||||||
|
roleName: "accentRole"
|
||||||
|
},
|
||||||
|
StringSorter {
|
||||||
|
property string tag: "numericMode"
|
||||||
|
property var expectedValues: ["a1", "a20", "a30", "a99", "a100", "a1000"]
|
||||||
|
roleName: "numericRole"
|
||||||
|
numericMode: true
|
||||||
|
},
|
||||||
|
StringSorter {
|
||||||
|
property string tag: "nonNumericMode"
|
||||||
|
property var expectedValues: ["a1", "a100", "a1000", "a20", "a30", "a99"]
|
||||||
|
roleName: "numericRole"
|
||||||
|
numericMode: false
|
||||||
|
},
|
||||||
|
StringSorter {
|
||||||
|
property string tag: "caseSensitive"
|
||||||
|
property var expectedValues: ["a", "A", "b", "c", "z", "Z"]
|
||||||
|
roleName: "caseRole"
|
||||||
|
caseSensitivity: Qt.CaseSensitive
|
||||||
|
},
|
||||||
|
StringSorter {
|
||||||
|
property string tag: "nonCaseSensitive"
|
||||||
|
property var expectedValues: ["A", "a", "b", "c", "Z", "z"]
|
||||||
|
roleName: "caseRole"
|
||||||
|
caseSensitivity: Qt.CaseInsensitive
|
||||||
|
},
|
||||||
|
StringSorter {
|
||||||
|
property string tag: "ignorePunctuation"
|
||||||
|
property var expectedValues: ["a-a", "aa", "b-b", "b-c", "b.c", "bc"]
|
||||||
|
roleName: "punctuationRole"
|
||||||
|
ignorePunctation: true
|
||||||
|
},
|
||||||
|
StringSorter {
|
||||||
|
property string tag: "doNotIgnorePunctuation"
|
||||||
|
property var expectedValues: ["aa", "a-a", "b.c", "b-b", "bc", "b-c"]
|
||||||
|
roleName: "punctuationRole"
|
||||||
|
ignorePunctation: false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
id: dataModel
|
||||||
|
ListElement { accentRole: "héhé"; numericRole: "a20"; caseRole: "b"; punctuationRole: "a-a"}
|
||||||
|
ListElement { accentRole: "hehe"; numericRole: "a1"; caseRole: "A"; punctuationRole: "aa"}
|
||||||
|
ListElement { accentRole: "haha"; numericRole: "a100"; caseRole: "a"; punctuationRole: "b-c"}
|
||||||
|
ListElement { accentRole: "huhu"; numericRole: "a99"; caseRole: "c"; punctuationRole: "b.c"}
|
||||||
|
ListElement { accentRole: "hihi"; numericRole: "a30"; caseRole: "Z"; punctuationRole: "bc"}
|
||||||
|
ListElement { accentRole: "hähä"; numericRole: "a1000"; caseRole: "z"; punctuationRole: "b-b"}
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testModel
|
||||||
|
sourceModel: dataModel
|
||||||
|
}
|
||||||
|
|
||||||
|
TestCase {
|
||||||
|
name: "StringSorterTests"
|
||||||
|
|
||||||
|
function test_stringSorters_data() {
|
||||||
|
return sorters;
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_stringSorters(sorter) {
|
||||||
|
testModel.sorters = sorter;
|
||||||
|
|
||||||
|
verify(testModel.count === sorter.expectedValues.length,
|
||||||
|
"Expected count " + sorter.expectedValues.length + ", actual count: " + testModel.count);
|
||||||
|
let actualValues = [];
|
||||||
|
for (var i = 0; i < testModel.count; i++) {
|
||||||
|
actualValues.push(testModel.get(i, sorter.roleName));
|
||||||
|
}
|
||||||
|
compare(actualValues, sorter.expectedValues);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
99
client/3rd/SortFilterProxyModel/tests/tst_switchrole.qml
Normal file
99
client/3rd/SortFilterProxyModel/tests/tst_switchrole.qml
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import QtQml 2.2
|
||||||
|
import QtTest 1.1
|
||||||
|
import SortFilterProxyModel 0.2
|
||||||
|
import QtQml 2.2
|
||||||
|
|
||||||
|
Item {
|
||||||
|
ListModel {
|
||||||
|
id: listModel
|
||||||
|
ListElement { name: "1"; favorite: true }
|
||||||
|
ListElement { name: "2"; favorite: false }
|
||||||
|
ListElement { name: "3"; favorite: false }
|
||||||
|
ListElement { name: "4"; favorite: true }
|
||||||
|
}
|
||||||
|
|
||||||
|
SortFilterProxyModel {
|
||||||
|
id: testModel
|
||||||
|
sourceModel: listModel
|
||||||
|
|
||||||
|
proxyRoles: SwitchRole {
|
||||||
|
id: switchRole
|
||||||
|
name: "switchRole"
|
||||||
|
ValueFilter {
|
||||||
|
id: valueFilter
|
||||||
|
roleName: "favorite"
|
||||||
|
value: true
|
||||||
|
SwitchRole.value: "*"
|
||||||
|
}
|
||||||
|
ValueFilter {
|
||||||
|
id: secondValueFilter
|
||||||
|
roleName: "favorite"
|
||||||
|
value: true
|
||||||
|
SwitchRole.value: "%"
|
||||||
|
}
|
||||||
|
ValueFilter {
|
||||||
|
id: thirdValueFilter
|
||||||
|
roleName: "name"
|
||||||
|
value: 3
|
||||||
|
SwitchRole.value: "three"
|
||||||
|
}
|
||||||
|
defaultRoleName: "name"
|
||||||
|
defaultValue: "foo"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Instantiator {
|
||||||
|
id: instantiator
|
||||||
|
model: testModel
|
||||||
|
QtObject {
|
||||||
|
property var switchRole: model.switchRole
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TestCase {
|
||||||
|
name: "SwitchRole"
|
||||||
|
|
||||||
|
function test_role() {
|
||||||
|
compare(testModel.get(0, "switchRole"), "*");
|
||||||
|
compare(testModel.get(1, "switchRole"), "2");
|
||||||
|
compare(testModel.get(2, "switchRole"), "three");
|
||||||
|
compare(testModel.get(3, "switchRole"), "*");
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_valueChange() {
|
||||||
|
compare(instantiator.object.switchRole, "*");
|
||||||
|
valueFilter.SwitchRole.value = "test";
|
||||||
|
compare(instantiator.object.switchRole, "test");
|
||||||
|
valueFilter.SwitchRole.value = "*";
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_filterChange() {
|
||||||
|
compare(instantiator.object.switchRole, "*");
|
||||||
|
valueFilter.enabled = false;
|
||||||
|
compare(instantiator.object.switchRole, "%");
|
||||||
|
valueFilter.enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_defaultSourceChange() {
|
||||||
|
compare(instantiator.object.switchRole, "*");
|
||||||
|
listModel.setProperty(0, "favorite", false);
|
||||||
|
compare(instantiator.object.switchRole, "1");
|
||||||
|
compare(instantiator.objectAt(1).switchRole, "2");
|
||||||
|
listModel.setProperty(1, "name", "test");
|
||||||
|
compare(instantiator.objectAt(1).switchRole, "test");
|
||||||
|
|
||||||
|
listModel.setProperty(1, "name", "2");
|
||||||
|
listModel.setProperty(0, "favorite", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_defaultValue() {
|
||||||
|
switchRole.defaultRoleName = "";
|
||||||
|
compare(instantiator.objectAt(1).switchRole, "foo");
|
||||||
|
switchRole.defaultValue = "bar";
|
||||||
|
compare(instantiator.objectAt(1).switchRole, "bar");
|
||||||
|
switchRole.defaultRoleName = "name";
|
||||||
|
switchRole.defaultValue = "foo";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
59
client/3rd/SortFilterProxyModel/utils/utils.cpp
Normal file
59
client/3rd/SortFilterProxyModel/utils/utils.cpp
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
|
#include <QDateTime>
|
||||||
|
|
||||||
|
namespace qqsfpm {
|
||||||
|
|
||||||
|
int compareVariants(const QVariant &lhs, const QVariant &rhs)
|
||||||
|
{
|
||||||
|
// Do the QString check first because otherwise the canConvert<int> check will get hit for strings.
|
||||||
|
if (lhs.typeId() == QMetaType::QString && rhs.typeId() == QMetaType::QString) {
|
||||||
|
const auto lhsValue = lhs.toString();
|
||||||
|
const auto rhsValue = rhs.toString();
|
||||||
|
if (lhsValue == rhsValue)
|
||||||
|
return 0;
|
||||||
|
return lhsValue.compare(rhsValue, Qt::CaseInsensitive);
|
||||||
|
} else if (lhs.typeId() == QMetaType::Bool && rhs.typeId() == QMetaType::Bool) {
|
||||||
|
const auto lhsValue = lhs.toBool();
|
||||||
|
const auto rhsValue = rhs.toBool();
|
||||||
|
if (lhsValue == rhsValue)
|
||||||
|
return 0;
|
||||||
|
// false < true.
|
||||||
|
return !lhsValue ? -1 : 1;
|
||||||
|
} else if (lhs.typeId() == QMetaType::QDate && rhs.typeId() == QMetaType::QDate) {
|
||||||
|
const auto lhsValue = lhs.toDate();
|
||||||
|
const auto rhsValue = rhs.toDate();
|
||||||
|
if (lhsValue == rhsValue)
|
||||||
|
return 0;
|
||||||
|
return lhsValue < rhsValue ? -1 : 1;
|
||||||
|
} else if (lhs.typeId() == QMetaType::QDateTime && rhs.typeId() == QMetaType::QDateTime) {
|
||||||
|
const auto lhsValue = lhs.toDateTime();
|
||||||
|
const auto rhsValue = rhs.toDateTime();
|
||||||
|
if (lhsValue == rhsValue)
|
||||||
|
return 0;
|
||||||
|
return lhsValue < rhsValue ? -1 : 1;
|
||||||
|
} else if (lhs.typeId() == QMetaType::QStringList && rhs.typeId() == QMetaType::QStringList) {
|
||||||
|
const auto lhsValue = lhs.toStringList();
|
||||||
|
const auto rhsValue = rhs.toStringList();
|
||||||
|
if (lhsValue == rhsValue)
|
||||||
|
return 0;
|
||||||
|
return lhsValue < rhsValue ? -1 : 1;
|
||||||
|
} else if (lhs.canConvert<int>() && rhs.canConvert<int>()) {
|
||||||
|
const auto lhsValue = lhs.toInt();
|
||||||
|
const auto rhsValue = rhs.toInt();
|
||||||
|
if (lhsValue == rhsValue)
|
||||||
|
return 0;
|
||||||
|
return lhsValue < rhsValue ? -1 : 1;
|
||||||
|
} else if (lhs.canConvert<qreal>() && rhs.canConvert<qreal>()) {
|
||||||
|
const auto lhsValue = lhs.toReal();
|
||||||
|
const auto rhsValue = rhs.toReal();
|
||||||
|
if (qFuzzyCompare(lhsValue, rhsValue))
|
||||||
|
return 0;
|
||||||
|
return lhsValue < rhsValue ? -1 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
qWarning() << "Don't know how to compare" << lhs << "against" << rhs << "- returning 0";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
17
client/3rd/SortFilterProxyModel/utils/utils.h
Normal file
17
client/3rd/SortFilterProxyModel/utils/utils.h
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
#ifndef UTILS_H
|
||||||
|
#define UTILS_H
|
||||||
|
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
|
namespace qqsfpm {
|
||||||
|
|
||||||
|
int compareVariants(const QVariant &lhs, const QVariant &rhs);
|
||||||
|
|
||||||
|
inline bool operator<(const QVariant &lhs, const QVariant &rhs) { return compareVariants(lhs, rhs) < 0; }
|
||||||
|
inline bool operator<=(const QVariant &lhs, const QVariant &rhs) { return compareVariants(lhs, rhs) <= 0; }
|
||||||
|
inline bool operator>(const QVariant &lhs, const QVariant &rhs) { return compareVariants(lhs, rhs) > 0; }
|
||||||
|
inline bool operator>=(const QVariant &lhs, const QVariant &rhs) { return compareVariants(lhs, rhs) >= 0; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // UTILS_H
|
|
@ -74,7 +74,7 @@ HEADERS += \
|
||||||
ui/uilogic.h \
|
ui/uilogic.h \
|
||||||
ui/qautostart.h \
|
ui/qautostart.h \
|
||||||
ui/models/sites_model.h \
|
ui/models/sites_model.h \
|
||||||
utils.h \
|
utilities.h \
|
||||||
vpnconnection.h \
|
vpnconnection.h \
|
||||||
protocols/vpnprotocol.h \
|
protocols/vpnprotocol.h \
|
||||||
logger.h \
|
logger.h \
|
||||||
|
@ -130,7 +130,7 @@ SOURCES += \
|
||||||
ui/uilogic.cpp \
|
ui/uilogic.cpp \
|
||||||
ui/qautostart.cpp \
|
ui/qautostart.cpp \
|
||||||
ui/models/sites_model.cpp \
|
ui/models/sites_model.cpp \
|
||||||
utils.cpp \
|
utilities.cpp \
|
||||||
vpnconnection.cpp \
|
vpnconnection.cpp \
|
||||||
protocols/vpnprotocol.cpp \
|
protocols/vpnprotocol.cpp \
|
||||||
logger.cpp \
|
logger.cpp \
|
||||||
|
@ -171,6 +171,7 @@ win32 {
|
||||||
-liphlpapi \
|
-liphlpapi \
|
||||||
-lgdi32
|
-lgdi32
|
||||||
|
|
||||||
|
QMAKE_LFLAGS_WINDOWS += /entry:mainCRTStartup
|
||||||
|
|
||||||
!contains(QMAKE_TARGET.arch, x86_64) {
|
!contains(QMAKE_TARGET.arch, x86_64) {
|
||||||
message("Windows x86 build")
|
message("Windows x86 build")
|
||||||
|
@ -339,15 +340,15 @@ ios {
|
||||||
QMAKE_PROVISIONING_PROFILE = f2fefb59-14aa-4aa9-ac14-1d5531b06dcc
|
QMAKE_PROVISIONING_PROFILE = f2fefb59-14aa-4aa9-ac14-1d5531b06dcc
|
||||||
QMAKE_XCODE_CODE_SIGN_IDENTITY = "Apple Distribution"
|
QMAKE_XCODE_CODE_SIGN_IDENTITY = "Apple Distribution"
|
||||||
QMAKE_INFO_PLIST = $$PWD/ios/app/Info.plist
|
QMAKE_INFO_PLIST = $$PWD/ios/app/Info.plist
|
||||||
|
|
||||||
XCODEBUILD_FLAGS += -allowProvisioningUpdates
|
XCODEBUILD_FLAGS += -allowProvisioningUpdates
|
||||||
|
|
||||||
DEFINES += iphoneos
|
DEFINES += iphoneos
|
||||||
|
|
||||||
contains(QT_ARCH, arm64) {
|
contains(QT_ARCH, arm64) {
|
||||||
message("Building for iOS/ARM v8 64-bit architecture")
|
message("Building for iOS/ARM v8 64-bit architecture")
|
||||||
ARCH_TAG = "ios_armv8_64"
|
ARCH_TAG = "ios_armv8_64"
|
||||||
|
|
||||||
LIBS += $$PWD/3rd/OpenSSL/lib/ios/iphone/libcrypto.a
|
LIBS += $$PWD/3rd/OpenSSL/lib/ios/iphone/libcrypto.a
|
||||||
LIBS += $$PWD/3rd/OpenSSL/lib/ios/iphone/libssl.a
|
LIBS += $$PWD/3rd/OpenSSL/lib/ios/iphone/libssl.a
|
||||||
} else {
|
} else {
|
||||||
|
@ -356,15 +357,15 @@ ios {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# }
|
# }
|
||||||
|
|
||||||
|
|
||||||
# CONFIG(iphonesimulator, iphoneos|iphonesimulator) {
|
# CONFIG(iphonesimulator, iphoneos|iphonesimulator) {
|
||||||
# iphonesimulator {
|
# iphonesimulator {
|
||||||
# message("Building for iPhone Simulator")
|
# message("Building for iPhone Simulator")
|
||||||
# ARCH_TAG = "ios_x86_64"
|
# ARCH_TAG = "ios_x86_64"
|
||||||
#
|
#
|
||||||
# DEFINES += iphonesimulator
|
# DEFINES += iphonesimulator
|
||||||
#
|
#
|
||||||
# LIBS += $$PWD/3rd/OpenSSL/lib/ios/simulator/libcrypto.a
|
# LIBS += $$PWD/3rd/OpenSSL/lib/ios/simulator/libcrypto.a
|
||||||
# LIBS += $$PWD/3rd/OpenSSL/lib/ios/simulator/libssl.a
|
# LIBS += $$PWD/3rd/OpenSSL/lib/ios/simulator/libssl.a
|
||||||
# }
|
# }
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include "core/server_defs.h"
|
#include "core/server_defs.h"
|
||||||
#include "containers/containers_defs.h"
|
#include "containers/containers_defs.h"
|
||||||
#include "core/scripts_registry.h"
|
#include "core/scripts_registry.h"
|
||||||
#include "utils.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
Ikev2Configurator::ConnectionData Ikev2Configurator::prepareIkev2Config(const ServerCredentials &credentials,
|
Ikev2Configurator::ConnectionData Ikev2Configurator::prepareIkev2Config(const ServerCredentials &credentials,
|
||||||
DockerContainer container, ErrorCode *errorCode)
|
DockerContainer container, ErrorCode *errorCode)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue