diff --git a/GUI/Model/Descriptor/PolyItem.h b/GUI/Model/Descriptor/PolyItem.h index af798c6657b35f8f8f9e81651ad715115f03ee57..e9a3816e2e6b9986dfcfb82c7e5bf1b52b34dd5d 100644 --- a/GUI/Model/Descriptor/PolyItem.h +++ b/GUI/Model/Descriptor/PolyItem.h @@ -34,6 +34,7 @@ public: BaseType* certainItem() const { return m_item.get(); } void setCertainItem(BaseType* t) { m_item.reset(t); } + template <typename S> S* createCertainItem(); static void writeChosen(const BaseType* t, QXmlStreamWriter* w, const QString& tag); @@ -84,9 +85,8 @@ private: //! Initialize by means of a catalog class and optional creation arguments. //! -//! The current selection will be initialized with the first type in the catalog types. The -//! optional arguments are the arguments which may be necessary for the creation method in the -//! catalog. +//! The current selection will be initialized with the first type in the catalog types. The optional +//! arguments are the arguments which may be necessary for the creation method in the catalog. template <typename C> template <typename... Args> void PolyItem<C>::initWithArgs(const QString& label, const QString& tooltip, typename C::Type currentType, Args... args) @@ -96,7 +96,8 @@ void PolyItem<C>::initWithArgs(const QString& label, const QString& tooltip, setCurrentIndex(index); } -//! Initialize by means of a catalog class, a subsection of allowed types and an initializer function. +//! Initialize by means of a catalog class, a subsection of allowed types and an initializer +//! function. //! //! Same as before, but only a subset of types available in a catalog shall be used. //! The current selection will be initialized with the first type in the given types subset. @@ -106,8 +107,7 @@ void PolyItem<C>::initWithArgs(const QString& label, const QString& tooltip, //! //! The initializer function takes two arguments: The first is the new item, the second is the //! old one (if present; can be null). This is intended to maybe copy values from the old to the -//! new selection. The old item also can be ignored, always according to the current -//! needs. +//! new selection. The old item also can be ignored, always according to the current needs. template <typename C> void PolyItem<C>::initWithInitializer( const QString& label, const QString& tooltip, const QVector<typename C::Type>& types, std::function<void(BaseType* newItem, const BaseType* oldItem)> initializer)