TinkerCell Core 1.0
TinkerCell's Core library providing all basic functionalities
Public Attributes
Tinkercell::NetworkHandle Class Reference

A class that is used to store a network. The network is a collection of Item Handles. The history stack is also a key component of a network. The network can either be represented as text using TextEditor or visualized with graphical items in the GraphicsScene. Each node and connection are contained in a handle, and each handle can either be represented as text or as graphics. The two main components of NetworkWindow are the SymbolsTable and HistoryStack This class provides functions for inserting items, removing items, and changing information inside the model. More...

#include <NetworkHandle.h>

Collaboration diagram for Tinkercell::NetworkHandle:
Collaboration graph
[legend]

List of all members.

Public Slots

slots

update the symbols table that stores all the symbols in the network

virtual void updateSymbolsTable ()
 updates the symbols table
virtual void updateSymbolsTable (int)
 updates the symbols table. The int argument is so that this can be connected to the history changed signal
virtual void close ()
 updates the symbols table. The int argument is so that this can be connected to the history changed signal
virtual void undo ()
 undo last command
virtual void redo ()
 redo last command
virtual void push (QUndoCommand *)
 push a new command into the history stack

Public Member Functions

Constructor and destructor
 NetworkHandle (MainWindow *)
 constructor
virtual ~NetworkHandle ()
 destructor
Get items

get the set of items in the model

virtual QList< ItemHandle * > handles (bool sort=false) const
 get all the items in this network
virtual QList< ItemHandle * > handlesSortedByFamily () const
 get list of all items sorted according to family
virtual ItemHandleglobalHandle ()
 the model global item
virtual QString annotations () const
 all free floating text in the visual diagram
virtual GraphicsScenecurrentScene () const
 gets the current scene that is active
virtual TextEditorcurrentTextEditor () const
 gets the text editor that is active
virtual NetworkWindowcurrentWindow () const
 gets the window that is active
virtual void showScene (GraphicsScene *)
 show the window that contains the given scene
virtual void showTextEditor (TextEditor *)
 show the window that contains the given text editor
ConsoleWindowconsole () const
 same as main window's console()
find item handles and data tables
QList< ItemHandle * > findItem (const QString &) const
 get all the items with the given name. Returns a list for non-unique names
QList< ItemHandle * > findItem (const QRegExp &) const
 get all the items with the given name pattern.
QList< ItemHandle * > findItem (const QStringList &) const
 get all the items with the given name. returned list may be longer if names are non-unique
QList< QPair< ItemHandle
*, QString > > 
findData (const QString &) const
 get all the items and corresponding data table name that contains the given string. if non-unique, returns a list
QList< QPair< ItemHandle
*, QString > > 
findData (const QStringList &) const
 get all the items and corresponding data table name that contains the given string. if non-unique, returns a list
QList< QPair< ItemHandle
*, QString > > 
findData (const QRegExp &) const
 get all the items and corresponding data table name that contains the given pattern. if non-unique, returns a list
create scene or editor
virtual void remove (const QString &name, const QList< QGraphicsItem * > &items)
 this command performs a removal and also adds undo command to history window and emits associated signal(s)
virtual void remove (const QString &name, const QList< ItemHandle * > &items)
 this command performs a removal and also adds undo command to history window and emits associated signal(s)
virtual QList< GraphicsScene * > scenes () const
 get all the graphics scenes used to illustrate this network
virtual QList< TextEditor * > editors () const
 get all the text editors used to express this network
virtual GraphicsScenecreateScene (const QList< QGraphicsItem * > &insertItems=QList< QGraphicsItem * >())
 create a new scene for this network
virtual GraphicsScenecreateScene (ItemHandle *, const QRectF &boundingRect=QRectF())
 create a new scene that gets all the items inside the given item handle.
virtual TextEditorcreateTextEditor (const QString &text=QString())
 create a new text editor for this network
virtual void setWindowTitle (const QString &)
 set all the title for each window representing this network
virtual QString windowTitle () const
 get the title for current window representing this network
virtual bool parseMath (QString &, QStringList &, QStringList &, QList< ItemHandle * > &)
 checks whether a string is a correct formula.
virtual QString makeUnique (const QString &, const QStringList &doNotUseNames=QStringList()) const
 checks whether the given string names a unique item or data entry
virtual QString makeUnique (ItemHandle *handle, const QStringList &doNotUseNames=QStringList()) const
 checks whether the given handle's name is unique and returns a new name. Note that this can be different from makeUnqiue for strings, because this function will check if an existing name belongs to the given handle, in which case no change is needed.
virtual QStringList makeUnique (const QStringList &, const QStringList &doNotUseNames=QStringList()) const
 checks whether the given string names a unique item or data entry
rename items

These functions automatically perform history updates and send appropriate signals, which will inform the other tools that an insertion or deletion has taken place.

virtual QString rename (const QString &oldname, const QString &new_name)
 rename item and also adds undo command to history window and emits associated signal(s)
virtual QString rename (ItemHandle *item, const QString &new_name)
 rename an item and also adds undo command to history window and emits associated signal(s)
virtual QStringList rename (const QList< ItemHandle * > &items, const QList< QString > &new_names)
 rename items and also adds undo command to history window and emits associated signal(s)
change parents of items

These functions automatically perform history updates and send appropriate signals, which will inform the other tools that an insertion or deletion has taken place.

virtual void setParentHandle (const QList< ItemHandle * > &handles, const QList< ItemHandle * > &parentHandles)
 change parent handles and also adds undo command to history window and emits associated signal(s)
virtual void setParentHandle (ItemHandle *child, ItemHandle *parent)
 change parent handle and also adds undo command to history window and emits associated signal(s)
virtual void setParentHandle (const QList< ItemHandle * > children, ItemHandle *parent)
 change parent for handles and also adds undo command to history window and emits associated signal(s)
virtual void setHandleFamily (const QList< ItemHandle * > &handles, const QList< ItemFamily * > &newfamilies)
 change handles families and also adds undo command to history window and emits associated signal(s)
virtual void setHandleFamily (ItemHandle *handle, ItemFamily *newfamily)
 change handle and also adds undo command to history window and emits associated signal(s)
virtual void setHandleFamily (const QList< ItemHandle * > handles, ItemFamily *newfamily)
 change family for handles and also adds undo command to history window and emits associated signal(s)
change data in one or more items

These functions automatically perform history updates and send appropriate signals, which will inform the other tools that an insertion or deletion has taken place.

virtual void changeData (const QString &name, ItemHandle *handle, const QString &hashstring, const NumericalDataTable *newdata)
 change numerical data table and also adds undo command to history window and emits associated signal(s)
virtual void changeData (const QString &name, const QList< ItemHandle * > &handles, const QList< QString > &hashstring, const QList< NumericalDataTable * > &newdata)
 change a list of numerical data tables and also adds undo command to history window and emits associated signal(s)
virtual void changeData (const QString &name, const QList< ItemHandle * > &handles, const QString &hashstring, const QList< NumericalDataTable * > &newdata)
 change a list of numerical data tables and also adds undo command to history window and emits associated signal(s)
virtual void changeData (const QString &name, ItemHandle *handle, const QString &hashstring, const TextDataTable *newdata)
 change text data table and also adds undo command to history window and emits associated signal(s)
virtual void changeData (const QString &name, const QList< ItemHandle * > &handles, const QList< QString > &hashstring, const QList< TextDataTable * > &newdata)
 change a list of text data tables and also adds undo command to history window and emits associated signal(s)
virtual void changeData (const QString &name, const QList< ItemHandle * > &handles, const QString &hashstring, const QList< TextDataTable * > &newdata)
 change a list of text data tables and also adds undo command to history window and emits associated signal(s)
virtual void changeData (const QString &name, ItemHandle *handle, const QString &hashstring, const NumericalDataTable *newdata1, const TextDataTable *newdata2)
 change two types of data tables and also adds undo command to history window and emits associated signal(s)
virtual void changeData (const QString &name, const QList< ItemHandle * > &handles, const QList< QString > &hashstring, const QList< NumericalDataTable * > &newdata1, const QList< TextDataTable * > &newdata2)
 change a list of two types of data tables and also adds undo command to history window and emits associated signal(s)
virtual void changeData (const QString &name, const QList< ItemHandle * > &handles, const QString &hashstring, const QList< NumericalDataTable * > &newdata1, const QList< TextDataTable * > &newdata2)
 change a list of two types of data tables and also adds undo command to history window and emits associated signal(s)
virtual void changeData (const QString &name, const QList< ItemHandle * > &handles, const QList< NumericalDataTable * > &olddata1, const QList< NumericalDataTable * > &newdata1)
 change a list of two types of data tables and also adds undo command to history window and emits associated signal(s)
virtual void changeData (const QString &name, const QList< ItemHandle * > &handles, const QList< TextDataTable * > &olddata2, const QList< TextDataTable * > &newdata2)
 change a list of two types of data tables and also adds undo command to history window and emits associated signal(s)
virtual void changeData (const QString &name, const QList< ItemHandle * > &handles, const QList< NumericalDataTable * > &olddata1, const QList< NumericalDataTable * > &newdata1, const QList< TextDataTable * > &olddata2, const QList< TextDataTable * > &newdata2)
 change a list of two types of data tables and also adds undo command to history window and emits associated signal(s)
virtual void changeData (const QString &name, const QList< ItemHandle * > &handles, NumericalDataTable *olddata1, const NumericalDataTable *newdata1, TextDataTable *olddata2, const TextDataTable *newdata2)
 change a two types of data tables and also adds undo command to history window and emits associated signal(s)
virtual void changeData (const QString &name, const QList< ItemHandle * > &handles, NumericalDataTable *olddata1, const NumericalDataTable *newdata1)
 change a data table and also adds undo command to history window and emits associated signal(s)
virtual void changeData (const QString &name, const QList< ItemHandle * > &handles, TextDataTable *olddata1, const TextDataTable *newdata1)
 change a data table and also adds undo command to history window and emits associated signal(s)
virtual void assignHandles (const QList< QGraphicsItem * > &items, ItemHandle *newHandle)
 assign the handle for one or more items
virtual void mergeHandles (const QList< ItemHandle * > &handles)
 merge the graphics items and children of two or more handles
virtual void setModelValues (const QStringList &names, const QList< double > &values, int column=0, const QString &defaultDataTable=QString())
 assign the values for the given strings. if data table has multiple columns, provide the column number in the argument
virtual void setModelValues (const QStringList &names, const QStringList &values, int column=0, const QString &defaultDataTable=QString())
 assign the values for the given strings. if data table has multiple columns, provide the column number in the argument
virtual void setModelValues (const NumericalDataTable &newvalues, const QString &defaultDataTable=QString())
 assign the values for the given strings. if data table has multiple columns, provide the column number in the argument
virtual void setModelValues (const TextDataTable &newvalues, const QString &defaultDataTable=QString())
 assign the values for the given strings. if data table has multiple columns, provide the column number in the argument

Public Attributes

QUndoStack history
 the undo stack
SymbolsTable symbolsTable
 holds a hash of all items and data in this scene.

signals

class GraphicsView
class GraphicsScene
class TextEditor
class MainWindow
class NetworkWindow
class SymbolsTable
void itemsRenamed (NetworkHandle *network, const QList< ItemHandle * > &items, const QList< QString > &oldnames, const QList< QString > &newnames)
 signals whenever an item is renamed
void parentHandleChanged (NetworkHandle *network, const QList< ItemHandle * > &, const QList< ItemHandle * > &)
 signals whenever item parent handle is changed
void handleFamilyChanged (NetworkHandle *network, const QList< ItemHandle * > &, const QList< ItemFamily * > &)
 signals whenever item handles' families are changed
void dataChanged (const QList< ItemHandle * > &items)
 signals whenever some data is changed
void handlesChanged (NetworkHandle *network, const QList< QGraphicsItem * > &items, const QList< ItemHandle * > &old)
 signals whenever the handles for graphics items have changed
void historyChanged (int i=0)
 one of more changed have occurred in the history window of the current scene

Detailed Description

A class that is used to store a network. The network is a collection of Item Handles. The history stack is also a key component of a network. The network can either be represented as text using TextEditor or visualized with graphical items in the GraphicsScene. Each node and connection are contained in a handle, and each handle can either be represented as text or as graphics. The two main components of NetworkWindow are the SymbolsTable and HistoryStack This class provides functions for inserting items, removing items, and changing information inside the model.

Definition at line 53 of file NetworkHandle.h.


Constructor & Destructor Documentation

Tinkercell::NetworkHandle::NetworkHandle ( MainWindow main)

constructor

Definition at line 309 of file NetworkHandle.cpp.

Here is the call graph for this function:

Tinkercell::NetworkHandle::~NetworkHandle ( ) [virtual]

destructor

Definition at line 34 of file NetworkHandle.cpp.

Here is the call graph for this function:


Member Function Documentation

QString Tinkercell::NetworkHandle::annotations ( ) const [virtual]

all free floating text in the visual diagram

Returns:
QString

Definition at line 1202 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::assignHandles ( const QList< QGraphicsItem * > &  items,
ItemHandle newHandle 
) [virtual]

assign the handle for one or more items

Definition at line 952 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::changeData ( const QString &  name,
ItemHandle handle,
const QString &  hashstring,
const NumericalDataTable newdata 
) [virtual]

change numerical data table and also adds undo command to history window and emits associated signal(s)

change numerical data table

Definition at line 536 of file NetworkHandle.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::NetworkHandle::changeData ( const QString &  name,
const QList< ItemHandle * > &  handles,
const QList< QString > &  hashstring,
const QList< NumericalDataTable * > &  newdata 
) [virtual]

change a list of numerical data tables and also adds undo command to history window and emits associated signal(s)

change a list of numerical data tables

Definition at line 550 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::changeData ( const QString &  name,
const QList< ItemHandle * > &  handles,
const QString &  hashstring,
const QList< NumericalDataTable * > &  newdata 
) [virtual]

change a list of numerical data tables and also adds undo command to history window and emits associated signal(s)

change a list of numerical data tables

Definition at line 573 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::changeData ( const QString &  name,
ItemHandle handle,
const QString &  hashstring,
const TextDataTable newdata 
) [virtual]

change text data table and also adds undo command to history window and emits associated signal(s)

change text data table

Definition at line 596 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::changeData ( const QString &  name,
const QList< ItemHandle * > &  handles,
const QList< QString > &  hashstring,
const QList< TextDataTable * > &  newdata 
) [virtual]

change a list of text data tables and also adds undo command to history window and emits associated signal(s)

change a list of text data tables

Definition at line 609 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::changeData ( const QString &  name,
const QList< ItemHandle * > &  handles,
const QString &  hashstring,
const QList< TextDataTable * > &  newdata 
) [virtual]

change a list of text data tables and also adds undo command to history window and emits associated signal(s)

change a list of text data tables

Definition at line 632 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::changeData ( const QString &  name,
ItemHandle handle,
const QString &  hashstring,
const NumericalDataTable newdata1,
const TextDataTable newdata2 
) [virtual]

change two types of data tables and also adds undo command to history window and emits associated signal(s)

change two types of data tables

Definition at line 655 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::changeData ( const QString &  name,
const QList< ItemHandle * > &  handles,
const QList< QString > &  hashstring,
const QList< NumericalDataTable * > &  newdata1,
const QList< TextDataTable * > &  newdata2 
) [virtual]

change a list of two types of data tables and also adds undo command to history window and emits associated signal(s)

change a list of two types of data tables

Definition at line 669 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::changeData ( const QString &  name,
const QList< ItemHandle * > &  handles,
const QString &  hashstring,
const QList< NumericalDataTable * > &  newdata1,
const QList< TextDataTable * > &  newdata2 
) [virtual]

change a list of two types of data tables and also adds undo command to history window and emits associated signal(s)

change a list of two types of data tables

Definition at line 704 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::changeData ( const QString &  name,
const QList< ItemHandle * > &  handles,
const QList< NumericalDataTable * > &  olddata1,
const QList< NumericalDataTable * > &  newdata1 
) [virtual]

change a list of two types of data tables and also adds undo command to history window and emits associated signal(s)

Definition at line 753 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::changeData ( const QString &  name,
const QList< ItemHandle * > &  handles,
const QList< NumericalDataTable * > &  olddata1,
const QList< NumericalDataTable * > &  newdata1,
const QList< TextDataTable * > &  olddata2,
const QList< TextDataTable * > &  newdata2 
) [virtual]

change a list of two types of data tables and also adds undo command to history window and emits associated signal(s)

Definition at line 740 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::changeData ( const QString &  name,
const QList< ItemHandle * > &  handles,
NumericalDataTable olddata1,
const NumericalDataTable newdata1,
TextDataTable olddata2,
const TextDataTable newdata2 
) [virtual]

change a two types of data tables and also adds undo command to history window and emits associated signal(s)

Definition at line 777 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::changeData ( const QString &  name,
const QList< ItemHandle * > &  handles,
const QList< TextDataTable * > &  olddata2,
const QList< TextDataTable * > &  newdata2 
) [virtual]

change a list of two types of data tables and also adds undo command to history window and emits associated signal(s)

Definition at line 765 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::changeData ( const QString &  name,
const QList< ItemHandle * > &  handles,
TextDataTable olddata1,
const TextDataTable newdata1 
) [virtual]

change a data table and also adds undo command to history window and emits associated signal(s)

Definition at line 802 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::changeData ( const QString &  name,
const QList< ItemHandle * > &  handles,
NumericalDataTable olddata1,
const NumericalDataTable newdata1 
) [virtual]

change a data table and also adds undo command to history window and emits associated signal(s)

Definition at line 790 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::close ( ) [virtual, slot]

updates the symbols table. The int argument is so that this can be connected to the history changed signal

Definition at line 169 of file NetworkHandle.cpp.

Here is the caller graph for this function:

ConsoleWindow * Tinkercell::NetworkHandle::console ( ) const

same as main window's console()

Definition at line 1074 of file NetworkHandle.cpp.

Here is the call graph for this function:

GraphicsScene * Tinkercell::NetworkHandle::createScene ( const QList< QGraphicsItem * > &  insertItems = QList<QGraphicsItem*>()) [virtual]

create a new scene for this network

Parameters:
QList<QGraphicsItem*>items to initialize the network with
Returns:
GraphicsScene* the new scene

Definition at line 268 of file NetworkHandle.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

GraphicsScene * Tinkercell::NetworkHandle::createScene ( ItemHandle item,
const QRectF &  boundingRect = QRectF() 
) [virtual]

create a new scene that gets all the items inside the given item handle.

Parameters:
ItemHandle*
QRectFonly include the graphicss items
Returns:
GraphicsScene* the new scene

Definition at line 284 of file NetworkHandle.cpp.

Here is the call graph for this function:

TextEditor * Tinkercell::NetworkHandle::createTextEditor ( const QString &  text = QString()) [virtual]

create a new text editor for this network

Parameters:
QString(optional) initial script
Returns:
TextEditor* the new scene

Definition at line 256 of file NetworkHandle.cpp.

Here is the call graph for this function:

GraphicsScene * Tinkercell::NetworkHandle::currentScene ( ) const [virtual]

gets the current scene that is active

Returns:
GraphicsScene* current scene

Definition at line 358 of file NetworkHandle.cpp.

TextEditor * Tinkercell::NetworkHandle::currentTextEditor ( ) const [virtual]

gets the text editor that is active

Returns:
TextEditor* current editor

Definition at line 374 of file NetworkHandle.cpp.

NetworkWindow * Tinkercell::NetworkHandle::currentWindow ( ) const [virtual]

gets the window that is active

Returns:
NetworkWindow* current window

Definition at line 366 of file NetworkHandle.cpp.

void Tinkercell::NetworkHandle::dataChanged ( const QList< ItemHandle * > &  items) [signal]

signals whenever some data is changed

Parameters:
QList<ItemHandle*>&items handles
Returns:
void

Here is the caller graph for this function:

QList< TextEditor * > Tinkercell::NetworkHandle::editors ( ) const [virtual]

get all the text editors used to express this network

Returns:
QList<TextEditor*>

Definition at line 204 of file NetworkHandle.cpp.

Here is the caller graph for this function:

QList< QPair< ItemHandle *, QString > > Tinkercell::NetworkHandle::findData ( const QRegExp &  re) const

get all the items and corresponding data table name that contains the given pattern. if non-unique, returns a list

Parameters:
QString
Returns:
QPair<ItemHandle*,QString>

Definition at line 117 of file NetworkHandle.cpp.

QList< QPair< ItemHandle *, QString > > Tinkercell::NetworkHandle::findData ( const QString &  s) const

get all the items and corresponding data table name that contains the given string. if non-unique, returns a list

Parameters:
QString
Returns:
QPair<ItemHandle*,QString>

Definition at line 102 of file NetworkHandle.cpp.

QList< QPair< ItemHandle *, QString > > Tinkercell::NetworkHandle::findData ( const QStringList &  list) const

get all the items and corresponding data table name that contains the given string. if non-unique, returns a list

Parameters:
QString
Returns:
QPair<ItemHandle*,QString>

Definition at line 139 of file NetworkHandle.cpp.

QList< ItemHandle * > Tinkercell::NetworkHandle::findItem ( const QString &  s) const

get all the items with the given name. Returns a list for non-unique names

Parameters:
QString
Returns:
QList<ItemHandle*>

Definition at line 49 of file NetworkHandle.cpp.

QList< ItemHandle * > Tinkercell::NetworkHandle::findItem ( const QRegExp &  re) const

get all the items with the given name pattern.

Parameters:
QString
Returns:
QList<ItemHandle*>

Definition at line 65 of file NetworkHandle.cpp.

Here is the call graph for this function:

QList< ItemHandle * > Tinkercell::NetworkHandle::findItem ( const QStringList &  list) const

get all the items with the given name. returned list may be longer if names are non-unique

Parameters:
QStringList
Returns:
QList<ItemHandle*>

Definition at line 76 of file NetworkHandle.cpp.

ItemHandle * Tinkercell::NetworkHandle::globalHandle ( ) [virtual]

the model global item

Definition at line 330 of file NetworkHandle.cpp.

Here is the caller graph for this function:

void Tinkercell::NetworkHandle::handleFamilyChanged ( NetworkHandle network,
const QList< ItemHandle * > &  ,
const QList< ItemFamily * > &   
) [signal]

signals whenever item handles' families are changed

Parameters:
NetworkHandle*network where the event took place
QList<ItemHandle*>&child items
QList<ItemFamily*>&old families
Returns:
void

Here is the caller graph for this function:

QList< ItemHandle * > Tinkercell::NetworkHandle::handles ( bool  sort = false) const [virtual]

get all the items in this network

Parameters:
boolsort handles by full name (default = false)

Definition at line 335 of file NetworkHandle.cpp.

Here is the caller graph for this function:

void Tinkercell::NetworkHandle::handlesChanged ( NetworkHandle network,
const QList< QGraphicsItem * > &  items,
const QList< ItemHandle * > &  old 
) [signal]

signals whenever the handles for graphics items have changed

Parameters:
NetworkHandle*network where the event took place
QList<GraphicsItem*>&items that are affected
QList<ItemHandle*>&old handle for each items
Returns:
void

Here is the caller graph for this function:

QList< ItemHandle * > Tinkercell::NetworkHandle::handlesSortedByFamily ( ) const [virtual]

get list of all items sorted according to family

Definition at line 353 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::historyChanged ( int  i = 0) [signal]

one of more changed have occurred in the history window of the current scene

Parameters:
intnumber of changes (negative = undos, positive = redos)
Returns:
void

Here is the caller graph for this function:

void Tinkercell::NetworkHandle::itemsRenamed ( NetworkHandle network,
const QList< ItemHandle * > &  items,
const QList< QString > &  oldnames,
const QList< QString > &  newnames 
) [signal]

signals whenever an item is renamed

Parameters:
NetworkHandle*network where the event took place
QList<ItemHandle*>&items
QList<QString>&old names
QList<QString>&new names
Returns:
void

Here is the caller graph for this function:

QString Tinkercell::NetworkHandle::makeUnique ( const QString &  str,
const QStringList &  doNotUseNames = QStringList() 
) const [virtual]

checks whether the given string names a unique item or data entry

Parameters:
QStringtarget string
QStringListany other names that should be disallowed (optional)
Returns:
QString new string

Definition at line 1081 of file NetworkHandle.cpp.

Here is the caller graph for this function:

QString Tinkercell::NetworkHandle::makeUnique ( ItemHandle handle,
const QStringList &  doNotUseNames = QStringList() 
) const [virtual]

checks whether the given handle's name is unique and returns a new name. Note that this can be different from makeUnqiue for strings, because this function will check if an existing name belongs to the given handle, in which case no change is needed.

Parameters:
ItemHandle* handle
QStringListany other names that should be disallowed (optional)
Returns:
QString new string

Definition at line 1158 of file NetworkHandle.cpp.

Here is the call graph for this function:

QStringList Tinkercell::NetworkHandle::makeUnique ( const QStringList &  oldnames,
const QStringList &  doNotUseNames = QStringList() 
) const [virtual]

checks whether the given string names a unique item or data entry

Parameters:
QStringListtarget strings
Returns:
QStringList new strings

Definition at line 1114 of file NetworkHandle.cpp.

void Tinkercell::NetworkHandle::mergeHandles ( const QList< ItemHandle * > &  handles) [virtual]

merge the graphics items and children of two or more handles

Definition at line 966 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::parentHandleChanged ( NetworkHandle network,
const QList< ItemHandle * > &  ,
const QList< ItemHandle * > &   
) [signal]

signals whenever item parent handle is changed

Parameters:
NetworkHandle*network where the event took place
QList<ItemHandle*>&child items
QList<ItemHandle*>&old parents
Returns:
void

Here is the caller graph for this function:

bool Tinkercell::NetworkHandle::parseMath ( QString &  s,
QStringList &  newvars,
QStringList &  existingVars,
QList< ItemHandle * > &  usedHandles 
) [virtual]

checks whether a string is a correct formula.

Parameters:
QStringtarget string (also the output)
QStringListreturns any new variables not found in this network
QStringListreturns any network variables found in this network
QList<ItemHandle*>returns any handles used in this equation
Returns:
Boolean whether or not the string is valid

Definition at line 831 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::push ( QUndoCommand cmd) [virtual, slot]

push a new command into the history stack

Definition at line 998 of file NetworkHandle.cpp.

Here is the caller graph for this function:

void Tinkercell::NetworkHandle::redo ( ) [virtual, slot]

redo last command

Definition at line 993 of file NetworkHandle.cpp.

Here is the caller graph for this function:

void Tinkercell::NetworkHandle::remove ( const QString &  name,
const QList< ItemHandle * > &  items 
) [virtual]

this command performs a removal and also adds undo command to history window and emits associated signal(s)

Definition at line 1040 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::remove ( const QString &  name,
const QList< QGraphicsItem * > &  items 
) [virtual]

this command performs a removal and also adds undo command to history window and emits associated signal(s)

Definition at line 1017 of file NetworkHandle.cpp.

Here is the call graph for this function:

QString Tinkercell::NetworkHandle::rename ( ItemHandle item,
const QString &  new_name 
) [virtual]

rename an item and also adds undo command to history window and emits associated signal(s)

Returns:
QString the new name; it might be different if the provided string was not unique

Definition at line 422 of file NetworkHandle.cpp.

Here is the call graph for this function:

QStringList Tinkercell::NetworkHandle::rename ( const QList< ItemHandle * > &  items,
const QList< QString > &  new_names 
) [virtual]

rename items and also adds undo command to history window and emits associated signal(s)

Returns:
QString the new names; they might be different if the provided strings were not unique

Definition at line 452 of file NetworkHandle.cpp.

Here is the call graph for this function:

QString Tinkercell::NetworkHandle::rename ( const QString &  oldname,
const QString &  new_name 
) [virtual]

rename item and also adds undo command to history window and emits associated signal(s)

Returns:
QString the new name; it might be different if the provided string was not unique

Definition at line 382 of file NetworkHandle.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QList< GraphicsScene * > Tinkercell::NetworkHandle::scenes ( ) const [virtual]

get all the graphics scenes used to illustrate this network

Returns:
QList<GraphicsScene*>

Definition at line 195 of file NetworkHandle.cpp.

Here is the caller graph for this function:

void Tinkercell::NetworkHandle::setHandleFamily ( const QList< ItemHandle * >  handles,
ItemFamily newfamily 
) [virtual]

change family for handles and also adds undo command to history window and emits associated signal(s)

Definition at line 527 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::setHandleFamily ( const QList< ItemHandle * > &  handles,
const QList< ItemFamily * > &  newfamilies 
) [virtual]

change handles families and also adds undo command to history window and emits associated signal(s)

Definition at line 512 of file NetworkHandle.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::NetworkHandle::setHandleFamily ( ItemHandle handle,
ItemFamily newfamily 
) [virtual]

change handle and also adds undo command to history window and emits associated signal(s)

Definition at line 522 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::setModelValues ( const QStringList &  names,
const QList< double > &  values,
int  column = 0,
const QString &  defaultDataTable = QString() 
) [virtual]

assign the values for the given strings. if data table has multiple columns, provide the column number in the argument

Parameters:
QStringListnames of variables
QList<double>values
intcolumn number (default=0)

Definition at line 1217 of file NetworkHandle.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::NetworkHandle::setModelValues ( const NumericalDataTable newvalues,
const QString &  defaultDataTable = QString() 
) [virtual]

assign the values for the given strings. if data table has multiple columns, provide the column number in the argument

Parameters:
NumericalDataTablenames (rows) and values
intcolumn number (default=0)

Definition at line 1241 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::setModelValues ( const TextDataTable newvalues,
const QString &  defaultDataTable = QString() 
) [virtual]

assign the values for the given strings. if data table has multiple columns, provide the column number in the argument

Parameters:
NumericalDataTablenames (rows) and values
intcolumn number (default=0)

Definition at line 1337 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::setModelValues ( const QStringList &  names,
const QStringList &  values,
int  column = 0,
const QString &  defaultDataTable = QString() 
) [virtual]

assign the values for the given strings. if data table has multiple columns, provide the column number in the argument

Parameters:
QStringListnames of variables
QStringListvalues
intcolumn number (default=0)

Definition at line 1229 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::setParentHandle ( ItemHandle child,
ItemHandle parent 
) [virtual]

change parent handle and also adds undo command to history window and emits associated signal(s)

Definition at line 496 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::setParentHandle ( const QList< ItemHandle * > &  handles,
const QList< ItemHandle * > &  parentHandles 
) [virtual]

change parent handles and also adds undo command to history window and emits associated signal(s)

Definition at line 485 of file NetworkHandle.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::NetworkHandle::setParentHandle ( const QList< ItemHandle * >  children,
ItemHandle parent 
) [virtual]

change parent for handles and also adds undo command to history window and emits associated signal(s)

Definition at line 504 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::setWindowTitle ( const QString &  title) [virtual]

set all the title for each window representing this network

Parameters:
QString

Definition at line 188 of file NetworkHandle.cpp.

void Tinkercell::NetworkHandle::showScene ( GraphicsScene scene) [virtual]

show the window that contains the given scene

Returns:
GraphicsScene * scene

Definition at line 213 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::showTextEditor ( TextEditor editor) [virtual]

show the window that contains the given text editor

Returns:
TextEditor * text editor

Definition at line 236 of file NetworkHandle.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::NetworkHandle::undo ( ) [virtual, slot]

undo last command

Definition at line 988 of file NetworkHandle.cpp.

Here is the caller graph for this function:

void Tinkercell::NetworkHandle::updateSymbolsTable ( int  i) [virtual, slot]

updates the symbols table. The int argument is so that this can be connected to the history changed signal

update symbols table

Definition at line 820 of file NetworkHandle.cpp.

Here is the call graph for this function:

void Tinkercell::NetworkHandle::updateSymbolsTable ( ) [virtual, slot]

updates the symbols table

update symbols table

Definition at line 814 of file NetworkHandle.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString Tinkercell::NetworkHandle::windowTitle ( ) const [virtual]

get the title for current window representing this network

Returns:
QString

Definition at line 1004 of file NetworkHandle.cpp.


Friends And Related Function Documentation

friend class GraphicsScene [friend]

Definition at line 392 of file NetworkHandle.h.

friend class GraphicsView [friend]

Definition at line 391 of file NetworkHandle.h.

friend class MainWindow [friend]

Definition at line 394 of file NetworkHandle.h.

friend class NetworkWindow [friend]

Definition at line 395 of file NetworkHandle.h.

friend class SymbolsTable [friend]

Definition at line 396 of file NetworkHandle.h.

friend class TextEditor [friend]

Definition at line 393 of file NetworkHandle.h.


Member Data Documentation

the undo stack

Definition at line 65 of file NetworkHandle.h.

holds a hash of all items and data in this scene.

See also:
SymbolsTable

Definition at line 68 of file NetworkHandle.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines