TinkerCell Core 1.0
TinkerCell's Core library providing all basic functionalities
Public Slots | Static Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Static Protected Attributes
Tinkercell::SimpleInputWindow Class Reference

Used to create an input window that can receive user inputs for C plugins. More...

#include <AbstractInputWindow.h>

Inheritance diagram for Tinkercell::SimpleInputWindow:
Inheritance graph
[legend]
Collaboration diagram for Tinkercell::SimpleInputWindow:
Collaboration graph
[legend]

List of all members.

Public Slots

virtual void exec ()
 Executes the CThread.

Static Public Member Functions

static SimpleInputWindowCreateWindow (MainWindow *main, const QString &title, const QString &libraryFile, const QString &funcName, const DataTable< qreal > &)
 Create a simple input window to run a CThread. The window can be used to fill in an input matrix.
static SimpleInputWindowCreateWindow (CThread *cthread, const QString &title, void(*f)(tc_matrix), const DataTable< qreal > &)
 creates a docking window in Tinkercell's mainwindow that can receive inputs from user and run a function in a separate thread
static SimpleInputWindowCreateWindow (MainWindow *main, const QString &title, const QString &funcName, const DataTable< qreal > &)
 Create a simple input window to run a script function. When the play button is pressed, this window will execute a command in the command window. The command will be f(arg1,arg2...), where f is the function name and arg1,arg2... are the user provided arguments in the input window.
static void AddOptions (const QString &title, int i, int j, const QStringList &options)
 add a list of options (combo box) to an existing input window
static void AddOptions (SimpleInputWindow *, int i, int j, const QStringList &options)
 add a list of options (combo box) to an existing input window

Protected Slots

virtual void dataChanged (int, int)
 updates the input matrix when user changes the table
virtual void addRow ()
 add a row to the input matrix
virtual void removeRow ()
 remove a row from the input matrix
virtual void comboBoxChanged (int)
 updates the input matrix when user changes the combo boxes

Protected Member Functions

 SimpleInputWindow (MainWindow *main, const QString &title, const QString &dllName, const QString &funcName, const DataTable< qreal > &)
 constructor that creates a docking window in Tinkercell's mainwindow that can receive inputs from user and run a function in a separate thread
 SimpleInputWindow (CThread *thread, const QString &title, void(*f)(tc_matrix), const DataTable< qreal > &)
 constructor that creates a docking window in Tinkercell's mainwindow that can receive inputs from user and run a function in a separate thread
 SimpleInputWindow (MainWindow *main, const QString &title, const DataTable< qreal > &)
 constructor that creates a docking window in Tinkercell's mainwindow that can receive inputs from user and run a function in a separate thread
 SimpleInputWindow ()
 constructor -- does nothing
 SimpleInputWindow (const SimpleInputWindow &)
 copy constructor
virtual void setupDisplay (const DataTable< qreal > &)
 reinitialize the contents on the input window
void leaveEvent (QEvent *event)
 make the window transparent when mouse exits the window
void enterEvent (QEvent *event)
 make the window transparent when mouse exits the window

Protected Attributes

DataTable< qreal > dataTable
 the input matix
QTableWidget tableWidget
 the table displaying the input matrix
QList< QComboBox * > comboBoxes
 combo boxes used in input window
PopupListWidgetDelegate delegate
 the item delegate that is used to change values in the input window
QString scriptCommand
 command that will be run when the play button is pressed (might be empty if a C or C++ function is the target function)

Static Protected Attributes

static QHash< QString,
SimpleInputWindow * > 
inputWindows
 the set of all simple input windows

Detailed Description

Used to create an input window that can receive user inputs for C plugins.

Definition at line 153 of file AbstractInputWindow.h.


Constructor & Destructor Documentation

Tinkercell::SimpleInputWindow::SimpleInputWindow ( MainWindow main,
const QString &  title,
const QString &  dllName,
const QString &  funcName,
const DataTable< qreal > &  data 
) [protected]

constructor that creates a docking window in Tinkercell's mainwindow that can receive inputs from user and run a function in a separate thread

Parameters:
MainWindow
QStringtitle
QStringdynamic library file
QStringfunction to run inside library
QDataTable<qreal>input table and its default values

Definition at line 126 of file AbstractInputWindow.cpp.

Here is the call graph for this function:

Tinkercell::SimpleInputWindow::SimpleInputWindow ( CThread thread,
const QString &  title,
void(*)(tc_matrix)  f,
const DataTable< qreal > &  data 
) [protected]

constructor that creates a docking window in Tinkercell's mainwindow that can receive inputs from user and run a function in a separate thread

Parameters:
CThread* existing thread with the library containing the function
QStringtitle
inputtc_matrixFunction*function that is triggered by the run button in the input window
QDataTable<qreal>input table and its default values

Definition at line 226 of file AbstractInputWindow.cpp.

Here is the call graph for this function:

Tinkercell::SimpleInputWindow::SimpleInputWindow ( MainWindow main,
const QString &  title,
const DataTable< qreal > &  data 
) [protected]

constructor that creates a docking window in Tinkercell's mainwindow that can receive inputs from user and run a function in a separate thread

Parameters:
QStringtitle
QDataTable<qreal>input table and its default values

Definition at line 197 of file AbstractInputWindow.cpp.

Here is the call graph for this function:

Tinkercell::SimpleInputWindow::SimpleInputWindow ( ) [protected]

constructor -- does nothing

Definition at line 296 of file AbstractInputWindow.cpp.

Here is the caller graph for this function:

Tinkercell::SimpleInputWindow::SimpleInputWindow ( const SimpleInputWindow ) [protected]

copy constructor

Definition at line 298 of file AbstractInputWindow.cpp.


Member Function Documentation

void Tinkercell::SimpleInputWindow::AddOptions ( const QString &  title,
int  i,
int  j,
const QStringList &  options 
) [static]

add a list of options (combo box) to an existing input window

Parameters:
QStringtitle
introw
intcolumn
QStringListoptions

Definition at line 269 of file AbstractInputWindow.cpp.

void Tinkercell::SimpleInputWindow::AddOptions ( SimpleInputWindow win,
int  i,
int  j,
const QStringList &  options 
) [static]

add a list of options (combo box) to an existing input window

Parameters:
SimpleInputWindow*
introw
intcolumn
QStringListoptions

Definition at line 278 of file AbstractInputWindow.cpp.

Here is the call graph for this function:

void Tinkercell::SimpleInputWindow::addRow ( ) [protected, virtual, slot]

add a row to the input matrix

Definition at line 388 of file AbstractInputWindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::SimpleInputWindow::comboBoxChanged ( int  ) [protected, virtual, slot]

updates the input matrix when user changes the combo boxes

Definition at line 499 of file AbstractInputWindow.cpp.

SimpleInputWindow * Tinkercell::SimpleInputWindow::CreateWindow ( CThread cthread,
const QString &  title,
void(*)(tc_matrix)  f,
const DataTable< qreal > &  data 
) [static]

creates a docking window in Tinkercell's mainwindow that can receive inputs from user and run a function in a separate thread

Parameters:
CThread* existing thread with the library containing the function
QStringtitle
itc_matrixFunction*function that is triggered by the run button in the input window
QDataTable<qreal>input table and its default values
Returns:
SimpleInputWindow* pointer to the new or existing window

Definition at line 329 of file AbstractInputWindow.cpp.

Here is the call graph for this function:

SimpleInputWindow * Tinkercell::SimpleInputWindow::CreateWindow ( MainWindow main,
const QString &  title,
const QString &  libraryFile,
const QString &  funcName,
const DataTable< qreal > &  data 
) [static]

Create a simple input window to run a CThread. The window can be used to fill in an input matrix.

Parameters:
MainWindow
QStringtitle
QStringdynamic library file (will first search if already loaded in MainWindow)
QStringfunction to run inside library
DataTable<double>inputs
Returns:
SimpleInputWindow* pointer to the new or existing window

Definition at line 300 of file AbstractInputWindow.cpp.

Here is the call graph for this function:

SimpleInputWindow * Tinkercell::SimpleInputWindow::CreateWindow ( MainWindow main,
const QString &  title,
const QString &  funcName,
const DataTable< qreal > &  data 
) [static]

Create a simple input window to run a script function. When the play button is pressed, this window will execute a command in the command window. The command will be f(arg1,arg2...), where f is the function name and arg1,arg2... are the user provided arguments in the input window.

Parameters:
MainWindow
QStringtitle
QStringfunction name
DataTable<double>inputs
Returns:
SimpleInputWindow* pointer to the new or existing window

Definition at line 358 of file AbstractInputWindow.cpp.

Here is the call graph for this function:

void Tinkercell::SimpleInputWindow::dataChanged ( int  i,
int  j 
) [protected, virtual, slot]

updates the input matrix when user changes the table

Definition at line 446 of file AbstractInputWindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::SimpleInputWindow::enterEvent ( QEvent *  event) [protected, virtual]

make the window transparent when mouse exits the window

Reimplemented from Tinkercell::AbstractInputWindow.

Definition at line 503 of file AbstractInputWindow.cpp.

void Tinkercell::SimpleInputWindow::exec ( ) [virtual, slot]

Executes the CThread.

See also:
CThread

Reimplemented from Tinkercell::AbstractInputWindow.

Definition at line 169 of file AbstractInputWindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::SimpleInputWindow::leaveEvent ( QEvent *  event) [protected]

make the window transparent when mouse exits the window

Definition at line 508 of file AbstractInputWindow.cpp.

void Tinkercell::SimpleInputWindow::removeRow ( ) [protected, virtual, slot]

remove a row from the input matrix

Definition at line 439 of file AbstractInputWindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::SimpleInputWindow::setupDisplay ( const DataTable< qreal > &  table) [protected, virtual]

reinitialize the contents on the input window

Definition at line 475 of file AbstractInputWindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

QList<QComboBox*> Tinkercell::SimpleInputWindow::comboBoxes [protected]

combo boxes used in input window

Definition at line 241 of file AbstractInputWindow.h.

the input matix

Definition at line 235 of file AbstractInputWindow.h.

the item delegate that is used to change values in the input window

Definition at line 253 of file AbstractInputWindow.h.

QHash< QString, SimpleInputWindow * > Tinkercell::SimpleInputWindow::inputWindows [static, protected]

the set of all simple input windows

Definition at line 261 of file AbstractInputWindow.h.

command that will be run when the play button is pressed (might be empty if a C or C++ function is the target function)

Definition at line 255 of file AbstractInputWindow.h.

the table displaying the input matrix

Definition at line 239 of file AbstractInputWindow.h.


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