9#include "customfields_p.h"
11CustomField::CustomField()
17CustomField::CustomField(
const QString &key,
const QString &title, Type type, Scope scope)
25CustomField CustomField::fromVariantMap(
const QVariantMap &map, Scope scope)
27 return CustomField(
map.value(QStringLiteral(
"key")).
toString(),
29 stringToType(
map.value(QStringLiteral(
"type")).
toString()),
33void CustomField::setKey(
const QString &key)
43void CustomField::setTitle(
const QString &title)
48QString CustomField::title()
const
53void CustomField::setType(Type type)
58CustomField::Type CustomField::type()
const
63void CustomField::setScope(Scope scope)
68CustomField::Scope CustomField::scope()
const
73void CustomField::setValue(
const QString &value)
78QString CustomField::value()
const
83QVariantMap CustomField::toVariantMap()
const
86 map.insert(QStringLiteral(
"key"), mKey);
87 map.insert(QStringLiteral(
"title"), mTitle);
88 map.insert(QStringLiteral(
"type"), typeToString(mType));
93CustomField::Type CustomField::stringToType(
const QString &type)
96 return CustomField::TextType;
99 return CustomField::NumericType;
102 return CustomField::BooleanType;
105 return CustomField::DateType;
108 return CustomField::TimeType;
111 return CustomField::DateTimeType;
114 return CustomField::UrlType;
117 return CustomField::TextType;
120QString CustomField::typeToString(CustomField::Type type)
123 case CustomField::TextType:
125 return QStringLiteral(
"text");
126 case CustomField::NumericType:
127 return QStringLiteral(
"numeric");
128 case CustomField::BooleanType:
129 return QStringLiteral(
"boolean");
130 case CustomField::DateType:
131 return QStringLiteral(
"date");
132 case CustomField::TimeType:
133 return QStringLiteral(
"time");
134 case CustomField::DateTimeType:
135 return QStringLiteral(
"datetime");
136 case CustomField::UrlType:
137 return QStringLiteral(
"url");
char * toString(const EngineQuery &query)
VehicleSection::Type type(QStringView coachNumber, QStringView coachClassification)
QFuture< void > map(Iterator begin, Iterator end, MapFunctor &&function)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:55:28 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.