NewItemDialog uses dynamically generated control widgets for model data as well. Added a WidgetHelper class to consolidate identical source code for ItemDetailMapper and NewItemDialog.

This commit is contained in:
2026-03-02 19:25:27 +01:00
parent 2fb7560e6e
commit 2d8c97b5f0
7 changed files with 146 additions and 97 deletions

17
widgethelper.h Normal file
View File

@ -0,0 +1,17 @@
#ifndef WIDGETHELPER_H
#define WIDGETHELPER_H
#include "model/metadata.h"
class QWidget;
class WidgetHelper {
public:
static QWidget* createControlWidget(const UserRoles role, QWidget* parent);
static QWidget* createComboBox(const UserRoles role, QWidget* parent);
private:
explicit WidgetHelper();
};
#endif // WIDGETHELPER_H