API Documentation
Loading...
Searching...
No Matches
ViewportManager.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/CameraView.h>
4#include <NDEVR/QCustomDockWidget.h>
5#include <NDEVR/ViewportLayout.h>
6#include <NDEVR/Buffer.h>
7#include <NDEVR/Set.h>
8#include <QPointer>
9namespace NDEVR
10{
11 class DesignObjectLookup;
12 class Camera;
13#if NDEVR_VIEWPORT
14 class DESIGN_WIDGETS_API ViewportManager
15 {
16 public:
17 virtual DockWidget<CameraView>* removeViewport(const UUID& id);
18 virtual bool removeView(QPointer<DockWidget<CameraView>> view) = 0;
19 virtual bool addView(QPointer<DockWidget<CameraView>> view) = 0;
20 virtual void onGlobalLayoutUpdated(Buffer<QPointer<DockWidget<CameraView>>>&) {};
21 virtual Buffer<QPointer<DockWidget<CameraView>>> views() const;
22 virtual DockWidget<CameraView>* viewport(const UUID& id) const;
23 virtual void onViewsSwapped(DockWidget<CameraView>* camera_a, DockWidget<CameraView>* camera_b);
24 virtual void layoutViews(ViewportLayout camera_theme, DesignObjectLookup* manager, Buffer<QPointer<DockWidget<CameraView>>>& removed_views);
25 virtual UUID activeViewport() const { return m_active_viewport; }
26 virtual CameraView* mainViewport();
27 virtual QCustomDockWidget* mainViewportDock();
28 virtual bool hasViewport(const UUID& id) const { return m_view_docks.hasKey(id); }
29 virtual uint04 layoutIndex(const UUID& id) const;
30 public:
31 virtual DockWidget<CameraView>* createView(DynamicPointer<Camera>& camera, DesignObjectLookup* manager);
32 protected:
33 UUID m_active_viewport = Constant<UUID>::NaN;
34 Dictionary<UUID, QPointer<DockWidget<CameraView>>> m_view_docks;
35 ViewportLayout m_current_layout;
36 bool m_is_dirty = false;
37 };
38#endif
39}
#define DESIGN_WIDGETS_API
Definition DLLInfo.h:74
Definition ACIColor.h:37
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:115