#include <set>
#include <memory>
#include <QObject>
#include "Locked.h"
Go to the source code of this file.
|
template<typename WIDGET , typename DATAMODEL , typename... ARGS> |
static WIDGET * | omni::ui::mixin::makeWidget (DATAMODEL *_dataModel, ARGS &&..._args) |
| Instantiate a new widget and set data model Uses raw pointer (unshared data model) More...
|
|
template<typename WIDGET , typename DATAMODEL , typename... ARGS> |
static WIDGET * | omni::ui::mixin::makeWidget (std::shared_ptr< DATAMODEL >_dataModel, ARGS &&..._args) |
| Instantiate a new widget and set data model Uses shared pointer (shared data model) More...
|
|
#define OMNI_UI_DATAMODEL |
( |
|
MODEL, |
|
|
|
SHARED |
|
) |
| |
Value:public: \
inline void updateDataModel() { \
mixin_data_model_type::updateDataModel(); \
} \
inline void updateFrontend() { \
this->locked([&]() { \
mixin_data_model_type::updateFrontend(); \
update(); \
}); \
} \
private: \
void emitDataModelChangedSignal() { \
emit dataModelChanged(); \
} \
public:
Holds a specific data model with frontend update mechanism.
Definition: DataModel.h:87
This macro needs to be inserted for every widget that uses DataModel.