LeechCraft
0.6.70-18450-gabe19ee3b0
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
tagsfiltermodel.h
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#pragma once
10
11
#include <
util/models/fixedstringfilterproxymodel.h
>
12
#include "
tagsconfig.h
"
13
14
namespace
LC::Util
15
{
29
class
UTIL_TAGS_API
TagsFilterModel
:
public
FixedStringFilterProxyModel
30
{
31
QString Separator_;
32
QList<QString>
FilterTags_;
33
int
TagsRole_ = -1;
34
bool
NormalMode_ =
true
;
35
public
:
40
enum class
TagsInclusionMode
41
{
47
Any,
48
54
All
55
};
56
private
:
57
TagsInclusionMode TagsMode_ = TagsInclusionMode::All;
58
public
:
63
explicit
TagsFilterModel
(QObject *parent =
nullptr
);
64
65
void
SetFilterString (
const
QString&)
override
;
66
67
void
SetTagsRole (
int
role);
68
82
void
SetSeparator (
const
QString& separator);
83
91
void
SetTagsInclusionMode (TagsInclusionMode mode);
92
99
void
SetTagsMode (
bool
enabled);
100
protected
:
103
bool
filterAcceptsRow (
int
,
const
QModelIndex&)
const override
;
104
114
virtual
QStringList GetTagsForIndex (
int
row)
const
;
115
private
:
116
bool
FilterTagsMode (
int
,
const
QModelIndex&)
const
;
117
};
118
}
LC::Util::FixedStringFilterProxyModel::FixedStringFilterProxyModel
FixedStringFilterProxyModel(QObject *=nullptr)
Definition
fixedstringfilterproxymodel.cpp:14
LC::Util::TagsFilterModel
Provides filter model with additional tags filter mode.
Definition
tagsfiltermodel.h:30
LC::Util::TagsFilterModel::TagsInclusionMode
TagsInclusionMode
Describes the modes of matching two sets of tags.
Definition
tagsfiltermodel.h:41
LC::Util::TagsFilterModel::TagsFilterModel
TagsFilterModel(QObject *parent=nullptr)
Creates the model with the given parent.
Definition
tagsfiltermodel.cpp:17
QList
Definition
ianrulesstorage.h:14
fixedstringfilterproxymodel.h
LC::Util
Definition
icoreproxy.h:34
tagsconfig.h
UTIL_TAGS_API
#define UTIL_TAGS_API
Definition
tagsconfig.h:16
src
util
tags
tagsfiltermodel.h
Generated by
1.16.1