LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
IFindProxy Class Referenceabstract

Represents search results for a single Request. More...

#include "ifinder.h"

Public Member Functions

virtual ~IFindProxy ()
 
virtual QAbstractItemModel * GetModel ()=0
 
virtual QByteArray GetUniqueSearchID () const =0
 Represents the unique ID of this finder type. More...
 
virtual QStringList GetCategories () const =0
 Returns the list of categories this proxy would return. More...
 

Detailed Description

Represents search results for a single Request.

Contains a QAbstractItemModel with the search results representation that would be embedded into the LeechCraft main area. Every single subrequest should represent its results via this model.

Definition at line 69 of file ifinder.h.

Constructor & Destructor Documentation

◆ ~IFindProxy()

virtual IFindProxy::~IFindProxy ( )
inlinevirtual

Definition at line 72 of file ifinder.h.

Member Function Documentation

◆ GetCategories()

virtual QStringList IFindProxy::GetCategories ( ) const
pure virtual

Returns the list of categories this proxy would return.

This function should return the list of human-readable representation of categories that this find proxy's results would belong into.

Returns
The list of categories this proxy would search in.

◆ GetModel()

virtual QAbstractItemModel* IFindProxy::GetModel ( )
pure virtual

Returns the model with search results representation.

See the CustomDataRoles list for the list of roles you can use in your model to communicate with other parts.

Returns
The model with results.
See also
CustomDataRoles

◆ GetUniqueSearchID()

virtual QByteArray IFindProxy::GetUniqueSearchID ( ) const
pure virtual

Represents the unique ID of this finder type.

Unique ID may be (and would be, in most cases) dependent upon the request this IFindProxy represents. This is required in order to filter out different IFindProxy objects that represent the same result set.

Consider your plugin performs the same search for two different categories. For example, one is site's name, where it searches, and the other one is "music", because your plugin searches for music. Then, if user selects both music and the site name, only one search find proxy should be returned. Thus, this function allows one to avoid such situations.

Returns
The string with unique ID.

The documentation for this class was generated from the following file: