35#include <NDEVR/WindowManager.h>
36#include <NDEVR/WidgetInit.h>
37#include <NDEVR/Pointer.h>
38#include <NDEVR/Buffer.h>
47 class ReportGeneratorDialog;
54 class MeasurementCommandsWidget;
132 virtual void exit(
bool relaunch =
false,
const StringView& relaunch_options =
"--relaunch")
override;
170 template<
class t_dock_type>
A LogStream that writes log messages directly to a specified ASCII text file.
The equivelent of std::vector but with a bit more control.
The default container for multiple Viewports in the NDEVR environment.
Provides a way to optionally lazily initialize widgets when needed but still pass them to container d...
This dialog is shown front and center before the user has loaded any data or created a project In tou...
A dialog which shows multiple log views, where each log is a tab.
The primary Window within the NDEVR API.
The Ribbon that typically appears on the top of the window or, in touch mode, to the side of the wind...
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
A ResourceListener which will always be executed on the main UI thread and can be tied to a Qt Object...
void refreshCameraSwap()
Slot that refreshes the camera swap state.
QPointer< DockWidget< MeasurementCommandsWidget > > m_measure_editor_dock
The measurement commands editor dock.
virtual bool isClosing() const
Checks whether the application is currently closing.
virtual QWidget * mainWindow() const override
Returns the primary window for the application.
virtual DockWidget< DrawCommandsWidget > * drawEditor()
Returns the draw commands editor dock widget.
DockWidget< DownloadDatasetWidget > * m_download_widget
The dataset download dock.
UUID m_selected_editor_id
The UUID of the currently selected editor target.
void setupSelectionWidget()
Slot that initializes or refreshes the selection widget.
virtual void setupRibbons(bool setup_all)
Sets up the ribbon toolbars.
void layoutAll() override
Performs a full layout pass, arranging all dock widgets and panels.
DockWidget< SelectionWidget > * m_selection_dock
The selection properties dock widget.
virtual DockWidget< SceneTreeWidget > * sceneTree() const
Returns the scene tree dock widget.
virtual NDEVRRibbon * ribbon() const
Returns the primary ribbon widget.
virtual void updateModified() override
Called when application should check to see if the project has been modified since last save.
DockWidget< LibraryWidget > * m_library_dock
The asset library dock.
DockWidget< ReportGeneratorDialog > * m_report_generator
The report generator dock widget.
virtual void closeWindow(MainWindow *window, QCloseEvent *event)
Closes a specific main window, handling the close event.
virtual DockWidget< ModelCommandsWidget > * modelEditor()
Returns the model commands editor dock widget.
virtual void setAutoCreateCameras(bool autocreate)
Sets whether camera viewport windows are automatically created for new cameras.
virtual void addWindow(MainWindow *window)
Adds an existing main window to the manager.
QPointer< DockWidget< ModelCommandsWidget > > m_model_edit_dock
The model commands editor dock.
virtual void setupViews()
Sets up the initial viewport views and camera panels.
virtual String mainWindowPreferedName() const
Returns the preferred name for the main window title.
bool m_has_model_content
Whether the project contains model content.
Buffer< MainWindow * > m_main_windows
All managed main windows.
Toolbar * m_vertical_mode_toolbar
The vertical mode toolbar.
void hideCurrentSelectionEditorDialog()
Hides the currently displayed selection editor dialog.
virtual LibraryWidget * createLibraryWidget() const
Creates a new library widget for asset browsing.
void addUserData(Buffer< UUID > object)
Slot invoked when user data has been added to the project.
virtual DockWidget< CameraPane > * cameraPane() const
Returns the camera pane dock widget.
DockWidget< t_dock_type > * customDock() const
Searches custom dock widgets for one matching the given type.
virtual void showModelProperties(const ShowPropertiesSettings &settings) override
Called when we want to show the dialog for editing a specific object using application default editin...
void onCameraDelete(UUID camera)
Slot invoked when a camera is deleted.
virtual uint04 windowCount() const
Returns the number of managed main windows.
virtual void exit(bool relaunch=false, const StringView &relaunch_options="--relaunch") override
Saves user settings and exits the application, relaunching if requested.
virtual void closeWindow(uint04 index, QCloseEvent *event)
Closes the main window at the given index, handling the close event.
Buffer< QPointer< QWidget > > m_active_screen_widgets
Widgets displayed on the active screen.
void cameraSwapSlot(UUID camera)
Slot invoked to swap a camera view to the primary viewport position.
Buffer< QPointer< DockWidget< CameraView > > > cameraViews() const
Returns all camera view dock widgets.
void designObjectAdded(Buffer< UUID > object)
Slot invoked when design objects have been added to the project.
void onClearSlot()
Slot invoked when the project is cleared.
virtual DropArea defaultDropArea(const QCustomDockWidget *dock_widget) const override
Returns the default drop area for a dock widget.
virtual bool autoCreateWindows()
Checks whether camera viewport windows are automatically created.
virtual void updateRemoteWidgets(const Buffer< QPointer< QWidget > > &widgets, bool are_remote)
Updates the remote widget display, toggling between embedded and remote modes.
virtual void userZoomToModel(const UUID &id)
Zooms the dialog to an object, and if required, shows a viewport if none are visible.
CustomDockButton * m_add_camera_button
Button for adding new camera viewports.
virtual void setupCameraPanels()
Sets up the camera panels based on the current viewport layout.
virtual RibbonArea defaultRibbonArea(const QCustomDockWidget *dock_widget) override
Returns the default ribbon area for a dock widget.
virtual GettingStartedDialog * createGettingStartedDialog() const
Creates a new getting started dialog for the home screen.
QTWindowManager(QTModelManager *manager, const Buffer< String > &args=Buffer< String >())
Constructs a 3D window manager with the given model manager and command-line arguments.
virtual LogManagerDialog * createLogView() override
Creates and returns a new LogManagerDialog instance.
virtual void requestExitWithFunction(std::function< void()> exit_function, const PopupInfo &popup_origin=PopupInfo()) override
Prompts the user to confirm an exit and save changes if required.
virtual MainWindow * window(uint04 index) const
Returns the main window at the given index.
virtual DockWidget< SelectionWidget > * selectionWidget()
Returns the selection properties dock widget.
void setupRemoteWidgetsSlot()
Slot that sets up remote widgets based on the current configuration.
bool m_auto_create_camera_windows
Whether to auto-create camera viewport windows.
DockWidget< DrawCommandsWidget > * m_draw_editor_dock
The draw commands editor dock.
virtual QCustomDockWidget * largestCameraView(bool check_visible=true) const
Returns the largest camera view dock widget, optionally filtering by visibility.
virtual DockWidget< DownloadDatasetWidget > * downloadWidget()
Returns the dataset download widget dock.
virtual SectionWidget * defaultDropReference(const QCustomDockWidget *dock_widget=nullptr) const override
Returns the default section widget to drop relative to.
virtual void recoverLastData() override
Attempts to recover data from the last session if it was not properly saved.
Buffer< String > m_args
Command-line arguments passed at construction.
virtual SelectionWidget * createSelectionWidget() const
Creates a new selection widget for displaying selected object properties.
bool eventFilter(QObject *Object, QEvent *Event) override
Filters events for managed objects.
virtual DockWidget< GettingStartedDialog > * home() const
Returns the getting started / home dialog dock widget.
virtual void clearAll() override
Resets the entire display to the initial state with no project loaded.
void onCameraLayoutUpdated(Buffer< QPointer< DockWidget< CameraView > > > &removed_views)
Handles a camera layout update, cleaning up removed views.
virtual void addCustomDockWidget(DockInit *widget) override
Adds a widget to be docked in the default location when a project has been loaded.
virtual DockWidget< MeasurementCommandsWidget > * measureEditor()
Returns the measurement commands editor dock widget.
Buffer< QPointer< QWidget > > m_inactive_screen_widgets
Widgets on inactive screens.
virtual DockWidget< LibraryWidget > * libraryEditor()
Returns the library widget dock for asset browsing.
void updateProjectSlot()
Slot invoked to update the display when the project changes.
void swapCameras(DockWidget< CameraView > *camera_a, DockWidget< CameraView > *camera_b)
Swaps the positions of two camera view dock widgets.
void finishInitialSetup()
Completes the initial setup process and transitions to the main application state.
virtual void onViewportSelection(UUID id)
Handles a viewport selection event for the given object.
virtual SceneTreeWidget * createSceneTree() const
Creates a new scene tree widget.
virtual MainWindow * createWindow(uint04 monitor_number)
Creates a new main window on the specified monitor.
StatusBar * m_status_bar
The status bar widget.
void setupLogs()
Sets up log stream connections to the status bar and log dock.
virtual ContainerWidget * container() const override
Returns the primary container widget for adding new docks.
virtual void readArg(const StringView &arg, const StringView &data)
Processes a single command-line argument and its associated data.
void onCameraAdd(UUID camera)
Slot invoked when a new camera is added.
virtual MainWindow * createMainWindow(uint04 monitor_number)
Creates a new main window on the specified monitor.
const Buffer< String > & args() const
Returns the command-line arguments passed at construction.
virtual DownloadDatasetWidget * createDownloadDatabaseWidget()
Creates a new download dataset widget.
virtual void readArgs(const Buffer< String > &args)
Parses and applies the command-line arguments.
DockWidget< CameraView > * cameraView(const UUID &camera) const
Returns the camera view dock widget for a specific camera.
void onDesignObjectDelete(Buffer< UUID > object)
Slot invoked when design objects are being deleted.
DockWidget< SceneTreeWidget > * m_scene_tree_dock
The scene tree dock widget.
virtual Toolbar * verticalModeToolbar()
Returns the vertical mode toolbar.
A simple widget that shows a Status and optionally a progressbar.
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Buffer< DockInit * > m_custom_dock_widgets
Custom dock widgets registered by modules.
WindowManager(QTModelManager *manager)
Constructs a WindowManager with the given model manager.
bool m_is_exiting
Whether the application is in the process of exiting.
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
DropArea
relates where a widget should be dropped relative to another.
RibbonArea
Requests a ribbon or tab area to be in a certain location and orientation relative to another widget.
Base class for user-driven events which are typically KeyEvent or MouseEvent.
Stores settings for setting up and displaying a DesignObjectDialog such as whether the dialog is part...