NDEVR
API Documentation
WidgetOptions.h
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;
14 class NDEVR_WIDGETS_API WidgetOptions
15 {
16 public:
25
27 static bool IsTouchOptimized();
30 static bool IsFieldMode();
33 static void SetFieldMode(bool field_mode);
45 #ifndef Q_OS_WASM
47 #else
49 #endif
56 static std::function<bool(QWidget* widget, const PopupInfo& start, const PopupInfo& end)> show_widget_function;
57 static std::function<void(QWidget* widget, const PopupInfo& info)> hide_widget_function;
58 static std::function<void(bool relaunch, const PopupInfo& info)> request_exit_function;
64 };
65 template class NDEVR_WIDGETS_API StringStream<WidgetOptions::WidgetMode>;
66}
The default object to store data of any type that should persist through sessions of the application.
Serves as the primary program interface for processes to report issues and allows any number of LogSt...
Definition Log.h:50
A core part of the engine, stores variables that can be listened to with ResourceListener which will ...
Definition Resource.h:42
Logic for reading or writing to a string or a user friendly, TranslatedString.
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Stores the options, added to the user settings, that control Widgets and low level UI options in the ...
WidgetMode
The UI layout mode, determining size and workflow optimizations.
@ e_desktop
UI layout, size, and workflow optimized for traditional desktop computers.
@ e_mobile
UI layout, size, and workflow optimized for mobile phones.
@ e_size
The number of widget modes; used for sizing arrays.
@ e_tablet
UI layout, size, and workflow optimized for tablets.
static ApplicationOption< fltp08 > ui_scale
Scale factor for all UI components except font.
static bool IsFieldMode()
Returns whether the UI should be optimized for field work.
static ApplicationOption< fltp08 > font_scale
Scale factor for all font within the UI.
static ApplicationOption< fltp04 > keypad_size_multiply
Size multiplier for the internal keypad.
static std::function< void(QWidget *widget, const PopupInfo &info)> hide_widget_function
The function called to hide a widget (used by QTTools::HideDialog).
static Resource< fltp08 > animation_quality
Render quality for animations (0.0-1.0). Lower = faster, higher = crisper.
static ApplicationOption< bool > global_allow_docking
Whether the user can manually dock and undock widgets.
static ApplicationOption< fltp08 > animation_scale
Speed multiplier for UI animations. 0 = no animations. Higher = slower.
static void ResetOptionsToDefaults()
Resets all widget options to their default values.
static bool IsTouchOptimized()
Returns whether the UI should be optimized for finger presses.
static ApplicationOption< bool > field_mode_fullscreen
Whether to show the main window fullscreen in field mode.
static ApplicationOption< fltp04 > keyboard_size_multiply
Size multiplier for the internal keyboard.
static Resource< LogPtr > ui_log
The default log for all UI events.
static ApplicationOption< bool > use_keypad_in_touch
Whether to use an internal keypad for value entry in touch mode.
static KeyEvent::KEY unhandled_key
The key event sent when the OS sends an unrecognized key.
static WidgetMode DefaultSystemWidgetMode()
Returns the default widget mode based on screen resolution and OS touch mode.
static Resource< QWidget * > new_window_parent
The default parent widget for all new dialogs.
static ApplicationOption< uint04 > default_decimal_places
The default number of decimal places used by the application.
static std::function< void(bool relaunch, const PopupInfo &info)> request_exit_function
The function called when the application requests an exit.
static void SetFieldMode(bool field_mode)
Sets whether the UI should be in field mode for the current widget mode.
static std::function< bool(QWidget *widget, const PopupInfo &start, const PopupInfo &end)> show_widget_function
The function called to show a widget (used by QTTools::ShowDialog).
static TranslatedString options_label
The category label in user settings for widget options.
static ApplicationOption< Vector< WidgetMode::e_size, bool > > field_mode
Per-mode flags for whether field mode is active.
static ApplicationOption< bool > allow_windowable_windows
Whether the user can window fullscreen views.
static ApplicationOption< WidgetMode > widget_mode
The current application widget mode.
The primary namespace for the NDEVR SDK.
Class which is used to pass arguments and requests for creating a popup dialog or widget.
Definition PopupInfo.h:16