Vuo  2.1.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
VuoPopover Class Reference

Description

Provides common methods for rendering popover windows.

Definition at line 15 of file VuoPopover.hh.

Public Member Functions

 VuoPopover (QWidget *parent=0)
 Creates a VuoPopover. More...
 

Static Public Member Functions

static void * getWindowForPopover (QWidget *popoverWidget)
 Returns a pointer to the NSWindow associated with the provided widget. More...
 
static void setWindowLevelAndVisibility (bool top, QWidget *popoverWidget)
 Changes the provided popover to float on top of all windows (if top is true), or to behave as a normal window (if top is false). More...
 
static void setWindowLevel (bool top, QWidget *popoverWidget)
 Changes the provided popover to float on top of all windows (if top is true), or to behave as a normal window (if top is false). More...
 

Protected Member Functions

QPainterPath getPopoverPath (Qt::AnchorPoint arrowSide, int arrowPixelsFromTopOrLeft)
 Returns a path that represents the outline of a popover that has an arrow on arrowSide at arrowPixelsFromTopOrLeft. More...
 
QMargins getPopoverContentsMargins (Qt::AnchorPoint arrowSide)
 Returns the recommended content area (inside margins) for a popover with an arrow on arrowSide. More...
 

Static Protected Member Functions

static void setWindowLevelForNextUpdate (bool top, QWidget *popoverWidget)
 Changes the provided popover to float on top of all windows (if top is true), or to behave as a normal window (if top is false). More...
 

Static Protected Attributes

static int popoverArrowHalfWidth = 12
 Half the width (or exactly the height) of the popover's arrow. More...
 

Constructor & Destructor Documentation

◆ VuoPopover()

VuoPopover::VuoPopover ( QWidget *  parent = 0)
explicit

Creates a VuoPopover.

Definition at line 19 of file VuoPopover.cc.

Member Function Documentation

◆ getPopoverContentsMargins()

QMargins VuoPopover::getPopoverContentsMargins ( Qt::AnchorPoint  arrowSide)
protected

Returns the recommended content area (inside margins) for a popover with an arrow on arrowSide.

Definition at line 124 of file VuoPopover.cc.

◆ getPopoverPath()

QPainterPath VuoPopover::getPopoverPath ( Qt::AnchorPoint  arrowSide,
int  arrowPixelsFromTopOrLeft 
)
protected

Returns a path that represents the outline of a popover that has an arrow on arrowSide at arrowPixelsFromTopOrLeft.

arrowPixelsFromTopOrLeft should be between cornerRadius and width() or height() - cornerRadius. If the provided value is out-of-bounds, the arrow is omitted.

Definition at line 32 of file VuoPopover.cc.

◆ getWindowForPopover()

void * VuoPopover::getWindowForPopover ( QWidget *  popoverWidget)
static

Returns a pointer to the NSWindow associated with the provided widget.

Definition at line 137 of file VuoPopover.cc.

◆ setWindowLevel()

void VuoPopover::setWindowLevel ( bool  top,
QWidget *  popoverWidget 
)
static

Changes the provided popover to float on top of all windows (if top is true), or to behave as a normal window (if top is false).

The change takes effect immediately.

Definition at line 168 of file VuoPopover.cc.

◆ setWindowLevelAndVisibility()

void VuoPopover::setWindowLevelAndVisibility ( bool  top,
QWidget *  popoverWidget 
)
static

Changes the provided popover to float on top of all windows (if top is true), or to behave as a normal window (if top is false).

If top is false, also lowers the popover, effectively hiding it. The change takes effect immediately.

Definition at line 156 of file VuoPopover.cc.

◆ setWindowLevelForNextUpdate()

void VuoPopover::setWindowLevelForNextUpdate ( bool  top,
QWidget *  popoverWidget 
)
staticprotected

Changes the provided popover to float on top of all windows (if top is true), or to behave as a normal window (if top is false).

Does not force a re-evaluation of the current window level, so the change might not take effect immediately.

Definition at line 189 of file VuoPopover.cc.

Member Data Documentation

◆ popoverArrowHalfWidth

int VuoPopover::popoverArrowHalfWidth = 12
staticprotected

Half the width (or exactly the height) of the popover's arrow.

Definition at line 25 of file VuoPopover.hh.


The documentation for this class was generated from the following files: