Namespace sh::search::criteria¶
-
namespace
sh::search
::
criteria
Implementations of search criteria.
Subclasses of sh::search::SearchCriterion.
-
class
AbstractActionDrivenSearchCriterion
: public sh::search::SearchCriterion - #include <abstractactiondrivensearchcriterion.h>
Abstract search criterion filtering by something which is configured in a wizard-like way by an action execution.
This provides an easy yet powerful programming interface, e.g. for usage in scripting.
Subclassed by sh::scripting::api::ApiSearchCriterion
Public Functions
Checks if a given file (by eurl) matches this criterion. .
-
QString
valuedescription
() Returns a human readable text describing the current criterion shortly and precisely. .
-
QString
serialize
() Serializes this criterion to a string. See also SearchCriterion::deserialize.
-
std::shared_ptr<sh::search::SearchCriterionFactory>
factory
() Returns the factory this criterion has created (provides some more metadata).
Public Members
-
QStringList
searchspec
Public Static Functions
-
std::shared_ptr<sh::search::SearchCriterion>
deserialize
(QString s) Deserializes this criterion from a string. See also SearchCriterion::serialize.
Friends
- friend class ActionAbstractActionDrivenSearchCriterionConfigure
-
class
AbstractStringSearchCriterion
: public sh::search::SearchCriterion - #include <abstractstringsearchcriterion.h>
Abstract search criterion filtering by some string value (providing different modes like exact, fuzzy, regexp, …).
Subclassed by sh::search::criteria::FileContentSearchCriterion, sh::search::criteria::FilenameSearchCriterion
Public Types
-
enum
Mode
Values:
-
enumerator
Simple
-
enumerator
Exact
-
enumerator
RegExp
-
enumerator
Fuzzy
-
enumerator
Public Functions
Checks if a given file (by eurl) matches this criterion. .
-
QString
valuedescription
() Returns a human readable text describing the current criterion shortly and precisely. .
-
QString
serialize
() Serializes this criterion to a string. See also SearchCriterion::deserialize.
-
std::shared_ptr<sh::search::SearchCriterionFactory>
factory
() Returns the factory this criterion has created (provides some more metadata).
Public Static Functions
-
int
levenshteinSubstringDistance
(QString needle, QString haystack)
-
double
relativeLevenshteinPartsSubstringDistance
(QString needle, QString haystack)
-
std::shared_ptr<sh::search::SearchCriterion>
deserialize
(QString s) Deserializes this criterion from a string. See also SearchCriterion::serialize.
Public Static Attributes
-
const QStringList
ModeCodes
-
enum
-
class
ActionAbstractActionDrivenSearchCriterionConfigure
: public sh::actions::ActionActionItem - #include <abstractactiondrivensearchcriterion.h>
Public Functions
-
void
action
(sh::actions::ActionExecutionInfo *info) The action implementation, i.e. what the actions should actually do.
-
void
execute
() Executes this action.
-
void
execute
(sh::actions::ActionExecutionInfo *info) Executes this action.
-
QKeySequence
shortcuthint
() Returns the keyboard shortcut for triggering this action.
-
bool
shortcuthintTriggersOnCurrentDirectory
() Checks if using the keyboard shortcut shall trigger the action on the current directory (or on the entry selection).
-
void
setShortcuthint
(QKeySequence shortcut, bool triggersOnCurrentDirectory = false) Sets the keyboard shortcut for triggering this action.
-
QString
text
() Returns the displayed text for this action.
-
QString
icon
() Returns the icon for this action.
-
bool
enabled
() Checks if this action is enabled.
-
bool
isChecked
() Checks if this action is checked (has a cross in the ui).
-
bool
isCheckable
() Checks if this action is checkable (can have a cross in the ui).
-
int
defaultActionPrecedence
() const Returns the precedence for becoming the default action of a parent submenu.
This e.g. leads to a bold label.
The action with the highest value becomes the default. Only values >0 will be considered. See ActionDefaultPrecedenceValues for reference values.
-
void
setText
(QString text) Sets the displayed text.
-
void
setIcon
(QString icon) Sets the icon.
-
void
setEnabled
(bool enabled) Sets if the item is enabled.
-
void
setChecked
(bool checked) Sets if the item is checked (has a cross in the ui).
-
void
setVisible
(bool visible) Sets the visibility of this item.
-
bool
visible
() Checks the visibility of this item (non-recursively).
-
std::weak_ptr<AbstractActionItem>
parentAction
() Returns the parent action, if it is added to a container.
Sets the parent action. .
-
void
initializeAsync
(std::function<void()> oninitialized = 0) Asynchonously initializes the action.
-
void
initializeSync
() Synchonously initializes the action.
-
bool
isInitialized
() Checks if this action is initialized.
-
bool
isInitializing
() Checks if this action is initializing.
Signals
-
void
changed
() Emits when some data changed.
-
void
-
class
ExtendedAttributeSearchCriterion
: public sh::search::SearchCriterion - #include <extendedattributesearchcriterion.h>
Search criterion filtering by extended attributes.
Public Types
-
enum
Mode
Values:
-
enumerator
None
-
enumerator
Simple
-
enumerator
RegExp
-
enumerator
Fuzzy
-
enumerator
Public Functions
Checks if a given file (by eurl) matches this criterion. .
-
QString
valuedescription
() Returns a human readable text describing the current criterion shortly and precisely. .
-
QString
serialize
() Serializes this criterion to a string. See also SearchCriterion::deserialize.
-
std::shared_ptr<sh::search::SearchCriterionFactory>
factory
() Returns the factory this criterion has created (provides some more metadata).
Public Static Functions
-
void
doInitialize
()
-
void
doShutdown
()
-
std::shared_ptr<sh::search::SearchCriterion>
deserialize
(QString s) Deserializes this criterion from a string. See also SearchCriterion::serialize.
Public Static Attributes
-
const QStringList
ModeCodes
-
enum
-
class
FileContentSearchCriterion
: public sh::search::criteria::AbstractStringSearchCriterion - #include <filecontentsearchcriterion.h>
Search criterion filtering by file contents.
Public Types
-
enum
Mode
Values:
-
enumerator
Simple
-
enumerator
Exact
-
enumerator
RegExp
-
enumerator
Fuzzy
-
enumerator
Public Functions
Checks if a given file (by eurl) matches this criterion. .
-
QString
valuedescription
() Returns a human readable text describing the current criterion shortly and precisely. .
-
QString
serialize
() Serializes this criterion to a string. See also SearchCriterion::deserialize.
-
std::shared_ptr<sh::search::SearchCriterionFactory>
factory
() Returns the factory this criterion has created (provides some more metadata).
Public Static Functions
-
void
doInitialize
()
-
void
doShutdown
()
-
int
levenshteinSubstringDistance
(QString needle, QString haystack)
-
double
relativeLevenshteinPartsSubstringDistance
(QString needle, QString haystack)
-
std::shared_ptr<sh::search::SearchCriterion>
deserialize
(QString s) Deserializes this criterion from a string. See also SearchCriterion::serialize.
Public Static Attributes
-
const QStringList
ModeCodes
-
enum
-
class
FilenameSearchCriterion
: public sh::search::criteria::AbstractStringSearchCriterion - #include <filenamesearchcriterion.h>
Search criterion filtering by file names.
Public Types
-
enum
Mode
Values:
-
enumerator
Simple
-
enumerator
Exact
-
enumerator
RegExp
-
enumerator
Fuzzy
-
enumerator
Public Functions
Checks if a given file (by eurl) matches this criterion. .
-
QString
valuedescription
() Returns a human readable text describing the current criterion shortly and precisely. .
-
QString
serialize
() Serializes this criterion to a string. See also SearchCriterion::deserialize.
-
std::shared_ptr<sh::search::SearchCriterionFactory>
factory
() Returns the factory this criterion has created (provides some more metadata).
Public Static Functions
-
void
doInitialize
()
-
void
doShutdown
()
-
int
levenshteinSubstringDistance
(QString needle, QString haystack)
-
double
relativeLevenshteinPartsSubstringDistance
(QString needle, QString haystack)
-
std::shared_ptr<sh::search::SearchCriterion>
deserialize
(QString s) Deserializes this criterion from a string. See also SearchCriterion::serialize.
Public Static Attributes
-
const QStringList
ModeCodes
-
enum
-
class
MtimeSearchCriterion
: public sh::search::SearchCriterion - #include <mtimesearchcriterion.h>
Search criterion filtering by file modification times.
Public Functions
Checks if a given file (by eurl) matches this criterion. .
-
QString
valuedescription
() Returns a human readable text describing the current criterion shortly and precisely. .
-
QString
serialize
() Serializes this criterion to a string. See also SearchCriterion::deserialize.
-
std::shared_ptr<sh::search::SearchCriterionFactory>
factory
() Returns the factory this criterion has created (provides some more metadata).
Public Members
-
QDateTime
from
-
QDateTime
to
Public Static Functions
-
void
doInitialize
()
-
void
doShutdown
()
-
std::shared_ptr<sh::search::SearchCriterion>
deserialize
(QString s) Deserializes this criterion from a string. See also SearchCriterion::serialize.
-
class