LeechCraft
0.6.70-18450-gabe19ee3b0
Modular cross-platform feature rich live environment.
Toggle main menu visibility
Loading...
Searching...
No Matches
ifinder.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
#ifndef INTERFACES_IFINDER_H
10
#define INTERFACES_IFINDER_H
11
#include <memory>
12
#include <QStringList>
13
#include <QHash>
14
#include <QVariant>
15
16
class
QAbstractItemModel;
17
18
namespace
LC
19
{
26
struct
Request
27
{
30
enum
Type
31
{
32
RTFixed
,
33
RTWildcard
,
34
RTRegexp
,
35
RTTag
36
};
37
40
bool
CaseSensitive_
;
41
44
Type
Type_
;
45
48
QString
Plugin_
;
49
52
QString
Category_
;
53
56
QString
String_
;
59
QHash<QString, QVariant>
Params_
;
60
};
61
}
62
69
class
Q_DECL_EXPORT
IFindProxy
70
{
71
public
:
72
virtual
~IFindProxy
() {}
73
83
virtual
QAbstractItemModel*
GetModel
() = 0;
84
101
virtual
QByteArray
GetUniqueSearchID
()
const
= 0;
102
111
virtual
QStringList
GetCategories
()
const
= 0;
112
};
113
114
typedef
std::shared_ptr<IFindProxy>
IFindProxy_ptr
;
115
123
class
Q_DECL_EXPORT
IFinder
124
{
125
public
:
126
virtual
~IFinder
() {}
127
138
virtual
QStringList
GetCategories
()
const
= 0;
139
152
virtual
QList<IFindProxy_ptr>
GetProxy
(
const
LC::Request
& r) = 0;
153
160
virtual
void
categoriesChanged
(
const
QStringList& newCats,
161
const
QStringList& oldCats) = 0;
162
};
163
164
Q_DECLARE_INTERFACE (
IFinder
,
"org.Deviant.LeechCraft.IFinder/1.0"
)
165
Q_DECLARE_INTERFACE (
IFindProxy
,
"org.Deviant.LeechCraft.IFinder/1.0"
)
166
167
#endif
168
IFindProxy
Represents search results for a single Request.
Definition
ifinder.h:70
IFindProxy::~IFindProxy
virtual ~IFindProxy()
Definition
ifinder.h:72
IFindProxy::GetUniqueSearchID
virtual QByteArray GetUniqueSearchID() const =0
Represents the unique ID of this finder type.
IFindProxy::GetModel
virtual QAbstractItemModel * GetModel()=0
IFindProxy::GetCategories
virtual QStringList GetCategories() const =0
Returns the list of categories this proxy would return.
IFinder
Base class for search providers.
Definition
ifinder.h:124
IFinder::GetProxy
virtual QList< IFindProxy_ptr > GetProxy(const LC::Request &r)=0
Returns find proxies for the given request.
IFinder::categoriesChanged
virtual void categoriesChanged(const QStringList &newCats, const QStringList &oldCats)=0
This signal should be emitted by plugin after the list of categories has been updated.
IFinder::~IFinder
virtual ~IFinder()
Definition
ifinder.h:126
IFinder::GetCategories
virtual QStringList GetCategories() const =0
Returns the plugin's categories.
QList
Definition
ianrulesstorage.h:14
IFindProxy_ptr
std::shared_ptr< IFindProxy > IFindProxy_ptr
Definition
ifinder.h:114
LC
Definition
constants.h:15
LC::Request
Describes the elementary subrequest.
Definition
ifinder.h:27
LC::Request::CaseSensitive_
bool CaseSensitive_
Definition
ifinder.h:40
LC::Request::Params_
QHash< QString, QVariant > Params_
Definition
ifinder.h:59
LC::Request::String_
QString String_
Definition
ifinder.h:56
LC::Request::Plugin_
QString Plugin_
Definition
ifinder.h:48
LC::Request::Type
Type
Definition
ifinder.h:31
LC::Request::RTWildcard
@ RTWildcard
Wildcard.
Definition
ifinder.h:33
LC::Request::RTTag
@ RTTag
Tag filtering.
Definition
ifinder.h:35
LC::Request::RTFixed
@ RTFixed
Fixed string.
Definition
ifinder.h:32
LC::Request::RTRegexp
@ RTRegexp
Regular expression.
Definition
ifinder.h:34
LC::Request::Type_
Type Type_
Definition
ifinder.h:44
LC::Request::Category_
QString Category_
Definition
ifinder.h:52
src
interfaces
ifinder.h
Generated by
1.17.0