3ds Max C++ API Reference
Loading...
Searching...
No Matches
TCEvent Class Reference

This event is sent to the Qt control before the toolclip widget is showing up. More...

#include <TCEvent.h>

+ Inheritance diagram for TCEvent:

Public Member Functions

 TCEvent (QWidget *refWidget, const QPoint &pos, const QPoint &globalPos)
 Constructs a TCEvent with the given toolclip reference widget.
 
 ~TCEvent () override
 
void setToolClipAreaRect (const QRect &tcAreaRect)
 Defines a custom sensitive toolclip area on which the toolclip will show up or closes when the mouse has left the area.
 
QRect toolClipAreaRect () const
 Returns the custom sensitive toolclip area, if set, otherwise an invalid rectangle.
 
void setToolClipRefWidget (QWidget *refWidget)
 Defines a custom widget that is taken as reference for the sensitive toolclip area.
 
QWidget * toolClipRefWidget () const
 Returns the toolclip reference widget on which the toolclip will be displayed.
 
void setToolClipKey (const QString &key)
 Sets the key for which the toolclip widget should display a toolclip.
 
QString toolClipKey () const
 Returns the key for which the toolclip widget should display a toolclip.
 
void setToolTip (const QString &tooltip)
 Defines a simple tooltip which is displayed by the toolclip widget if there is no matching toolclip key available.
 
QString toolTip () const
 Returns a simple tooltip which is displayed by the toolclip widget if there is no matching toolclip key available.
 
void setToolClipAlign (Qt::Orientation align)
 Defines the alignment of the toolclip widget.
 
Qt::Orientation toolClipAlign () const
 Returns the alignment of the toolclip widget.
 
void setSkipLevel1 (bool skipIt)
 Sets the progressive tooltip to show immediately its level 2 presentation.
 
bool skipLevel1 () const
 Returns whether or not the progressive tooltip's level 1 is skipped.
 

Static Public Member Functions

static QEvent::Type type ()
 Returns the Qt generated event type of the TCEvent.
 

Detailed Description

This event is sent to the Qt control before the toolclip widget is showing up.

The toolclip will show up if either a matching toolclip key is found for the widget or if the widget has a simple tooltip set. If you don't want the advanced toolclips to show up you can just ignore the event by calling event->ignore() in your widgets event() function. If the event is ignored the procedure will fall back to the ordinary Qt tooltip mechanism, which means you'll recieve a QEvent::ToolTip event. The TCEvent provides the possibility to define a sensitive area on which the toolclip will show up or closes when the mouse has left the area. By default this area is the bounding rectangle of the widget receiving the toolclip. However sometimes this could just be a sub area or sub widget of the widget receiving the toolclip.

Constructor & Destructor Documentation

◆ TCEvent()

TCEvent ( QWidget *  refWidget,
const QPoint &  pos,
const QPoint &  globalPos 
)

Constructs a TCEvent with the given toolclip reference widget.

See also
QHelpEvent

◆ ~TCEvent()

~TCEvent ( )
override

Member Function Documentation

◆ setToolClipAreaRect()

void setToolClipAreaRect ( const QRect &  tcAreaRect)

Defines a custom sensitive toolclip area on which the toolclip will show up or closes when the mouse has left the area.

Note: The area rectangle which should be defined in relative coordinates will be internally translated back to screen coordinates using the toolclip widget as base reference.

Parameters
tcAreaRectThe toolclip area in relative coordinates.
See also
setToolClipRefWidget()

◆ toolClipAreaRect()

QRect toolClipAreaRect ( ) const

Returns the custom sensitive toolclip area, if set, otherwise an invalid rectangle.

See also
setToolClipAreaRect()

◆ setToolClipRefWidget()

void setToolClipRefWidget ( QWidget *  refWidget)

Defines a custom widget that is taken as reference for the sensitive toolclip area.

The toolclip area will be the bounding rectangle of the reference widget. By default the reference widget will be the same widget receiving the TCEvent.

Parameters
refWidgetThe widget that should be taken as reference for displaying the toolclip.
See also
setToolClipRefWidget()

◆ toolClipRefWidget()

QWidget * toolClipRefWidget ( ) const

Returns the toolclip reference widget on which the toolclip will be displayed.

By default the reference widget will be the same widget receiving the TCEvent.

See also
setToolClipRefWidget()

◆ type()

static QEvent::Type type ( )
static

Returns the Qt generated event type of the TCEvent.

See also
QEvent::registerEventType()

◆ setToolClipKey()

void setToolClipKey ( const QString &  key)

Sets the key for which the toolclip widget should display a toolclip.

If there is no matching toolclip found for the key, the toolclip widget will display the simple tooltip. By default the TCEvent's key is initialized with the the reference widget's object name.

Parameters
keyThe key for which the toolclip widget should display a toolclip.
See also
toolClipKey(), toolTip()

◆ toolClipKey()

QString toolClipKey ( ) const

Returns the key for which the toolclip widget should display a toolclip.

If there is no matching toolclip found for the key, the toolclip widget will display the simple tooltip. By default the TCEvent's key is initialized with the the reference widget's object name.

See also
setToolClipKey(), toolTip()

◆ setToolTip()

void setToolTip ( const QString &  tooltip)

Defines a simple tooltip which is displayed by the toolclip widget if there is no matching toolclip key available.

By default the TCEvent's tooltip is initialized with the tooltip of the reference widget.

Parameters
tooltipThe simple tooltip that should be shown if there is no toolclip available.
See also
toolTip()

◆ toolTip()

QString toolTip ( ) const

Returns a simple tooltip which is displayed by the toolclip widget if there is no matching toolclip key available.

By default the TCEvent's tooltip is initialized with the tooltip of the reference widget.

See also
setToolTip()

◆ setToolClipAlign()

void setToolClipAlign ( Qt::Orientation  align)

Defines the alignment of the toolclip widget.

The toolclip can be aligned horizontally or vertically to the mouse over area, which is either given by the bounding rectangle of the reference widget or, if specified, by the toolclip area rectangle. By default the alignment will be vertically so that the toolclip is shown beneath the mouse over area.

Parameters
alignThe alignment of the toolclip widget to the mouse over area.
See also
toolClipAlign(), setToolClipAreaRect(), setToolClipRefWidget()

◆ toolClipAlign()

Qt::Orientation toolClipAlign ( ) const

Returns the alignment of the toolclip widget.

The toolclip can be aligned horizontally or vertically to the mouse over area, which is either given by the bounding rectangle of the reference widget or, if specified, by the toolclip area rectangle. By default the alignment will be vertically so that the toolclip is shown beneath the mouse over area.

See also
setToolClipAlign(), setToolClipAreaRect(), setToolClipRefWidget()

◆ setSkipLevel1()

void setSkipLevel1 ( bool  skipIt)

Sets the progressive tooltip to show immediately its level 2 presentation.

The progressive tooltip can show several levels of information, the first and most simple one is a brief description of the feature, the second one is a more developed and detailed presentation describing more specifically the feature. This method allows to show immediately the level 2 if set to true. Otherwise the level 2 will appear just after the level 1 has been shown. Set by default to false.

Parameters
skipItThe value to be set to skipLevel1 attribute.
See also
skipLevel1()

◆ skipLevel1()

bool skipLevel1 ( ) const

Returns whether or not the progressive tooltip's level 1 is skipped.

By default the progressive tooltip is set to show the level 1.

See also
setSkipLevel1()