digiKam
|
Public Member Functions | |
QString | album () const |
QUrl | albumRoot () const |
Album URL. More... | |
int | albumRootId () const |
QString | albumRootPath () const |
bool | areaCoordinates (double *lat1, double *lat2, double *lon1, double *lon2) const |
MapImages URL. More... | |
CoreDbUrl () | |
CoreDbUrl (const CoreDbUrl &url) | |
CoreDbUrl (const QUrl &digikamUrl) | |
QDate | endDate () const |
QUrl | fileUrl () const |
bool | isAlbumUrl () const |
bool | isDateUrl () const |
bool | isMapImagesUrl () const |
bool | isSearchUrl () const |
bool | isTagUrl () const |
QString | name () const |
CoreDbUrl & | operator= (const CoreDbUrl &url) |
CoreDbUrl & | operator= (const QUrl &digikamalbumsUrl) |
bool | operator== (const QUrl &digikamalbumsUrl) const |
DbEngineParameters | parameters () const |
int | searchId () const |
Search URL. More... | |
void | setParameters (const DbEngineParameters ¶meters) |
QDate | startDate () const |
Date URL. More... | |
int | tagId () const |
Tag URL. More... | |
QList< int > | tagIds () const |
|
explicit |
Create a CoreDbUrl object from a QUrl, to retrieve the information stored
Digikam::CoreDbUrl::CoreDbUrl | ( | ) |
Create an invalid database URL
Digikam::CoreDbUrl::CoreDbUrl | ( | const CoreDbUrl & | url | ) |
QString Digikam::CoreDbUrl::album | ( | ) | const |
Returns the album: This is the directory hierarchy below the album root. In the example above, the album is "/Summer 2007"
Referenced by Digikam::ItemInfoJob::allItemsFromAlbum(), fromAlbumAndName(), Digikam::ItemLister::list(), and Digikam::ItemAlbumModel::startListJob().
QUrl Digikam::CoreDbUrl::albumRoot | ( | ) | const |
Album URL.
The following methods are only applicable for a certain protocol each. If the URL has another protocol, the return value of these methods is undefined. Returns the album root URL of the file or album referenced by this URL In the example above, this is "file://media/fotos"
Referenced by fileUrl(), fromAlbumAndName(), and fromFileUrl().
int Digikam::CoreDbUrl::albumRootId | ( | ) | const |
Returns the album root id
Referenced by Digikam::ItemInfoJob::allItemsFromAlbum(), fromAlbumAndName(), fromFileUrl(), Digikam::ItemLister::list(), and Digikam::ItemAlbumModel::startListJob().
QString Digikam::CoreDbUrl::albumRootPath | ( | ) | const |
Returns the album root path of the file or album referenced by this URL In the example above, this is "/media/fotos"
Referenced by fromFileUrl().
|
static |
Create an empty digikamalbums:/ url
References parameters(), and setParameters().
bool Digikam::CoreDbUrl::areaCoordinates | ( | double * | lat1, |
double * | lat2, | ||
double * | lon1, | ||
double * | lon2 | ||
) | const |
MapImages URL.
Returns the coordinates surrounding the map area. Returns true if the string to number conversion was ok.
Referenced by Digikam::ItemLister::list().
|
static |
Create an empty digikamdates:/ url
References parameters(), and setParameters().
QDate Digikam::CoreDbUrl::endDate | ( | ) | const |
Return the referenced end date (excluded from the referenced span)
Referenced by Digikam::ItemInfoJob::allItemsFromAlbum(), fromDateRange(), Digikam::ItemLister::list(), and Digikam::ItemAlbumModel::startListJob().
QUrl Digikam::CoreDbUrl::fileUrl | ( | ) | const |
Converts this digikamalbums:// URL to a file:// URL
References albumRoot().
Referenced by Digikam::AlbumManager::createPAlbum(), Digikam::PAlbum::fileUrl(), Digikam::DeleteItem::fileUrl(), Digikam::PAlbum::folderPath(), fromFileUrl(), and Digikam::ItemScanner::ItemScanner().
|
static |
|
static |
Create a digikamalbums:/ url from an album name and an image in this album. If name is empty, the album is referenced. Other parameters as above.
References album(), albumRoot(), albumRootId(), name(), parameters(), and setParameters().
Referenced by Digikam::PAlbum::databaseUrl(), fromAlbumAndName(), and Digikam::ItemScanner::ItemScanner().
|
static |
References parameters(), and setParameters().
|
static |
Create a digikamdates:/ url for the month of the given date. (The whole month of the given date will included in the referenced time span)
References fromDateRange(), and parameters().
Referenced by Digikam::DAlbum::databaseUrl().
|
static |
Create a digikamdates:/ url for the year of the given date. (The whole year of the given date will included in the referenced time span)
References fromDateRange(), and parameters().
Referenced by Digikam::DAlbum::databaseUrl().
|
static |
Create a digikamdates:/ url for a specified time span which begin with the start date (inclusive) and ends before the end date (exclusive). To cover the whole year of 1984, you would pass 1/1/1984 and 1/1/1985.
References endDate(), parameters(), setParameters(), and startDate().
Referenced by fromDateForMonth(), and fromDateForYear().
|
static |
|
static |
This class shall facilitate the usage of digikamalbums:/, digikamtags:/, digikamdates:/ and digikamsearch: URLs. It provides functions to set and get the parameters stored in such a URL. (with the exception of the search parameters in a search URL, which are out of the scope of this class.) Create a digikamalbums:/ URL from a file:// URL. The file URL can point to a file or a directory (an album in this case). The additional information stored in the URL need to be supplied as well:
References albumRoot(), albumRootId(), albumRootPath(), fileUrl(), parameters(), and setParameters().
Referenced by fromFileUrl().
|
static |
Create a digikamtags:/ url from a list of tag IDs, where this list is the tag hierarchy of the referenced tag, with the topmost parent first, and the tag last in the list. An empty list references the root tag.
References parameters(), setParameters(), and tagIds().
Referenced by Digikam::TAlbum::databaseUrl(), and Digikam::ItemAlbumModel::startListJob().
bool Digikam::CoreDbUrl::isAlbumUrl | ( | ) | const |
These test for the protocol of this URL. The protocol string is of course available via protocol().
Referenced by Digikam::DeleteItem::DeleteItem(), and Digikam::ItemLister::list().
bool Digikam::CoreDbUrl::isDateUrl | ( | ) | const |
Referenced by Digikam::ItemLister::list().
bool Digikam::CoreDbUrl::isMapImagesUrl | ( | ) | const |
Referenced by Digikam::ItemLister::list().
bool Digikam::CoreDbUrl::isSearchUrl | ( | ) | const |
bool Digikam::CoreDbUrl::isTagUrl | ( | ) | const |
Referenced by Digikam::ItemLister::list().
|
static |
Create an empty digikammapimages:/ url
References parameters(), and setParameters().
QString Digikam::CoreDbUrl::name | ( | ) | const |
Returns the file name. In the example above, this is "001.jpg"
Referenced by fromAlbumAndName().
CoreDbUrl & Digikam::CoreDbUrl::operator= | ( | const QUrl & | digikamalbumsUrl | ) |
bool Digikam::CoreDbUrl::operator== | ( | const QUrl & | digikamalbumsUrl | ) | const |
DbEngineParameters Digikam::CoreDbUrl::parameters | ( | ) | const |
Returns the DbEngineParameters stored in this URL. Applicable to all protocols.
Referenced by albumUrl(), dateUrl(), fromAlbumAndName(), fromAreaRange(), fromDateForMonth(), fromDateForYear(), fromDateRange(), fromFileUrl(), fromTagIds(), mapImagesUrl(), searchUrl(), and setParameters().
int Digikam::CoreDbUrl::searchId | ( | ) | const |
|
static |
Create a digikamsearch: URL for the search with the given id.
References parameters(), and setParameters().
Referenced by Digikam::SAlbum::databaseUrl().
void Digikam::CoreDbUrl::setParameters | ( | const DbEngineParameters & | parameters | ) |
Change the database parameters stored in this URL Applicable to all protocols.
References Digikam::DbEngineParameters::insertInUrl(), and parameters().
Referenced by albumUrl(), dateUrl(), fromAlbumAndName(), fromAreaRange(), fromDateRange(), fromFileUrl(), fromTagIds(), mapImagesUrl(), and searchUrl().
QDate Digikam::CoreDbUrl::startDate | ( | ) | const |
Date URL.
Return the referenced start date (included in the referenced span)
Referenced by Digikam::ItemInfoJob::allItemsFromAlbum(), fromDateRange(), Digikam::ItemLister::list(), and Digikam::ItemAlbumModel::startListJob().
int Digikam::CoreDbUrl::tagId | ( | ) | const |
Tag URL.
Returns the tag ID, or -1 if the root tag is referenced
Referenced by Digikam::ItemInfoJob::allItemsFromAlbum().
QList< int > Digikam::CoreDbUrl::tagIds | ( | ) | const |
Returns the tag ids of all tags in the tag path of this tag, the topmost tag in the hierarchy first.
References QT_SKIP_EMPTY_PARTS.
Referenced by fromTagIds(), and Digikam::ItemLister::list().