digiKam Developer Documentation: Digikam::ItemPosition Class Reference

| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Digikam::ItemPosition Class Reference

## Public Member Functions
| ItemPosition ()
| Creates a null ItemPosition object.
| ItemPosition (const CoreDbAccess &access, qlonglong imageId)
| ItemPosition (const ItemPosition &other)
| ItemPosition (qlonglong imageId)
| Creates an ItemPosition object for the given image.
double | accuracy () const
double | altitude () const
| The altitude in meters.
QString | altitudeFormatted () const
| Returns the altitude formatted in a user-presentable way in the form "43.45m".
void | apply ()
| Apply all changes made to this object.
QString | description () const
bool | hasAccuracy () const
bool | hasAltitude () const
bool | hasCoordinates () const
bool | hasOrientation () const
bool | hasRoll () const
bool | hasTilt () const
bool | isEmpty () const
| An object is empty if no entry exists in the ItemPosition table for the referenced image, or if the object is null.
bool | isNull () const
QString | 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?.
QString | latitudeFormatted () const
| Returns the latitude/longitude in a user-presentable version, in the form "30°45'55.123'' East".
double | latitudeNumber () const
| Returns latitude/longitude as a double in degrees.
bool | latitudeUserPresentableNumbers (int *degrees, int *minutes, double *seconds, char *directionReference)
| Returns latitude/longitude as user-presentable numbers.
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 ()
| Removes the whole data set for the referenced image from the database.
void | removeAltitude ()
| Removes the altitude for the referenced image from the database.
double | roll () const
void | setAccuracy (double accuracy)
void | setAltitude (double altitude)
| Set the altitude in meters.
void | setDescription (const QString &description)
bool | setLatitude (const QString &latitude)
| Sets the latitude/longitude from the GPSCoordinate string as described by XMP.
bool | setLatitude (double latitudeNumber)
| Sets the latitude/longitude from a double floating point number, as described for latitudeNumber() above.
bool | setLongitude (const QString &longitude)
bool | setLongitude (double longitudeNumber)
void | setOrientation (double orientation)
void | setRoll (double roll)
void | setTilt (double tilt)
double | tilt () const

## Constructor & Destructor Documentation

## ◆ ItemPosition()

Digikam::ItemPosition::ItemPosition | ( | qlonglong | imageId | ) |
| explicit

The information is read from the database.

## Member Function Documentation

## ◆ apply()

void Digikam::ItemPosition::apply | ( |  | ) |

(Also called from destructor)

## ◆ isEmpty()

bool Digikam::ItemPosition::isEmpty | ( |  | ) | const

An empty object is empty even if values have been set; it becomes not empty after calling apply().

## ◆ latitude()

QString Digikam::ItemPosition::latitude | ( |  | ) | const

This provides lossless storage.

## ◆ latitudeNumber()

double Digikam::ItemPosition::latitudeNumber | ( |  | ) | const

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.

## ◆ latitudeUserPresentableNumbers()

bool Digikam::ItemPosition::latitudeUserPresentableNumbers | ( | int * | degrees,
|  | int * | minutes,
|  | double * | seconds,
|  | char * | directionReference
| ) |  |

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.

## ◆ remove()

void Digikam::ItemPosition::remove | ( |  | ) |

This object and any ItemPosition object created later will be empty.

## ◆ setLatitude() [1/2]

bool Digikam::ItemPosition::setLatitude | ( | const QString & | latitude | ) |

Returns true if the format is accepted.

## ◆ setLatitude() [2/2]

bool Digikam::ItemPosition::setLatitude | ( | double | latitudeNumber | ) |

Returns true if the value is valid and accepted.