digikam
Digikam::DatabaseUrl Class Reference
#include <databaseurl.h>
Inherits KUrl.
Public Member Functions | |
| DatabaseUrl (const DatabaseUrl &url) | |
| DatabaseUrl () | |
| DatabaseUrl (const KUrl &digikamUrl) | |
| QString | album () const |
| KUrl | albumRoot () const |
| int | albumRootId () const |
| QString | albumRootPath () const |
| QDate | endDate () const |
| KUrl | fileUrl () const |
| bool | isAlbumUrl () const |
| bool | isDateUrl () const |
| bool | isSearchUrl () const |
| bool | isTagUrl () const |
| QString | name () const |
| DatabaseUrl & | operator= (const DatabaseUrl &url) |
| DatabaseUrl & | operator= (const KUrl &digikamalbumsUrl) |
| bool | operator== (const KUrl &digikamalbumsUrl) |
| DatabaseParameters | parameters () const |
| int | searchId () const |
| void | setParameters (const DatabaseParameters ¶meters) |
| QDate | startDate () const |
| int | tagId () const |
| QList< int > | tagIds () const |
Static Public Member Functions | |
| static DatabaseUrl | albumUrl (const DatabaseParameters ¶meters=DatabaseAccess::parameters()) |
| static DatabaseUrl | dateUrl (const DatabaseParameters ¶meters=DatabaseAccess::parameters()) |
| static DatabaseUrl | fromAlbumAndName (const QString &name, const QString &album, const KUrl &albumRoot, const DatabaseParameters ¶meters=DatabaseAccess::parameters()) |
| static DatabaseUrl | fromAlbumAndName (const QString &name, const QString &album, const KUrl &albumRoot, int albumRootId, const DatabaseParameters ¶meters=DatabaseAccess::parameters()) |
| static DatabaseUrl | fromDateForMonth (const QDate &date, const DatabaseParameters ¶meters=DatabaseAccess::parameters()) |
| static DatabaseUrl | fromDateForYear (const QDate &date, const DatabaseParameters ¶meters=DatabaseAccess::parameters()) |
| static DatabaseUrl | fromDateRange (const QDate &startDate, const QDate &endDate, const DatabaseParameters ¶meters=DatabaseAccess::parameters()) |
| static DatabaseUrl | fromFileUrl (const KUrl &fileUrl, const KUrl &albumRoot, const DatabaseParameters ¶meters=DatabaseAccess::parameters()) |
| static DatabaseUrl | fromFileUrl (const KUrl &fileUrl, const KUrl &albumRoot, int albumRootId, const DatabaseParameters ¶meters=DatabaseAccess::parameters()) |
| static DatabaseUrl | fromTagIds (const QList< int > &tagIds, const DatabaseParameters ¶meters=DatabaseAccess::parameters()) |
| static DatabaseUrl | searchUrl (int searchId, const DatabaseParameters ¶meters=DatabaseAccess::parameters()) |
Detailed Description
Definition at line 45 of file databaseurl.h.
Constructor & Destructor Documentation
| Digikam::DatabaseUrl::DatabaseUrl | ( | const KUrl & | digikamUrl | ) |
Create a DatabaseUrl object from a KUrl, to retrieve the information stored.
Definition at line 164 of file databaseurl.cpp.
| Digikam::DatabaseUrl::DatabaseUrl | ( | ) |
Create an invalid database URL.
Definition at line 174 of file databaseurl.cpp.
| Digikam::DatabaseUrl::DatabaseUrl | ( | const DatabaseUrl & | url | ) |
Definition at line 169 of file databaseurl.cpp.
Member Function Documentation
| QString Digikam::DatabaseUrl::album | ( | ) | const |
Returns the album: This is the directory hierarchy below the album root.
In the example above, the album is "/Summer 2007"
Definition at line 262 of file databaseurl.cpp.
| KUrl Digikam::DatabaseUrl::albumRoot | ( | ) | const |
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. Album URL Returns the album root URL of the file or album referenced by this URL In the example above, this is "file://media/fotos"
Definition at line 240 of file databaseurl.cpp.
| int Digikam::DatabaseUrl::albumRootId | ( | ) | const |
Returns the album root id.
Definition at line 257 of file databaseurl.cpp.
| QString Digikam::DatabaseUrl::albumRootPath | ( | ) | const |
Returns the album root path of the file or album referenced by this URL In the example above, this is "/media/fotos".
Definition at line 252 of file databaseurl.cpp.
| DatabaseUrl Digikam::DatabaseUrl::albumUrl | ( | const DatabaseParameters & | parameters = DatabaseAccess::parameters() |
) | [static] |
Create an empty digikamalbums:/ url.
Definition at line 92 of file databaseurl.cpp.
| DatabaseUrl Digikam::DatabaseUrl::dateUrl | ( | const DatabaseParameters & | parameters = DatabaseAccess::parameters() |
) | [static] |
Create an empty digikamdates:/ url.
Definition at line 115 of file databaseurl.cpp.
| QDate Digikam::DatabaseUrl::endDate | ( | ) | const |
Return the referenced end date (excluded from the referenced span).
Definition at line 314 of file databaseurl.cpp.
| KUrl Digikam::DatabaseUrl::fileUrl | ( | ) | const |
Converts this digikamalbums:// URL to a file:// URL.
Definition at line 275 of file databaseurl.cpp.
| DatabaseUrl Digikam::DatabaseUrl::fromAlbumAndName | ( | const QString & | name, | |
| const QString & | album, | |||
| const KUrl & | albumRoot, | |||
| const DatabaseParameters & | parameters = DatabaseAccess::parameters() | |||
| ) | [static] |
Definition at line 64 of file databaseurl.cpp.
| DatabaseUrl Digikam::DatabaseUrl::fromAlbumAndName | ( | const QString & | name, | |
| const QString & | album, | |||
| const KUrl & | albumRoot, | |||
| int | albumRootId, | |||
| const DatabaseParameters & | parameters = DatabaseAccess::parameters() | |||
| ) | [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.
Definition at line 73 of file databaseurl.cpp.
| DatabaseUrl Digikam::DatabaseUrl::fromDateForMonth | ( | const QDate & | date, | |
| const DatabaseParameters & | parameters = DatabaseAccess::parameters() | |||
| ) | [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)
Definition at line 123 of file databaseurl.cpp.
| DatabaseUrl Digikam::DatabaseUrl::fromDateForYear | ( | const QDate & | date, | |
| const DatabaseParameters & | parameters = DatabaseAccess::parameters() | |||
| ) | [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)
Definition at line 132 of file databaseurl.cpp.
| DatabaseUrl Digikam::DatabaseUrl::fromDateRange | ( | const QDate & | startDate, | |
| const QDate & | endDate, | |||
| const DatabaseParameters & | parameters = DatabaseAccess::parameters() | |||
| ) | [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.
Definition at line 141 of file databaseurl.cpp.
| DatabaseUrl Digikam::DatabaseUrl::fromFileUrl | ( | const KUrl & | fileUrl, | |
| const KUrl & | albumRoot, | |||
| const DatabaseParameters & | parameters = DatabaseAccess::parameters() | |||
| ) | [static] |
Definition at line 38 of file databaseurl.cpp.
| DatabaseUrl Digikam::DatabaseUrl::fromFileUrl | ( | const KUrl & | fileUrl, | |
| const KUrl & | albumRoot, | |||
| int | albumRootId, | |||
| const DatabaseParameters & | parameters = DatabaseAccess::parameters() | |||
| ) | [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:
- The album root in which the entity pointed to is stored. This is the left part of the file URL. (if the file is "/media/fotos/Summer 2007/001.jpg", the album root may be "/media/fotos")
- The parameters of the database that is referenced
Definition at line 46 of file databaseurl.cpp.
| DatabaseUrl Digikam::DatabaseUrl::fromTagIds | ( | const QList< int > & | tagIds, | |
| const DatabaseParameters & | parameters = DatabaseAccess::parameters() | |||
| ) | [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.
Definition at line 100 of file databaseurl.cpp.
| bool Digikam::DatabaseUrl::isAlbumUrl | ( | ) | const |
These test for the protocol of this URL.
The protocol string is of course available via protocol().
Definition at line 217 of file databaseurl.cpp.
| bool Digikam::DatabaseUrl::isDateUrl | ( | ) | const |
Definition at line 227 of file databaseurl.cpp.
| bool Digikam::DatabaseUrl::isSearchUrl | ( | ) | const |
Definition at line 232 of file databaseurl.cpp.
| bool Digikam::DatabaseUrl::isTagUrl | ( | ) | const |
Definition at line 222 of file databaseurl.cpp.
| QString Digikam::DatabaseUrl::name | ( | ) | const |
Returns the file name.
In the example above, this is "001.jpg"
Definition at line 269 of file databaseurl.cpp.
| DatabaseUrl & Digikam::DatabaseUrl::operator= | ( | const DatabaseUrl & | url | ) |
Definition at line 184 of file databaseurl.cpp.
| DatabaseUrl & Digikam::DatabaseUrl::operator= | ( | const KUrl & | digikamalbumsUrl | ) |
Definition at line 178 of file databaseurl.cpp.
| bool Digikam::DatabaseUrl::operator== | ( | const KUrl & | digikamalbumsUrl | ) |
Definition at line 190 of file databaseurl.cpp.
| DatabaseParameters Digikam::DatabaseUrl::parameters | ( | ) | const |
Returns the DatabaseParameters stored in this URL.
Applicable to all protocols.
Definition at line 204 of file databaseurl.cpp.
| int Digikam::DatabaseUrl::searchId | ( | ) | const |
| DatabaseUrl Digikam::DatabaseUrl::searchUrl | ( | int | searchId, | |
| const DatabaseParameters & | parameters = DatabaseAccess::parameters() | |||
| ) | [static] |
Create a digikamsearch: URL for the search with the given id.
Definition at line 154 of file databaseurl.cpp.
| void Digikam::DatabaseUrl::setParameters | ( | const DatabaseParameters & | parameters | ) |
Change the database parameters stored in this URL Applicable to all protocols.
Definition at line 209 of file databaseurl.cpp.
| QDate Digikam::DatabaseUrl::startDate | ( | ) | const |
Date URL.
Return the referenced start date (included in the referenced span)
Definition at line 305 of file databaseurl.cpp.
| int Digikam::DatabaseUrl::tagId | ( | ) | const |
Tag URL.
Returns the tag ID, or -1 if the root tag is referenced
Definition at line 285 of file databaseurl.cpp.
| QList< int > Digikam::DatabaseUrl::tagIds | ( | ) | const |
Returns the tag ids of all tags in the tag path of this tag, the topmost tag in the hierarchy first.
Definition at line 292 of file databaseurl.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference