digiKam
|
Public Types | |
enum | ReplaceMode { ReplaceAllEntries , ReplaceLanguageEntry , AddEntryToExisting } |
Public Member Functions | |
MetaEngine::AltLangMap | allCopyrightNotices () |
MetaEngine::AltLangMap | allRightsUsageTerms () |
QStringList | author () const |
QString | authorsPosition () const |
QStringList | byLine () const |
QString | byLineTitle () const |
IptcCoreContactInfo | contactInfo () |
QString | copyrightNotice (const QString &languageCode=QString()) |
QStringList | creator () const |
QString | creatorJobTitle () const |
QString | credit () const |
void | fillTemplate (Template &t) |
QString | instructions () |
ItemCopyright () | |
ItemCopyright (const ItemCopyright &other) | |
ItemCopyright (qlonglong imageid) | |
ItemCopyright & | operator= (const ItemCopyright &other) |
QString | provider () const |
void | removeAll () |
void | removeContactInfo () |
void | removeCopyrightNotices () |
void | removeCreatorJobTitle () |
void | removeCreators () |
void | removeInstructions () |
void | removeProvider () |
void | removeRightsUsageTerms () |
void | removeSource () |
void | replaceFrom (const ItemCopyright &source) |
QString | rights (const QString &languageCode=QString()) |
QString | rightsUsageTerms (const QString &languageCode=QString()) |
void | setAuthor (const QString &author, ReplaceMode mode=ReplaceAllEntries) |
void | setAuthorsPosition (const QString &position) |
void | setByLine (const QString &byline, ReplaceMode mode=ReplaceAllEntries) |
void | setByLineTitle (const QString &title) |
void | setContactInfo (const IptcCoreContactInfo &info) |
void | setCopyrightNotice (const QString ¬ice, const QString &languageCode=QString(), ReplaceMode mode=ReplaceLanguageEntry) |
void | setCreator (const QString &creator, ReplaceMode mode=ReplaceAllEntries) |
void | setCreatorJobTitle (const QString &title) |
void | setCredit (const QString &credit) |
void | setFromTemplate (const Template &t) |
void | setInstructions (const QString &instructions) |
void | setProvider (const QString &provider) |
void | setRights (const QString ¬ice, const QString &languageCode=QString(), ReplaceMode mode=ReplaceLanguageEntry) |
void | setRightsUsageTerms (const QString &term, const QString &languageCode=QString(), ReplaceMode mode=ReplaceLanguageEntry) |
void | setSource (const QString &source) |
QString | source () |
~ItemCopyright () | |
Protected Member Functions | |
CopyrightInfo | copyrightInfo (const QString &property) const |
QList< CopyrightInfo > | copyrightInfos (const QString &property) const |
int | languageMatch (const QList< CopyrightInfo > &infos, const QString &languageCode) const |
MetaEngine::AltLangMap | readLanguageProperties (const QString &property) |
QString | readLanguageProperty (const QString &property, const QString &languageCode) |
QString | readSimpleProperty (const QString &property) const |
void | removeLanguageProperty (const QString &property, const QString &languageCode) |
void | removeProperties (const QString &property) |
void | setLanguageProperty (const QString &property, const QString &value, const QString &languageCode, ReplaceMode mode) |
void | setSimpleProperty (const QString &property, const QString &value) |
Protected Attributes | |
ItemCopyrightCache * | m_cache |
qlonglong | m_id |
Friends | |
class | ItemCopyrightCache |
|
explicit |
Digikam::ItemCopyright::ItemCopyright | ( | ) |
Create a null ItemCopyright object
Digikam::ItemCopyright::ItemCopyright | ( | const ItemCopyright & | other | ) |
Digikam::ItemCopyright::~ItemCopyright | ( | ) |
References m_cache.
MetaEngine::AltLangMap Digikam::ItemCopyright::allCopyrightNotices | ( | ) |
References Digikam::MetadataInfo::IptcCoreCopyrightNotice, Digikam::ItemScanner::iptcCorePropertyName(), and readLanguageProperties().
Referenced by fillTemplate().
MetaEngine::AltLangMap Digikam::ItemCopyright::allRightsUsageTerms | ( | ) |
References Digikam::ItemScanner::iptcCorePropertyName(), Digikam::MetadataInfo::IptcCoreRightsUsageTerms, and readLanguageProperties().
Referenced by fillTemplate().
|
inline |
Referenced by fillTemplate(), Digikam::CommonKeys::getDbValue(), and setFromTemplate().
|
inline |
Referenced by fillTemplate().
|
inline |
|
inline |
IptcCoreContactInfo Digikam::ItemCopyright::contactInfo | ( | ) |
Returns the creator's contact info. This is Iptc4xmpCore:CreatorContactInfo in XMP. The creator's contact information provides all necessary information to get in contact with the creator of this news object and comprises a set of sub-properties for proper addressing.
References Digikam::IptcCoreContactInfo::address, Digikam::IptcCoreContactInfo::city, Digikam::IptcCoreContactInfo::country, Digikam::IptcCoreContactInfo::email, Digikam::MetadataInfo::IptcCoreContactInfoAddress, Digikam::MetadataInfo::IptcCoreContactInfoCity, Digikam::MetadataInfo::IptcCoreContactInfoCountry, Digikam::MetadataInfo::IptcCoreContactInfoEmail, Digikam::MetadataInfo::IptcCoreContactInfoPhone, Digikam::MetadataInfo::IptcCoreContactInfoPostalCode, Digikam::MetadataInfo::IptcCoreContactInfoProvinceState, Digikam::MetadataInfo::IptcCoreContactInfoWebUrl, Digikam::ItemScanner::iptcCorePropertyName(), Digikam::IptcCoreContactInfo::phone, Digikam::IptcCoreContactInfo::postalCode, Digikam::IptcCoreContactInfo::provinceState, readSimpleProperty(), and Digikam::IptcCoreContactInfo::webUrl.
Referenced by fillTemplate().
|
protected |
References Digikam::CoreDbAccess::db(), Digikam::CoreDB::getItemCopyright(), m_cache, m_id, and Digikam::CopyrightInfo::property.
Referenced by readSimpleProperty(), removeLanguageProperty(), and removeProperties().
|
protected |
References Digikam::CoreDbAccess::db(), Digikam::CoreDB::getItemCopyright(), m_cache, m_id, and Digikam::CopyrightInfo::property.
Referenced by creator(), readLanguageProperties(), and readLanguageProperty().
QString Digikam::ItemCopyright::copyrightNotice | ( | const QString & | languageCode = QString() | ) |
Returns the copyright notice. This is Photoshop Copyright Notice. This is IPTC Copyright Notice. This is DC Rights. This is dc:rights in XMP. Contains any necessary copyright notice for claiming the intellectual property for this news object and should identify the current owner of the copyright for the news object. Other entities like the creator of the news object may be added. Notes on usage rights should be provided in Rights usage terms. Note on language matching: You can specify a language code. If the requested language is not available, the entry with default language code is returned. If a default-language entry is not available, the first entry is returned. If you pass a null string as languageCode, the local language is returned.
References Digikam::MetadataInfo::IptcCoreCopyrightNotice, Digikam::ItemScanner::iptcCorePropertyName(), and readLanguageProperty().
QStringList Digikam::ItemCopyright::creator | ( | ) | const |
Returns the author/creator/byline. This is Photoshop Author. This is IPTC By-line. This is DC creator. This is dc:creator in XMP. Contains preferably the name of the person who created the content of this news object, a photographer for photos, a graphic artist for graphics, or a writer for textual news. If it is not appropriate to add the name of a person the name of a company or organization could be applied as well. Aligning with IIM notions IPTC Core intents to have only one creator for this news object despite the underlying XMP property dc:creator allows for more than one item to be included. If there are more than one item in this array the first one should be considered as the IPTC Core Creator value.
References copyrightInfos(), Digikam::MetadataInfo::IptcCoreCreator, Digikam::ItemScanner::iptcCorePropertyName(), and Digikam::CopyrightInfo::value.
Referenced by Digikam::DBInfoIface::itemInfo(), and setCreator().
QString Digikam::ItemCopyright::creatorJobTitle | ( | ) | const |
Returns the creator's job title. This is Photoshop AuthorsPosition. This is IPTC By-line Title. This is photoshop:AuthorsPosition in XMP. Contains the job title of the person who created the content of this news object. As this is sort of a qualifier the Creator element has to be filled in as mandatory prerequisite for using Creator's Jobtitle.
References Digikam::MetadataInfo::IptcCoreCreatorJobTitle, Digikam::ItemScanner::iptcCorePropertyName(), and readSimpleProperty().
|
inline |
Referenced by fillTemplate(), and Digikam::DBInfoIface::itemInfo().
void Digikam::ItemCopyright::fillTemplate | ( | Template & | t | ) |
Fills the information fields in template concerning copyright info (note there are other fields in the a Template. There will not be touched)
References allCopyrightNotices(), allRightsUsageTerms(), author(), authorsPosition(), contactInfo(), credit(), instructions(), ItemCopyrightCache, Digikam::Template::setAuthors(), Digikam::Template::setAuthorsPosition(), Digikam::Template::setContactInfo(), Digikam::Template::setCopyright(), Digikam::Template::setCredit(), Digikam::Template::setInstructions(), Digikam::Template::setRightUsageTerms(), Digikam::Template::setSource(), and source().
Referenced by Digikam::ItemInfo::metadataTemplate().
QString Digikam::ItemCopyright::instructions | ( | ) |
Returns the instructions. This is Photoshop Instructions. This is IPTC Special Instruction. This is photoshop:Instructions in XMP. Any of a number of instructions from the provider or creator to the receiver of the news object which might include any of the following: embargoes (NewsMagazines OUT) and other restrictions not covered by the Rights Usage Terms field; information regarding the original means of capture (scanning notes, colorspace info) or other specific text information that the user may need for accurate reproduction; additional permissions or credits required when publishing.
References Digikam::MetadataInfo::IptcCoreInstructions, Digikam::ItemScanner::iptcCorePropertyName(), and readSimpleProperty().
Referenced by fillTemplate(), and setInstructions().
|
protected |
References Digikam::CopyrightInfo::extraValue.
Referenced by readLanguageProperty().
ItemCopyright & Digikam::ItemCopyright::operator= | ( | const ItemCopyright & | other | ) |
QString Digikam::ItemCopyright::provider | ( | ) | const |
Returns the credit/provider. This is Photoshop Credit. This is IPTC Credit. This is photoshop:Credit in XMP Identifies the provider of the news object, who is not necessarily the owner/creator.
References Digikam::ItemScanner::iptcCorePropertyName(), Digikam::MetadataInfo::IptcCoreProvider, and readSimpleProperty().
Referenced by setProvider().
|
protected |
References copyrightInfos(), Digikam::CopyrightInfo::extraValue, and Digikam::CopyrightInfo::value.
Referenced by allCopyrightNotices(), and allRightsUsageTerms().
|
protected |
References copyrightInfos(), and languageMatch().
Referenced by copyrightNotice(), and rightsUsageTerms().
|
protected |
References copyrightInfo(), and Digikam::CopyrightInfo::value.
Referenced by contactInfo(), creatorJobTitle(), instructions(), provider(), and source().
void Digikam::ItemCopyright::removeAll | ( | ) |
Calls all remove...() methods in this class
References ItemCopyrightCache, removeContactInfo(), removeCopyrightNotices(), removeCreatorJobTitle(), removeCreators(), removeInstructions(), removeProvider(), removeRightsUsageTerms(), and removeSource().
Referenced by Digikam::ItemScanner::commitItemCopyright(), and Digikam::ItemInfo::removeMetadataTemplate().
void Digikam::ItemCopyright::removeContactInfo | ( | ) |
References Digikam::MetadataInfo::IptcCoreContactInfoAddress, Digikam::MetadataInfo::IptcCoreContactInfoCity, Digikam::MetadataInfo::IptcCoreContactInfoCountry, Digikam::MetadataInfo::IptcCoreContactInfoEmail, Digikam::MetadataInfo::IptcCoreContactInfoPhone, Digikam::MetadataInfo::IptcCoreContactInfoPostalCode, Digikam::MetadataInfo::IptcCoreContactInfoProvinceState, Digikam::MetadataInfo::IptcCoreContactInfoWebUrl, Digikam::ItemScanner::iptcCorePropertyName(), and removeProperties().
Referenced by removeAll().
void Digikam::ItemCopyright::removeCopyrightNotices | ( | ) |
References Digikam::MetadataInfo::IptcCoreCopyrightNotice, Digikam::ItemScanner::iptcCorePropertyName(), and removeProperties().
Referenced by removeAll().
void Digikam::ItemCopyright::removeCreatorJobTitle | ( | ) |
References Digikam::MetadataInfo::IptcCoreCreatorJobTitle, Digikam::ItemScanner::iptcCorePropertyName(), and removeProperties().
Referenced by removeAll().
void Digikam::ItemCopyright::removeCreators | ( | ) |
References Digikam::MetadataInfo::IptcCoreCreator, Digikam::ItemScanner::iptcCorePropertyName(), and removeProperties().
Referenced by removeAll().
void Digikam::ItemCopyright::removeInstructions | ( | ) |
References Digikam::MetadataInfo::IptcCoreInstructions, Digikam::ItemScanner::iptcCorePropertyName(), and removeProperties().
Referenced by removeAll().
|
protected |
|
protected |
References copyrightInfo(), Digikam::CoreDbAccess::db(), m_cache, m_id, and Digikam::CoreDB::removeItemCopyrightProperties().
Referenced by removeContactInfo(), removeCopyrightNotices(), removeCreatorJobTitle(), removeCreators(), removeInstructions(), removeProvider(), removeRightsUsageTerms(), and removeSource().
void Digikam::ItemCopyright::removeProvider | ( | ) |
References Digikam::ItemScanner::iptcCorePropertyName(), Digikam::MetadataInfo::IptcCoreProvider, and removeProperties().
Referenced by removeAll().
void Digikam::ItemCopyright::removeRightsUsageTerms | ( | ) |
References Digikam::ItemScanner::iptcCorePropertyName(), Digikam::MetadataInfo::IptcCoreRightsUsageTerms, and removeProperties().
Referenced by removeAll().
void Digikam::ItemCopyright::removeSource | ( | ) |
References Digikam::ItemScanner::iptcCorePropertyName(), Digikam::MetadataInfo::IptcCoreSource, and removeProperties().
Referenced by removeAll().
void Digikam::ItemCopyright::replaceFrom | ( | const ItemCopyright & | source | ) |
Removes all entries and replaces them with the entries from source.
References Digikam::CoreDbAccess::db(), Digikam::CopyrightInfo::extraValue, Digikam::CoreDB::getItemCopyright(), m_id, Digikam::CopyrightInfo::property, Digikam::CoreDB::PropertyNoConstraint, Digikam::CoreDB::removeItemCopyrightProperties(), Digikam::CoreDB::setItemCopyrightProperty(), source(), and Digikam::CopyrightInfo::value.
Referenced by Digikam::CollectionScanner::copyFileProperties().
|
inline |
Referenced by Digikam::DBInfoIface::itemInfo().
QString Digikam::ItemCopyright::rightsUsageTerms | ( | const QString & | languageCode = QString() | ) |
Returns the right usage terms. This has no equivalent in Photoshop, IPTC, or DC. This is xmpRights:UsageTerms in XMP. Language matching is done as with copyrightNotice(). Free text instructions on how this news object can be legally used.
References Digikam::ItemScanner::iptcCorePropertyName(), Digikam::MetadataInfo::IptcCoreRightsUsageTerms, and readLanguageProperty().
|
inline |
Referenced by setFromTemplate().
|
inline |
Referenced by setFromTemplate().
|
inline |
|
inline |
void Digikam::ItemCopyright::setContactInfo | ( | const IptcCoreContactInfo & | info | ) |
References Digikam::IptcCoreContactInfo::address, Digikam::IptcCoreContactInfo::city, Digikam::IptcCoreContactInfo::country, Digikam::IptcCoreContactInfo::email, Digikam::MetadataInfo::IptcCoreContactInfoAddress, Digikam::MetadataInfo::IptcCoreContactInfoCity, Digikam::MetadataInfo::IptcCoreContactInfoCountry, Digikam::MetadataInfo::IptcCoreContactInfoEmail, Digikam::MetadataInfo::IptcCoreContactInfoPhone, Digikam::MetadataInfo::IptcCoreContactInfoPostalCode, Digikam::MetadataInfo::IptcCoreContactInfoProvinceState, Digikam::MetadataInfo::IptcCoreContactInfoWebUrl, Digikam::ItemScanner::iptcCorePropertyName(), Digikam::IptcCoreContactInfo::phone, Digikam::IptcCoreContactInfo::postalCode, Digikam::IptcCoreContactInfo::provinceState, setSimpleProperty(), and Digikam::IptcCoreContactInfo::webUrl.
Referenced by setFromTemplate().
void Digikam::ItemCopyright::setCopyrightNotice | ( | const QString & | notice, |
const QString & | languageCode = QString() , |
||
ReplaceMode | mode = ReplaceLanguageEntry |
||
) |
Sets the copyright notice. If you supply a null QString as language code, this is regarded as an entry for the default language (“x-default”). The ReplaceMode determines how existing entries are handled.
References Digikam::MetadataInfo::IptcCoreCopyrightNotice, Digikam::ItemScanner::iptcCorePropertyName(), and setLanguageProperty().
void Digikam::ItemCopyright::setCreator | ( | const QString & | creator, |
ReplaceMode | mode = ReplaceAllEntries |
||
) |
Sets the creator. If you want to specify only one creator, set the replace mode to ReplaceAllEntries. If you want to add it to a list of existing entries, pass AddEntryToExisting. You shall not use ReplaceLanguageEntry for this method, creators have no language associated.
References creator(), Digikam::CoreDbAccess::db(), Digikam::MetadataInfo::IptcCoreCreator, Digikam::ItemScanner::iptcCorePropertyName(), m_id, Digikam::CoreDB::PropertyNoConstraint, Digikam::CoreDB::PropertyUnique, ReplaceAllEntries, and Digikam::CoreDB::setItemCopyrightProperty().
void Digikam::ItemCopyright::setCreatorJobTitle | ( | const QString & | title | ) |
|
inline |
Referenced by setFromTemplate().
void Digikam::ItemCopyright::setFromTemplate | ( | const Template & | t | ) |
Sets all database copyright fields from the template. This does not clear any fields before.
References AddEntryToExisting, author(), Digikam::Template::authors(), Digikam::Template::authorsPosition(), Digikam::Template::contactInfo(), Digikam::Template::copyright(), Digikam::Template::credit(), Digikam::Template::instructions(), Digikam::Template::rightUsageTerms(), setAuthor(), setAuthorsPosition(), setContactInfo(), setCredit(), setInstructions(), setRights(), setRightsUsageTerms(), setSource(), and Digikam::Template::source().
Referenced by Digikam::ItemScanner::commitItemCopyright(), and Digikam::ItemInfo::setMetadataTemplate().
void Digikam::ItemCopyright::setInstructions | ( | const QString & | instructions | ) |
References instructions(), Digikam::MetadataInfo::IptcCoreInstructions, Digikam::ItemScanner::iptcCorePropertyName(), and setSimpleProperty().
Referenced by setFromTemplate().
|
protected |
References Digikam::CoreDbAccess::db(), m_id, Digikam::CoreDB::PropertyExtraValueUnique, Digikam::CoreDB::PropertyNoConstraint, Digikam::CoreDB::PropertyUnique, ReplaceAllEntries, ReplaceLanguageEntry, Digikam::CoreDB::setItemCopyrightProperty(), and value.
Referenced by setCopyrightNotice(), and setRightsUsageTerms().
void Digikam::ItemCopyright::setProvider | ( | const QString & | provider | ) |
|
inline |
Referenced by setFromTemplate().
void Digikam::ItemCopyright::setRightsUsageTerms | ( | const QString & | term, |
const QString & | languageCode = QString() , |
||
ReplaceMode | mode = ReplaceLanguageEntry |
||
) |
References Digikam::ItemScanner::iptcCorePropertyName(), Digikam::MetadataInfo::IptcCoreRightsUsageTerms, and setLanguageProperty().
Referenced by setFromTemplate().
|
protected |
References Digikam::CoreDbAccess::db(), m_id, Digikam::CoreDB::PropertyUnique, Digikam::CoreDB::setItemCopyrightProperty(), and value.
Referenced by setContactInfo(), setCreatorJobTitle(), setInstructions(), setProvider(), and setSource().
void Digikam::ItemCopyright::setSource | ( | const QString & | source | ) |
References Digikam::ItemScanner::iptcCorePropertyName(), Digikam::MetadataInfo::IptcCoreSource, setSimpleProperty(), and source().
Referenced by setFromTemplate().
QString Digikam::ItemCopyright::source | ( | ) |
Returns the source. This is Photoshop Source. This is IPTC Source. This is photoshop::Source in XMP. Identifies the original owner of the copyright for the intellectual content of the news object. This could be an agency, a member of an agency or an individual. Source could be different from Creator and from the entities in the CopyrightNotice. As the original owner can not change the content of this property should never be changed or deleted after the information is entered following the news object's initial creation.
References Digikam::ItemScanner::iptcCorePropertyName(), Digikam::MetadataInfo::IptcCoreSource, and readSimpleProperty().
Referenced by fillTemplate(), Digikam::DBInfoIface::itemInfo(), replaceFrom(), and setSource().
|
friend |
Referenced by fillTemplate(), and removeAll().
|
protected |
Referenced by copyrightInfo(), copyrightInfos(), operator=(), removeLanguageProperty(), removeProperties(), and ~ItemCopyright().
|
protected |