Loading...
Searching...
No Matches
DocumentView.hpp
1#pragma once
2
3#include <score_lib_base_export.h>
4
5#include <verdigris>
6class QWidget;
7namespace score
8{
9class Document;
10class DocumentDelegateFactory;
11class DocumentDelegateView;
12class CentralViewStack;
13
21class SCORE_LIB_BASE_EXPORT DocumentView final : public QObject
22{
23 W_OBJECT(DocumentView)
24public:
26 DocumentDelegateFactory& viewDelegate, const Document& doc, QObject* parent);
27 ~DocumentView() override;
28
29 DocumentDelegateView& viewDelegate() const { return *m_view; }
30
31 const Document& document() const { return m_document; }
32
34 QWidget* widget() const noexcept;
35
37 CentralViewStack& centralViews() const noexcept { return *m_central; }
38
39private:
40 const Document& m_document;
41 DocumentDelegateView* m_view{};
42 CentralViewStack* m_central{};
43};
44}
45
46W_REGISTER_ARGTYPE(score::DocumentView*)
The central area of a document.
Definition CentralViewStack.hpp:33
Used to provide custom document types.
Definition DocumentDelegateFactory.hpp:26
Definition DocumentDelegateView.hpp:11
The Document class is the central part of the software.
Definition Document.hpp:51
The DocumentView class shows a document.
Definition DocumentView.hpp:22
CentralViewStack & centralViews() const noexcept
The navigation bar and the stack of central views of this document.
Definition DocumentView.hpp:37
Base toolkit upon which the software is built.
Definition Application.cpp:116