#include <kis_meta_data_entry.h>
Represent a metadata entry, a name and a value (KisMetaData::Value).
Definition at line 24 of file kis_meta_data_entry.h.
◆ Entry() [1/3]
◆ Entry() [2/3]
Create a new entry.
- Parameters
-
| name | |
| namespacePrefix | |
| value | |
◆ Entry() [3/3]
| KisMetaData::Entry::Entry |
( |
const Entry & | | ) |
|
◆ ~Entry()
◆ isValid()
| bool Entry::isValid |
( |
| ) |
const |
◆ isValidName()
| bool Entry::isValidName |
( |
const QString & | _name | ) |
|
|
static |
- Returns
- true if the name in argument is valid entry name.
Definition at line 96 of file kis_meta_data_entry.cc.
97{
98 if (_name.length() < 1) {
100 return false;
101 }
102 if (!_name[0].isLetter()) {
103 dbgMetaData << _name <<
" doesn't start by a letter";
104 return false;
105 }
106 for (int i = 1; i < _name.length(); ++i) {
107 QChar c = _name[i];
108 if (!c.isLetterOrNumber()) {
109 dbgMetaData << _name <<
" " << i <<
"th character isn't a letter or a digit";
110 return false;
111 }
112 }
113 return true;
114}
References dbgMetaData.
◆ name()
| QString KisMetaData::Entry::name |
( |
| ) |
const |
- Returns
- the name of this entry
◆ operator=()
Affect the content of entry to this entry if entry is valid
Definition at line 122 of file kis_meta_data_entry.cc.
123{
124 if (e.isValid()) {
125 Q_ASSERT(!
isValid() || *
this == e);
127 d->schema = e.d->schema;
128 d->value = e.d->value;
130 }
131 return *this;
132}
References d, and isValid().
◆ operator==()
| bool Entry::operator== |
( |
const Entry & | e | ) |
const |
◆ qualifiedName()
| QString Entry::qualifiedName |
( |
| ) |
const |
- Returns
- the qualified name of this entry, which is the concatenation of the namespace and of the name
Definition at line 75 of file kis_meta_data_entry.cc.
76{
78 return d->schema->generateQualifiedName(
d->name);
79}
References d.
◆ schema()
- Returns
- the namespace of this entry
◆ setSchema()
◆ value() [1/2]
- Returns
- the value of this entry
◆ value() [2/2]
- Returns
- the value of this entry
◆ Store
| Private* const KisMetaData::Entry::d |
|
private |
The documentation for this class was generated from the following files: