NDEVR
API Documentation
SettingsDialog.h
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: NDEVR
28File: SettingsDialog
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/Dictionary.h>
35#include <QWidget>
36namespace Ui
37{
38 class SettingsUI;
39}
40namespace NDEVR
41{
44 class QTModelManager;
45 class UnitsDialog;
46 class MouseController;
48 class ModelFileDialog;
50 class WindowManager;
51 class LanguageEditor;
52 class RibbonSubGroup;
53 class Button;
55 class KeystrokeWidget;
56 class ModulesDialog;
61 class NDEVR_API SettingsDialog : public QWidget
62 {
63 Q_OBJECT
64 public:
71 SettingsDialog(WindowManager* window_manager, QTModelManager* model_manager, QWidget* parent = nullptr);
72 virtual ~SettingsDialog();
81 void addSettingsMenu(QWidget* menu, std::function<void()> reset_to_defaults, uint04 location = 1);
86 void removeSettingsMenu(QWidget* menu);
87 protected:
93 void setupUITab();
116 bool event(QEvent* event) override;
123 signals:
125 protected slots:
128 protected:
131 protected:
132 Ui::SettingsUI* ui;
146 Dictionary<QWidget*, std::function<void()>> m_reset_to_default_settings;
147 bool m_shown_to_user = false;
148 };
149}
A core widget that allows the user to click one of many button types.
Definition Button.h:68
A hash-based key-value store, useful for quick associative lookups.
Definition Dictionary.h:64
Allows the user to adjust default folders or whether or not the software uses project folders or proj...
A dialog designed to allow the user to navigate a filesytem and select or create one or more files or...
Allows the user to assign a keystroke to an action by displaying a button with the current keystroke ...
Allows the user to adjust translation values for a given language.
Shows options related to an import or export that utilizes the IOFactory methods to write or read pro...
Allows the user to see which Modules are available and toggle them on or off, when Modules are toggle...
Contains logic for executing actions based on user mouse inputs.
Allows the end user to set default mouse buttons and behavior for navigating in a Viewport.
Settings for saving or displaying camera data.
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...
Definition QTTools.h:493
Represents a sub-section of "Tab" of a ribbon representing a grouping of buttons or widgets within a ...
LanguageEditor * m_language_editor
The language selection editor.
void createBackground()
Creates the background visual for the settings dialog.
FileAndFolderSettingsDialog * m_file_and_folder_settings
The file and folder settings dialog.
void prepareToShow()
Prepares the dialog for display, refreshing all tab contents.
void retranslate()
Retranslates all UI strings for the current language.
void removeSettingsMenu(QWidget *menu)
Removes a previously added settings menu tab.
RibbonSubGroup * m_export_settings_ribbon_group
Ribbon group for export settings.
bool m_shown_to_user
Whether the dialog has been shown at least once.
void setupMouseSettingsTab()
Sets up the mouse settings tab.
ModelFileDialog * m_export_settings_dialog
The export settings file dialog.
void setupStationTab()
Sets up the station settings tab.
void resetGeneralToDefaults()
Resets general settings to their default values.
WindowManager * m_window_manager
The window manager.
void updateExportSettingsRibbon()
Updates the export settings ribbon to reflect current state.
void updateTabLocation()
Updates the tab position and orientation in the dialog.
ModulesDialog * m_modules_dialog
The modules management dialog.
SettingsDialog(WindowManager *window_manager, QTModelManager *model_manager, QWidget *parent=nullptr)
Constructs the main settings dialog.
MouseEditorWidget * m_mouse_editor
The mouse settings editor.
void addSettingsMenu(QWidget *menu, std::function< void()> reset_to_defaults, uint04 location=1)
Adds a custom settings menu tab to the dialog.
void setupFolderTab()
Sets up the file and folder settings tab.
void settingsAcceptedSignal()
Emitted when the user accepts the settings.
void setupMainTab()
Sets up the main (general) settings tab.
Dictionary< QWidget *, std::function< void()> > m_reset_to_default_settings
Map of tabs to their reset callbacks.
void releaseTypesChangedSlot()
Handles changes to the release type selection.
QTResourceListener * m_camera_background_listener
Listener for camera background changes.
UnitsDialog * m_units_dialog
The units configuration dialog.
Ui::SettingsUI * ui
The UI form for the settings dialog.
void updateLayout()
Updates the layout of all tabs after changes.
KeystrokeWidget * m_keystroke_widget
The keystroke configuration widget.
ModelFileDialog * m_import_settings_dialog
The import settings file dialog.
void setupKeystrokeTab()
Sets up the keystroke settings tab.
RibbonSubGroup * m_import_settings_ribbon_group
Ribbon group for import settings.
QTModelManager * m_model_manager
The model manager.
void setupExportTab()
Sets up the export settings tab.
void resetUIToDefaults()
Resets UI settings to their default values.
void setupUnitsTab()
Sets up the units settings tab.
void setupImportTab()
Sets up the import settings tab.
void setupGraphicsTab()
Sets up the graphics settings tab.
void setupUITab()
Sets up the user interface settings tab.
void updateImportSettingsRibbon()
Updates the import settings ribbon to reflect current state.
A dialog which can be used to set various units for different unit categories, such as selecting the ...
Definition UnitsDialog.h:54
Manages all windows and logic surrounding dialogs and views for displaying and managing any environme...
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...