Workspace 6.21.5
Public Member Functions | Static Public Member Functions | List of all members
DockManager Class Reference

Class for managing a set of dock widgets associated with a particular menu. More...

#include <Tools/WorkflowValidation/dockmanager.h>

Public Member Functions

 DockManager (QMainWindow &appWindow, QMenu &toolMenu, const QString &actionPrefixStr="workflowtools_action", const QString &dockPrefixStr="workflowtools_dock")
 
QDockWidget * addDockWidget (const QString &title, QWidget &widget, QAction &action, Qt::DockWidgetArea area=Qt::RightDockWidgetArea, Qt::DockWidgetAreas allowedAreas=Qt::AllDockWidgetAreas)
 Creates a DockWidget that can be docked to the application window, but will be managed by this DockManager.
 
QString createActionObjectName (const QString &name)
 Creates an object name with the local prefix so that the DockManager can locate its own dock widgets from all those owned by the main application.
 
QMenu * getDockMenu ()
 
QMenu & getToolMenu ()
 
void resetDockWidgets ()
 Removes and deletes the current QDockWidgets, then retriggers the actions of those that were open (use this when the workflow is changed)
 

Static Public Member Functions

static QString createActionObjectName (const QString &prefix, const QString &name)
 Creates an object name with the local prefix so that the DOckManager can locate its own dock widgets from all those owned by the main application.
 

Detailed Description

It creates a Dock submenu, so that you can show/close any docks. If you reset the docks, a note is made of any visible docks, the current docks are deleted and the list of docks that were open are retriggered so that they will reflect the new current workflow

Constructor & Destructor Documentation

◆ DockManager()

DockManager ( QMainWindow &  appWindow,
QMenu &  toolMenu,
const QString &  actionPrefixStr = "workflowtools_action",
const QString &  dockPrefixStr = "workflowtools_dock" 
)
Parameters
appWindowThe main application: all DockWidgets created can be be docked to this window
toolMenuMenu that the QDockWidgets created will be attached to, it will manage closing, deleting and resetting the docks
actionPrefixStrprefix used to identify QActions being managed by this. Should be unique within the application
dockPrefixStrprefix used to identify QDockWidgets being managed by this. Should be unique within the application

Member Function Documentation

◆ addDockWidget()

QDockWidget * addDockWidget ( const QString &  title,
QWidget &  widget,
QAction &  action,
Qt::DockWidgetArea  area = Qt::RightDockWidgetArea,
Qt::DockWidgetAreas  allowedAreas = Qt::AllDockWidgetAreas 
)

◆ createActionObjectName() [1/2]

QString createActionObjectName ( const QString &  name)

◆ createActionObjectName() [2/2]

QString createActionObjectName ( const QString &  prefix,
const QString &  name 
)
static

◆ getDockMenu()

QMenu * getDockMenu ( )

◆ getToolMenu()

QMenu & getToolMenu ( )
inline

◆ resetDockWidgets()

void resetDockWidgets ( )