Vuo  2.1.0
Static Public Member Functions | List of all members
VuoEditorUtilities Class Reference

Description

Miscellaneous shared functions for Vuo Editor.

Definition at line 19 of file VuoEditorUtilities.hh.

Static Public Member Functions

static QPixmap vuoLogoForDialogs ()
 Returns a retina-compatible logo of the appropriate size for popup dialog windows. More...
 
static Q_INVOKABLE QString getHTMLForSVG (QString svgPath, int pointsWide, int pointsHigh)
 Returns a data-URI-encoded rendering of an SVG (since Qt fails to render inline SVGs at Retina resolution). More...
 
static void openUserModulesFolder ()
 Opens the user's Modules folder in Finder. More...
 
static void openSystemModulesFolder ()
 Opens the system's Modules folder in Finder. More...
 
static bool optionKeyPressedForEvent (QEvent *event)
 Returns a boolean indicating whether the "Option" key was pressed in conjunction with the provided event. More...
 
static bool isNodeClassEditable (VuoNodeClass *nodeClass, QString &editLabel, QString &sourcePath)
 Checks if the node class has source code that the user can edit, and if so, provides some information about it. More...
 
static bool isNodeClassSuccessorTo (QString oldNodeClass, QString newNodeClass)
 Checks whether a given node class is the recommended replacement for another given node class. More...
 
static QList< QMainWindow * > getOpenEditingWindows ()
 Returns a list of currently open composition- and code-editing windows, sorted case-insensitively by window title. More...
 
static QList< VuoEditorWindow * > getOpenCompositionEditingWindows ()
 Returns a list of currently open composition-editing windows, sorted case-insensitively by window title. More...
 
static QList< QMainWindow * > getOpenEditingWindowsStacked ()
 Returns a list of currently open composition- and code-editing windows, sorted by stacking order (frontmost first). More...
 
static QMainWindow * existingWindowWithFile (const QString &filename)
 Returns an open composition- or code-editing window editing filename, if one exists. More...
 
static QAction * getRaiseDocumentActionForWindow (QMainWindow *window)
 Returns VuoEditorWindow::getRaiseDocumentAction or VuoCodeWindow::getRaiseDocumentAction. More...
 
static VuoRecentFileMenugetRecentFileMenuForWindow (QMainWindow *window)
 Hack in place of proper polymorphism. More...
 
static QMenu * getFileMenuForWindow (QMainWindow *window)
 Hack in place of proper polymorphism. More...
 
static void setWindowAsActiveWindow (QMainWindow *window)
 Hack in place of proper polymorphism. More...
 
static void setWindowOpacity (QMainWindow *window, int opacity)
 Sets the canvas opacity level to the provided opacity value, where a value of 0 means that the canvas should be fully transparent and 255 means that it should be fully opaque. More...
 

Member Function Documentation

◆ existingWindowWithFile()

QMainWindow * VuoEditorUtilities::existingWindowWithFile ( const QString &  filename)
static

Returns an open composition- or code-editing window editing filename, if one exists.

Otherwise returns NULL.

Definition at line 313 of file VuoEditorUtilities.cc.

◆ getFileMenuForWindow()

QMenu * VuoEditorUtilities::getFileMenuForWindow ( QMainWindow *  window)
static

Hack in place of proper polymorphism.

Definition at line 368 of file VuoEditorUtilities.cc.

◆ getHTMLForSVG()

QString VuoEditorUtilities::getHTMLForSVG ( QString  svgPath,
int  pointsWide,
int  pointsHigh 
)
static

Returns a data-URI-encoded rendering of an SVG (since Qt fails to render inline SVGs at Retina resolution).

Definition at line 41 of file VuoEditorUtilities.cc.

◆ getOpenCompositionEditingWindows()

QList< VuoEditorWindow * > VuoEditorUtilities::getOpenCompositionEditingWindows ( )
static

Returns a list of currently open composition-editing windows, sorted case-insensitively by window title.

Definition at line 278 of file VuoEditorUtilities.cc.

◆ getOpenEditingWindows()

QList< QMainWindow * > VuoEditorUtilities::getOpenEditingWindows ( )
static

Returns a list of currently open composition- and code-editing windows, sorted case-insensitively by window title.

Definition at line 261 of file VuoEditorUtilities.cc.

◆ getOpenEditingWindowsStacked()

QList< QMainWindow * > VuoEditorUtilities::getOpenEditingWindowsStacked ( )
static

Returns a list of currently open composition- and code-editing windows, sorted by stacking order (frontmost first).

Definition at line 291 of file VuoEditorUtilities.cc.

◆ getRaiseDocumentActionForWindow()

QAction * VuoEditorUtilities::getRaiseDocumentActionForWindow ( QMainWindow *  window)
static

Returns VuoEditorWindow::getRaiseDocumentAction or VuoCodeWindow::getRaiseDocumentAction.

A hack in place of proper polymorphism.

Definition at line 328 of file VuoEditorUtilities.cc.

◆ getRecentFileMenuForWindow()

VuoRecentFileMenu * VuoEditorUtilities::getRecentFileMenuForWindow ( QMainWindow *  window)
static

Hack in place of proper polymorphism.

Definition at line 348 of file VuoEditorUtilities.cc.

◆ isNodeClassEditable()

bool VuoEditorUtilities::isNodeClassEditable ( VuoNodeClass nodeClass,
QString &  editLabel,
QString &  sourcePath 
)
static

Checks if the node class has source code that the user can edit, and if so, provides some information about it.

Parameters
nodeClassThe node class to check.
[out]editLabelTranslated text for a link or action to edit the source code, customized to the type of source code.
[out]sourcePathPath of the source code file.
Returns
True if there is a source code file to edit, false otherwise.

Definition at line 164 of file VuoEditorUtilities.cc.

◆ isNodeClassSuccessorTo()

bool VuoEditorUtilities::isNodeClassSuccessorTo ( QString  oldNodeClass,
QString  newNodeClass 
)
static

Checks whether a given node class is the recommended replacement for another given node class.

Parameters
oldNodeClassThe node class to be replaced.
newNodeClassThe potential replacement node class.
Returns
True if newNodeClass is the successor to oldNodeClass, false otherwise.

Definition at line 196 of file VuoEditorUtilities.cc.

◆ openSystemModulesFolder()

void VuoEditorUtilities::openSystemModulesFolder ( )
static

Opens the system's Modules folder in Finder.

Definition at line 81 of file VuoEditorUtilities.cc.

◆ openUserModulesFolder()

void VuoEditorUtilities::openUserModulesFolder ( )
static

Opens the user's Modules folder in Finder.

Definition at line 65 of file VuoEditorUtilities.cc.

◆ optionKeyPressedForEvent()

bool VuoEditorUtilities::optionKeyPressedForEvent ( QEvent *  event)
static

Returns a boolean indicating whether the "Option" key was pressed in conjunction with the provided event.

This method works reliably even when the event originated from another application while the Vuo Editor was inactive, e.g., when dragging and dropping files from the Finder.

Definition at line 143 of file VuoEditorUtilities.cc.

◆ setWindowAsActiveWindow()

void VuoEditorUtilities::setWindowAsActiveWindow ( QMainWindow *  window)
static

Hack in place of proper polymorphism.

Definition at line 388 of file VuoEditorUtilities.cc.

◆ setWindowOpacity()

void VuoEditorUtilities::setWindowOpacity ( QMainWindow *  window,
int  opacity 
)
static

Sets the canvas opacity level to the provided opacity value, where a value of 0 means that the canvas should be fully transparent and 255 means that it should be fully opaque.

Definition at line 408 of file VuoEditorUtilities.cc.

◆ vuoLogoForDialogs()

QPixmap VuoEditorUtilities::vuoLogoForDialogs ( )
static

Returns a retina-compatible logo of the appropriate size for popup dialog windows.

Definition at line 28 of file VuoEditorUtilities.cc.


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