NDEVR
API Documentation
AutoModelFileDialog

Dialog that allows user to choose import or export options while simultaneously automatically writing or reading the file in the background such that the user might already have the data when finished. More...

Inheritance diagram for AutoModelFileDialog:
[legend]
Collaboration diagram for AutoModelFileDialog:
[legend]

Public Member Functions

 AutoModelFileDialog (bool is_import, InfoPipe *log, QWidget *parent=nullptr)
 Constructs the AutoModelFileDialog.
virtual void beginProcess ()
 Begins the import or export process using the current settings.
virtual void filterModelsToExport ()
 Filters the model list to show only those appropriate for export.
Buffer< UUIDIDs () const
 Returns the UUIDs of the models currently selected in the dialog.
void loaded ()
 Emitted when the file has been successfully loaded or saved.
virtual void reset ()
 Resets the dialog to its initial state.
void selectAllVisible ()
 Selects all visible models in the selection tree.
void selectDefaultToExport ()
 Selects the default set of models for export.
void setIsValid (bool is_valid)
 Sets whether the current dialog configuration is valid for processing.
void setPositionOnEnd (bool position_on_end)
 Sets whether the camera should reposition to the imported data on completion.
virtual void setRequests (const Buffer< FactoryParameters > &file)
 Sets the file requests to be processed, starting background I/O if possible.
virtual void setUUIDs (Buffer< UUID > models)
 Sets the UUIDs of models available for selection in the dialog.
QSize sizeHint () const override
 Returns the recommended size for this dialog.
virtual void updateOptions (FactoryOptions &new_options) override
 Updates the given factory options with the current dialog settings.
Public Member Functions inherited from ModelFileDialog
 ModelFileDialog (bool is_import, InfoPipe *log, QWidget *parent=0)
 Constructs the model file dialog for import or export settings.
bool canResetOptions () const
 Returns whether the options can be reset to factory defaults.
bool canRevertOptions () const
 Returns whether the options can be reverted to saved defaults.
void closeEvent (QCloseEvent *) override
 Handles the close event, treating it as a cancellation if not already accepted or canceled.
void dialogEnded (bool accepted)
 Emitted when the dialog is closed, indicating acceptance or cancellation.
FactoryOptions::IncludeProperties getGenerationPrecision () const
 Returns the generation precision setting from the current options.
FactoryOptions::IncludeProperties getReadPrecision () const
 Returns the read precision setting from the current options.
File iniFile () const
 Returns the INI settings file for the current format.
virtual void isOptionMode (bool is_options_mode)
 Switches the dialog between options-only mode and full import/export mode.
void ModelLoaded (const Scene *object)
 Emitted when a model has been loaded from the import.
FactoryOptions options () const
 Returns the current factory options.
void postUpdateUIRequest ()
 Posts a deferred request to update the UI on the next event loop cycle.
virtual void setFeatures (const FactoryFeatures &features)
 Sets the factory features and updates the UI accordingly.
void setFormat (const FactoryParameters &format)
 Sets the file format and parameters for this dialog.
void setWindingCalculation (WindingMode winding)
 Sets the winding calculation mode for mesh imports.
bool shouldShow () const
 Returns whether this dialog has settings that warrant showing it to the user.
virtual void updateFeatures ()
 Updates the UI to reflect the current factory feature set.
virtual void updateUINow ()
 Immediately updates the UI to reflect the current options state.

Protected Attributes

CachedFactoryIOThread m_factory_thread
 The background thread managing cached file I/O.
Buffer< FactoryParametersm_files
 The file parameters for the current operation.
ModelSelectionTreem_selection_tree
 The tree widget for selecting models to import or export.
bool m_show_error_dialog
 Whether to display an error dialog on failure.
Protected Attributes inherited from ModelFileDialog
bool m_accepted
 Whether the dialog was accepted.
bool m_canceled
 Whether the dialog was canceled.
FactoryOptions m_default_options
 The default factory options for comparison.
UnitManager m_file_units
 The unit manager for file unit conversions.
Buffer< GenericOptionsGroup * > m_generic_options_widgets
 Widgets for format-specific generic options.
bool m_has_settings_change
 Whether settings have been modified from defaults.
File m_ini_file
 The INI file path for persisting options.
const bool m_is_import
 Whether this dialog is for importing (true) or exporting (false).
InfoPipem_log
 The logging pipe for status messages.
FactoryParameters m_params
 The current factory parameters including format and options.
bool m_ui_dirty = false
 Whether the UI needs to be refreshed.
Ui::ImportSettings * ui
 The auto-generated UI form.

Private Member Functions

virtual void onAccepted () override
 Called when the user accepts the dialog, finalizing the operation.
virtual void onCancelled () override
 Called when the user cancels the dialog, aborting any active operation.

Additional Inherited Members

Static Public Member Functions inherited from ModelFileDialog
static File INISettingsFolder (bool is_import)
 Returns the folder where INI settings files are stored.
static void ResetAllExportOptionsToDefaults ()
 Resets all export options for all formats to factory defaults.
static void ResetAllImportOptionsToDefaults ()
 Resets all import options for all formats to factory defaults.
Protected Member Functions inherited from ModelFileDialog
const FactoryOptionsdefaultOptions ()
 Returns the default factory options for the current format.
void revertOptionsToFactoryDefault ()
 Reverts the current options to the original factory defaults.
void saveOptionsAsDefault ()
 Saves the current options as the default for this file format.
void setOptionsToDefault ()
 Resets the current options to the saved defaults.
void setShowOnEachImport ()
 Toggles whether the options dialog is shown on each import.

Detailed Description

Dialog that allows user to choose import or export options while simultaneously automatically writing or reading the file in the background such that the user might already have the data when finished.


Definition at line 48 of file AutoModelFileDialog.h.

Constructor & Destructor Documentation

◆ AutoModelFileDialog()

AutoModelFileDialog::AutoModelFileDialog ( bool is_import,
InfoPipe * log,
QWidget * parent = nullptr )

Constructs the AutoModelFileDialog.

Parameters
[in]is_importTrue for import mode, false for export mode.
[in]logThe info pipe for logging messages during the operation.
[in]parentThe optional parent widget.

References AutoModelFileDialog().

Referenced by AutoModelFileDialog().

Member Function Documentation

◆ IDs()

Buffer< UUID > AutoModelFileDialog::IDs ( ) const

Returns the UUIDs of the models currently selected in the dialog.

Returns
A buffer of selected model UUIDs.

◆ setIsValid()

void AutoModelFileDialog::setIsValid ( bool is_valid)

Sets whether the current dialog configuration is valid for processing.

Parameters
[in]is_validTrue if the configuration is valid.

◆ setPositionOnEnd()

void AutoModelFileDialog::setPositionOnEnd ( bool position_on_end)

Sets whether the camera should reposition to the imported data on completion.

Parameters
[in]position_on_endTrue to reposition the view after import.

◆ setRequests()

virtual void AutoModelFileDialog::setRequests ( const Buffer< FactoryParameters > & file)
virtual

Sets the file requests to be processed, starting background I/O if possible.

Parameters
[in]fileThe buffer of factory parameters describing the files.

Reimplemented in AsciiModelFileDialog.

◆ setUUIDs()

virtual void AutoModelFileDialog::setUUIDs ( Buffer< UUID > models)
virtual

Sets the UUIDs of models available for selection in the dialog.

Parameters
[in]modelsThe buffer of model UUIDs.

Reimplemented in AsciiModelFileDialog.

◆ sizeHint()

QSize AutoModelFileDialog::sizeHint ( ) const
override

Returns the recommended size for this dialog.

Returns
The preferred size hint.

◆ updateOptions()

virtual void AutoModelFileDialog::updateOptions ( FactoryOptions & new_options)
overridevirtual

Updates the given factory options with the current dialog settings.

Parameters
[in]new_optionsThe factory options to update.

Reimplemented from ModelFileDialog.

Reimplemented in AsciiModelFileDialog.


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