digiKam
Digikam::GPSItemContainer Class Reference
+ Inheritance diagram for Digikam::GPSItemContainer:

Public Member Functions

 GPSItemContainer (const QUrl &url)
 
virtual ~GPSItemContainer ()
 
Loading and saving
virtual QString saveChanges ()
 
virtual bool loadImageData ()
 
bool isDirty () const
 
QUrl url () const
 
QDateTime dateTime () const
 
GPS related functions
void setCoordinates (const GeoCoordinates &newCoordinates)
 
GeoCoordinates coordinates () const
 
GPSDataContainer gpsData () const
 
void setGPSData (const GPSDataContainer &container)
 
void restoreGPSData (const GPSDataContainer &container)
 Restore the gps data to container. Sets m_dirty to false if container equals savedState. More...
 

Static Public Attributes

static const int ColumnAccuracy = 6
 
static const int ColumnAltitude = 5
 
static const int ColumnDateTime = 2
 
static const int ColumnDOP = 9
 
static const int ColumnFilename = 1
 
static const int ColumnFixType = 10
 
static const int ColumnGPSItemContainerCount = 13
 
static const int ColumnLatitude = 3
 
static const int ColumnLongitude = 4
 
static const int ColumnNSatellites = 11
 
static const int ColumnSpeed = 12
 
static const int ColumnStatus = 8
 
static const int ColumnTags = 7
 
static const int ColumnThumbnail = 0
 
static const int RoleCoordinates = Qt::UserRole + 1
 

Tag related functions

GPSItemModelm_model
 
QUrl m_url
 
QDateTime m_dateTime
 
bool m_dirty
 
GPSDataContainer m_gpsData
 
GPSDataContainer m_savedState
 
bool m_tagListDirty
 
QList< QList< TagData > > m_tagList
 
QList< QList< TagData > > m_savedTagList
 
bool m_writeXmpTags
 
bool m_saveTags
 
bool m_saveGPS
 
class GPSItemModel
 
void setTagList (const QList< QList< TagData > > &externalTagList)
 
bool isTagListDirty () const
 
QList< QList< TagData > > getTagList () const
 
void restoreRGTagList (const QList< QList< TagData > > &tagList)
 
void writeTagsToXmp (const bool writeXmpTags)
 
QVariant data (const int column, const int role) const
 these are only to be called by the GPSItemModel More...
 
void setModel (GPSItemModel *const model)
 
void emitDataChanged ()
 
DMetadatagetMetadataForFile () const
 
SaveProperties saveProperties () const
 

Functions used by the model

bool lessThan (const GPSItemContainer *const otherItem, const int column) const
 
static void setHeaderData (GPSItemModel *const model)
 

Constructor & Destructor Documentation

◆ GPSItemContainer()

Digikam::GPSItemContainer::GPSItemContainer ( const QUrl &  url)
explicit

◆ ~GPSItemContainer()

Digikam::GPSItemContainer::~GPSItemContainer ( )
virtual

Member Function Documentation

◆ coordinates()

GeoCoordinates Digikam::GPSItemContainer::coordinates ( ) const

◆ data()

◆ dateTime()

QDateTime Digikam::GPSItemContainer::dateTime ( ) const

◆ emitDataChanged()

◆ getMetadataForFile()

DMetadata * Digikam::GPSItemContainer::getMetadataForFile ( ) const
protected

◆ getTagList()

QList< QList< TagData > > Digikam::GPSItemContainer::getTagList ( ) const

◆ gpsData()

◆ isDirty()

bool Digikam::GPSItemContainer::isDirty ( ) const

◆ isTagListDirty()

bool Digikam::GPSItemContainer::isTagListDirty ( ) const
Returns
Returns true is the current image has been modified and not saved.

References m_tagListDirty.

Referenced by DigikamGenericGeolocationEditPlugin::GeolocationEdit::closeEvent().

◆ lessThan()

◆ loadImageData()

◆ restoreGPSData()

void Digikam::GPSItemContainer::restoreGPSData ( const GPSDataContainer container)

Restore the gps data to container. Sets m_dirty to false if container equals savedState.

References emitDataChanged(), m_dirty, m_gpsData, and m_savedState.

Referenced by Digikam::GPSUndoCommand::changeItemData().

◆ restoreRGTagList()

void Digikam::GPSItemContainer::restoreRGTagList ( const QList< QList< TagData > > &  tagList)

Replaces the current tag list with the one contained in tagList.

References emitDataChanged(), m_savedTagList, m_tagList, and m_tagListDirty.

Referenced by Digikam::GPSUndoCommand::changeItemData().

◆ saveChanges()

◆ saveProperties()

◆ setCoordinates()

void Digikam::GPSItemContainer::setCoordinates ( const GeoCoordinates newCoordinates)

◆ setGPSData()

◆ setHeaderData()

◆ setModel()

void Digikam::GPSItemContainer::setModel ( GPSItemModel *const  model)
protected

References m_model.

Referenced by Digikam::GPSItemModel::addItem().

◆ setTagList()

void Digikam::GPSItemContainer::setTagList ( const QList< QList< TagData > > &  externalTagList)

The tags added in reverse geocoding process are stored in each image, before they end up in external tag model. This function adds them.

Parameters
externalTagListA list containing tags.

References emitDataChanged(), m_tagList, and m_tagListDirty.

◆ url()

◆ writeTagsToXmp()

void Digikam::GPSItemContainer::writeTagsToXmp ( const bool  writeXmpTags)
inline

Writes the current tags to XMP metadata.

Friends And Related Function Documentation

◆ GPSItemModel

friend class GPSItemModel
friend

Member Data Documentation

◆ ColumnAccuracy

const int Digikam::GPSItemContainer::ColumnAccuracy = 6
static

Referenced by data(), lessThan(), and setHeaderData().

◆ ColumnAltitude

const int Digikam::GPSItemContainer::ColumnAltitude = 5
static

Referenced by data(), lessThan(), and setHeaderData().

◆ ColumnDateTime

const int Digikam::GPSItemContainer::ColumnDateTime = 2
static

Referenced by data(), lessThan(), and setHeaderData().

◆ ColumnDOP

const int Digikam::GPSItemContainer::ColumnDOP = 9
static

◆ ColumnFilename

const int Digikam::GPSItemContainer::ColumnFilename = 1
static

Referenced by data(), lessThan(), and setHeaderData().

◆ ColumnFixType

const int Digikam::GPSItemContainer::ColumnFixType = 10
static

◆ ColumnGPSItemContainerCount

const int Digikam::GPSItemContainer::ColumnGPSItemContainerCount = 13
static

Referenced by setHeaderData().

◆ ColumnLatitude

const int Digikam::GPSItemContainer::ColumnLatitude = 3
static

Referenced by data(), lessThan(), and setHeaderData().

◆ ColumnLongitude

const int Digikam::GPSItemContainer::ColumnLongitude = 4
static

Referenced by data(), lessThan(), and setHeaderData().

◆ ColumnNSatellites

const int Digikam::GPSItemContainer::ColumnNSatellites = 11
static

◆ ColumnSpeed

const int Digikam::GPSItemContainer::ColumnSpeed = 12
static

Referenced by data(), lessThan(), and setHeaderData().

◆ ColumnStatus

const int Digikam::GPSItemContainer::ColumnStatus = 8
static

Referenced by data(), lessThan(), and setHeaderData().

◆ ColumnTags

const int Digikam::GPSItemContainer::ColumnTags = 7
static

Referenced by data(), and setHeaderData().

◆ ColumnThumbnail

const int Digikam::GPSItemContainer::ColumnThumbnail = 0
static

◆ m_dateTime

QDateTime Digikam::GPSItemContainer::m_dateTime
protected

◆ m_dirty

bool Digikam::GPSItemContainer::m_dirty
protected

◆ m_gpsData

◆ m_model

GPSItemModel* Digikam::GPSItemContainer::m_model
protected

Referenced by emitDataChanged(), and setModel().

◆ m_savedState

GPSDataContainer Digikam::GPSItemContainer::m_savedState
protected

◆ m_savedTagList

QList<QList<TagData> > Digikam::GPSItemContainer::m_savedTagList
protected

Referenced by restoreRGTagList(), and saveChanges().

◆ m_saveGPS

bool Digikam::GPSItemContainer::m_saveGPS
protected

◆ m_saveTags

bool Digikam::GPSItemContainer::m_saveTags
protected

◆ m_tagList

QList<QList<TagData> > Digikam::GPSItemContainer::m_tagList
protected

◆ m_tagListDirty

bool Digikam::GPSItemContainer::m_tagListDirty
protected

◆ m_url

QUrl Digikam::GPSItemContainer::m_url
protected

◆ m_writeXmpTags

bool Digikam::GPSItemContainer::m_writeXmpTags
protected

Referenced by saveChanges().

◆ RoleCoordinates

const int Digikam::GPSItemContainer::RoleCoordinates = Qt::UserRole + 1
static

Referenced by data().


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