Script
Public Slots | Public Member Functions | List of all members
selection Class Reference

With the Selection functions, you can retrieve information about the modules or columns you have selected within a view. These functions work best if run from an icon in the Views Toolbar. More...

#include <selinterface.h>

Inheritance diagram for selection:
Inheritance graph
[legend]
Collaboration diagram for selection:
Collaboration graph
[legend]

Public Slots

int numberOfNodesSelected () const
 returns the number of modules that are selected.
 
QString selectedNode (int i) const
 returns the path of the selected node
 
int numberOfColumnsSelected () const
 returns a value for the number of columns selected in the xsheet.
 
QString selectedColumn (int i) const
 returns the ith column selected in the xsheet.
 
bool clearSelection ()
 Clear the selection.
 
bool addNodeToSelection (QString node)
 Add a node to the selection.
 
bool addColumnToSelection (QString column)
 Add a column to the selection.
 
bool addDrawingColumnToSelection (QString columnName)
 Adds the drawing column and it's associated read node to the selection.
 
bool extendSelectionWithColumn (QString columnName)
 Adds the column to the selection. If the column is a drawing column, also adds the associated read node to the selection.
 
void setSelectionFrameRange (int start, int length)
 Sets the selection frame range.
 
void selectAll ()
 selects all nodes and all columns in the scene
 

Public Member Functions

 selection (QObject *parent, const char *name)
 

Detailed Description

With the Selection functions, you can retrieve information about the modules or columns you have selected within a view. These functions work best if run from an icon in the Views Toolbar.

function dumpSelectedColumn()
{
// The numberOfCellColumnsSelected function loops to check all of the selected columns and determine their frame values.
//The selectedCellColumn function prints the name of the selected column to the shell and
// then loops through the values in the column to print them as well.
var ncol = selection.numberOfCellColumnsSelected();
var nframe = frame.numberOf();
var i;
for (i = 0; i < ncol; ++i)
{
var f;
var c = selection.selectedCellColumn(i);
System.println("Column " + c);
for (f = 1; f <= nframe; ++f)
{
var value = column.getEntry(c, 1, f);
var keyframe = column.isKeyFrame(c, 1, f);
if (keyframe) value += " (keyframe)";
System.println(" " + f + ": " + value);
}
}
}

Constructor & Destructor Documentation

selection::selection ( QObject *  parent,
const char *  name 
)

Member Function Documentation

bool selection::addColumnToSelection ( QString  column)
slot

Add a column to the selection.

returns whether columns was located and successfully added to the selection

Parameters
columnname of column
bool selection::addDrawingColumnToSelection ( QString  columnName)
slot

Adds the drawing column and it's associated read node to the selection.

Parameters
columnsnamedisplayed name of column
bool selection::addNodeToSelection ( QString  node)
slot

Add a node to the selection.

returns whether node was located and successfully added to the selection

Parameters
nodename of node
bool selection::clearSelection ( )
slot

Clear the selection.

bool selection::extendSelectionWithColumn ( QString  columnName)
slot

Adds the column to the selection. If the column is a drawing column, also adds the associated read node to the selection.

Parameters
columnsnamedisplayed name of column
int selection::numberOfColumnsSelected ( ) const
slot

returns a value for the number of columns selected in the xsheet.

int selection::numberOfNodesSelected ( ) const
slot

returns the number of modules that are selected.

void selection::selectAll ( )
slot

selects all nodes and all columns in the scene

QString selection::selectedColumn ( int  i) const
slot

returns the ith column selected in the xsheet.

QString selection::selectedNode ( int  i) const
slot

returns the path of the selected node

void selection::setSelectionFrameRange ( int  start,
int  length 
)
slot

Sets the selection frame range.

Parameters
startbeginning frame
lengthnb of frames selected

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