This class is used by 3ds Max for its docking UI and should be used as replacement for the standard QMainWindow.
More...
#include <C:/adskgit/3dsmax/3dsmax/3dswin/src/maxsdk/include/Qt/QmaxMainWindow.h>
|
| QmaxMainWindow (QWidget *parent=nullptr, Qt::WindowFlags flags={}) |
virtual | ~QmaxMainWindow () override |
void | loadLayout (const QString &fileName) |
| Loads a docking layout from a specified file.
|
void | saveLayout (const QString &fileName) const |
| Saves the current docking layout to a specified file.
|
QList< QToolBar * > | getToolBars () const |
| Returns a list with the toolbars attached to this main window.
|
QList< QDockWidget * > | getDockWidgets () const |
| Returns a list with the dock widgets attached to this main window.
|
bool | dockingLocked () const |
| Determines whether the docked toolbars and dockwidgets can be moved around.
|
void | expertMode (bool on) |
| This method is for internal use only.
|
virtual QMenu * | createPopupMenu () override |
|
bool | eventFilter (QObject *obj, QEvent *evt) override |
void | childEvent (QChildEvent *evt) override |
bool | event (QEvent *evt) override |
bool | nativeEvent (const QByteArray &eventType, void *message, qintptr *result) override |
bool | addDefaultDockOptions (QWidget *dockWidget, QMenu *menu) const |
| Adds the default docking options for a given toolbar or dock widget to the specified menu.
|
QWidget * | dockWidgetUnderMouse () const |
| Returns the child toolbar or dock widget which is currently under the mouse.
|
|
bool | dockingLocked |
| Determines whether the docked toolbars and dockwidgets can be moved around and/or made floating.
|
This class is used by 3ds Max for its docking UI and should be used as replacement for the standard QMainWindow.
◆ QmaxDockFlag
Enumerator |
---|
DontSaveCUIContent | |
SystemWindow | |
HideInVisiblityMenu | |
ShowInExpertMode | |
DestroyOnCUIChange | |
NoDockFlags | |
51 {
52 DontSaveCUIContent = 0x1,
53 SystemWindow = 0x2,
54 HideInVisiblityMenu = 0x4,
55 ShowInExpertMode = 0x8,
56 DestroyOnCUIChange = 0x10,
57 NoDockFlags = 0
58 };
◆ QmaxDockType
Enumerator |
---|
Window | |
Toolbar | |
Menu | |
63 {
64 Window,
65 Toolbar,
66 Menu
67 };
◆ QmaxMainWindow()
QmaxMainWindow |
( |
QWidget * | parent = nullptr, |
|
|
Qt::WindowFlags | flags = {} ) |
|
explicit |
◆ ~QmaxMainWindow()
◆ loadLayout()
void loadLayout |
( |
const QString & | fileName | ) |
|
Loads a docking layout from a specified file.
- Parameters
-
fileName | The full path to a docking layout file that should be loaded. |
- See also
- saveLayout()
◆ saveLayout()
void saveLayout |
( |
const QString & | fileName | ) |
const |
Saves the current docking layout to a specified file.
- Parameters
-
fileName | The full path to the docking layout file that should be saved. |
- See also
- loadLayout()
◆ layoutFileExtension()
QString layoutFileExtension |
( |
| ) |
|
|
inlinestatic |
◆ getToolBars()
QList< QToolBar * > getToolBars |
( |
| ) |
const |
Returns a list with the toolbars attached to this main window.
- See also
- getDockWidgets()
◆ getDockWidgets()
QList< QDockWidget * > getDockWidgets |
( |
| ) |
const |
Returns a list with the dock widgets attached to this main window.
- See also
- getToolBars()
◆ dockingLocked()
bool dockingLocked |
( |
| ) |
const |
Determines whether the docked toolbars and dockwidgets can be moved around.
The basic idea of having the docking locked mode is to prevent all docked toolbars and dockwidgets to be moved or made floating. Already floating toolbars and dockwidgets can be moved around but not be docked back into the main window.
Note that docking locked does not prevent the user from resize the UI.
◆ setMaxDockType()
Sets the 3ds Max dock type on a QToolBar or QDockWidget.
- Parameters
-
[in] | widget | The QToolBar or QDockWidget on which the dock type should be set. |
[in] | dockType | The dock type of the actual docking content. |
- See also
- maxDockType()
◆ maxDockType()
Returns the 3ds Max dock type for a QToolBar or QDockWidget.
- Parameters
-
[in] | widget | The QToolBar or QDockWidget for which the dock type should be returned. |
- See also
- setMaxDockType()
◆ setMaxDockFlags()
void setMaxDockFlags |
( |
QWidget * | widget, |
|
|
QmaxDockFlags | dockFlags ) |
|
static |
Sets the 3ds Max specific dock flags on a QToolBar or QDockWidget.
- Parameters
-
[in] | widget | The QToolBar or QDockWidget on which the dock flags should be set. |
[in] | dockFlags | The 3ds Max specific dock flags. |
- See also
- maxDockFlags(), addMaxDockFlags()
◆ maxDockFlags()
QmaxDockFlags maxDockFlags |
( |
const QWidget * | widget | ) |
|
|
static |
Returns the 3ds Max specific dock flags for a QToolBar or QDockWidget.
- Parameters
-
[in] | widget | The QToolBar or QDockWidget for which the dock flags should be returned. |
- See also
- setMaxDockFlags(), addMaxDockFlags()
◆ addMaxDockFlags()
void addMaxDockFlags |
( |
QWidget * | widget, |
|
|
QmaxDockFlags | dockFlags ) |
|
inlinestatic |
Adds the 3ds Max specific dock flags on a QToolBar or QDockWidget.
- Parameters
-
[in] | widget | The QToolBar or QDockWidget on which the dock flags should be added. |
[in] | dockFlags | The 3ds Max specific dock flags. |
- See also
- maxDockFlags(), setMaxDockFlags()
134{ setMaxDockFlags( widget, maxDockFlags( widget ) | dockFlags ); }
◆ makeToolBarFloating()
void makeToolBarFloating |
( |
QToolBar * | toolBar, |
|
|
const QPoint & | pos = QPoint() ) |
|
static |
Makes a docked toolbar floating at the specified screen position.
- Parameters
-
[in] | toolBar | The QToolBar that should float. |
[in] | pos | The screen position at which the toolbar should float. |
- Note
- The toolbar needs to be added once to the main window toolbar layout, before you can't float it.
◆ getToolBarArea()
Qt::ToolBarArea getToolBarArea |
( |
QToolBar * | toolbar | ) |
|
|
static |
Returns the toolbar area for a QToolBar.
- Parameters
-
[in] | toolbar | The QToolBar for which the toolbar area should be returned. |
- See also
- getDockWidgetArea()
◆ getDockWidgetArea()
Qt::DockWidgetArea getDockWidgetArea |
( |
QDockWidget * | dockwidget | ) |
|
|
static |
Returns the docking area for a QDockWidget.
- Parameters
-
[in] | dockwidget | The QDockWidget for which the docking area should be returned. |
- See also
- getToolBarArea()
◆ getDockingWinHost()
◆ getICustToolbar()
◆ expertMode()
void expertMode |
( |
bool | on | ) |
|
This method is for internal use only.
Calling this method alone will not put 3ds Max in Expert mode.
◆ createPopupMenu()
virtual QMenu * createPopupMenu |
( |
| ) |
|
|
overridevirtual |
◆ setDockingLocked
void setDockingLocked |
( |
bool | state | ) |
|
|
slot |
Changes the dockingLocked state.
- Parameters
-
[in] | state | The new dockingLocked state. |
- See also
- dockingLocked()
◆ eventFilter()
bool eventFilter |
( |
QObject * | obj, |
|
|
QEvent * | evt ) |
|
overrideprotected |
◆ childEvent()
void childEvent |
( |
QChildEvent * | evt | ) |
|
|
overrideprotected |
◆ event()
bool event |
( |
QEvent * | evt | ) |
|
|
overrideprotected |
◆ nativeEvent()
bool nativeEvent |
( |
const QByteArray & | eventType, |
|
|
void * | message, |
|
|
qintptr * | result ) |
|
overrideprotected |
◆ addDefaultDockOptions()
bool addDefaultDockOptions |
( |
QWidget * | dockWidget, |
|
|
QMenu * | menu ) const |
|
protected |
Adds the default docking options for a given toolbar or dock widget to the specified menu.
◆ dockWidgetUnderMouse()
QWidget * dockWidgetUnderMouse |
( |
| ) |
const |
|
protected |
Returns the child toolbar or dock widget which is currently under the mouse.
◆ dockingLocked