3ds Max C++ API Reference
QmaxRollup Class Reference

3ds Max Qt Rollup class. More...

#include <QmaxRollup.h>

+ Inheritance diagram for QmaxRollup:

Public Types

enum  Option {
  NoOptions = 0x0 , DontAutoClose = 0x2 , SaveCat = 0x4 , BorderLess = 0x10 ,
  NoPadding = 0x20 , FixedCat = 0x40
}
 Create options for QmaxRollup. More...
 

Public Slots

virtual void setOpen (bool isOpen=true)
 Sets the open/closed state of the rollup. More...
 
void open ()
 Sets the state of the rollup to open. More...
 
void close ()
 Sets the state of the rollup to closed. More...
 

Signals

void toggled (bool isOpen=false)
 Emitted when the open/close state of the rollup is changed. More...
 
void opened ()
 Emitted when the rollup is opened. More...
 
void closed ()
 Emitted when the rollup is closed. More...
 

Public Member Functions

 QmaxRollup (int category=ROLLUP_CAT_STANDARD, QWidget *parent=nullptr)
 Creates a QmaxRollup with no title, with an optionally specified category and parent. More...
 
 QmaxRollup (const QString &title, int category=ROLLUP_CAT_STANDARD, QWidget *parent=nullptr)
 Creates a QmaxRollup with the specified title, and optional category and parent. More...
 
virtual ~QmaxRollup ()
 Destructor. More...
 
 Q_DECLARE_FLAGS (Options, Option)
 
void setOptions (Options options)
 Sets the options for the rollup. More...
 
Options options () const
 Returns the options for the rollup. More...
 
QWidget * widget () const
 Returns the rollup's widget, or a nullptr if there is none. More...
 
virtual void setWidget (QWidget *widget)
 Puts a widget (such as a panel containing other widgets) into the rollup. More...
 
virtual QWidget * takeWidget ()
 Removes the rollup's widget, and passes ownership of the widget to the caller. More...
 
bool isOpen () const
 Returns whether the rollup is open or closed ("rolled up"). More...
 
QString title () const
 Returns the rollup's title. More...
 
void setTitle (const QString &title)
 Sets the rollup's title. More...
 
int category () const
 
void setCategory (int category)
 Sets the rollup's category. More...
 
void resetCategory ()
 Resets the rollup's category to its original category. More...
 
QmaxRollupContainercontainer () const
 Returns the container for the rollup. More...
 

Protected Member Functions

 QmaxRollup (QmaxRollupPrivate *_d, const QString &title, QWidget *parent=nullptr)
 
virtual void paintEvent (QPaintEvent *event) override
 
virtual void mousePressEvent (QMouseEvent *event) override
 
virtual void mouseReleaseEvent (QMouseEvent *event) override
 
virtual void mouseMoveEvent (QMouseEvent *event) override
 
virtual bool event (QEvent *event) override
 
 Q_DECLARE_PRIVATE (QmaxRollup)
 

Properties

QString title
 The rollup title. More...
 
bool open
 The rollup open status. More...
 
int category
 The rollup category. More...
 

Friends

class QmaxRollupContainer
 

Detailed Description

3ds Max Qt Rollup class.

This class provides access to the Qt implementation of the 3ds Max Rollup widget.
It exposes properties such as title and category, so they can be easily set in code or in the Qt Designer.

Rollups are the base containers for other widgets for most plug-ins. They are displayed on the 3ds Max command panel.

Note
QmaxRollupContainer filters out wheel events for some children to prevent the user from inadvertently changing values of controls. Wheel events are filtered for children that inherit from QAbstractSpinBox, QLineEdit, QAbstractSlider, QComboBox, and QCalendarView.

Member Enumeration Documentation

◆ Option

enum Option

Create options for QmaxRollup.

Enumerator
NoOptions 

Create rollup in a closed state.

DontAutoClose 

Don't close this rollup when doing a "close all".

SaveCat 

Save the category provided in the RollupOrder.cfg.

BorderLess 

Don't display a title or border, don't support drag-and-drop, right-click menu, or collapse/expand.

NoPadding 

Create the rollup with minimal padding. This is primarily for MaxScript, which performs its own padding.

FixedCat 

Fixed rollups have no drag pattern in the header.

55  {
56  NoOptions = 0x0,
57  DontAutoClose = 0x2,
58  SaveCat = 0x4,
59  BorderLess = 0x10,
60  NoPadding = 0x20,
61  FixedCat = 0x40
62  };
@ FixedCat
Fixed rollups have no drag pattern in the header.
Definition: QmaxRollup.h:61
@ DontAutoClose
Don't close this rollup when doing a "close all".
Definition: QmaxRollup.h:57
@ SaveCat
Save the category provided in the RollupOrder.cfg.
Definition: QmaxRollup.h:58
@ NoPadding
Create the rollup with minimal padding. This is primarily for MaxScript, which performs its own paddi...
Definition: QmaxRollup.h:60
@ NoOptions
Create rollup in a closed state.
Definition: QmaxRollup.h:56
@ BorderLess
Don't display a title or border, don't support drag-and-drop, right-click menu, or collapse/expand.
Definition: QmaxRollup.h:59

Constructor & Destructor Documentation

◆ QmaxRollup() [1/3]

QmaxRollup ( int  category = ROLLUP_CAT_STANDARD,
QWidget *  parent = nullptr 
)
explicit

Creates a QmaxRollup with no title, with an optionally specified category and parent.


Parameters
categoryThe category. For third-party plug-ins, this is usually ROLLUP_CAT_STANDARD.
parentThe widget parent. You typically do not need to supply a parent, unless you are placing the rollup somewhere other than the command panel (such as in a dialog).

◆ QmaxRollup() [2/3]

QmaxRollup ( const QString &  title,
int  category = ROLLUP_CAT_STANDARD,
QWidget *  parent = nullptr 
)
explicit

Creates a QmaxRollup with the specified title, and optional category and parent.


Parameters
titleThe title for the rollup.
categoryThe category. For third-party plug-ins, this is usually ROLLUP_CAT_STANDARD.
parentThe widget parent. You typically do not need to supply a parent, unless you are placing the rollup somewhere other than the command panel (such as in a dialog).

◆ ~QmaxRollup()

virtual ~QmaxRollup ( )
virtual

Destructor.

◆ QmaxRollup() [3/3]

QmaxRollup ( QmaxRollupPrivate *  _d,
const QString &  title,
QWidget *  parent = nullptr 
)
explicitprotected

Member Function Documentation

◆ Q_DECLARE_FLAGS()

Q_DECLARE_FLAGS ( Options  ,
Option   
)

◆ setOptions()

void setOptions ( Options  options)

Sets the options for the rollup.

See also
Option, options()

◆ options()

Options options ( ) const

Returns the options for the rollup.

◆ widget()

QWidget* widget ( ) const

Returns the rollup's widget, or a nullptr if there is none.

See also
setWidget(), takeWidget()

◆ setWidget()

virtual void setWidget ( QWidget *  widget)
virtual

Puts a widget (such as a panel containing other widgets) into the rollup.

The widget becomes a child of the rollup, and will be destroyed when the rollup is deleted or when a new widget is set. If the rollup already contains a widget, it is destroyed.

See also
widget(), takeWidget()

◆ takeWidget()

virtual QWidget* takeWidget ( )
virtual

Removes the rollup's widget, and passes ownership of the widget to the caller.

The widget is not destroyed.

Returns
The containing widget
See also
widget(), setWidget

◆ isOpen()

bool isOpen ( ) const

Returns whether the rollup is open or closed ("rolled up").

◆ title()

QString title ( ) const

Returns the rollup's title.

◆ setTitle()

void setTitle ( const QString &  title)

Sets the rollup's title.

Parameters
titleThe title string.

◆ category()

int category ( ) const

◆ setCategory()

void setCategory ( int  category)

Sets the rollup's category.

◆ resetCategory()

void resetCategory ( )

Resets the rollup's category to its original category.

◆ container()

QmaxRollupContainer* container ( ) const

Returns the container for the rollup.

◆ setOpen

virtual void setOpen ( bool  isOpen = true)
virtualslot

Sets the open/closed state of the rollup.

Parameters
isOpenIf true, sets the rollup state to open.

◆ open

void open ( )
inlineslot

Sets the state of the rollup to open.

133 { setOpen( true ); }
virtual void setOpen(bool isOpen=true)
Sets the open/closed state of the rollup.

◆ close

void close ( )
inlineslot

Sets the state of the rollup to closed.

135 { setOpen( false ); }

◆ toggled

void toggled ( bool  isOpen = false)
signal

Emitted when the open/close state of the rollup is changed.

Parameters
isOpenTrue when the rollup state is now open.

◆ opened

void opened ( )
signal

Emitted when the rollup is opened.

◆ closed

void closed ( )
signal

Emitted when the rollup is closed.

◆ paintEvent()

virtual void paintEvent ( QPaintEvent *  event)
overrideprotectedvirtual

◆ mousePressEvent()

virtual void mousePressEvent ( QMouseEvent *  event)
overrideprotectedvirtual

◆ mouseReleaseEvent()

virtual void mouseReleaseEvent ( QMouseEvent *  event)
overrideprotectedvirtual

◆ mouseMoveEvent()

virtual void mouseMoveEvent ( QMouseEvent *  event)
overrideprotectedvirtual

◆ event()

virtual bool event ( QEvent *  event)
overrideprotectedvirtual

◆ Q_DECLARE_PRIVATE()

Q_DECLARE_PRIVATE ( QmaxRollup  )
protected

Friends And Related Function Documentation

◆ QmaxRollupContainer

friend class QmaxRollupContainer
friend

Property Documentation

◆ title

QString title
readwrite

The rollup title.


See also
title(), setTitle()

◆ open

bool open
readwrite

The rollup open status.

See also
setOpen(), open(), close()

◆ category

int category
readwrite

The rollup category.


See also
category(), setCategory(), resetCategory()