digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::SearchModificationHelper Class Reference

Utility class providing methods to modify search albums (SAlbum) in a way useful to implement views. More...

+ Inheritance diagram for Digikam::SearchModificationHelper:

Public Slots

void slotCreateFuzzySearchFromDropped (const QString &name, const QString &filePath, float threshold, float maxThreshold, const QList< int > &targetAlbums, bool overwriteIfExisting)
 Creates a new fuzzy search for finding similar photos based on the file path of a photo and selects it in the album manager after creation.
 
void slotCreateFuzzySearchFromImage (const QString &name, const ItemInfo &image, float threshold, float maxThreshold, const QList< int > &targetAlbums, bool overwriteIfExisting=false)
 Creates a new fuzzy search for finding similar photos based on one photo and selects it in the album manager after creation.
 
void slotCreateFuzzySearchFromSketch (const QString &name, SketchWidget *sketchWidget, unsigned int numberOfResults, const QList< int > &targetAlbums, bool overwriteIfExisting=false)
 Creates a new fuzzy search based on a sketch created by the user and selects it in the AlbumManager after creation.
 
SAlbumslotCreateTimeLineSearch (const QString &desiredName, const DateRangeList &dateRanges, bool overwriteIfExisting=false)
 Creates a new timeline search.
 
void slotSearchDelete (SAlbum *searchAlbum)
 Deletes the given search after prompting the user.
 
void slotSearchRename (SAlbum *searchAlbum)
 Renames the given search via a dialog.
 

Public Member Functions

 SearchModificationHelper (QObject *const parent, QWidget *const dialogParent)
 Constructor.
 
 ~SearchModificationHelper () override
 Destructor.
 
SAlbumcreateFuzzySearchFromDropped (const QString &name, const QString &filePath, float threshold, float maxThreshold, const QList< int > &targetAlbums, bool overwriteIfExisting=false)
 
SAlbumcreateFuzzySearchFromImage (const QString &name, const ItemInfo &image, float threshold, float maxThreshold, const QList< int > &targetAlbums, bool overwriteIfExisting=false)
 
SAlbumcreateFuzzySearchFromSketch (const QString &name, SketchWidget *sketchWidget, unsigned int numberOfResults, const QList< int > &targetAlbums, bool overwriteIfExisting=false)
 

Detailed Description

Author
jwienke

Constructor & Destructor Documentation

◆ SearchModificationHelper()

Digikam::SearchModificationHelper::SearchModificationHelper ( QObject *const  parent,
QWidget *const  dialogParent 
)
Parameters
parentthe parent for qt parent child mechanism
dialogParentparent widget for dialogs displayed by this object

Member Function Documentation

◆ createFuzzySearchFromDropped()

SAlbum * Digikam::SearchModificationHelper::createFuzzySearchFromDropped ( const QString &  name,
const QString &  filePath,
float  threshold,
float  maxThreshold,
const QList< int > &  targetAlbums,
bool  overwriteIfExisting = false 
)
See also
slotCreateFuzzySearchFromDropped()
Returns
the newly created album

◆ createFuzzySearchFromImage()

SAlbum * Digikam::SearchModificationHelper::createFuzzySearchFromImage ( const QString &  name,
const ItemInfo image,
float  threshold,
float  maxThreshold,
const QList< int > &  targetAlbums,
bool  overwriteIfExisting = false 
)
See also
slotCreateFuzzySearchFromImage()
Returns
the newly created album

◆ createFuzzySearchFromSketch()

SAlbum * Digikam::SearchModificationHelper::createFuzzySearchFromSketch ( const QString &  name,
SketchWidget sketchWidget,
unsigned int  numberOfResults,
const QList< int > &  targetAlbums,
bool  overwriteIfExisting = false 
)
See also
slotCreateFuzzySearchFromSketch()
Returns
the newly created album

◆ slotCreateFuzzySearchFromDropped

void Digikam::SearchModificationHelper::slotCreateFuzzySearchFromDropped ( const QString &  name,
const QString &  filePath,
float  threshold,
float  maxThreshold,
const QList< int > &  targetAlbums,
bool  overwriteIfExisting 
)
slot
Parameters
nameof the new search
filePathpath of the image to base this search on
thresholdminimum threshold for image search
maxThresholdmaximum threshold for image search
targetAlbumsThe image must be in one of these albums
overwriteIfExistingif true, an existing search with the desired name will be overwritten without prompting the user for a new name

◆ slotCreateFuzzySearchFromImage

void Digikam::SearchModificationHelper::slotCreateFuzzySearchFromImage ( const QString &  name,
const ItemInfo image,
float  threshold,
float  maxThreshold,
const QList< int > &  targetAlbums,
bool  overwriteIfExisting = false 
)
slot
Parameters
nameof the new search
imagethe image to base this search on
thresholdthe threshold for image search, 0 <= threshold <= 1
maxThresholdthe maximum threshold of similarity.
targetAlbumsThe image must be in one of these albums
overwriteIfExistingif true, an existing search with the desired name will be overwritten without prompting the user for a new name

◆ slotCreateFuzzySearchFromSketch

void Digikam::SearchModificationHelper::slotCreateFuzzySearchFromSketch ( const QString &  name,
SketchWidget sketchWidget,
unsigned int  numberOfResults,
const QList< int > &  targetAlbums,
bool  overwriteIfExisting = false 
)
slot
Parameters
namethe name of the new sketch search
sketchWidgetthe widget containing the sketch of the user
numberOfResultsmax number of results to display
targetAlbumsThe image must be in one of these albums
overwriteIfExistingif true, an existing search with the desired name will be overwritten without prompting the user for a new name

◆ slotCreateTimeLineSearch

SAlbum * Digikam::SearchModificationHelper::slotCreateTimeLineSearch ( const QString &  desiredName,
const DateRangeList dateRanges,
bool  overwriteIfExisting = false 
)
slot
Parameters
desiredNamedesired name for the search. If this name already exists and overwriteIfExisting is false, then the user will be prompted for a new name
dateRangesdate ranges to contain in this timeline search. If this is empty, no search will be created.
overwriteIfExistingif true, an existing search with the desired name will be overwritten without prompting the user for a new name

◆ slotSearchDelete

void Digikam::SearchModificationHelper::slotSearchDelete ( SAlbum searchAlbum)
slot
Parameters
searchAlbumsearch to delete

◆ slotSearchRename

void Digikam::SearchModificationHelper::slotSearchRename ( SAlbum searchAlbum)
slot
Parameters
searchAlbumsearch to rename