digiKam
Digikam::ItemPosition Class Reference

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)
 
ItemPositionoperator= (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 ()
 

Constructor & Destructor Documentation

◆ ItemPosition() [1/4]

Digikam::ItemPosition::ItemPosition ( )

Creates a null ItemPosition object

◆ ItemPosition() [2/4]

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

Creates an ItemPosition object for the given image. The information is read from the database.

◆ ItemPosition() [3/4]

Digikam::ItemPosition::ItemPosition ( const CoreDbAccess access,
qlonglong  imageId 
)

◆ ItemPosition() [4/4]

Digikam::ItemPosition::ItemPosition ( const ItemPosition other)

◆ ~ItemPosition()

Digikam::ItemPosition::~ItemPosition ( )

References apply().

Member Function Documentation

◆ accuracy()

double Digikam::ItemPosition::accuracy ( ) const

Referenced by setAccuracy().

◆ altitude()

double Digikam::ItemPosition::altitude ( ) const

◆ altitudeFormatted()

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().

◆ apply()

◆ description()

QString Digikam::ItemPosition::description ( ) const

Referenced by setDescription().

◆ hasAccuracy()

bool Digikam::ItemPosition::hasAccuracy ( ) const

◆ hasAltitude()

bool Digikam::ItemPosition::hasAltitude ( ) const

◆ hasCoordinates()

bool Digikam::ItemPosition::hasCoordinates ( ) const

◆ hasOrientation()

bool Digikam::ItemPosition::hasOrientation ( ) const

◆ hasRoll()

bool Digikam::ItemPosition::hasRoll ( ) const

◆ hasTilt()

bool Digikam::ItemPosition::hasTilt ( ) const

◆ isEmpty()

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().

◆ isNull()

bool Digikam::ItemPosition::isNull ( ) const

Referenced by setLatitude(), and setLongitude().

◆ latitude()

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().

◆ latitudeFormatted()

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().

◆ latitudeNumber()

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().

◆ latitudeUserPresentableNumbers()

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().

◆ longitude()

QString Digikam::ItemPosition::longitude ( ) const

Referenced by setLongitude().

◆ longitudeFormatted()

QString Digikam::ItemPosition::longitudeFormatted ( ) const

◆ longitudeNumber()

double Digikam::ItemPosition::longitudeNumber ( ) const

◆ longitudeUserPresentableNumbers()

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

◆ operator=()

ItemPosition & Digikam::ItemPosition::operator= ( const ItemPosition other)

◆ orientation()

double Digikam::ItemPosition::orientation ( ) const

Referenced by setOrientation().

◆ remove()

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().

◆ removeAltitude()

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().

◆ roll()

double Digikam::ItemPosition::roll ( ) const

Referenced by setRoll().

◆ setAccuracy()

void Digikam::ItemPosition::setAccuracy ( double  accuracy)

◆ setAltitude()

void Digikam::ItemPosition::setAltitude ( double  altitude)

Set the altitude in meters

References Digikam::DatabaseFields::Altitude, and altitude().

Referenced by Digikam::ItemGPS::saveChanges().

◆ setDescription()

void Digikam::ItemPosition::setDescription ( const QString &  description)

◆ setLatitude() [1/2]

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().

◆ setLatitude() [2/2]

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().

◆ setLongitude() [1/2]

◆ setLongitude() [2/2]

◆ setOrientation()

void Digikam::ItemPosition::setOrientation ( double  orientation)

◆ setRoll()

void Digikam::ItemPosition::setRoll ( double  roll)

◆ setTilt()

void Digikam::ItemPosition::setTilt ( double  tilt)

◆ tilt()

double Digikam::ItemPosition::tilt ( ) const

Referenced by setTilt().


The documentation for this class was generated from the following files: