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:
17
widgethelper.h
Normal file
17
widgethelper.h
Normal 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
|
||||
Reference in New Issue
Block a user