1 #ifndef TYPESCONTROLLER_H 2 #define TYPESCONTROLLER_H 6 #include "../Model/customtypelist.h" 7 #include "../Model/customtypesetlist.h" 37 const QString& baseType,
38 const QVariantMap& facets,
39 const QString& customTypeSetName);
52 const QStringList& enumeration,
53 const QString& customTypeSetName);
66 const QString& itemType,
67 const QString& customTypeSetName);
81 const QString& keyType,
82 const QString& valueType,
83 const QString& customTypeSetName);
181 const QString& newName,
182 const QString& baseType,
183 const QVariantMap facets,
184 const QString& typeSetName);
199 const QString& newName,
200 const QStringList& enumeration,
201 const QString& typeSetName);
216 const QString& newName,
217 const QString& itemType,
218 const QString& typeSetName);
234 const QString& newName,
235 const QString& keyType,
236 const QString& valueType,
237 const QString& typeSetName);
245 QString
valueToString(
const QVariant& value,
const QString& typeName)
const;
259 void typeRenamed(
const QString& oldName,
const QString& newName);
274 CustomTypeSetList* model;
276 void addCustomType(
CustomType customType,
const QString& customTypeSetName);
277 CustomType* getCustomTypeByName(
const QString& name)
const;
278 void moveCustomTypeToSet(
const QString& customTypeName,
const QString& customTypeSetName);
279 void renameType(
const QString oldName,
const QString newName);
283 #endif // TYPESCONTROLLER_H Definition: commandlineoptions.h:6
const QStringList getCustomTypeSetNames() const
Gets a list of the names of all custom type sets in the project.
Definition: typescontroller.cpp:116
const CustomType addList(const QString &name, const QString &itemType, const QString &customTypeSetName)
Adds a new list type to the specified set.
Definition: typescontroller.cpp:45
void updateList(const QString &oldName, const QString &newName, const QString &itemType, const QString &typeSetName)
Updates the properties of the specified list type.
Definition: typescontroller.cpp:284
void updateMap(const QString &oldName, const QString &newName, const QString &keyType, const QString &valueType, const QString &typeSetName)
Updates the properties of the specified map type.
Definition: typescontroller.cpp:313
void typeUpdated(const Tome::CustomType &type)
The properties of a custom type have been updated.
void typeRenamed(const QString &oldName, const QString &newName)
A custom type has ben renamed.
void updateDerivedType(const QString &oldName, const QString &newName, const QString &baseType, const QVariantMap facets, const QString &typeSetName)
Updates the properties of the specified derived type.
Definition: typescontroller.cpp:225
const CustomType addMap(const QString &name, const QString &keyType, const QString &valueType, const QString &customTypeSetName)
Adds a new map type to the specified set.
Definition: typescontroller.cpp:58
void setCustomTypes(CustomTypeSetList &model)
Uses the specified list of custom type sets as model for this controller.
Definition: typescontroller.cpp:220
bool isCustomType(const QString &name) const
Checks whether the project has a custom type with the specified name.
Definition: typescontroller.cpp:149
const CustomType addEnumeration(const QString &name, const QStringList &enumeration, const QString &customTypeSetName)
Adds a new enumeration type to the specified set.
Definition: typescontroller.cpp:32
QString valueToString(const QVariant &value, const QString &typeName) const
Converts the specified value to a human-readable string.
Definition: typescontroller.cpp:343
void updateEnumeration(const QString &oldName, const QString &newName, const QStringList &enumeration, const QString &typeSetName)
Updates the properties of the specified enumeration.
Definition: typescontroller.cpp:255
Controller for adding, updating and removing custom types.
Definition: typescontroller.h:14
const CustomType & getCustomType(const QString &name) const
Gets the custom type with the specified name.
Definition: typescontroller.cpp:89
void typeAdded(const Tome::CustomType &type)
A new custom type has been added to the project.
bool isBuiltInType(const QString &name) const
Checks whether the specified name denotes a built-in type of Tome.
Definition: typescontroller.cpp:144
const QStringList getBuiltInTypes() const
Gets a list of built-in (i.e. non-custom) types of Tome.
Definition: typescontroller.cpp:72
const QStringList getTypeNames() const
Gets a list of all type names of this project, including built-in types.
Definition: typescontroller.cpp:129
void removeCustomType(const QString &typeName)
Removes the custom type with the specified name from the project.
Definition: typescontroller.cpp:181
const CustomTypeSetList & getCustomTypeSets() const
Gets a list of all custom type sets in the project.
Definition: typescontroller.cpp:111
User-defined type of any field.
Definition: customtype.h:14
bool isTypeOrDerivedFromType(const QString &lhs, const QString &rhs) const
Checks whether the first specified type is equal to or derived from the second specified type...
Definition: typescontroller.cpp:165
const CustomTypeList getCustomTypes() const
Gets a list of all custom types in the project.
Definition: typescontroller.cpp:94
Named set of Tome custom types.
Definition: customtypeset.h:11
void removeCustomTypeSet(const QString &name)
Removes the custom type set with the specified name from the project, including all custom types...
Definition: typescontroller.cpp:205
const CustomType addDerivedType(const QString &name, const QString &baseType, const QVariantMap &facets, const QString &customTypeSetName)
Adds a new derived type to the specified set.
Definition: typescontroller.cpp:18
void typeRemoved(const Tome::CustomType &type)
A custom type has been removed from the project.
void addCustomTypeSet(const CustomTypeSet &customTypeSet)
Adds the passed custom type set to the project.
Definition: typescontroller.cpp:13