3ds Max C++ API Reference
|
This class is used by 3ds Max for its docking UI and should be used as replacement for the standard QMainWindow. More...
#include <QmaxMainWindow.h>
Public Types | |
enum | QmaxDockFlag { DontSaveCUIContent = 0x1 , SystemWindow = 0x2 , HideInVisiblityMenu = 0x4 , ShowInExpertMode = 0x8 , DestroyOnCUIChange = 0x10 , NoDockFlags = 0 } |
enum | QmaxDockType { Window , Toolbar , Menu } |
Public Slots | |
void | setDockingLocked (bool state) |
Changes the dockingLocked state. | |
Public Member Functions | |
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 |
Static Public Member Functions | |
static QString | layoutFileExtension () |
Returns the file extension for a 3ds Max docking layout file. | |
static void | setMaxDockType (QWidget *widget, QmaxDockType dockType) |
Sets the 3ds Max dock type on a QToolBar or QDockWidget. | |
static QmaxDockType | maxDockType (const QWidget *widget) |
Returns the 3ds Max dock type for a QToolBar or QDockWidget. | |
static void | setMaxDockFlags (QWidget *widget, QmaxDockFlags dockFlags) |
Sets the 3ds Max specific dock flags on a QToolBar or QDockWidget. | |
static QmaxDockFlags | maxDockFlags (const QWidget *widget) |
Returns the 3ds Max specific dock flags for a QToolBar or QDockWidget. | |
static void | addMaxDockFlags (QWidget *widget, QmaxDockFlags dockFlags) |
Adds the 3ds Max specific dock flags on a QToolBar or QDockWidget. | |
static void | makeToolBarFloating (QToolBar *toolBar, const QPoint &pos=QPoint()) |
Makes a docked toolbar floating at the specified screen position. | |
static Qt::ToolBarArea | getToolBarArea (QToolBar *toolbar) |
Returns the toolbar area for a QToolBar. | |
static Qt::DockWidgetArea | getDockWidgetArea (QDockWidget *dockwidget) |
Returns the docking area for a QDockWidget. | |
static QmaxDockingWinHost * | getDockingWinHost (QToolBar *toolbar) |
Retrieves the QmaxDockingWinHost if the given toolbar hosts a legacy win32 control. | |
static ICustToolbar * | getICustToolbar (QToolBar *toolbar) |
Retrieves the legacy 3ds Max toolbar if the given QToolBar hosts one. | |
Protected Member Functions | |
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. | |
Properties | |
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.
enum QmaxDockFlag |
Enumerator | |
---|---|
DontSaveCUIContent | |
SystemWindow | |
HideInVisiblityMenu | |
ShowInExpertMode | |
DestroyOnCUIChange | |
NoDockFlags |
enum QmaxDockType |
|
explicit |
|
overridevirtual |
void loadLayout | ( | const QString & | fileName | ) |
Loads a docking layout from a specified file.
fileName | The full path to a docking layout file that should be loaded. |
void saveLayout | ( | const QString & | fileName | ) | const |
Saves the current docking layout to a specified file.
fileName | The full path to the docking layout file that should be saved. |
|
inlinestatic |
Returns the file extension for a 3ds Max docking layout 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.
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.
|
static |
Sets the 3ds Max dock type on a QToolBar or QDockWidget.
[in] | widget | The QToolBar or QDockWidget on which the dock type should be set. |
[in] | dockType | The dock type of the actual docking content. |
|
static |
Returns the 3ds Max dock type for a QToolBar or QDockWidget.
[in] | widget | The QToolBar or QDockWidget for which the dock type should be returned. |
|
static |
Sets the 3ds Max specific dock flags on a QToolBar or QDockWidget.
[in] | widget | The QToolBar or QDockWidget on which the dock flags should be set. |
[in] | dockFlags | The 3ds Max specific dock flags. |
|
static |
Returns the 3ds Max specific dock flags for a QToolBar or QDockWidget.
[in] | widget | The QToolBar or QDockWidget for which the dock flags should be returned. |
|
inlinestatic |
Adds the 3ds Max specific dock flags on a QToolBar or QDockWidget.
[in] | widget | The QToolBar or QDockWidget on which the dock flags should be added. |
[in] | dockFlags | The 3ds Max specific dock flags. |
|
static |
Makes a docked toolbar floating at the specified screen position.
[in] | toolBar | The QToolBar that should float. |
[in] | pos | The screen position at which the toolbar should float. |
|
static |
Returns the toolbar area for a QToolBar.
[in] | toolbar | The QToolBar for which the toolbar area should be returned. |
|
static |
Returns the docking area for a QDockWidget.
[in] | dockwidget | The QDockWidget for which the docking area should be returned. |
|
static |
Retrieves the QmaxDockingWinHost if the given toolbar hosts a legacy win32 control.
[in] | toolbar | The QToolBar for which the QmaxDockingWinHost should be retrieved. |
|
static |
Retrieves the legacy 3ds Max toolbar if the given QToolBar hosts one.
void expertMode | ( | bool | on | ) |
This method is for internal use only.
Calling this method alone will not put 3ds Max in Expert mode.
|
overridevirtual |
|
slot |
Changes the dockingLocked state.
[in] | state | The new dockingLocked state. |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
protected |
Adds the default docking options for a given toolbar or dock widget to the specified menu.
|
protected |
Returns the child toolbar or dock widget which is currently under the mouse.
|
readwrite |
Determines whether the docked toolbars and dockwidgets can be moved around and/or made floating.