digiKam
|
Public Slots | |
void | slotCreateFuzzySearchFromDropped (const QString &name, const QString &filePath, float threshold, float maxThreshold, const QList< int > &targetAlbums, bool overwriteIfExisting) |
void | slotCreateFuzzySearchFromImage (const QString &name, const ItemInfo &image, float threshold, float maxThreshold, const QList< int > &targetAlbums, bool overwriteIfExisting=false) |
void | slotCreateFuzzySearchFromSketch (const QString &name, SketchWidget *sketchWidget, unsigned int numberOfResults, const QList< int > &targetAlbums, bool overwriteIfExisting=false) |
SAlbum * | slotCreateTimeLineSearch (const QString &desiredName, const DateRangeList &dateRanges, bool overwriteIfExisting=false) |
void | slotSearchDelete (SAlbum *searchAlbum) |
void | slotSearchRename (SAlbum *searchAlbum) |
Public Member Functions | |
SAlbum * | createFuzzySearchFromDropped (const QString &name, const QString &filePath, float threshold, float maxThreshold, const QList< int > &targetAlbums, bool overwriteIfExisting=false) |
SAlbum * | createFuzzySearchFromImage (const QString &name, const ItemInfo &image, float threshold, float maxThreshold, const QList< int > &targetAlbums, bool overwriteIfExisting=false) |
SAlbum * | createFuzzySearchFromSketch (const QString &name, SketchWidget *sketchWidget, unsigned int numberOfResults, const QList< int > &targetAlbums, bool overwriteIfExisting=false) |
SearchModificationHelper (QObject *const parent, QWidget *const dialogParent) | |
~SearchModificationHelper () override | |
Utility class providing methods to modify search albums (SAlbum) in a way useful to implement views.
Digikam::SearchModificationHelper::SearchModificationHelper | ( | QObject *const | parent, |
QWidget *const | dialogParent | ||
) |
Constructor.
parent | the parent for qt parent child mechanism |
dialogParent | parent widget for dialogs displayed by this object |
|
override |
Destructor.
SAlbum * Digikam::SearchModificationHelper::createFuzzySearchFromDropped | ( | const QString & | name, |
const QString & | filePath, | ||
float | threshold, | ||
float | maxThreshold, | ||
const QList< int > & | targetAlbums, | ||
bool | overwriteIfExisting = false |
||
) |
References Digikam::AlbumManager::createSAlbum(), Digikam::SearchXmlWriter::finish(), Digikam::SearchXmlWriter::finishField(), Digikam::SearchXmlWriter::finishGroup(), Digikam::DatabaseSearch::HaarSearch, Digikam::AlbumManager::instance(), Digikam::SearchXml::Like, Digikam::SearchXml::OneOf, Digikam::AlbumManager::setCurrentAlbums(), Digikam::SearchXmlWriter::writeField(), Digikam::SearchXmlWriter::writeGroup(), Digikam::SearchXmlWriter::writeValue(), and Digikam::SearchXmlWriter::xml().
Referenced by Digikam::FuzzySearchView::dropEvent(), and slotCreateFuzzySearchFromDropped().
SAlbum * Digikam::SearchModificationHelper::createFuzzySearchFromImage | ( | const QString & | name, |
const ItemInfo & | image, | ||
float | threshold, | ||
float | maxThreshold, | ||
const QList< int > & | targetAlbums, | ||
bool | overwriteIfExisting = false |
||
) |
References Digikam::AlbumManager::createSAlbum(), Digikam::ItemInfo::filePath(), Digikam::SearchXmlWriter::finish(), Digikam::SearchXmlWriter::finishField(), Digikam::SearchXmlWriter::finishGroup(), Digikam::DatabaseSearch::HaarSearch, Digikam::ItemInfo::id(), Digikam::HaarIface::indexImage(), Digikam::AlbumManager::instance(), Digikam::ItemInfo::isNull(), Digikam::SearchXml::Like, Digikam::SearchXml::OneOf, Digikam::AlbumManager::setCurrentAlbums(), Digikam::SearchXmlWriter::writeField(), Digikam::SearchXmlWriter::writeGroup(), Digikam::SearchXmlWriter::writeValue(), and Digikam::SearchXmlWriter::xml().
Referenced by slotCreateFuzzySearchFromImage().
SAlbum * Digikam::SearchModificationHelper::createFuzzySearchFromSketch | ( | const QString & | name, |
SketchWidget * | sketchWidget, | ||
unsigned int | numberOfResults, | ||
const QList< int > & | targetAlbums, | ||
bool | overwriteIfExisting = false |
||
) |
References Digikam::AlbumManager::createSAlbum(), Digikam::SearchXmlWriter::finish(), Digikam::SearchXmlWriter::finishField(), Digikam::SearchXmlWriter::finishGroup(), Digikam::DatabaseSearch::HaarSearch, Digikam::AlbumManager::instance(), Digikam::SketchWidget::isClear(), Digikam::SearchXml::Like, Digikam::SearchXml::OneOf, Digikam::AlbumManager::setCurrentAlbums(), Digikam::HaarIface::signatureAsText(), Digikam::SketchWidget::sketchImage(), Digikam::SketchWidget::sketchImageToXML(), Digikam::SearchXmlWriter::writeField(), Digikam::SearchXmlWriter::writeGroup(), Digikam::SearchXmlWriter::writeValue(), and Digikam::SearchXmlWriter::xml().
Referenced by slotCreateFuzzySearchFromSketch().
|
slot |
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.
name | of the new search |
filePath | path of the image to base this search on |
threshold | minimum threshold for image search |
maxThreshold | maximum threshold for image search |
targetAlbums | The image must be in one of these albums |
overwriteIfExisting | if true, an existing search with the desired name will be overwritten without prompting the user for a new name |
References createFuzzySearchFromDropped().
|
slot |
Creates a new fuzzy search for finding similar photos based on one photo and selects it in the album manager after creation.
name | of the new search |
image | the image to base this search on |
threshold | the threshold for image search, 0 <= threshold <= 1 |
maxThreshold | the maximum threshold of similarity. |
targetAlbums | The image must be in one of these albums |
overwriteIfExisting | if true, an existing search with the desired name will be overwritten without prompting the user for a new name |
References createFuzzySearchFromImage().
|
slot |
Creates a new fuzzy search based on a sketch created by the user and selects it in the AlbumManager after creation.
name | the name of the new sketch search |
sketchWidget | the widget containing the sketch of the user |
numberOfResults | max number of results to display |
targetAlbums | The image must be in one of these albums |
overwriteIfExisting | if true, an existing search with the desired name will be overwritten without prompting the user for a new name |
References createFuzzySearchFromSketch().
|
slot |
Creates a new timeline search.
desiredName | desired name for the search. If this name already exists and overwriteIfExisting is false, then the user will be prompted for a new name |
dateRanges | date ranges to contain in this timeline search. If this is empty, no search will be created. |
overwriteIfExisting | if true, an existing search with the desired name will be overwritten without prompting the user for a new name |
References Digikam::AlbumManager::clearCurrentAlbums(), Digikam::AlbumManager::createSAlbum(), Digikam::SearchXmlWriter::finish(), Digikam::SearchXmlWriter::finishField(), Digikam::SearchXmlWriter::finishGroup(), Digikam::SearchXml::GreaterThanOrEqual, Digikam::AlbumManager::instance(), Digikam::SearchXml::LessThan, Digikam::AlbumManager::setCurrentAlbums(), Digikam::DatabaseSearch::TimeLineSearch, Digikam::SearchXmlWriter::writeField(), Digikam::SearchXmlWriter::writeGroup(), Digikam::SearchXmlWriter::writeValue(), and Digikam::SearchXmlWriter::xml().
|
slot |
Deletes the given search after prompting the user.
searchAlbum | search to delete |
References Digikam::AlbumManager::deleteSAlbum(), Digikam::SAlbum::displayTitle(), and Digikam::AlbumManager::instance().
|
slot |
Renames the given search via a dialog.
searchAlbum | search to rename |
References Digikam::AlbumManager::instance(), Digikam::SAlbum::query(), Digikam::Album::title(), and Digikam::AlbumManager::updateSAlbum().