You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
120 lines
2.1 KiB
C++
120 lines
2.1 KiB
C++
#include "cfont.h"
|
|
|
|
|
|
cFont::cFont(QObject *parent)
|
|
: QObject{parent}
|
|
{
|
|
}
|
|
|
|
void cFont::setFamily(const QString& family) {
|
|
m_family = family;
|
|
}
|
|
|
|
QString cFont::family() {
|
|
return m_family;
|
|
}
|
|
|
|
void cFont::setVariants(const QStringList& variants) {
|
|
m_variants = variants;
|
|
m_variants.removeDuplicates();
|
|
}
|
|
|
|
void cFont::clearVariants() {
|
|
m_variants.clear();
|
|
}
|
|
|
|
void cFont::addVariants(const QStringList& variants) {
|
|
m_variants.append(variants);
|
|
m_variants.removeDuplicates();
|
|
}
|
|
|
|
void cFont::addVariants(const QString& variant) {
|
|
m_variants.append(variant);
|
|
m_variants.removeDuplicates();
|
|
}
|
|
|
|
QStringList cFont::variants() {
|
|
return m_variants;
|
|
}
|
|
|
|
void cFont::setSubsets(const QStringList& subsets) {
|
|
m_subsets = subsets;
|
|
m_subsets.removeDuplicates();
|
|
}
|
|
|
|
void cFont::clearSubsets() {
|
|
m_subsets.clear();
|
|
}
|
|
|
|
void cFont::addSubsets(const QStringList& subsets) {
|
|
m_subsets.append(subsets);
|
|
m_subsets.removeDuplicates();
|
|
}
|
|
|
|
void cFont::addSubsets(const QString& subset) {
|
|
m_subsets.append(subset);
|
|
m_subsets.removeDuplicates();
|
|
}
|
|
|
|
QStringList cFont::subsets() {
|
|
return m_subsets;
|
|
}
|
|
|
|
void cFont::setVersion(const QString& version) {
|
|
m_version = version;
|
|
}
|
|
|
|
QString cFont::version() {
|
|
return m_version;
|
|
}
|
|
|
|
void cFont::setLastModified(const QDate& lastModified) {
|
|
m_lastModified = lastModified;
|
|
}
|
|
|
|
QDate cFont::lastModified() {
|
|
return m_lastModified;
|
|
}
|
|
|
|
void cFont::setFiles(const QMap<QString, QFile>& files) {
|
|
for (auto [key, value] : files.asKeyValueRange()) {
|
|
m_files.insert(key, value);
|
|
}
|
|
}
|
|
|
|
void cFont::clearFiles() {
|
|
m_files.clear();
|
|
}
|
|
|
|
void cFont::addFiles(const QMap<QString, QFile>& files) {
|
|
for (auto [key, value] : files.asKeyValueRange()) {
|
|
if (!m_files.contains(key))
|
|
m_files.insert(key, value);
|
|
}
|
|
}
|
|
|
|
void cFont::addFiles(const QString& variant, const QFile& file) {
|
|
if (!m_files.contains(variant))
|
|
m_files.insert(variant, file);
|
|
}
|
|
|
|
QMap<QString, QFile> cFont::files() {
|
|
return m_files;
|
|
}
|
|
|
|
void cFont::setCategory(const QString& category) {
|
|
m_category = category;
|
|
}
|
|
|
|
QString cFont::category() {
|
|
return m_category;
|
|
}
|
|
|
|
void cFont::setKind(const QString& kind) {
|
|
m_kind = kind;
|
|
}
|
|
|
|
QString cFont::kind() {
|
|
return m_kind;
|
|
}
|