Class sh::search::SearchCriterionFactory

class sh::search::SearchCriterionFactory : public std::enable_shared_from_this<SearchCriterionFactory>

Abstract base class for a search criterion factory, which constructs some sh::search::SearchCriterion instances.

It also provides some control methods and metadata (which is possible since there is a separate factory for each criterion class).

Note: Though possible in some exotic situations, one should not override this class. Override and register sh::search::SearchCriterion instead!

Subclassed by sh::scripting::api::ApiSearchCriterionFactory, sh::search::SearchCriterionFactoryFromFunction

Public Functions

SearchCriterionFactory()
QString key() = 0

Returns the string key for the associated search criterion class. .

QString description() = 0

Returns the description string for the associated search criterion class. .

void editor(std::shared_ptr<sh::search::SearchCriterion> c, sh::ui::SearchPanelConfiguration *panelcfg) = 0

Builds the search config ui in a search panel.

Takes the data from c and populates panelcfg with it.

void editorupdateconfig(sh::ui::SearchPanelConfiguration *panelcfg, std::shared_ptr<sh::search::SearchCriterion> c) = 0

Updates own data with the content from the search config ui in a search panel.

Takes the data from panelcfg and updates c with it.

std::shared_ptr<sh::search::SearchCriterion> construct() = 0

Constructs an instance of the associated search criterion class. .

bool isVisibleFor(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::FilesystemNode> node)

Checks if the associated search criterion class should be offered to the user for a given node. .

~SearchCriterionFactory()