![]() |
VR-Forces 4.8 Class Documentation
|
The DtLayoutManager class allows for the managing (adding, setting and deleting) of UI Layout configurations. More...

Classes | |
| struct | Configuration |
Public Member Functions | |
| DtLayoutManager (makVrv::DtDe &de) | |
| virtual | ~DtLayoutManager () |
| virtual void | setLayout (const DtFilename &, bool updateCurrentLayoutBeforeSwitch=false) |
| Sets a new GUI layout from the given uisx layout file. More... | |
| virtual void | setLayoutFromClass (const DtString &, bool updateCurrentLayoutBeforeSwitch=false) |
| Sets a new GUI layout from the given class name. More... | |
| virtual DtString | layout () const |
| Currently selected layout. If blank is the default layout. The layout returned is the class name. More... | |
| virtual std::vector< DtString > | layouts () const |
| Returns a list of all the layouts available. More... | |
| virtual bool | hasFactoryDefault (const DtString &) const |
| Returns true if there is a file in the factory settings folder that matches the given class name's file. More... | |
| virtual void | restoreFromFactory (const DtString &) |
| Restores the layout settings from the factory file specified by the class name, if it exists. More... | |
| virtual bool | copyToFactory (const DtString &) |
| Copies the settings to the factory directory. Will overwrite existing. More... | |
| virtual void | revertCurrentLayout () |
| Reverts the current layout. More... | |
| virtual void | revertLayout (const DtString &) |
| Reverts the layout to the original layout (by class name) More... | |
| virtual DtString | classNameFrom (const DtFilename &f) const |
| Given the ui layout file, return the class name from it. More... | |
| virtual void | uiConfigurationFor (const DtFilename &, makVrv::DtVrvApplicationConfiguration::UIConfiguration &) |
| Returns the current configuration for the given uisx file. If does not exist will load it. More... | |
| virtual void | updateCurrentLayout () |
| Updates the current layout (toolbars and dock widgets) with the state of the pages. More... | |
| virtual void | updateLayout (const DtString &) |
| Updates the specified layout (className) with the current state of toolsbars and pages. More... | |
| virtual void | setIgnoreGeometryChange (bool b) |
| Sets whether or not to ignore geometry changes and leave the window as is regardless of what the layout wants. Default is false. More... | |
| virtual bool | ignoreGeometryChange () const |
| virtual void | resetLayoutFromMasterModeConfiguration () |
| Resets the layout to the current global master configuration. More... | |
| virtual void | setDefaultLayout (const DtString &) |
| Sets/gets the default layout. More... | |
| virtual void | clearDefaultLayout () |
| virtual DtString | defaultLayout () const |
| virtual bool | duplicateLayout (const DtString &classNameFrom, const DtString &classNameTo) |
| Duplicates the from layout from the specified class to the given class. More... | |
| virtual DtFilename | layoutFilename (const DtString &) const |
| Returns the filename associated with the layout class. More... | |
| virtual void | addConfiguration (const DtFilename &, const makVrv::DtVrvApplicationConfiguration::UIConfiguration &) |
| Creates a new configuration slot based on the supplied configuration and filename. More... | |
| virtual bool | hasLayout (const DtString &) const |
| Returns true if this layout exists. More... | |
| virtual void | addPageCollectionFromMaster (const DtString &) |
| Looks in the master mode configuration for the page collection, and, if present, adds to all page collections that is not currently in. More... | |
| virtual void | addToolbarFromMaster (const DtString &) |
| Looks in the master mode configuration for the toolbar, and, if present, adds to all toolbar collections that is not currently in. More... | |
| virtual void | setPanelVisible (const DtString &className, const DtString &panel, bool b) |
| Sets the page panel visible. More... | |
| virtual void | setToolbarVisible (const DtString &className, const DtString &toolbar, bool b) |
| Sets the toolbar visible. More... | |
| virtual void | setPaletteItemVisible (const std::string &, bool) |
| Sets whether or not the given palette item is visible. More... | |
| virtual bool | paletteItemVisible (const std::string &, bool *keyExists=0) const |
| virtual void | addPaletteItemIfDoesNotExistAndSetToVisible (const std::string &, bool b) |
| If this palette item is not present, add it and set its visiblity to the given flag. More... | |
| virtual void | newLayout (const DtString &, bool basedOnCurrent=true) |
| Creates a new layout based on the current UI configuration and makes it the current layout. More... | |
| virtual void | writeLayouts () |
| Saves all the layouts to their respective files (unless the flag to save layouts is turned off) More... | |
| virtual void | saveLayout (const DtString &) |
| Saves the specified layout class to the directory where it was read from. More... | |
| virtual bool | deleteLayout (const DtString &s) |
| Deletes the layout (class name) from disk and internal structures. More... | |
| virtual void | renameLayout (const DtString &oldName, const DtString &newName) |
| Renames the layout internally and on disk from the old to the new name. More... | |
| virtual void | setCurrentLayoutUsesFullScreen () |
| Sets/gets current configuration using full screen. More... | |
| virtual bool | currentLayoutUsesFullScreen () const |
| virtual void | setLayoutUsesFullScreen (const DtString &) |
| virtual bool | layoutUsesFullScreen (const DtString &) const |
| virtual void | setCurrentLayoutIsAlwaysMaximized () |
| Sets/gets current configuration using full screen. More... | |
| virtual bool | currentLayoutIsAlwaysMaximized () const |
| virtual void | setLayoutIsAlwaysMaximized (const DtString &) |
| virtual bool | layoutIsAlwaysMaximized (const DtString &) const |
| virtual void | setCurrentLayoutUsesWindowGeometry () |
| Gets/sets whether or not the layout, when updates, will store the current windows geometry. More... | |
| virtual bool | currentLayoutUsesWindowGeometry () const |
| virtual void | setLayoutUsesWindowGeometry (const DtString &) |
| virtual bool | layoutUsesWindowGeometry (const DtString &) const |
| virtual void | updateWithCurrentWindowGeometry (const DtString &) |
| If top, left, width and height are all 0 means this window is maximized. More... | |
| virtual void | setWindowGeometry (const DtString &, int top, int left, int width, int height) |
| virtual void | layoutWindowGeometry (const DtString &, int &top, int &left, int &width, int &height) const |
| virtual void | updateWindowWithGeometryFrom (const DtString &) |
| Updates the window with the geometry found in the class configuration. More... | |
| virtual void | initialize () |
| Called after the gui has been assembled. More... | |
| virtual void | setSaveLayouts (bool) |
| Sets whether or not layouts can be saved (default is true) More... | |
| bool | saveLayouts () const |
| virtual void | setSaveLastSavedLayout (bool) |
| Sets whether or not to save the last saved layout. This flag is checked before saving in the application. More... | |
| bool | saveLastSavedLayout () const |
| virtual void | addClassToIgnore (const DtString &) |
| Classes to ignore when initializing. More... | |
| virtual void | removeClassToIgnore (const DtString &) |
| const std::set< DtString > & | classesToIgnore () const |
| virtual bool | ignoreClass (const DtString &) const |
| virtual void | setLastSavedLayoutClassName (const DtString &) |
| Get/set the class name of the file used to save the GUI layout in the case of no default layout. More... | |
| virtual const DtString & | lastSavedLayoutClassName () const |
| virtual void | preAssemble () |
| Pre/post gui assembly. More... | |
| virtual void | postAssemble () |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. More... | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. More... | |
Static Public Member Functions | |
| static DtLayoutManager & | instance (makVrv::DtDe &) |
| Get an instance of the creator. More... | |
| static void | registerInstance (makVrv::DtDe &de, DtLayoutManager *instance) |
| Register an instance of the creator. More... | |
Public Attributes | |
| boost::signals2::signal< void(const DtString &newLayout, const DtString &oldLayout)> | signal_layoutSelected |
| Signal sent when a layout is selected. More... | |
| boost::signals2::signal< void(const DtString &)> | signal_layoutAdded |
| Signal sent when a layout is added. More... | |
| boost::signals2::signal< void(const DtString &)> | signal_layoutUpdated |
| Signal sent when a layout is updated. More... | |
| boost::signals2::signal< void(const DtString &)> | signal_layoutDeleted |
| Signal sent when a layout is removed. More... | |
| boost::signals2::signal< void(const DtString &newFav, const DtString &oldFav)> | signal_defaultChanged |
| Signal sent when a layout is made the default. More... | |
| boost::signals2::signal< void(const DtString &oldName, const DtString &newName)> | signal_layoutRenamed |
| Signal sent when a layout is renamed. More... | |
| boost::signals2::signal< void(const DtString &className, makVrv::DtVrvApplicationConfiguration::UIConfiguration &)> | signal_layoutToBeRealized |
| Signal sent before layout is to be realized. More... | |
Protected Types | |
| typedef std::map< DtString, std::pair< DtFilename, Configuration > > | Configurations |
| typedef std::map< std::string, bool > | PanelItems |
Protected Member Functions | |
| virtual void | updateToolbarStates (const makVrv::DtToolbarConfiguration &) |
| No-op at this level. More... | |
| virtual void | updatePageStates (const makVrv::DtPageConfiguration &) |
| virtual bool | addConfigurationFor (const DtFilename &, bool addAny=false) |
| Adds a new configuration for the given class name. More... | |
| virtual void | createLayoutBasedOnCurrentConfiguration (const DtString &, bool andUpdateLayout=true) |
| Creates a new layout based on the current configuration (does not signal addition nor make current – call newLayout for that) More... | |
Protected Attributes | |
| makVrv::DtDe & | myDe |
| DtFilename | myLayout |
| Configurations | myConfigurations |
| bool | mySaveLayouts |
| bool | mySaveLastSavedLayout |
| PanelItems | myPanelItems |
| std::set< DtString > | myClassesToIgnore |
| DtString | myLastSavedLayoutClassName |
| bool | myIgnoreGeometryChange |
Static Protected Attributes | |
| static DtString | theLayoutFilePrefix |
| Prefix used for the layout files on disk. Defaults to "layout_". More... | |
The DtLayoutManager class allows for the managing (adding, setting and deleting) of UI Layout configurations.
|
protected |
|
protected |
| makVrf::DtLayoutManager::DtLayoutManager | ( | makVrv::DtDe & | de | ) |
|
virtual |
|
static |
Get an instance of the creator.
|
static |
Register an instance of the creator.
|
virtual |
Sets a new GUI layout from the given uisx layout file.
|
virtual |
Sets a new GUI layout from the given class name.
|
virtual |
Currently selected layout. If blank is the default layout. The layout returned is the class name.
|
virtual |
Returns a list of all the layouts available.
Returns true if there is a file in the factory settings folder that matches the given class name's file.
|
virtual |
Restores the layout settings from the factory file specified by the class name, if it exists.
Copies the settings to the factory directory. Will overwrite existing.
|
virtual |
Reverts the current layout.
|
virtual |
Reverts the layout to the original layout (by class name)
|
virtual |
Given the ui layout file, return the class name from it.
|
virtual |
Returns the current configuration for the given uisx file. If does not exist will load it.
|
virtual |
Updates the current layout (toolbars and dock widgets) with the state of the pages.
|
virtual |
Updates the specified layout (className) with the current state of toolsbars and pages.
Reimplemented in makVrf::DtQtLayoutManager.
|
virtual |
Sets whether or not to ignore geometry changes and leave the window as is regardless of what the layout wants. Default is false.
|
virtual |
|
virtual |
Resets the layout to the current global master configuration.
Reimplemented in makVrf::DtQtLayoutManager.
|
virtual |
Sets/gets the default layout.
|
virtual |
|
virtual |
|
virtual |
Duplicates the from layout from the specified class to the given class.
IF the specified class does not exist it will attempted to be loaded from disk
|
virtual |
Returns the filename associated with the layout class.
|
virtual |
Creates a new configuration slot based on the supplied configuration and filename.
Returns true if this layout exists.
|
virtual |
Looks in the master mode configuration for the page collection, and, if present, adds to all page collections that is not currently in.
|
virtual |
Looks in the master mode configuration for the toolbar, and, if present, adds to all toolbar collections that is not currently in.
|
virtual |
Sets the page panel visible.
Reimplemented in makVrf::DtQtLayoutManager.
|
virtual |
Sets the toolbar visible.
Reimplemented in makVrf::DtQtLayoutManager.
|
virtual |
Sets whether or not the given palette item is visible.
Palette items are treated a bit differently than normal pages, so are handled a bit differently
|
virtual |
|
virtual |
If this palette item is not present, add it and set its visiblity to the given flag.
|
virtual |
Creates a new layout based on the current UI configuration and makes it the current layout.
|
virtual |
Saves all the layouts to their respective files (unless the flag to save layouts is turned off)
|
virtual |
Saves the specified layout class to the directory where it was read from.
Deletes the layout (class name) from disk and internal structures.
|
virtual |
Renames the layout internally and on disk from the old to the new name.
|
virtual |
Sets/gets current configuration using full screen.
|
virtual |
|
virtual |
Reimplemented in makVrf::DtQtLayoutManager.
|
virtual |
Sets/gets current configuration using full screen.
|
virtual |
|
virtual |
Reimplemented in makVrf::DtQtLayoutManager.
|
virtual |
Gets/sets whether or not the layout, when updates, will store the current windows geometry.
|
virtual |
|
virtual |
|
virtual |
If top, left, width and height are all 0 means this window is maximized.
Reimplemented in makVrf::DtQtLayoutManager.
|
virtual |
|
virtual |
|
virtual |
Updates the window with the geometry found in the class configuration.
Since there is no geometry handling here this must be implemented in a subclass
Reimplemented in makVrf::DtQtLayoutManager.
|
virtual |
Called after the gui has been assembled.
Reimplemented in makVrf::DtQtLayoutManager.
|
virtual |
Sets whether or not layouts can be saved (default is true)
| bool makVrf::DtLayoutManager::saveLayouts | ( | ) | const |
|
virtual |
Sets whether or not to save the last saved layout. This flag is checked before saving in the application.
| bool makVrf::DtLayoutManager::saveLastSavedLayout | ( | ) | const |
|
virtual |
Classes to ignore when initializing.
|
virtual |
|
inline |
|
virtual |
Get/set the class name of the file used to save the GUI layout in the case of no default layout.
|
virtual |
|
virtual |
Pre/post gui assembly.
|
virtual |
|
protectedvirtual |
No-op at this level.
Reimplemented in makVrf::DtQtLayoutManager.
|
protectedvirtual |
Reimplemented in makVrf::DtQtLayoutManager.
|
protectedvirtual |
Adds a new configuration for the given class name.
If addAny is true will add any class else will check if is in ignore list
|
protectedvirtual |
Creates a new layout based on the current configuration (does not signal addition nor make current – call newLayout for that)
| boost::signals2::signal<void (const DtString& newLayout, const DtString& oldLayout)> makVrf::DtLayoutManager::signal_layoutSelected |
Signal sent when a layout is selected.
| boost::signals2::signal<void (const DtString&)> makVrf::DtLayoutManager::signal_layoutAdded |
Signal sent when a layout is added.
| boost::signals2::signal<void (const DtString&)> makVrf::DtLayoutManager::signal_layoutUpdated |
Signal sent when a layout is updated.
| boost::signals2::signal<void (const DtString&)> makVrf::DtLayoutManager::signal_layoutDeleted |
Signal sent when a layout is removed.
| boost::signals2::signal<void (const DtString& newFav, const DtString& oldFav)> makVrf::DtLayoutManager::signal_defaultChanged |
Signal sent when a layout is made the default.
| boost::signals2::signal<void (const DtString& oldName, const DtString& newName)> makVrf::DtLayoutManager::signal_layoutRenamed |
Signal sent when a layout is renamed.
| boost::signals2::signal<void (const DtString& className, makVrv::DtVrvApplicationConfiguration::UIConfiguration&)> makVrf::DtLayoutManager::signal_layoutToBeRealized |
Signal sent before layout is to be realized.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
Prefix used for the layout files on disk. Defaults to "layout_".