From aa9c114ceded8a41a5d9c748f6fbd5deb5f4e6c7 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de> Date: Mon, 22 Jul 2024 15:37:25 +0200 Subject: [PATCH] . --- GUI/Model/Descriptor/PolyItem.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/GUI/Model/Descriptor/PolyItem.h b/GUI/Model/Descriptor/PolyItem.h index af798c6657b..e9a3816e2e6 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) -- GitLab