Tome
A generic data editor for games supporting arbitrary input and output formats.
Public Member Functions | List of all members
Tome::SettingsController Class Reference

Controller for accessing user settings. More...

#include <settingscontroller.h>

Public Member Functions

 SettingsController ()
 Constructs a new controller for accessing user settings.
 
void addRecentProject (const QString &path)
 Adds the specified full project path to the list of recent projects. More...
 
const QStringList getRecentProjects () const
 Gets a list of full paths to recently opened projects. More...
 
bool getRunIntegrityChecksOnLoad () const
 Gets whether to run all integrity checks after opening a project. More...
 
bool getRunIntegrityChecksOnSave () const
 Gets whether to run all integrity checks after saving a project. More...
 
bool getShowComponentNamesInRecordTable () const
 Gets whether to show the names of the respective component in front of the field name in the record table. More...
 
bool getShowDescriptionColumnInsteadOfFieldTooltips () const
 Gets whether to show an additional column with the description of all record fields in the record table. More...
 
bool getExpandRecordTreeOnRefresh () const
 Gets whether to expand all nodes of the record tree every time after it has changed. More...
 
const QString getLastProjectPath () const
 Gets the full path to the most recently opened project. More...
 
void removeRecentProject (const QString &path)
 Removes the specified full project path from the list of recent projects. More...
 
void setRecentProjects (const QStringList &recentProjects)
 Sets the list of full paths to recently opened projects. More...
 
void setRunIntegrityChecksOnLoad (bool runIntegrityChecksOnLoad)
 Sets whether to run all integrity checks after opening a project, or not. More...
 
void setRunIntegrityChecksOnSave (bool runIntegrityChecksOnSave)
 Sets whether to run all integrity checks after saving a project, or not. More...
 
void setShowComponentNamesInRecordTable (bool showComponentNamesInRecordTable)
 Sets whether to show the names of the respective component in front of the field name in the record table. More...
 
void setShowDescriptionColumnInsteadOfFieldTooltips (bool showDescriptionColumnInsteadOfFieldTooltips)
 Sets whether to show an additional column with the description of all record fields in the record table, or to show tooltips instead. More...
 
void setExpandRecordTreeOnRefresh (bool expandRecordTreeOnRefresh)
 Sets whether to expand all nodes of the record tree every time after it has changed, or not. More...
 
void setLastProjectPath (const QString &path)
 Sets the full path to the most recently opened project. More...
 

Detailed Description

Controller for accessing user settings.

Member Function Documentation

◆ addRecentProject()

void SettingsController::addRecentProject ( const QString &  path)

Adds the specified full project path to the list of recent projects.

Parameters
pathPath of the project to add.

◆ getExpandRecordTreeOnRefresh()

bool SettingsController::getExpandRecordTreeOnRefresh ( ) const

Gets whether to expand all nodes of the record tree every time after it has changed.

Returns
Whether to expand all nodes of the record tree every time after it has changed, or not.

◆ getLastProjectPath()

const QString SettingsController::getLastProjectPath ( ) const

Gets the full path to the most recently opened project.

Returns
Full path of the most recently opened project.

◆ getRecentProjects()

const QStringList SettingsController::getRecentProjects ( ) const

Gets a list of full paths to recently opened projects.

Returns
List of full paths to recently opened projects.

◆ getRunIntegrityChecksOnLoad()

bool SettingsController::getRunIntegrityChecksOnLoad ( ) const

Gets whether to run all integrity checks after opening a project.

Returns
Whether to run all integrity checks after opening a project, or not.

◆ getRunIntegrityChecksOnSave()

bool SettingsController::getRunIntegrityChecksOnSave ( ) const

Gets whether to run all integrity checks after saving a project.

Returns
Whether to run all integrity checks after saving a project, or not.

◆ getShowComponentNamesInRecordTable()

bool SettingsController::getShowComponentNamesInRecordTable ( ) const

Gets whether to show the names of the respective component in front of the field name in the record table.

Returns
Whether to show the names of the respective component in front of the field name in the record table, or not.

◆ getShowDescriptionColumnInsteadOfFieldTooltips()

bool SettingsController::getShowDescriptionColumnInsteadOfFieldTooltips ( ) const

Gets whether to show an additional column with the description of all record fields in the record table.

Returns
true, if showing the description of all record fields in an additional column in the record table, and false if showing tooltips instead.

◆ removeRecentProject()

void SettingsController::removeRecentProject ( const QString &  path)

Removes the specified full project path from the list of recent projects.

Parameters
pathPath of the project to remove.

◆ setExpandRecordTreeOnRefresh()

void SettingsController::setExpandRecordTreeOnRefresh ( bool  expandRecordTreeOnRefresh)

Sets whether to expand all nodes of the record tree every time after it has changed, or not.

Parameters
expandRecordTreeOnRefreshWhether to expand all nodes of the record tree every time after it has changed.

◆ setLastProjectPath()

void SettingsController::setLastProjectPath ( const QString &  path)

Sets the full path to the most recently opened project.

Parameters
pathFull path to the most recently opened project.

◆ setRecentProjects()

void SettingsController::setRecentProjects ( const QStringList &  recentProjects)

Sets the list of full paths to recently opened projects.

Parameters
recentProjectsList of full paths to recently opened projects.

◆ setRunIntegrityChecksOnLoad()

void SettingsController::setRunIntegrityChecksOnLoad ( bool  runIntegrityChecksOnLoad)

Sets whether to run all integrity checks after opening a project, or not.

Parameters
runIntegrityChecksOnLoadWhether to run all integrity checks after opening a project.

◆ setRunIntegrityChecksOnSave()

void SettingsController::setRunIntegrityChecksOnSave ( bool  runIntegrityChecksOnSave)

Sets whether to run all integrity checks after saving a project, or not.

Parameters
runIntegrityChecksOnSaveWhether to run all integrity checks after saving a project.

◆ setShowComponentNamesInRecordTable()

void SettingsController::setShowComponentNamesInRecordTable ( bool  showComponentNamesInRecordTable)

Sets whether to show the names of the respective component in front of the field name in the record table.

Parameters
showComponentNamesInRecordTableWhether to show the names of the respective component in front of the field name in the record table.

◆ setShowDescriptionColumnInsteadOfFieldTooltips()

void SettingsController::setShowDescriptionColumnInsteadOfFieldTooltips ( bool  showDescriptionColumnInsteadOfFieldTooltips)

Sets whether to show an additional column with the description of all record fields in the record table, or to show tooltips instead.

Parameters
showDescriptionColumnInsteadOfFieldTooltipsWhether to show an additional column with the description of all record fields in the record table.

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