Vuo  2.1.0
Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Friends | List of all members
VuoEditor Class Reference

Description

The Vuo Editor's QApplication subclass.

Singleton. Provides the standard menu bar.

Definition at line 30 of file VuoEditor.hh.

Public Types

enum  subscriptionLevel { CommunityUser, ProSubscriber }
 Possible user subscription levels: More...
 

Public Slots

void about (void)
 Displays an "About" box. More...
 
void newComposition (void)
 Creates an empty composition editor window. More...
 
void newCompositionWithProtocol (void)
 Creates an empty composition editor window with the active protocol template indicated by the sender. More...
 
void newCompositionWithTemplate (void)
 Creates an empty composition editor window with the active window template indicated by the sender. More...
 
void openUrl (const QString &url)
 Determines what type of url has been provided: More...
 
void openFile (void)
 Displays an "Open File" dialog, and if a composition or shader is selected, opens it in an editor window. More...
 
void openExampleComposition (QString filename, VuoNodeSet *nodeSet, string nodeClassToHighlight)
 Opens a composition editor window for an example composition. More...
 
void showNodeLibrary (void)
 Shows the Node Class Library browser and focuses its text filter. More...
 
void addFileToAllOpenRecentFileMenus (QString filePath)
 Adds the file at filePath to the application-global "File > Open Recent" menu list, and synchronizes each editor window's "File > Open Recent" menu with the global version. More...
 
void addFileToRecentlyClosedList (QString filePath)
 Adds the provided filePath to the list of composition files that have been closed during this editor session since the list was last cleared. More...
 
void clearAllOpenRecentFileMenus ()
 Clears the list of recently opened files from the application-global "File > Open Recent" menu list, and synchronizes each editor window's "File > Open Recent" menu with the global version. More...
 
void pruneAllOpenRecentFileMenus ()
 Prunes the list of recently opened files from the application-global "File > Open Recent" menu list, removing any that no longer exist, and synchronizes each editor window's "File > Open Recent" menu with the global version. More...
 
void synchronizeOpenRecentFileMenus ()
 Synchronizes each editor window's "File > Open Recent" menu with the global version, and saves the updated file list to the stored application settings. More...
 
void showNodeSetDocumentationFromUrl (const QUrl &url)
 Activates the "vuo-nodeset" URL handler to handle the input url. More...
 
void showNodeDocumentationFromUrl (const QUrl &url)
 Activates the "vuo-node" URL handler to handle the input url. More...
 
void openFileFromSenderData ()
 Opens the local file at the path associated with the sender action that triggered the call to this slot. More...
 
void removeFileFromSenderData ()
 Removes (by moving to the Trash) the file at the path associated with the sender action that triggered the call to this slot. More...
 
void openExternalUrlFromSenderData ()
 Uses an external browser to open the URL associated with the sender action that triggered the call to this slot. More...
 
void openExampleCompositionFromUrl (const QUrl &url)
 Activates the "vuo-example" URL handler to handle the input url. More...
 
void openMostRecentFile ()
 Opens the most recent file. More...
 
void openRandomExample ()
 Opens a random example composition. More...
 
void quitCleanly ()
 Initiates final cleanup, and attempts to close all windows. More...
 
void continueQuit (QMainWindow *window)
 Called by VuoEditorWindow or VuoCodeWindow after the user has confirmed a window-close request. More...
 
void cancelQuit ()
 Called by VuoEditorWindow after the user has cancelled a window-close request. More...
 
Q_INVOKABLE void openHelpBook ()
 Launches HelpViewer.app and opens the Vuo Manual to the introduction / table of contents. More...
 

Signals

void globalNodeLibraryStateChanged (VuoNodeLibrary::nodeLibraryState newState, VuoNodeLibrary *floater, bool previousFloaterDestroyed)
 Emitted after updateGlobalNodeLibraryState() is called. More...
 
void activeApplicationStateChanged (bool active)
 Emitted when the application gains or loses focus. More...
 
void darkInterfaceToggled (bool isDark)
 Emitted when the user changes the "Dark Interface" menu item. More...
 
void showGridToggled ()
 Emitted when the user toggles the "Grid > Lines" or "Grid > Points" menu item. More...
 
void canvasOpacityChanged ()
 Emitted when the user selects a new "Canvas Transparency" menu item. More...
 
void applicationWillHide ()
 Emitted when macOS hides the application. More...
 
void applicationDidUnhide ()
 Emitted when macOS unhides the application. More...
 

Public Member Functions

 VuoEditor (int &argc, char *argv[])
 Sets up the Vuo Editor at launch time. More...
 
 ~VuoEditor ()
 Destructor. More...
 
Q_INVOKABLE void processQueuedCompositionsToOpen ()
 Iterates through the queue of pending files to open and tries to open each one. More...
 
Q_INVOKABLE void reevaluateWelcomePrecedence ()
 Allow pending file-open events to override the welcome window display if the welcome window is in a state where it is allowed to be closed. More...
 
string getUserName ()
 Returns the username associated with this editor session. More...
 
string getStoredUserProfileURL ()
 Returns the user profile URL associated with this editor session. More...
 
QString getSubcompositionPrefix ()
 Returns the string to be used as the subcomposition prefix for this user. More...
 
QString getDefaultSubcompositionPrefix ()
 Returns the default string to be used as the subcomposition prefix for this user if it has not been customized by the user. More...
 
map< QString, QString > getUberExampleCompositions ()
 Returns a map containing the uberexamplecompositions to be displayed at the top level within the "File > Open Example" menu, and the node sets to which they belong. More...
 
map< QString, QString > getExampleCompositionsForProtocol (VuoProtocol *protocol)
 Returns a map containing the example compositions to be listed in association with the provided protocol in the "File > Open Example" menu, and the node sets to which they belong. More...
 
int getPreferredNodeDocumentationPanelHeight ()
 Returns the preferred node documentation panel height as indicated in stored user preferences and/or actions performed since the stored preferences were last applied. More...
 
int getPreferredNodeLibraryWidth ()
 Returns the preferred node library width as indicated in stored user preferences and/or actions performed since the stored preferences were last applied. More...
 
void highlightNewNodeClassInAllLibraries (string nodeClassName)
 Highlights the requested new node class in all visible node libraries where it is listed, via callback made by each node library's module manager once installation has completed. More...
 
void updateSubcompositionPrefix (QString prefix)
 Sets the global subcomposition prefix to the value provided; stores the provided value as a preference in the settings. More...
 
void updateGlobalShaderDocumentationVisibility (bool isVisible)
 Updates the global shader documentation setting to match isVisible. More...
 
bool getGlobalShaderDocumentationVisibility ()
 Returns the current global shader documentation setting. More...
 
void getGlobalMovieExportSettings (int &width, int &height, double &time, double &duration, double &framerate, int &spatialSupersample, int &temporalSupersample, float &shutterAngle, QString &imageFormat, double &quality)
 Returns the current global movie export settings. More...
 
string getResourceDirectoryForNodeSet (string nodeSetName)
 Returns the resource directory associated with the provided nodeSetName. More...
 
void setResourceDirectoryForNodeSet (string nodeSetName, string directory)
 Sets the resource directory associated with the provided nodeSetName to the provided directory. More...
 
void generateMainHtmlPageForNodeSet (VuoNodeSet *nodeSet, string saveFileName, bool publishInternalVuoLinks)
 Generates the main HTML documentation page for the provided nodeSet, and saves it at the provided saveFileName. More...
 
void generateNodeClassHtmlPagesForNodeSet (VuoNodeSet *nodeSet, string saveDir, bool publishInternalVuoLinks)
 Generates the HTML documentation pages for non-deprecated node classes belonging to the provided nodeSet, and saves them in provided saveDir. More...
 
VuoSubcompositionMessageRoutergetSubcompositionRouter (void)
 Returns the subcomposition message router shared by all open compositions. More...
 
VuoCompilerDrivergetBuiltInDriverForProtocol (VuoProtocol *protocol)
 Returns the built-in driver for the provided protocol, or NULL if none. More...
 
dispatch_queue_t getDocumentationQueue ()
 Returns the dispatch queue to be used for documentation-related tasks, such as extracting resources from node set archives. More...
 
bool isNodeLibraryCurrentlyDocked ()
 Returns true if the node library is docked, or false if it is floating. More...
 
void registerOpenDocument (QMainWindow *window)
 Updates the application UI immediately (on creation of window) and when window is destroyed. More...
 
VuoEditorWindownewCompositionWithContent (string content, string compositionDir="")
 Creates a composition editor window with the provided content. More...
 
QMainWindow * openFileWithName (QString filename, bool addToRecentFileMenu=true)
 Opens a composition editor window with the specified filename. More...
 
void populateNewCompositionWithTemplateMenu (QMenu *m)
 Populates the provided menu m with the editor's built-in templates. More...
 
void populateNewShaderMenu (QMenu *m)
 Populates the provided menu with the templates for shaders. More...
 
void populateCanvasTransparencyMenu (QMenu *m)
 Populates the provided menu m with items related to canvas transparency. More...
 
void populateWindowMenu (QMenu *m, QMainWindow *currentWindow)
 Populates the provided menu with window-related items, including the list of open documents. More...
 
void populateHelpMenu (QMenu *m)
 Populates the provided menu m with support-related items. More...
 
bool isInterfaceDark (void)
 Returns true if the user interface is in dark mode. More...
 
int getCanvasOpacity (void)
 Returns the current opacity level of the canvas, where 0 is fully transparent and 255 is fully opaque. More...
 
Q_INVOKABLE QStringList recentFiles ()
 Returns the list of recently-opened files. More...
 

Static Public Member Functions

static void setDocumentationGenerationDirectory (string dir)
 Sets the directory in which to save generated node documentation. More...
 
static QString getDefaultCompositionStorageDirectory ()
 Returns the default directory to be used for opening and saving Vuo compositions. More...
 
static string removeVuoLinks (string markdownText)
 Filters out internal vuo-node:// and vuo-nodeset:// links within the provided markdownText, encapsulating the previously linked text in backticks. More...
 
static QString getURLForExampleComposition (QString compositionName, QString nodeSetName)
 Returns the example composition URL corresponding to the example composition with the provided name and node set. More...
 
static QString getVuoManualURL ()
 Returns the path of the locally bundled Vuo manual if it exists, or the URL of the manual hosted on vuo.org otherwise. More...
 
static QString getClipboardText ()
 Returns the text content of the clipboard, or the empty string if the clipboard does not contain text content. More...
 
static QString generateHtmlDocumentationStyles (bool forBrowser=true, bool isDark=false)
 Returns the HTML <style> block for use in node set and node documentation. More...
 

Public Attributes

QAction * showGridLinesAction
 Toggles grid line rendering. More...
 
QAction * showGridPointsAction
 Toggles grid point rendering. More...
 
QAction * snapToGridAction
 Toggles grid snapping. More...
 
QActionGroup * canvasTransparencyOptions
 Actions for changing canvas transparency. More...
 
QAction * canvasTransparencyNoneAction
 Makes the canvas opaque. More...
 
QAction * canvasTransparencySlightAction
 Makes the canvas slightly transparent. More...
 
QAction * canvasTransparencyHighAction
 Makes the canvas highly transparent. More...
 

Static Public Attributes

static const QString vuoHelpBookScheme = "vuo-help"
 The URL scheme used for opening a section of the user manual. More...
 
static const QString vuoNodeSetDocumentationScheme = "vuo-nodeset"
 The URL scheme used for opening node set documentation. More...
 
static const QString vuoNodeDocumentationScheme = "vuo-node"
 The URL scheme used for opening node documentation. More...
 
static const QString vuoExampleCompositionScheme = "vuo-example"
 The URL scheme used for opening example compositions. More...
 
static const QString vuoExampleHighlightedNodeClassQueryItem = "nodeClass"
 The query item expected to indicate what node class to highlight within an example composition. More...
 
static const QString vuoCompositionFileExtension = "vuo"
 The file extension for Vuo compositions. More...
 
static const QString vuoNodeClassFileExtension = "vuonode"
 The file extension for Vuo node classes. More...
 
static const QString vuoTutorialURL = "https://vuo.org/tutorials"
 The URL for Vuo tutorial videos. More...
 

Protected Member Functions

bool event (QEvent *e) VuoWarnUnusedResult
 Reimplements QApplication::event(), to handle application-wide events. More...
 

Friends

class TestVuoEditor
 

Member Enumeration Documentation

◆ subscriptionLevel

Possible user subscription levels:

Definition at line 35 of file VuoEditor.hh.

Constructor & Destructor Documentation

◆ VuoEditor()

VuoEditor::VuoEditor ( int &  argc,
char *  argv[] 
)
explicit

Sets up the Vuo Editor at launch time.

Definition at line 88 of file VuoEditor.cc.

◆ ~VuoEditor()

VuoEditor::~VuoEditor ( )

Destructor.

Definition at line 499 of file VuoEditor.cc.

Member Function Documentation

◆ about

void VuoEditor::about ( void  )
slot

Displays an "About" box.

Definition at line 895 of file VuoEditor.cc.

◆ activeApplicationStateChanged

void VuoEditor::activeApplicationStateChanged ( bool  active)
signal

Emitted when the application gains or loses focus.

◆ addFileToAllOpenRecentFileMenus

void VuoEditor::addFileToAllOpenRecentFileMenus ( QString  filePath)
slot

Adds the file at filePath to the application-global "File > Open Recent" menu list, and synchronizes each editor window's "File > Open Recent" menu with the global version.

Definition at line 2247 of file VuoEditor.cc.

◆ addFileToRecentlyClosedList

void VuoEditor::addFileToRecentlyClosedList ( QString  filePath)
slot

Adds the provided filePath to the list of composition files that have been closed during this editor session since the list was last cleared.

Definition at line 2257 of file VuoEditor.cc.

◆ applicationDidUnhide

void VuoEditor::applicationDidUnhide ( )
signal

Emitted when macOS unhides the application.

◆ applicationWillHide

void VuoEditor::applicationWillHide ( )
signal

Emitted when macOS hides the application.

◆ cancelQuit

void VuoEditor::cancelQuit ( )
slot

Called by VuoEditorWindow after the user has cancelled a window-close request.

If a quit is in progress, it is cancelled (by clearing the list of windows awaiting user action), and the node library is reenabled.

Definition at line 772 of file VuoEditor.cc.

◆ canvasOpacityChanged

void VuoEditor::canvasOpacityChanged ( )
signal

Emitted when the user selects a new "Canvas Transparency" menu item.

◆ clearAllOpenRecentFileMenus

void VuoEditor::clearAllOpenRecentFileMenus ( )
slot

Clears the list of recently opened files from the application-global "File > Open Recent" menu list, and synchronizes each editor window's "File > Open Recent" menu with the global version.

Definition at line 2267 of file VuoEditor.cc.

◆ continueQuit

void VuoEditor::continueQuit ( QMainWindow *  window)
slot

Called by VuoEditorWindow or VuoCodeWindow after the user has confirmed a window-close request.

If a quit is in progress, the specified window is removed from the list of windows awaiting user action. Then we try closing the next window (or if the list is now empty, we really quit).

Definition at line 798 of file VuoEditor.cc.

◆ darkInterfaceToggled

void VuoEditor::darkInterfaceToggled ( bool  isDark)
signal

Emitted when the user changes the "Dark Interface" menu item.

◆ event()

bool VuoEditor::event ( QEvent *  e)
protected

Reimplements QApplication::event(), to handle application-wide events.

Definition at line 1643 of file VuoEditor.cc.

◆ generateHtmlDocumentationStyles()

QString VuoEditor::generateHtmlDocumentationStyles ( bool  forBrowser = true,
bool  isDark = false 
)
static

Returns the HTML <style> block for use in node set and node documentation.

When forBrowser is true, the styles are adjusted for viewing in a large web browser. When false, the styles are adjusted for viewing in the small node documentation panel

Definition at line 2466 of file VuoEditor.cc.

◆ generateMainHtmlPageForNodeSet()

void VuoEditor::generateMainHtmlPageForNodeSet ( VuoNodeSet nodeSet,
string  saveFileName,
bool  publishInternalVuoLinks 
)

Generates the main HTML documentation page for the provided nodeSet, and saves it at the provided saveFileName.

Definition at line 2493 of file VuoEditor.cc.

◆ generateNodeClassHtmlPagesForNodeSet()

void VuoEditor::generateNodeClassHtmlPagesForNodeSet ( VuoNodeSet nodeSet,
string  saveDir,
bool  publishInternalVuoLinks 
)

Generates the HTML documentation pages for non-deprecated node classes belonging to the provided nodeSet, and saves them in provided saveDir.

If publishInternalVuoLinks is true, maps internal vuo-node:// and vuo-nodeset:// links to the appropriate relative links for use within web documentation. This function is not responsible for ensuring that the target files referenced by those links actually exist.

If publishInternalVuoLinks is false, filters out internal links instead of mapping them to external links.

Definition at line 2640 of file VuoEditor.cc.

◆ getBuiltInDriverForProtocol()

VuoCompilerDriver * VuoEditor::getBuiltInDriverForProtocol ( VuoProtocol protocol)

Returns the built-in driver for the provided protocol, or NULL if none.

Definition at line 2960 of file VuoEditor.cc.

◆ getCanvasOpacity()

int VuoEditor::getCanvasOpacity ( void  )

Returns the current opacity level of the canvas, where 0 is fully transparent and 255 is fully opaque.

Definition at line 3212 of file VuoEditor.cc.

◆ getClipboardText()

QString VuoEditor::getClipboardText ( )
static

Returns the text content of the clipboard, or the empty string if the clipboard does not contain text content.

Definition at line 2843 of file VuoEditor.cc.

◆ getDefaultCompositionStorageDirectory()

QString VuoEditor::getDefaultCompositionStorageDirectory ( )
static

Returns the default directory to be used for opening and saving Vuo compositions.

Definition at line 2317 of file VuoEditor.cc.

◆ getDefaultSubcompositionPrefix()

QString VuoEditor::getDefaultSubcompositionPrefix ( )

Returns the default string to be used as the subcomposition prefix for this user if it has not been customized by the user.

Definition at line 3412 of file VuoEditor.cc.

◆ getDocumentationQueue()

dispatch_queue_t VuoEditor::getDocumentationQueue ( )

Returns the dispatch queue to be used for documentation-related tasks, such as extracting resources from node set archives.

Definition at line 3191 of file VuoEditor.cc.

◆ getExampleCompositionsForProtocol()

map< QString, QString > VuoEditor::getExampleCompositionsForProtocol ( VuoProtocol protocol)

Returns a map containing the example compositions to be listed in association with the provided protocol in the "File > Open Example" menu, and the node sets to which they belong.

Definition at line 3328 of file VuoEditor.cc.

◆ getGlobalMovieExportSettings()

void VuoEditor::getGlobalMovieExportSettings ( int &  width,
int &  height,
double &  time,
double &  duration,
double &  framerate,
int &  spatialSupersample,
int &  temporalSupersample,
float &  shutterAngle,
QString &  imageFormat,
double &  quality 
)

Returns the current global movie export settings.

Definition at line 1942 of file VuoEditor.cc.

◆ getGlobalShaderDocumentationVisibility()

bool VuoEditor::getGlobalShaderDocumentationVisibility ( )

Returns the current global shader documentation setting.

Definition at line 1842 of file VuoEditor.cc.

◆ getPreferredNodeDocumentationPanelHeight()

int VuoEditor::getPreferredNodeDocumentationPanelHeight ( )

Returns the preferred node documentation panel height as indicated in stored user preferences and/or actions performed since the stored preferences were last applied.

Definition at line 2858 of file VuoEditor.cc.

◆ getPreferredNodeLibraryWidth()

int VuoEditor::getPreferredNodeLibraryWidth ( )

Returns the preferred node library width as indicated in stored user preferences and/or actions performed since the stored preferences were last applied.

Definition at line 2867 of file VuoEditor.cc.

◆ getResourceDirectoryForNodeSet()

string VuoEditor::getResourceDirectoryForNodeSet ( string  nodeSetName)

Returns the resource directory associated with the provided nodeSetName.

If no such resource directory exists, returns the empty string. The existence of the resource directory implies that all resources (e.g., images) associated with the node set have already been extracted, and all HTML pages for the node set and its node classes have already been generated and saved within this directory.

Definition at line 2879 of file VuoEditor.cc.

◆ getStoredUserProfileURL()

string VuoEditor::getStoredUserProfileURL ( )

Returns the user profile URL associated with this editor session.

Definition at line 3380 of file VuoEditor.cc.

◆ getSubcompositionPrefix()

QString VuoEditor::getSubcompositionPrefix ( )

Returns the string to be used as the subcomposition prefix for this user.

Definition at line 3403 of file VuoEditor.cc.

◆ getSubcompositionRouter()

VuoSubcompositionMessageRouter * VuoEditor::getSubcompositionRouter ( void  )

Returns the subcomposition message router shared by all open compositions.

Definition at line 2899 of file VuoEditor.cc.

◆ getUberExampleCompositions()

map< QString, QString > VuoEditor::getUberExampleCompositions ( )

Returns a map containing the uberexamplecompositions to be displayed at the top level within the "File > Open Example" menu, and the node sets to which they belong.

Definition at line 3314 of file VuoEditor.cc.

◆ getURLForExampleComposition()

QString VuoEditor::getURLForExampleComposition ( QString  compositionName,
QString  nodeSetName 
)
static

Returns the example composition URL corresponding to the example composition with the provided name and node set.

Definition at line 3355 of file VuoEditor.cc.

◆ getUserName()

string VuoEditor::getUserName ( )

Returns the username associated with this editor session.

Definition at line 3368 of file VuoEditor.cc.

◆ getVuoManualURL()

QString VuoEditor::getVuoManualURL ( )
static

Returns the path of the locally bundled Vuo manual if it exists, or the URL of the manual hosted on vuo.org otherwise.

Definition at line 2300 of file VuoEditor.cc.

◆ globalNodeLibraryStateChanged

void VuoEditor::globalNodeLibraryStateChanged ( VuoNodeLibrary::nodeLibraryState  newState,
VuoNodeLibrary floater,
bool  previousFloaterDestroyed 
)
signal

Emitted after updateGlobalNodeLibraryState() is called.

◆ highlightNewNodeClassInAllLibraries()

void VuoEditor::highlightNewNodeClassInAllLibraries ( string  nodeClassName)

Highlights the requested new node class in all visible node libraries where it is listed, via callback made by each node library's module manager once installation has completed.

Definition at line 2158 of file VuoEditor.cc.

◆ isInterfaceDark()

bool VuoEditor::isInterfaceDark ( void  )

Returns true if the user interface is in dark mode.

Definition at line 3199 of file VuoEditor.cc.

◆ isNodeLibraryCurrentlyDocked()

bool VuoEditor::isNodeLibraryCurrentlyDocked ( )

Returns true if the node library is docked, or false if it is floating.

Definition at line 835 of file VuoEditor.cc.

◆ newComposition

void VuoEditor::newComposition ( void  )
slot

Creates an empty composition editor window.

Definition at line 1255 of file VuoEditor.cc.

◆ newCompositionWithContent()

VuoEditorWindow * VuoEditor::newCompositionWithContent ( string  content,
string  compositionDir = "" 
)

Creates a composition editor window with the provided content.

Returns a pointer to the new window.

Definition at line 1293 of file VuoEditor.cc.

◆ newCompositionWithProtocol

void VuoEditor::newCompositionWithProtocol ( void  )
slot

Creates an empty composition editor window with the active protocol template indicated by the sender.

Definition at line 1304 of file VuoEditor.cc.

◆ newCompositionWithTemplate

void VuoEditor::newCompositionWithTemplate ( void  )
slot

Creates an empty composition editor window with the active window template indicated by the sender.

Definition at line 1334 of file VuoEditor.cc.

◆ openExampleComposition

void VuoEditor::openExampleComposition ( QString  filename,
VuoNodeSet nodeSet,
string  nodeClassToHighlight 
)
slot

Opens a composition editor window for an example composition.

Parameters
filenameThe name of the example composition.
nodeSetThe node set that containst the example composition.
nodeClassToHighlightThe node class name to initially select.

Definition at line 1515 of file VuoEditor.cc.

◆ openExampleCompositionFromUrl

void VuoEditor::openExampleCompositionFromUrl ( const QUrl &  url)
slot

Activates the "vuo-example" URL handler to handle the input url.

Extracts the node set name and example composition name from the URL and opens the example composition.

Sample url format: "vuo-example://vuo.text/RevealWord.vuo"

Definition at line 2819 of file VuoEditor.cc.

◆ openExternalUrlFromSenderData

void VuoEditor::openExternalUrlFromSenderData ( )
slot

Uses an external browser to open the URL associated with the sender action that triggered the call to this slot.

Definition at line 1674 of file VuoEditor.cc.

◆ openFile

void VuoEditor::openFile ( void  )
slot

Displays an "Open File" dialog, and if a composition or shader is selected, opens it in an editor window.

Definition at line 1423 of file VuoEditor.cc.

◆ openFileFromSenderData

void VuoEditor::openFileFromSenderData ( )
slot

Opens the local file at the path associated with the sender action that triggered the call to this slot.

Definition at line 1684 of file VuoEditor.cc.

◆ openFileWithName()

QMainWindow * VuoEditor::openFileWithName ( QString  filename,
bool  addToRecentFileMenu = true 
)

Opens a composition editor window with the specified filename.

Definition at line 1444 of file VuoEditor.cc.

◆ openHelpBook

void VuoEditor::openHelpBook ( )
slot

Launches HelpViewer.app and opens the Vuo Manual to the introduction / table of contents.

Definition at line 1048 of file VuoEditor.cc.

◆ openMostRecentFile

void VuoEditor::openMostRecentFile ( )
slot

Opens the most recent file.

Definition at line 3420 of file VuoEditor.cc.

◆ openRandomExample

void VuoEditor::openRandomExample ( )
slot

Opens a random example composition.

Definition at line 3428 of file VuoEditor.cc.

◆ openUrl

void VuoEditor::openUrl ( const QString &  url)
slot

Determines what type of url has been provided:

  • A Vuo example composition (prefixed with VuoEditor::vuoExampleCompositionScheme), or
  • A URL with the "file://" scheme, assumed to contain the path of a local composition, node class, or shader. Opens the url using the appropriate handler.

Definition at line 1728 of file VuoEditor.cc.

◆ populateCanvasTransparencyMenu()

void VuoEditor::populateCanvasTransparencyMenu ( QMenu *  m)

Populates the provided menu m with items related to canvas transparency.

Definition at line 908 of file VuoEditor.cc.

◆ populateHelpMenu()

void VuoEditor::populateHelpMenu ( QMenu *  m)

Populates the provided menu m with support-related items.

Definition at line 953 of file VuoEditor.cc.

◆ populateNewCompositionWithTemplateMenu()

void VuoEditor::populateNewCompositionWithTemplateMenu ( QMenu *  m)

Populates the provided menu m with the editor's built-in templates.

Definition at line 2974 of file VuoEditor.cc.

◆ populateNewShaderMenu()

void VuoEditor::populateNewShaderMenu ( QMenu *  m)

Populates the provided menu with the templates for shaders.

Definition at line 3139 of file VuoEditor.cc.

◆ populateWindowMenu()

void VuoEditor::populateWindowMenu ( QMenu *  m,
QMainWindow *  currentWindow 
)

Populates the provided menu with window-related items, including the list of open documents.

Definition at line 918 of file VuoEditor.cc.

◆ processQueuedCompositionsToOpen()

void VuoEditor::processQueuedCompositionsToOpen ( )

Iterates through the queue of pending files to open and tries to open each one.

Definition at line 671 of file VuoEditor.cc.

◆ pruneAllOpenRecentFileMenus

void VuoEditor::pruneAllOpenRecentFileMenus ( )
slot

Prunes the list of recently opened files from the application-global "File > Open Recent" menu list, removing any that no longer exist, and synchronizes each editor window's "File > Open Recent" menu with the global version.

Definition at line 2278 of file VuoEditor.cc.

◆ quitCleanly

void VuoEditor::quitCleanly ( )
slot

Initiates final cleanup, and attempts to close all windows.

Definition at line 742 of file VuoEditor.cc.

◆ recentFiles()

QStringList VuoEditor::recentFiles ( )

Returns the list of recently-opened files.

Definition at line 733 of file VuoEditor.cc.

◆ reevaluateWelcomePrecedence()

void VuoEditor::reevaluateWelcomePrecedence ( )

Allow pending file-open events to override the welcome window display if the welcome window is in a state where it is allowed to be closed.

Definition at line 687 of file VuoEditor.cc.

◆ registerOpenDocument()

void VuoEditor::registerOpenDocument ( QMainWindow *  window)

Updates the application UI immediately (on creation of window) and when window is destroyed.

Definition at line 1240 of file VuoEditor.cc.

◆ removeFileFromSenderData

void VuoEditor::removeFileFromSenderData ( )
slot

Removes (by moving to the Trash) the file at the path associated with the sender action that triggered the call to this slot.

Definition at line 1699 of file VuoEditor.cc.

◆ removeVuoLinks()

string VuoEditor::removeVuoLinks ( string  markdownText)
static

Filters out internal vuo-node:// and vuo-nodeset:// links within the provided markdownText, encapsulating the previously linked text in backticks.

Definition at line 2800 of file VuoEditor.cc.

◆ setDocumentationGenerationDirectory()

void VuoEditor::setDocumentationGenerationDirectory ( string  dir)
static

Sets the directory in which to save generated node documentation.

If this value is non-empty when the VuoEditor is instantiated, the editor will generate the full collection of node class and node set documentation, save it within the provided directory, and exit.

Definition at line 3304 of file VuoEditor.cc.

◆ setResourceDirectoryForNodeSet()

void VuoEditor::setResourceDirectoryForNodeSet ( string  nodeSetName,
string  directory 
)

Sets the resource directory associated with the provided nodeSetName to the provided directory.

Definition at line 2891 of file VuoEditor.cc.

◆ showGridToggled

void VuoEditor::showGridToggled ( )
signal

Emitted when the user toggles the "Grid > Lines" or "Grid > Points" menu item.

◆ showNodeDocumentationFromUrl

void VuoEditor::showNodeDocumentationFromUrl ( const QUrl &  url)
slot

Activates the "vuo-node" URL handler to handle the input url.

Extracts the node class name from the URL and displays its documentation in the node library documentation pane.

Sample url format: "vuo-node://vuo.math.calculate"

Definition at line 2449 of file VuoEditor.cc.

◆ showNodeLibrary

void VuoEditor::showNodeLibrary ( void  )
slot

Shows the Node Class Library browser and focuses its text filter.

Definition at line 1556 of file VuoEditor.cc.

◆ showNodeSetDocumentationFromUrl

void VuoEditor::showNodeSetDocumentationFromUrl ( const QUrl &  url)
slot

Activates the "vuo-nodeset" URL handler to handle the input url.

Extracts the node set name from the URL and displays its documentation in an external browser.

Sample url format: "vuo-nodeset://vuo.math"

Definition at line 2407 of file VuoEditor.cc.

◆ synchronizeOpenRecentFileMenus

void VuoEditor::synchronizeOpenRecentFileMenus ( )
slot

Synchronizes each editor window's "File > Open Recent" menu with the global version, and saves the updated file list to the stored application settings.

Definition at line 2288 of file VuoEditor.cc.

◆ updateGlobalShaderDocumentationVisibility()

void VuoEditor::updateGlobalShaderDocumentationVisibility ( bool  isVisible)

Updates the global shader documentation setting to match isVisible.

Definition at line 1833 of file VuoEditor.cc.

◆ updateSubcompositionPrefix()

void VuoEditor::updateSubcompositionPrefix ( QString  prefix)

Sets the global subcomposition prefix to the value provided; stores the provided value as a preference in the settings.

Definition at line 3393 of file VuoEditor.cc.

Member Data Documentation

◆ canvasTransparencyHighAction

QAction* VuoEditor::canvasTransparencyHighAction

Makes the canvas highly transparent.

Definition at line 91 of file VuoEditor.hh.

◆ canvasTransparencyNoneAction

QAction* VuoEditor::canvasTransparencyNoneAction

Makes the canvas opaque.

Definition at line 89 of file VuoEditor.hh.

◆ canvasTransparencyOptions

QActionGroup* VuoEditor::canvasTransparencyOptions

Actions for changing canvas transparency.

Definition at line 88 of file VuoEditor.hh.

◆ canvasTransparencySlightAction

QAction* VuoEditor::canvasTransparencySlightAction

Makes the canvas slightly transparent.

Definition at line 90 of file VuoEditor.hh.

◆ showGridLinesAction

QAction* VuoEditor::showGridLinesAction

Toggles grid line rendering.

Definition at line 82 of file VuoEditor.hh.

◆ showGridPointsAction

QAction* VuoEditor::showGridPointsAction

Toggles grid point rendering.

Definition at line 83 of file VuoEditor.hh.

◆ snapToGridAction

QAction* VuoEditor::snapToGridAction

Toggles grid snapping.

Definition at line 84 of file VuoEditor.hh.

◆ vuoCompositionFileExtension

const QString VuoEditor::vuoCompositionFileExtension = "vuo"
static

The file extension for Vuo compositions.

Definition at line 97 of file VuoEditor.hh.

◆ vuoExampleCompositionScheme

const QString VuoEditor::vuoExampleCompositionScheme = "vuo-example"
static

The URL scheme used for opening example compositions.

Definition at line 95 of file VuoEditor.hh.

◆ vuoExampleHighlightedNodeClassQueryItem

const QString VuoEditor::vuoExampleHighlightedNodeClassQueryItem = "nodeClass"
static

The query item expected to indicate what node class to highlight within an example composition.

Definition at line 96 of file VuoEditor.hh.

◆ vuoHelpBookScheme

const QString VuoEditor::vuoHelpBookScheme = "vuo-help"
static

The URL scheme used for opening a section of the user manual.

Definition at line 92 of file VuoEditor.hh.

◆ vuoNodeClassFileExtension

const QString VuoEditor::vuoNodeClassFileExtension = "vuonode"
static

The file extension for Vuo node classes.

Definition at line 98 of file VuoEditor.hh.

◆ vuoNodeDocumentationScheme

const QString VuoEditor::vuoNodeDocumentationScheme = "vuo-node"
static

The URL scheme used for opening node documentation.

Definition at line 94 of file VuoEditor.hh.

◆ vuoNodeSetDocumentationScheme

const QString VuoEditor::vuoNodeSetDocumentationScheme = "vuo-nodeset"
static

The URL scheme used for opening node set documentation.

Definition at line 93 of file VuoEditor.hh.

◆ vuoTutorialURL

const QString VuoEditor::vuoTutorialURL = "https://vuo.org/tutorials"
static

The URL for Vuo tutorial videos.

Definition at line 99 of file VuoEditor.hh.


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