digiKam
|
Public Member Functions | |
double | accuracy () const |
double | altitude () const |
QString | altitudeFormatted () const |
void | apply () |
QString | description () const |
bool | hasAccuracy () const |
bool | hasAltitude () const |
bool | hasCoordinates () const |
bool | hasOrientation () const |
bool | hasRoll () const |
bool | hasTilt () const |
bool | isEmpty () const |
bool | isNull () const |
ItemPosition () | |
ItemPosition (const CoreDbAccess &access, qlonglong imageId) | |
ItemPosition (const ItemPosition &other) | |
ItemPosition (qlonglong imageId) | |
QString | latitude () const |
QString | latitudeFormatted () const |
double | latitudeNumber () const |
bool | latitudeUserPresentableNumbers (int *degrees, int *minutes, double *seconds, char *directionReference) |
QString | longitude () const |
QString | longitudeFormatted () const |
double | longitudeNumber () const |
bool | longitudeUserPresentableNumbers (int *degrees, int *minutes, double *seconds, char *directionReference) |
ItemPosition & | operator= (const ItemPosition &other) |
double | orientation () const |
void | remove () |
void | removeAltitude () |
double | roll () const |
void | setAccuracy (double accuracy) |
void | setAltitude (double altitude) |
void | setDescription (const QString &description) |
bool | setLatitude (const QString &latitude) |
bool | setLatitude (double latitudeNumber) |
bool | setLongitude (const QString &longitude) |
bool | setLongitude (double longitudeNumber) |
void | setOrientation (double orientation) |
void | setRoll (double roll) |
void | setTilt (double tilt) |
double | tilt () const |
~ItemPosition () | |
Digikam::ItemPosition::ItemPosition | ( | ) |
Creates a null ItemPosition object
|
explicit |
Creates an ItemPosition object for the given image. The information is read from the database.
Digikam::ItemPosition::ItemPosition | ( | const CoreDbAccess & | access, |
qlonglong | imageId | ||
) |
Digikam::ItemPosition::ItemPosition | ( | const ItemPosition & | other | ) |
Digikam::ItemPosition::~ItemPosition | ( | ) |
References apply().
double Digikam::ItemPosition::accuracy | ( | ) | const |
Referenced by setAccuracy().
double Digikam::ItemPosition::altitude | ( | ) | const |
The altitude in meters
Referenced by Digikam::ItemInfo::imagePosition(), Digikam::DBInfoIface::itemInfo(), Digikam::ItemGPS::loadImageData(), and setAltitude().
QString Digikam::ItemPosition::altitudeFormatted | ( | ) | const |
Returns the altitude formatted in a user-presentable way in the form "43.45m"
References Digikam::MetadataInfo::Altitude, and Digikam::DMetadata::valueToString().
void Digikam::ItemPosition::apply | ( | ) |
Apply all changes made to this object. (Also called from destructor)
References Digikam::CoreDB::addItemPosition(), Digikam::DatabaseFields::Altitude, Digikam::CoreDB::changeItemPosition(), Digikam::CoreDbAccess::db(), Digikam::DatabaseFields::ItemPositionsNone, Digikam::DatabaseFields::Latitude, Digikam::DatabaseFields::LatitudeNumber, Digikam::DatabaseFields::Longitude, Digikam::DatabaseFields::LongitudeNumber, Digikam::DatabaseFields::PositionAccuracy, Digikam::DatabaseFields::PositionDescription, Digikam::DatabaseFields::PositionOrientation, Digikam::DatabaseFields::PositionRoll, and Digikam::DatabaseFields::PositionTilt.
Referenced by Digikam::ItemGPS::saveChanges(), and ~ItemPosition().
QString Digikam::ItemPosition::description | ( | ) | const |
Referenced by setDescription().
bool Digikam::ItemPosition::hasAccuracy | ( | ) | const |
bool Digikam::ItemPosition::hasAltitude | ( | ) | const |
Referenced by Digikam::ItemInfo::imagePosition(), and Digikam::ItemGPS::loadImageData().
bool Digikam::ItemPosition::hasCoordinates | ( | ) | const |
Referenced by Digikam::ItemInfo::imagePosition(), and Digikam::ItemGPS::loadImageData().
bool Digikam::ItemPosition::hasOrientation | ( | ) | const |
bool Digikam::ItemPosition::hasRoll | ( | ) | const |
bool Digikam::ItemPosition::hasTilt | ( | ) | const |
bool Digikam::ItemPosition::isEmpty | ( | ) | const |
An object is empty if no entry exists in the ItemPosition table for the referenced image, or if the object is null. An empty object is empty even if values have been set; it becomes not empty after calling apply().
Referenced by Digikam::DBInfoIface::itemInfo(), and Digikam::ItemGPS::loadImageData().
bool Digikam::ItemPosition::isNull | ( | ) | const |
Referenced by setLatitude(), and setLongitude().
QString Digikam::ItemPosition::latitude | ( | ) | const |
Returns latitude/longitude in the format as described by the XMP specification as "GPSCoordinate": A Text value in the form ?DDD,MM,SSk? or ?DDD,MM.mmk?. This provides lossless storage.
Referenced by setLatitude().
QString Digikam::ItemPosition::latitudeFormatted | ( | ) | const |
Returns the latitude/longitude in a user-presentable version, in the form "30°45'55.123'' East"
References Digikam::MetadataInfo::Latitude, and Digikam::DMetadata::valueToString().
double Digikam::ItemPosition::latitudeNumber | ( | ) | const |
Returns latitude/longitude as a double in degrees. North and East have a positive sign, South and West negative. This provides high precision, with the usual floating point concerns, and possible problems finding the exact text form when converting back to fractions.
Referenced by Digikam::ItemInfo::imagePosition(), Digikam::DBInfoIface::itemInfo(), Digikam::ItemGPS::loadImageData(), and setLatitude().
bool Digikam::ItemPosition::latitudeUserPresentableNumbers | ( | int * | degrees, |
int * | minutes, | ||
double * | seconds, | ||
char * | directionReference | ||
) |
Returns latitude/longitude as user-presentable numbers. This means that degrees and minutes are integer, the seconds fractional. Direction reference is 'N'/'S', 'E'/'W' resp. This is for the purpose of presenting to the user, there are no guarantees on precision. Returns true if the values have been changed.
References Digikam::MetaEngine::convertToUserPresentableNumbers().
QString Digikam::ItemPosition::longitude | ( | ) | const |
Referenced by setLongitude().
QString Digikam::ItemPosition::longitudeFormatted | ( | ) | const |
References Digikam::MetadataInfo::Longitude, and Digikam::DMetadata::valueToString().
double Digikam::ItemPosition::longitudeNumber | ( | ) | const |
bool Digikam::ItemPosition::longitudeUserPresentableNumbers | ( | int * | degrees, |
int * | minutes, | ||
double * | seconds, | ||
char * | directionReference | ||
) |
ItemPosition & Digikam::ItemPosition::operator= | ( | const ItemPosition & | other | ) |
double Digikam::ItemPosition::orientation | ( | ) | const |
Referenced by setOrientation().
void Digikam::ItemPosition::remove | ( | ) |
Removes the whole data set for the referenced image from the database. This object and any ItemPosition object created later will be empty.
References Digikam::CoreDbAccess::db(), and Digikam::CoreDB::removeItemPosition().
Referenced by Digikam::ItemGPS::saveChanges().
void Digikam::ItemPosition::removeAltitude | ( | ) |
Removes the altitude for the referenced image from the database.
References Digikam::DatabaseFields::Altitude, Digikam::CoreDbAccess::db(), and Digikam::CoreDB::removeItemPositionAltitude().
Referenced by Digikam::ItemGPS::saveChanges().
double Digikam::ItemPosition::roll | ( | ) | const |
Referenced by setRoll().
void Digikam::ItemPosition::setAccuracy | ( | double | accuracy | ) |
References accuracy(), and Digikam::DatabaseFields::PositionAccuracy.
void Digikam::ItemPosition::setAltitude | ( | double | altitude | ) |
Set the altitude in meters
References Digikam::DatabaseFields::Altitude, and altitude().
Referenced by Digikam::ItemGPS::saveChanges().
void Digikam::ItemPosition::setDescription | ( | const QString & | description | ) |
References description(), and Digikam::DatabaseFields::PositionDescription.
bool Digikam::ItemPosition::setLatitude | ( | const QString & | latitude | ) |
Sets the latitude/longitude from the GPSCoordinate string as described by XMP. Returns true if the format is accepted.
References Digikam::MetaEngine::convertFromGPSCoordinateString(), Digikam::DatabaseFields::Latitude, latitude(), and Digikam::DatabaseFields::LatitudeNumber.
Referenced by Digikam::ItemGPS::saveChanges().
bool Digikam::ItemPosition::setLatitude | ( | double | latitudeNumber | ) |
Sets the latitude/longitude from a double floating point number, as described for latitudeNumber() above. Returns true if the value is valid and accepted.
References Digikam::MetaEngine::convertToGPSCoordinateString(), isNull(), Digikam::DatabaseFields::Latitude, Digikam::DatabaseFields::LatitudeNumber, and latitudeNumber().
bool Digikam::ItemPosition::setLongitude | ( | const QString & | longitude | ) |
bool Digikam::ItemPosition::setLongitude | ( | double | longitudeNumber | ) |
void Digikam::ItemPosition::setOrientation | ( | double | orientation | ) |
References orientation(), and Digikam::DatabaseFields::PositionOrientation.
void Digikam::ItemPosition::setRoll | ( | double | roll | ) |
References Digikam::DatabaseFields::PositionRoll, and roll().
void Digikam::ItemPosition::setTilt | ( | double | tilt | ) |
References Digikam::DatabaseFields::PositionTilt, and tilt().
double Digikam::ItemPosition::tilt | ( | ) | const |
Referenced by setTilt().