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 | Protected Types | Protected Slots | Protected Member Functions | Protected Attributes
makVrf::DtQtLayoutManager Class Reference

The DtLayoutManager class allows for the managing (adding, setting and deleting) of UI Layout configurations. More...

Inheritance diagram for makVrf::DtQtLayoutManager:
Inheritance graph
[legend]

Public Member Functions

 DtQtLayoutManager (makVrv::DtDe &de)
 
virtual ~DtQtLayoutManager ()
 
virtual void setLayout (const DtFilename &)
 Sets a new GUI layout from the given uisx layout file. More...
 
virtual void resetLayoutFromMasterModeConfiguration ()
 Resets the layout to the current global master configuration. More...
 
virtual void setLayoutUsesFullScreen (const DtString &)
 If top, left, width and height are all 0 means this window is maximized. More...
 
virtual void setLayoutIsAlwaysMaximized (const DtString &)
 
virtual void updateLayout (const DtString &)
 Updates the specified layout (className) with the current state of toolsbars and pages. More...
 
virtual void initialize ()
 Called after the gui has been assembled. More...
 
virtual void updateWindowWithGeometryFrom (const DtString &)
 Given the layout class, change the window geometry to the geometry in that class. More...
 
virtual void setPanelVisible (const DtString &className, const DtString &panel, bool b)
 Sets the page panel visible if layout is current. More...
 
virtual void setToolbarVisible (const DtString &className, const DtString &toolbar, bool b)
 Sets the toolbar visible if layout is current. More...
 
- Public Member Functions inherited from makVrf::DtLayoutManager
 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< DtStringlayouts () 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 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 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 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 bool layoutUsesFullScreen (const DtString &) const
 
virtual void setCurrentLayoutIsAlwaysMaximized ()
 Sets/gets current configuration using full screen. More...
 
virtual bool currentLayoutIsAlwaysMaximized () const
 
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 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 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 DtStringlastSavedLayoutClassName () 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...
 

Protected Types

typedef std::map
< makVrv::DtQtPagePanel
*, std::pair
< makVrv::DtPageConfiguration::PageCollectionGeometry,
QSize > > 
PanelGeometrySettings
 
- Protected Types inherited from makVrf::DtLayoutManager
typedef std::map< DtString,
std::pair< DtFilename,
Configuration > > 
Configurations
 
typedef std::map< std::string,
bool
PanelItems
 

Protected Slots

virtual void showFloatingPanelsAndToolbarsForFullscreen ()
 Sets any item (toolbar or panel) to be visible such that it can be seen in full screen mode. More...
 
virtual void preFullScreenToggle ()
 Updates the current layout before full screen might destroy it. More...
 

Protected Member Functions

virtual void updatePageGeometries ()
 
virtual void resetPagedGeometries ()
 
virtual void finalizeSetup ()
 
virtual void updateToolbarStates (const makVrv::DtToolbarConfiguration &)
 No-op at this level. More...
 
virtual void updatePageStates (const makVrv::DtPageConfiguration &)
 
virtual void finishToolbars ()
 
virtual void completeFullScreen ()
 
virtual void updateWithCurrentWindowGeometry (const DtString &)
 Updates internal state with current window geometry. More...
 
virtual void updateWindowWithGeometryFrom (const makVrv::DtPageConfiguration::PageCollectionState *)
 Updates geometry of window from specififed state. More...
 
- Protected Member Functions inherited from makVrf::DtLayoutManager
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

std::map< QToolBar
*, makVrv::DtToolbarConfiguration::ToolbarState
myFloaters
 
PanelGeometrySettings myPanelGeometrySettings
 
const
makVrv::DtPageConfiguration::PageCollectionState
myRestoreWindowState
 
boost::signalslib::connection myPostTickConnection
 
- Protected Attributes inherited from makVrf::DtLayoutManager
makVrv::DtDemyDe
 
DtFilename myLayout
 
Configurations myConfigurations
 
bool mySaveLayouts
 
bool mySaveLastSavedLayout
 
PanelItems myPanelItems
 
std::set< DtStringmyClassesToIgnore
 
DtString myLastSavedLayoutClassName
 
bool myIgnoreGeometryChange
 

Additional Inherited Members

- Static Public Member Functions inherited from makVrf::DtLayoutManager
static DtLayoutManagerinstance (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 inherited from makVrf::DtLayoutManager
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...
 
- Static Protected Attributes inherited from makVrf::DtLayoutManager
static DtString theLayoutFilePrefix
 Prefix used for the layout files on disk. Defaults to "layout_". More...
 

Detailed Description

The DtLayoutManager class allows for the managing (adding, setting and deleting) of UI Layout configurations.

Member Typedef Documentation

Constructor & Destructor Documentation

makVrf::DtQtLayoutManager::DtQtLayoutManager ( makVrv::DtDe de)
virtual makVrf::DtQtLayoutManager::~DtQtLayoutManager ( )
virtual

Member Function Documentation

virtual void makVrf::DtQtLayoutManager::setLayout ( const DtFilename &  )
virtual

Sets a new GUI layout from the given uisx layout file.

virtual void makVrf::DtQtLayoutManager::resetLayoutFromMasterModeConfiguration ( )
virtual

Resets the layout to the current global master configuration.

Reimplemented from makVrf::DtLayoutManager.

virtual void makVrf::DtQtLayoutManager::setLayoutUsesFullScreen ( const DtString )
virtual

If top, left, width and height are all 0 means this window is maximized.

Reimplemented from makVrf::DtLayoutManager.

virtual void makVrf::DtQtLayoutManager::setLayoutIsAlwaysMaximized ( const DtString )
virtual

Reimplemented from makVrf::DtLayoutManager.

virtual void makVrf::DtQtLayoutManager::updateLayout ( const DtString )
virtual

Updates the specified layout (className) with the current state of toolsbars and pages.

Reimplemented from makVrf::DtLayoutManager.

virtual void makVrf::DtQtLayoutManager::initialize ( )
virtual

Called after the gui has been assembled.

Reimplemented from makVrf::DtLayoutManager.

virtual void makVrf::DtQtLayoutManager::updateWindowWithGeometryFrom ( const DtString )
virtual

Given the layout class, change the window geometry to the geometry in that class.

Reimplemented from makVrf::DtLayoutManager.

virtual void makVrf::DtQtLayoutManager::setPanelVisible ( const DtString className,
const DtString panel,
bool  b 
)
virtual

Sets the page panel visible if layout is current.

Reimplemented from makVrf::DtLayoutManager.

virtual void makVrf::DtQtLayoutManager::setToolbarVisible ( const DtString className,
const DtString toolbar,
bool  b 
)
virtual

Sets the toolbar visible if layout is current.

Reimplemented from makVrf::DtLayoutManager.

virtual void makVrf::DtQtLayoutManager::showFloatingPanelsAndToolbarsForFullscreen ( )
protectedvirtualslot

Sets any item (toolbar or panel) to be visible such that it can be seen in full screen mode.

virtual void makVrf::DtQtLayoutManager::preFullScreenToggle ( )
protectedvirtualslot

Updates the current layout before full screen might destroy it.

virtual void makVrf::DtQtLayoutManager::updatePageGeometries ( )
protectedvirtual
virtual void makVrf::DtQtLayoutManager::resetPagedGeometries ( )
protectedvirtual
virtual void makVrf::DtQtLayoutManager::finalizeSetup ( )
protectedvirtual
virtual void makVrf::DtQtLayoutManager::updateToolbarStates ( const makVrv::DtToolbarConfiguration )
protectedvirtual

No-op at this level.

Reimplemented from makVrf::DtLayoutManager.

virtual void makVrf::DtQtLayoutManager::updatePageStates ( const makVrv::DtPageConfiguration )
protectedvirtual

Reimplemented from makVrf::DtLayoutManager.

virtual void makVrf::DtQtLayoutManager::finishToolbars ( )
protectedvirtual
virtual void makVrf::DtQtLayoutManager::completeFullScreen ( )
protectedvirtual
virtual void makVrf::DtQtLayoutManager::updateWithCurrentWindowGeometry ( const DtString )
protectedvirtual

Updates internal state with current window geometry.

Reimplemented from makVrf::DtLayoutManager.

virtual void makVrf::DtQtLayoutManager::updateWindowWithGeometryFrom ( const makVrv::DtPageConfiguration::PageCollectionState )
protectedvirtual

Updates geometry of window from specififed state.

Member Data Documentation

std::map<QToolBar*, makVrv::DtToolbarConfiguration::ToolbarState> makVrf::DtQtLayoutManager::myFloaters
protected
PanelGeometrySettings makVrf::DtQtLayoutManager::myPanelGeometrySettings
protected
const makVrv::DtPageConfiguration::PageCollectionState* makVrf::DtQtLayoutManager::myRestoreWindowState
protected
boost::signalslib::connection makVrf::DtQtLayoutManager::myPostTickConnection
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)