All mapped control widgets (plus labels) are dynamically generated from meta data.
This commit is contained in:
@ -47,28 +47,23 @@ class ItemDetailMapper : public QWidget {
|
||||
|
||||
/// GUI elements
|
||||
QGridLayout* m_layout;
|
||||
QList<QWidget*> editControls;
|
||||
|
||||
QLabel* m_typeLabel;
|
||||
QComboBox* m_typeBox;
|
||||
QStringListModel* m_typeModel = nullptr;
|
||||
|
||||
QLabel* m_amountLabel = nullptr;
|
||||
QSpinBox* m_amountBox = nullptr;
|
||||
|
||||
QLabel* m_factorLabel = nullptr;
|
||||
QDoubleSpinBox* m_factorBox = nullptr;
|
||||
QList<QWidget*> m_controlWidgets;
|
||||
|
||||
QPushButton* m_nextButton;
|
||||
QPushButton* m_previousButton;
|
||||
|
||||
void setupConnections();
|
||||
void setupLayout();
|
||||
void setupNavigationButtons();
|
||||
void setupWidgets();
|
||||
|
||||
void addWidgetsWithMapping(const int row);
|
||||
QPair<QWidget*, QWidget*> createWidgetPairForColumn(const int column);
|
||||
void clearEditWidgets();
|
||||
void setupWidgetPairForColumn(const int column);
|
||||
QWidget* createControlWidget(const int column);
|
||||
QWidget* createComboBox(const int role);
|
||||
|
||||
void clearControlWidgets();
|
||||
void clearLineEdit(const int column);
|
||||
void clearComboBox(const int column);
|
||||
void clearSpinBox(const int column);
|
||||
};
|
||||
|
||||
#endif // ITEMDETAILMAPPER_H
|
||||
|
||||
Reference in New Issue
Block a user