API Documentation
Loading...
Searching...
No Matches
WidgetOptions.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/ApplicationOptions.h>
4#include <NDEVR/Event.h>
5class QWidget;
6namespace NDEVR
7{
8 struct PopupInfo;
9 class Log;
10 /**--------------------------------------------------------------------------------------------------
11 \brief Stores the options, added to the user settings, that control Widgets and low level UI options in the
12 application. All options retained across application restart
13 **/
15 {
16 public:
18 {
19 e_desktop///UI layout, size, and workflow optimized for traditional desktop computers
20 , e_tablet//UI layout, size, and workflow optimized for tablets
21 , e_mobile///UI layout, size, and workflow optimized for mobile phones
23 };
24 //Returns whether or not the UI should be optimized for finger presses
25 static bool IsTouchOptimized();
26 //Returns whether or not the UI should be optimized for work in the field, based off of field_mode and the current widget_mode
27 static bool IsFieldMode();
28 //Sets whether or not the UI in the current widget_mode should be optimized for work in the field, based off of field_mode and the current widget_mode
29 static void SetFieldMode(bool field_mode);
30 //Based off of things like screen resolution or whether OS is in touch mode
32 //Grows or shrinks all UI components with the exception of font
34 //Grows or shrinks all font within the UI
36 //For animations, the speed multiplier for UI animaitions. 0 = no animations. Higher the number = slower animations
38 //For animations, the scale at which to render the animation 0.0-1.0. Lower = faster animations, Higher = crisper animations
40 //Allows the user to manually dock and undock widgets
42 //Whether or not to show the main window full screen (without close/window/minimize buttons) in "field mode". In android shows the top bar
44 //Allows user to window fullscreen views
46 //Whether or not each application mode should be in field mode
48 //The mode of the application
50
51 ///////////////////////////////////////////////////
52
53 //The default parent widget for all new dialogs
55 //The function to call when we want to show a widget (Used primarily via QTTools::showDialog)
56 static std::function<bool(QWidget* widget, const PopupInfo& start, const PopupInfo& end)> show_widget_function;
57 //The function to call when we want to hide a widget (Used primarily via QTTools::showDialog)
58 static std::function<void(QWidget* widget, const PopupInfo& info)> hide_widget_function;
59
60 static std::function<void(bool relaunch, const PopupInfo& info)> request_exit_function;
61 ///The key event sent when the OS sends a key not recognized by the software
63 ///The default log for all UI events
65 //Resets all Viewport Options to defaults
67 //The category in user settings for all of the above options
69 };
71}
#define NDEVR_WIDGETS_API
Definition DLLInfo.h:59
The default object to store data of any type that should persist through sessions of the application.
Definition Button.h:57
KEY
Definition Event.h:55
A core part of the engine, stores variables that can be listened to with ResourceListener which will ...
Definition Toggle.h:41
Logic for reading or writing to a string or a user friendly, TranslatedString.
Definition StringStream.h:230
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Definition TranslatedString.h:13
Stores the options, added to the user settings, that control Widgets and low level UI options in the ...
Definition WidgetOptions.h:15
static std::function< void(QWidget *widget, const PopupInfo &info)> hide_widget_function
Definition WidgetOptions.h:58
static bool IsFieldMode()
static ApplicationOption< fltp08 > animation_scale
Definition WidgetOptions.h:37
static Resource< fltp08 > animation_quality
Definition WidgetOptions.h:39
static ApplicationOption< WidgetMode > widget_mode
Definition WidgetOptions.h:49
static ApplicationOption< bool > allow_windowable_windows
Definition WidgetOptions.h:45
static ApplicationOption< bool > field_mode_fullscreen
Definition WidgetOptions.h:43
static ApplicationOption< bool > global_allow_docking
Definition WidgetOptions.h:41
static void ResetOptionsToDefaults()
static ApplicationOption< fltp08 > font_scale
Definition WidgetOptions.h:35
static bool IsTouchOptimized()
static void SetFieldMode(bool field_mode)
static std::function< bool(QWidget *widget, const PopupInfo &start, const PopupInfo &end)> show_widget_function
Definition WidgetOptions.h:56
static Resource< ProgressInfo * > ui_log
The default log for all UI events.
Definition WidgetOptions.h:64
static std::function< void(bool relaunch, const PopupInfo &info)> request_exit_function
Definition WidgetOptions.h:60
static WidgetMode DefaultSystemWidgetMode()
static Resource< QWidget * > new_window_parent
Definition WidgetOptions.h:54
static ApplicationOption< fltp08 > ui_scale
Definition WidgetOptions.h:33
static ApplicationOption< Vector< WidgetMode::e_size, bool > > field_mode
Definition WidgetOptions.h:47
static TranslatedString options_label
Definition WidgetOptions.h:68
static KeyEvent::KEY unhandled_key
The key event sent when the OS sends a key not recognized by the software.
Definition WidgetOptions.h:62
WidgetMode
Definition WidgetOptions.h:18
Definition ACIColor.h:37
Class which is used to pass arguments and requests for creating a popup dialog or widget....
Definition PopupInfo.h:15