API Documentation
Loading...
Searching...
No Matches
ApplicationSetup.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/WidgetInitialization.h>
4#include <NDEVR/UUID.h>
5#include <NDEVR/String.h>
6#include <NDEVR/SnapLocation.h>
7#include <NDEVR/File.h>
8#include <NDEVR/Buffer.h>
9
10#include <functional>
11#ifdef QT_BUILD
12#include <QApplication>
13Q_DECLARE_METATYPE(NDEVR::UUID);
14Q_DECLARE_METATYPE(NDEVR::SnapLocation);
15Q_DECLARE_METATYPE(NDEVR::String);
16Q_DECLARE_METATYPE(NDEVR::File);
17Q_DECLARE_METATYPE(NDEVR::Buffer<NDEVR::UUID>);
18#endif
19class QWindow;
20class QWidget;
21namespace NDEVR
22{
23#ifndef QT_BUILD
24#ifdef Q_DECLARE_METATYPE
25 Q_DECLARE_METATYPE(UUID);
26 Q_DECLARE_METATYPE(SnapLocation);
27 Q_DECLARE_METATYPE(String);
28 Q_DECLARE_METATYPE(File);
29 Q_DECLARE_METATYPE(Buffer<UUID>);
30#endif
31#endif
32 class WindowManager;
33 class ModelManager;
34 /**--------------------------------------------------------------------------------------------------
35 \brief Initializes the engine for most applications. Applications using the default workspace
36 should call this function to layout and initialize the application. Calls all relevant module functions
37 in the correct order.
38 **/
40 {
41 public:
42 enum UIMode
43 {
44 e_no_ui
45 , e_window_manager
46 , e_3D_window_manager
47 };
48 UIMode ui_mode = e_3D_window_manager;
49 std::function<void(QWidget*)> main_window_created_callback;
50 public:
52 ApplicationSetup(int argc, char** argv);
53 void registerMetatypes() override;
54 void setupUserOptions() override;
55 void setupFactories() override;
56 void setupUI() override;
57 int launch() override;
58 };
59}
#define NDEVR_API
Definition DLLInfo.h:50
Initializes the engine for most applications. Applications using the default workspace should call th...
Definition ApplicationSetup.h:40
UIMode
Definition ApplicationSetup.h:43
std::function< void(QWidget *)> main_window_created_callback
Definition ApplicationSetup.h:49
void registerMetatypes() override
ApplicationSetup(int argc, char **argv)
void setupFactories() override
int launch() override
void setupUI() override
void setupUserOptions() override
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
Logic for reading or writing to a file as well as navigating filesystems.
Definition File.h:48
The core String class for the NDEVR API.
Definition String.h:69
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:60
The primary logic for initializing an application within the NDEVR engine by calling module functions...
Definition WidgetInitialization.h:16
Definition ACIColor.h:37
SnapLocation
A list of directions that a view can be pointed relative to an object or scene.
Definition ViewLocation.h:40