CaptionManager Class Reference

The CaptionManager JavaScript class. Access the caption properties of a panel. More...

Public Slots

Panel
int numberOfPanelCaptions ()
 Return the number of panel captions. More...
 
String nameOfPanelCaption (int index)
 Return the name of the panel caption at the given index. More...
 
String textOfPanelCaption (String &name, String &panelId)
 Return the text of the panel caption. More...
 
bool addPanelCaption (String &name)
 Add a panel caption. More...
 
bool addPanelSketch (String &name, String &panelId)
 Add a panel sketch. More...
 
bool deletePanelCaption (String &name)
 Delete a panel caption. More...
 
bool deletePanelSketch (String &name, String &panelId)
 Delete a panel sketch. More...
 
bool renamePanelCaption (String &name, String &newName)
 Rename a panel caption. More...
 
bool renamePanelSketch (String &name, String &panelId, String &newName)
 Rename a panel sketch. More...
 
bool setPanelCaptionText (String &name, String &panelId, String &text)
 Set text on a panel caption. More...
 
Project
int numberOfProjectCaptions ()
 Return the number of project captions. More...
 
String nameOfProjectCaption (int index)
 Return the name of the panel caption at the given index. More...
 
bool addProjectCaption (String &name)
 Add a project caption. More...
 
String textOfProjectCaption (String &name)
 Return the text of the project caption. More...
 
bool deleteProjectCaption (String &name)
 Delete a project caption. More...
 
bool renameProjectCaption (String &name, String &newName)
 Rename a project caption. More...
 
bool setProjectCaptionText (String &name, String &text)
 Set new text in a project caption. More...
 

Detailed Description

The CaptionManager JavaScript class. Access the caption properties of a panel.

Note
The text in captions is in the html format.
var cm = new CaptionManager();
var sb = new StoryboardManager();
// Retrieve the first panel in the project.
var panelId = sb.panelInProject(0);
var str = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\
<html>\
<head>\
<meta name=\"qrichtext\" content=\"1\" />\
<style type=\"text/css\">p, li { white-space: pre-wrap; }</style>\
</head>\
<body style=\" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;\">\
<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">New Text</p>\
</body>\
</html>";
// Add a caption named Private Notes, and assign the string to the caption in the first panel
if (cm.addPanelCaption("Private Notes"))
cm.setPanelCaptionText("Private Notes", panelId, str);

Member Function Documentation

◆ addPanelCaption

bool CaptionManager::addPanelCaption ( String &  name)
slot

Add a panel caption.

Parameters
name- The title of the caption

◆ addPanelSketch

bool CaptionManager::addPanelSketch ( String &  name,
String &  panelId 
)
slot

Add a panel sketch.

Parameters
name- The title of the caption
panelId- The uniqueId of panel

◆ addProjectCaption

bool CaptionManager::addProjectCaption ( String &  name)
slot

Add a project caption.

Parameters
name- The title of Caption

◆ deletePanelCaption

bool CaptionManager::deletePanelCaption ( String &  name)
slot

Delete a panel caption.

Parameters
name- The title of the caption

◆ deletePanelSketch

bool CaptionManager::deletePanelSketch ( String &  name,
String &  panelId 
)
slot

Delete a panel sketch.

Parameters
name- The title of the caption
panelId- The uniqueId of panel

◆ deleteProjectCaption

bool CaptionManager::deleteProjectCaption ( String &  name)
slot

Delete a project caption.

Parameters
name- The title of the caption

◆ nameOfPanelCaption

String CaptionManager::nameOfPanelCaption ( int  index)
slot

Return the name of the panel caption at the given index.

Parameters
index- The index of the ith caption in the scene

◆ nameOfProjectCaption

String CaptionManager::nameOfProjectCaption ( int  index)
slot

Return the name of the panel caption at the given index.

Parameters
index- The position of the caption
Returns
The name of the ith panel caption

◆ numberOfPanelCaptions

int CaptionManager::numberOfPanelCaptions ( )
slot

Return the number of panel captions.

Returns
The number of panel captions

◆ numberOfProjectCaptions

int CaptionManager::numberOfProjectCaptions ( )
slot

Return the number of project captions.

◆ renamePanelCaption

bool CaptionManager::renamePanelCaption ( String &  name,
String &  newName 
)
slot

Rename a panel caption.

Parameters
name- The existing title of the caption
newName- The new title of the caption

◆ renamePanelSketch

bool CaptionManager::renamePanelSketch ( String &  name,
String &  panelId,
String &  newName 
)
slot

Rename a panel sketch.

Parameters
name- The title of the caption
panelId- The uniqueId of panel
newName- The new title of the caption

◆ renameProjectCaption

bool CaptionManager::renameProjectCaption ( String &  name,
String &  newName 
)
slot

Rename a project caption.

Parameters
name- The title of the caption
newName- The new title of the caption

◆ setPanelCaptionText

bool CaptionManager::setPanelCaptionText ( String &  name,
String &  panelId,
String &  text 
)
slot

Set text on a panel caption.

Parameters
name- The title of the caption
panelId- The uniqueId of the panel
text- The new text formated in HTML

◆ setProjectCaptionText

bool CaptionManager::setProjectCaptionText ( String &  name,
String &  text 
)
slot

Set new text in a project caption.

Parameters
name- The title of the caption
text- A new text for the caption
Returns
True if the project caption text was set.

◆ textOfPanelCaption

String CaptionManager::textOfPanelCaption ( String &  name,
String &  panelId 
)
slot

Return the text of the panel caption.

Parameters
name- The title of the caption
panelId- The uniqueId of the panel

◆ textOfProjectCaption

String CaptionManager::textOfProjectCaption ( String &  name)
slot

Return the text of the project caption.

Parameters
name- The title of Caption