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);
28SCORE_LIB_BASE_EXPORT Document* try_documentFromObject(
const QObject& obj)
noexcept;
29SCORE_LIB_BASE_EXPORT
const DocumentContext& documentContext(
const QObject& obj);
40SCORE_LIB_BASE_EXPORT
ObjectPath unsafe_path(QObject
const*
const& obj);
41SCORE_LIB_BASE_EXPORT
ObjectPath unsafe_path(
const QObject& obj);
45SCORE_LIB_BASE_EXPORT QString copyOrigin(
const Document& doc);
50SCORE_LIB_BASE_EXPORT DocumentDelegatePresenter*
51presenterDelegate_generic(
const Document& d);
54T* presenterDelegate(
const Document& d)
56 auto pd = presenterDelegate_generic(d);
58 return safe_cast<T*>(pd);
63 requires(std::is_base_of<DocumentDelegatePresenter, T>::value)
64T* get(
const Document& d)
66 return presenterDelegate<T>(d);
70T* try_presenterDelegate(
const Document& d)
72 return dynamic_cast<T*
>(presenterDelegate_generic(d));
76 requires(std::is_base_of<DocumentDelegatePresenter, T>::value)
77T* try_get(
const Document& d)
79 return try_presenterDelegate<T>(d);
84SCORE_LIB_BASE_EXPORT DocumentDelegateModel& modelDelegate_generic(
const Document& d);
87T& modelDelegate(
const Document& d)
89 return safe_cast<T&>(modelDelegate_generic(d));
93 requires(std::is_base_of<DocumentDelegateModel, T>::value)
94T& get(
const Document& d)
96 return modelDelegate<T>(d);
102T* try_modelDelegate(
const Document& d)
104 return dynamic_cast<T*
>(&modelDelegate_generic(d));
108 requires(std::is_base_of<DocumentDelegateModel, T>::value)
109T* try_get(
const Document& d)
111 return try_modelDelegate<T>(d);
The ObjectPath class.
Definition ObjectPath.hpp:37
Base toolkit upon which the software is built.
Definition Application.cpp:108