#ifndef OBJECTBINDER_H #define OBJECTBINDER_H #include #include #include #include #include #include "ivalidator.h" #include "combodata.h" #include "core_global.h" class CORESHARED_EXPORT ObjectBinder : public QObject { Q_OBJECT public: explicit ObjectBinder(QObject *parent = NULL); void registerBinding(QWidget *widget); void registerBinding(QComboBox *combo, const QList &values); void registerValidator(IValidator *validator); void setData(QObject *data); void bindToUi(); bool bindToData(); signals: void validationError(QString msg); private: QList m_bindWidgets; QHash > m_bindCombos; QList m_validators; QObject *m_data; }; #endif // OBJECTBINDER_H