NDEVR
API Documentation
WidgetOptions

Stores the options, added to the user settings, that control Widgets and low level UI options in the application. More...

Collaboration diagram for WidgetOptions:
[legend]

Public Types

enum  WidgetMode { e_desktop , e_tablet , e_mobile , e_size }
 The UI layout mode, determining size and workflow optimizations. More...

Static Public Member Functions

static WidgetMode DefaultSystemWidgetMode ()
 Returns the default widget mode based on screen resolution and OS touch mode.
static bool IsFieldMode ()
 Returns whether the UI should be optimized for field work.
static bool IsTouchOptimized ()
 Returns whether the UI should be optimized for finger presses.
static void ResetOptionsToDefaults ()
 Resets all widget options to their default values.
static void SetFieldMode (bool field_mode)
 Sets whether the UI should be in field mode for the current widget mode.

Static Public Attributes

static ApplicationOption< bool > allow_windowable_windows
 Whether the user can window fullscreen views.
static Resource< fltp08animation_quality
 Render quality for animations (0.0-1.0). Lower = faster, higher = crisper.
static ApplicationOption< fltp08animation_scale
 Speed multiplier for UI animations. 0 = no animations. Higher = slower.
static ApplicationOption< uint04default_decimal_places
 The default number of decimal places used by the application.
static ApplicationOption< Vector< WidgetMode::e_size, bool > > field_mode
 Per-mode flags for whether field mode is active.
static ApplicationOption< bool > field_mode_fullscreen
 Whether to show the main window fullscreen in field mode.
static ApplicationOption< fltp08font_scale
 Scale factor for all font within the UI.
static ApplicationOption< bool > global_allow_docking
 Whether the user can manually dock and undock widgets.
static std::function< void(QWidget *widget, const PopupInfo &info)> hide_widget_function
 The function called to hide a widget (used by QTTools::HideDialog).
static ApplicationOption< fltp04keyboard_size_multiply
 Size multiplier for the internal keyboard.
static ApplicationOption< fltp04keypad_size_multiply
 Size multiplier for the internal keypad.
static Resource< QWidget * > new_window_parent
 The default parent widget for all new dialogs.
static TranslatedString options_label
 The category label in user settings for widget options.
static std::function< void(bool relaunch, const PopupInfo &info)> request_exit_function
 The function called when the application requests an exit.
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 Resource< LogPtrui_log
 The default log for all UI events.
static ApplicationOption< fltp08ui_scale
 Scale factor for all UI components except font.
static KeyEvent::KEY unhandled_key
 The key event sent when the OS sends an unrecognized key.
static ApplicationOption< bool > use_keypad_in_touch
 Whether to use an internal keypad for value entry in touch mode.
static ApplicationOption< WidgetModewidget_mode
 The current application widget mode.

Detailed Description

Stores the options, added to the user settings, that control Widgets and low level UI options in the application.


All options retained across application restart

Definition at line 14 of file WidgetOptions.h.

Member Enumeration Documentation

◆ WidgetMode

The UI layout mode, determining size and workflow optimizations.

Enumerator
e_desktop 

UI layout, size, and workflow optimized for traditional desktop computers.

e_tablet 

UI layout, size, and workflow optimized for tablets.

e_mobile 

UI layout, size, and workflow optimized for mobile phones.

e_size 

The number of widget modes; used for sizing arrays.

Definition at line 18 of file WidgetOptions.h.

Member Function Documentation

◆ DefaultSystemWidgetMode()

WidgetMode WidgetOptions::DefaultSystemWidgetMode ( )
static

Returns the default widget mode based on screen resolution and OS touch mode.

Returns
The recommended WidgetMode for the current system.

◆ IsFieldMode()

bool WidgetOptions::IsFieldMode ( )
static

Returns whether the UI should be optimized for field work.

Returns
True if field mode is active for the current widget mode.

◆ IsTouchOptimized()

bool WidgetOptions::IsTouchOptimized ( )
static

Returns whether the UI should be optimized for finger presses.

Returns
True if the current mode is touch-optimized.

◆ SetFieldMode()

void WidgetOptions::SetFieldMode ( bool field_mode)
static

Sets whether the UI should be in field mode for the current widget mode.

Parameters
[in]field_modeWhether to enable field mode.

References field_mode.


The documentation for this class was generated from the following file: