|
class | Private |
|
class | CoreDbWatch |
|
class | CoreDbAccess |
|
QStringList | allAvailableAlbumRootPaths () |
| Returns a list of the paths of all currently available root paths.
|
|
QString | albumRootPath (int id) |
| Returns the album root path with the given id.
|
|
QString | albumRootLabel (int id) |
| Returns the album root label with the given id.
|
|
QUrl | albumRoot (const QUrl &fileUrl) |
| For a given path, the part of the path that forms the album root is returned, ending without a slash.
|
|
QString | albumRootPath (const QUrl &fileUrl) |
|
QString | albumRootPath (const QString &filePath) |
|
bool | isAlbumRoot (const QUrl &fileUrl) |
| Returns true if the given path forms an album root.
|
|
bool | isAlbumRoot (const QString &filePath) |
| The file path should not end with the directory slash.
|
|
QString | album (const QUrl &fileUrl) |
| Returns the album part of the given file path, i.e.
|
|
QString | album (const QString &filePath) |
|
QString | album (const CollectionLocation &location, const QUrl &fileUrl) |
|
QString | album (const CollectionLocation &location, const QString &filePath) |
|
QUrl | oneAlbumRoot () |
| Returns just one album root, out of the list of available location, the one that is most suitable to serve as a default, e.g.
|
|
QString | oneAlbumRootPath () |
|
|
CollectionLocation | addLocation (const QUrl &fileUrl, const QString &label=QString()) |
| Add the given file system location as new collection location.
|
|
CollectionLocation | addNetworkLocation (const QUrl &fileUrl, const QString &label=QString()) |
|
CollectionLocation | refreshLocation (const CollectionLocation &location, int newType, const QStringList &pathList, const QString &label=QString()) |
|
LocationCheckResult | checkLocation (const QUrl &fileUrl, QList< CollectionLocation > &assumeDeleted, QString *message=nullptr, QString *suggestedMessageIconName=nullptr) |
| Analyzes the given file path.
|
|
LocationCheckResult | checkNetworkLocation (const QUrl &fileUrl, QList< CollectionLocation > &assumeDeleted, QString *message=nullptr, QString *suggestedMessageIconName=nullptr) |
|
void | removeLocation (const CollectionLocation &location) |
| Removes the given location.
|
|
void | setLabel (const CollectionLocation &location, const QString &label) |
| Sets the label of the given location.
|
|
void | changeType (const CollectionLocation &location, int type) |
| Changes the CollectionLocation::Type of the given location.
|
|
QList< CollectionLocation > | checkHardWiredLocations () |
| Checks the locations of type HardWired.
|
|
void | migrationCandidates (const CollectionLocation &disappearedLocation, QString *const technicalDescription, QStringList *const candidateIdentifiers, QStringList *const candidateDescriptions) |
| For a given disappeared location (retrieved from checkHardWiredLocations()) retrieve a user-presentable technical description (excluding the CollectionLocation's label) and a list of identifiers and corresponding user presentable strings of candidates to where the given location may have been moved.
|
|
void | migrateToVolume (const CollectionLocation &location, const QString &identifier) |
| Migrates the existing collection to a new volume, identified by an internal identifier as returned by checkHardWiredLocations().
|
|
QList< CollectionLocation > | allLocations () |
| Returns a list of all CollectionLocations stored in the database.
|
|
QList< CollectionLocation > | allAvailableLocations () |
| Returns a list of all currently available CollectionLocations.
|
|
CollectionLocation | locationForAlbumRootId (int id) |
| Returns the location for the given album root id.
|
|
CollectionLocation | locationForAlbumRoot (const QUrl &fileUrl) |
| Returns the CollectionLocation that contains the given album root.
|
|
CollectionLocation | locationForAlbumRootPath (const QString &albumRootPath) |
|
CollectionLocation | locationForUrl (const QUrl &fileUrl) |
| Returns the CollectionLocation that contains the given path.
|
|
CollectionLocation | locationForPath (const QString &filePath) |
|
void | locationStatusChanged (const CollectionLocation &location, int oldStatus) |
| Emitted when the status of a collection location changed.
|
|
void | locationPropertiesChanged (const CollectionLocation &location) |
| Emitted when the label of a collection location is changed.
|
|
CollectionLocation Digikam::CollectionManager::addLocation |
( |
const QUrl & |
fileUrl, |
|
|
const QString & |
label = QString() |
|
) |
| |
Type and availability will be detected. On failure returns null. This would be the case if the given url is already contained in another collection location. You may pass an optional user-visible label that will be stored in the database. The label has no further meaning and can be freely chosen.
CollectionLocation objects returned are simple data containers. If the corresponding location is returned, the data is still safe to access, but does not represent anything. Therefore, do not store returned objects, but prefer to retrieve them freshly.
QString Digikam::CollectionManager::album |
( |
const QUrl & |
fileUrl | ) |
|
the album root path at the beginning is removed and the second part, starting with "/", ending without a slash, is returned. Example: "/media/fotos/Paris 2007" gives "/Paris 2007" Returns a null QString if the file path is not located in an album root. Returns "/" if the file path is an album root. Note that trailing slashes are removed in the return value, regardless if there was one or not. Note that you have to feed a path/url pointing to a directory. File names cannot be recognized as such by this method, and will be treated as a directory.
void Digikam::CollectionManager::locationStatusChanged |
( |
const CollectionLocation & |
location, |
|
|
int |
oldStatus |
|
) |
| |
|
signal |
This means that the location became available, hidden or unavailable.
An added location will change its status after addition, from Null to Available, Hidden or Unavailable.
A removed location will change its status to Deleted during the removal; in this case, you shall not use the object passed with this signal with any method of CollectionManager.
The second signal argument is of type CollectionLocation::Status and describes the status before the state change occurred