Implemented permission settings for Roles.
This commit is contained in:
+6
-1
@@ -52,6 +52,10 @@ public:
|
||||
m_validators.append(validator);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void bindOtherToUi() {}
|
||||
virtual bool bindOtherToData() { return true; }
|
||||
|
||||
private:
|
||||
QSharedPointer<T> m_entity;
|
||||
QList<QWidget*> m_bindWidgets;
|
||||
@@ -63,6 +67,7 @@ private:
|
||||
const char* prop = widget->metaObject()->userProperty().name();
|
||||
widget->setProperty(prop, ((QObject*)m_entity.data())->property(widget->objectName().toStdString().c_str()));
|
||||
}
|
||||
bindOtherToUi();
|
||||
}
|
||||
|
||||
bool bindToData() {
|
||||
@@ -78,7 +83,7 @@ private:
|
||||
((QObject*)m_entity.data())->setProperty(widget->objectName().toStdString().c_str(), widget->property(prop));
|
||||
}
|
||||
|
||||
return true;
|
||||
return bindOtherToData();
|
||||
}
|
||||
|
||||
public slots:
|
||||
|
||||
Reference in New Issue
Block a user