VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
makVrv::DtApplicationSettingsManager Class Reference

Application Settings Manager Settings associated with the application that don't merit an additional settings file (one offs, primarily) More...

Inheritance diagram for makVrv::DtApplicationSettingsManager:
Inheritance graph
[legend]

Public Member Functions

virtual ~DtApplicationSettingsManager ()
 DTOR. More...
 
virtual void setShowQuitDialogOnClose (bool show)
 Set whether or not to show the quit dialog on close. More...
 
virtual bool showQuitDialogOnClose () const
 Get whether ot not to show the quit dialog on close. More...
 
Setters/getters for settings
virtual void setViewControlEnabled (bool val)
 
virtual bool viewControlEnabled () const
 
virtual void setScreenCaptureFilePath (const DtUnicode &filePath)
 
virtual const DtUnicodescreenCaptureFilePath () const
 
virtual void setMouseHideEnabled (bool enabled)
 Set whether the mouse should be hidden when it hasn't moved for a specified period of time (default 3 seconds) More...
 
virtual bool mouseHideEnabled () const
 Set whether the mouse should be hidden when it hasn't moved for a specified period of time. More...
 
virtual void setMouseHideTime (float hideTime)
 If mouse hide is enabled, set the amount of time to wait for absence of mouse motion. More...
 
virtual float mouseHideTime () const
 Set the amount of time to wait for absence of mouse motion. More...
 
Setting Persistence Methods
void setFromRecord (const DtApplicationSettingsRecord &rec)
 Set the current settings' state from the given record. More...
 
void getRecord (DtApplicationSettingsRecord &rec) const
 Store the current settings' state in the given record. More...
 
- Public Member Functions inherited from makVrv::DtBaseSettingsManager< DtApplicationSettingsRecord >
 DtBaseSettingsManager (DtDe &de, const std::string &name, const std::string &displayName, const std::string &ext)
 CTOR. More...
 
virtual ~DtBaseSettingsManager ()
 Virtual DTOR. More...
 
virtual void initializeBackup ()
 Creates a backup of the settings' current state. More...
 
virtual void setFromRecord (const DtApplicationSettingsRecord &record)=0
 Set the current settings' state from the given record (abstract). More...
 
virtual void getRecord (DtApplicationSettingsRecord &record) const =0
 Store the current settings' state in the given record (abstract). More...
 
- Public Member Functions inherited from makVrv::DtCommonBaseSettingsManager< DtApplicationSettingsRecord >
 DtCommonBaseSettingsManager (DtDe &de, const std::string &name, const std::string &displayName, const std::string &ext)
 CTOR The name, displayName, and extension parameters are used for creating the settings object (DtDeSettings) and backup, and for constructing the filename when readin/writing the records to disk. More...
 
virtual ~DtCommonBaseSettingsManager ()
 Virtual DTOR. More...
 
virtual void autoSaveIfNecessary ()
 Saves the current settings as defaults if autosave is enabled. More...
 
virtual void setAutoSave (bool doit)
 Sets whether autosave is enabled for the settings manager. More...
 
virtual bool autoSave () const
 Gets whether autosave is enabled for the settings manager. More...
 
virtual void setUseDefaultSettingsRecord (bool useit)
 Sets whether setting initialization should check for a default record. More...
 
virtual bool useDefaultSettingsRecord () const
 Gets whether setting initialization should check for a default record. More...
 
virtual DtDeSettingssettings ()
 Accessor for the manager's DtDeSettings object. More...
 
virtual const DtDeSettingssettings () const
 Accessor for the manager's DtDeSettings object (const). More...
 
virtual DtSettingsBackupsettingsBackup ()
 Accessor for the manager's settings backup. More...
 
virtual const DtSettingsBackupsettingsBackup () const
 Accessor for the manager's settings backup (const). More...
 
virtual void loadDefaults ()
 Initializes the settings and creates a backup. More...
 
virtual void saveDefaultSettings ()
 Saves the current settings' state as the default (on disk). More...
 
virtual void loadDefaultSettings (bool loadOnlyFactorySettings)
 Loads the default settings from disk. More...
 
virtual void importSettings (const std::string &filePath)
 Load the settings' state from the given file. More...
 
virtual void exportSettings (const std::string &filePath) const
 Save the current settings' state to the given file. More...
 
virtual void getSplitRecord (std::vector< DtApplicationSettingsRecord > &rec, std::vector< std::string > &fileNames)
 For directory support, split the main record into different sub-records and give them each a file name. More...
 
virtual void addRecords (DtApplicationSettingsRecord &rec, DtApplicationSettingsRecord &combinedRec)
 For directory support, when reading in a directory, add the records from each file to the combined record. More...
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor. More...
 
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor. More...
 

Static Public Member Functions

static
DtApplicationSettingsManager
instance (DtDe &de)
 Get an instance of the settings manager. More...
 

Public Attributes

Boost signals for changed settings
boost::signal< void(bool)> signal_viewControlEnabledSet
 
boost::signal< void(DtUnicode)> signal_screenCaptureFilePathChanged
 
boost::signal< void(bool)> signal_mouseHideEnabledChanged
 
boost::signal< void(float)> signal_mouseHideTimeChanged
 
boost::signal< void(bool)> signal_showQuitDialogOnCloseChanged
 

Protected Member Functions

 DtApplicationSettingsManager (DtDe &)
 CTOR. More...
 

Protected Attributes

bool myViewControlEnabled
 
DtUnicode myScreenCaptureFilePath
 
bool myMouseHideEnabled
 
float myMouseHideTime
 
bool myShowQuitDialogOnClose
 
- Protected Attributes inherited from makVrv::DtCommonBaseSettingsManager< DtApplicationSettingsRecord >
DtSignalConnectionManager myConnections
 
std::string myName
 
std::string myExtension
 
std::string myDisplayName
 
bool myUseDefaultSettingsRecordFlag
 
bool myAutoSaveFlag
 
DtSettingsBackupmySettingsBackup
 
DtDemyDe
 

Friends

template<typename ManagerClass >
ManagerClass & defaultManagerInstanceFunction (DtDe &, bool)
 Befriend the manager instance functions for instance retreival/creation. More...
 
template<typename ManagerClass >
void defaultManagerRegisterInstanceFunction (DtDe &, ManagerClass *)
 Befriend the manager instance functions for instance retreival/creation. More...
 

Additional Inherited Members

- Protected Types inherited from makVrv::DtBaseSettingsManager< DtApplicationSettingsRecord >
typedef DtRecordSettingsBackup
< DtBaseSettingsManager
< DtApplicationSettingsRecord >
, DtApplicationSettingsRecord > 
RecordBackupType
 

Detailed Description

Application Settings Manager Settings associated with the application that don't merit an additional settings file (one offs, primarily)

Constructor & Destructor Documentation

virtual makVrv::DtApplicationSettingsManager::~DtApplicationSettingsManager ( )
virtual

DTOR.

makVrv::DtApplicationSettingsManager::DtApplicationSettingsManager ( DtDe )
protected

CTOR.

Member Function Documentation

static DtApplicationSettingsManager& makVrv::DtApplicationSettingsManager::instance ( DtDe de)
static

Get an instance of the settings manager.

virtual void makVrv::DtApplicationSettingsManager::setViewControlEnabled ( bool  val)
virtual
virtual bool makVrv::DtApplicationSettingsManager::viewControlEnabled ( ) const
virtual
virtual void makVrv::DtApplicationSettingsManager::setScreenCaptureFilePath ( const DtUnicode filePath)
virtual
virtual const DtUnicode& makVrv::DtApplicationSettingsManager::screenCaptureFilePath ( ) const
virtual
virtual void makVrv::DtApplicationSettingsManager::setMouseHideEnabled ( bool  enabled)
virtual

Set whether the mouse should be hidden when it hasn't moved for a specified period of time (default 3 seconds)

virtual bool makVrv::DtApplicationSettingsManager::mouseHideEnabled ( ) const
virtual

Set whether the mouse should be hidden when it hasn't moved for a specified period of time.

virtual void makVrv::DtApplicationSettingsManager::setMouseHideTime ( float  hideTime)
virtual

If mouse hide is enabled, set the amount of time to wait for absence of mouse motion.

virtual float makVrv::DtApplicationSettingsManager::mouseHideTime ( ) const
virtual

Set the amount of time to wait for absence of mouse motion.

virtual void makVrv::DtApplicationSettingsManager::setShowQuitDialogOnClose ( bool  show)
virtual

Set whether or not to show the quit dialog on close.

virtual bool makVrv::DtApplicationSettingsManager::showQuitDialogOnClose ( ) const
virtual

Get whether ot not to show the quit dialog on close.

void makVrv::DtApplicationSettingsManager::setFromRecord ( const DtApplicationSettingsRecord rec)

Set the current settings' state from the given record.

void makVrv::DtApplicationSettingsManager::getRecord ( DtApplicationSettingsRecord rec) const

Store the current settings' state in the given record.

Friends And Related Function Documentation

template<typename ManagerClass >
ManagerClass& defaultManagerInstanceFunction ( DtDe de,
bool  allowedInSlave 
)
friend

Befriend the manager instance functions for instance retreival/creation.

Befriend the manager instance functions for instance retrieval/creation.

Manager requirements: 1) Static instance function 2) Protected DtSignalConnectionManager named myConnections. 3) Member functioned called loadDefaults which takes no arguments. and loads the default settings of the manager or factory from disk. 4) define defaultManagerInstanceFunction as friend. 5) define defaultManagerRegisterInstanceFunction as friend (see below). 5) Protected Constructor which only takes a DtDe reference.

* class Manager
* {
* public:
* static Manager& instance(DtDe& de);
* void loadDefaults();
* protected:
* template <typename ManagerClass>
* friend ManagerClass& defaultManagerInstanceFunction(DtDe& de, bool);
* template <typename ManagerClass>
* friend void defaultManagerRegisterInstanceFunction(DtDe& de, ManagerClass* mgr)
* Manager(DtDe&);
* DtSignalConnectionManager myConnections;
* };
*

Then simply in the implementation of instance call defaultManagerInstanceFunction with the de object and return the return value.

* Manager& Manager::instance(DtDe& de)
* {
* return defaultManagerInstanceFunction<Manager>(de);
* }
*
template<typename ManagerClass >
void defaultManagerRegisterInstanceFunction ( DtDe de,
ManagerClass *  mgr 
)
friend

Befriend the manager instance functions for instance retreival/creation.

Befriend the manager instance functions for instance retrieval/creation.

* static void Manager::registerInstance(DtDe& de, Manager* mgr)
* {
* }
* ...else where call.
* // Assuming class NewManager : public Manager
* Manager::registerInstance(de,new NewManager(de));
*

Member Data Documentation

boost::signal<void ( bool )> makVrv::DtApplicationSettingsManager::signal_viewControlEnabledSet
boost::signal<void(DtUnicode)> makVrv::DtApplicationSettingsManager::signal_screenCaptureFilePathChanged
boost::signal<void(bool)> makVrv::DtApplicationSettingsManager::signal_mouseHideEnabledChanged
boost::signal<void(float)> makVrv::DtApplicationSettingsManager::signal_mouseHideTimeChanged
boost::signal<void(bool)> makVrv::DtApplicationSettingsManager::signal_showQuitDialogOnCloseChanged
bool makVrv::DtApplicationSettingsManager::myViewControlEnabled
protected
DtUnicode makVrv::DtApplicationSettingsManager::myScreenCaptureFilePath
protected
bool makVrv::DtApplicationSettingsManager::myMouseHideEnabled
protected
float makVrv::DtApplicationSettingsManager::myMouseHideTime
protected
bool makVrv::DtApplicationSettingsManager::myShowQuitDialogOnClose
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)