6 #ifndef SWIFT_MISC_COUNTRY_H
7 #define SWIFT_MISC_COUNTRY_H
32 IndexIsoCode = CPropertyIndexRef::GlobalIndexCCountry,
46 CCountry(
const QString &iso,
const QString &name);
61 void setIsoCode(
const QString &iso);
64 void setIso3Code(
const QString &iso);
67 bool hasIsoCode()
const;
70 bool hasIso3Code()
const;
73 const QString &
getName()
const {
return m_name; }
79 const QString &
getAlias1()
const {
return m_alias1; }
82 void setAlias1(
const QString &alias);
85 const QString &
getAlias2()
const {
return m_alias2; }
88 void setAlias2(
const QString &alias);
97 QString getCombinedStringIsoName()
const;
100 QString getCombinedStringNameIso()
const;
103 void setName(
const QString &countryName);
106 bool matchesCountryName(
const QString &name)
const;
109 bool matchesAlias(
const QString &alias)
const;
112 QString convertToQString(
bool i18n =
false)
const;
124 static CCountry fromDatabaseJson(
const QJsonObject &json,
const QString &prefix = QString());
127 static bool isValidIsoCode(
const QString &isoCode);
131 void setSimplifiedNameIfNotSame();
135 QString m_simplifiedName;
138 bool m_historic =
false;
const QString & getName() const
Country name.
const QString & getIso3Code() const
Get 3 letter iso code.
CCountry()=default
Constructor.
const QString & getAlias1() const
Alias 1.
const QString & getIsoCode() const
DB ISO code.
ColumnIndex
Properties by index.
bool isHistoric() const
Historic / non-existing country (e.g. Soviet Union)
const QString & getAlias2() const
Alias 2.
const QString & getSimplifiedName() const
Country name (no accents ...)
void setHistoric(bool historic)
Historic country?
IconIndex
Index for each icon, allows to send them via DBus, efficiently store them, etc.
Non-owning reference to a CPropertyIndex with a subset of its features.
Mix of the most commonly used mixin classes.
Class from which a derived class can inherit datastore-related functions.
Free functions in swift::misc.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.
#define SWIFT_DECLARE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template declaration of mixins for a CValueObject subclass to be placed near the top of the ...