2#include <score/model/path/ObjectPath.hpp>
12class DocumentDelegateModel;
13class DocumentDelegatePresenter;
14struct DocumentContext;
25SCORE_LIB_BASE_EXPORT Document* documentFromObject(
const QObject* obj);
26SCORE_LIB_BASE_EXPORT Document* documentFromObject(
const QObject& obj);
27SCORE_LIB_BASE_EXPORT
const DocumentContext& documentContext(
const QObject& obj);
38SCORE_LIB_BASE_EXPORT
ObjectPath unsafe_path(QObject
const*
const& obj);
39SCORE_LIB_BASE_EXPORT
ObjectPath unsafe_path(
const QObject& obj);
44SCORE_LIB_BASE_EXPORT DocumentDelegatePresenter*
45presenterDelegate_generic(
const Document& d);
48T* presenterDelegate(
const Document& d)
50 auto pd = presenterDelegate_generic(d);
52 return safe_cast<T*>(pd);
57 requires(std::is_base_of<DocumentDelegatePresenter, T>::value)
58T* get(
const Document& d)
60 return presenterDelegate<T>(d);
64T* try_presenterDelegate(
const Document& d)
66 return dynamic_cast<T*
>(presenterDelegate_generic(d));
70 requires(std::is_base_of<DocumentDelegatePresenter, T>::value)
71T* try_get(
const Document& d)
73 return try_presenterDelegate<T>(d);
78SCORE_LIB_BASE_EXPORT DocumentDelegateModel& modelDelegate_generic(
const Document& d);
81T& modelDelegate(
const Document& d)
83 return safe_cast<T&>(modelDelegate_generic(d));
87 requires(std::is_base_of<DocumentDelegateModel, T>::value)
88T& get(
const Document& d)
90 return modelDelegate<T>(d);
96T* try_modelDelegate(
const Document& d)
98 return dynamic_cast<T*
>(&modelDelegate_generic(d));
102 requires(std::is_base_of<DocumentDelegateModel, T>::value)
103T* try_get(
const Document& d)
105 return try_modelDelegate<T>(d);
The ObjectPath class.
Definition ObjectPath.hpp:37
Base toolkit upon which the software is built.
Definition Application.cpp:90