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

This class is used to run specific functions inside a C dynamic library as a separate thread. Uses CThread to call the C functions. More...

#include <MultithreadedSliderWidget.h>

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

List of all members.

Public Slots

virtual void setSliders (const QStringList &options, const QList< double > &minValues, const QList< double > &maxValues)
 setup the sliders options and initial values
virtual void setVisibleSliders (const QStringList &options)
 set the sliders visible
virtual void setVisibleSliders (const QString &substring)
 set the sliders visible if the slider name has the given string as a substring

Signals

void valuesChanged (DataTable< qreal >)
 the values in the slider have changed

Public Member Functions

 MultithreadedSliderWidget (MainWindow *parent, CThread *thread=0, Qt::Orientation orientation=Qt::Horizontal)
 constructor
 MultithreadedSliderWidget (MainWindow *parent, const QString &lib, const QString &functionName, Qt::Orientation orientation=Qt::Horizontal)
 constructor
virtual CThreadthread () const
 the cthread that is run every time the sliders change
virtual void setThread (CThread *)
 the cthread that is run every time the sliders change
virtual void setDefaultDataTable (const QString &)
 This is the data table that will be altered when no appropriate data is available. For example, if one of the sliders is labeled "A" and the default table is set to "bla", then changing the slider for "A" will result in change to "A.bla[0,0]".
virtual DataTable< qreal > data () const
 table containing the variables, current values, min and max

Protected Slots

virtual void valueChanged ()
 whenver the value text change, the function in the C library is called
virtual void sliderChanged (int)
 whenver the sliders change, the function in the C library is called
virtual void minmaxChanged ()
 whenver the text change, the function in the C library is called
virtual void saveValues ()
 copy the values from the slider to the model

Protected Attributes

CThreadcthread
 whenver the slides change, cthread->start() is called
Qt::Orientation orientation
 orientation of the sliders
DataTable< qreal > values
 table storing slider values
QList< QLabel * > labels
 slider labels in same order as sliders list
QList< QSlider * > sliders
 all the sliders
QList< QLineEdit * > minline
 slider min, max, and values in same order as sliders list
QList< QLineEdit * > maxline
QList< QLineEdit * > valueline
QList< double > min
 slider min and max in same order as sliders list
QList< double > max
QVBoxLayout * slidersLayout
 slider layout
QHash< QString, QWidget * > sliderWidgets
 sliders by name
MainWindowmainWindow
 main window
QString defaultDataTable
 This is the data table that will be altered when no appropriate data is available. For example, if one of the sliders is labeled "A" and the default table is set to "bla", then changing the slider for "A" will result in change to "A.bla[0,0]".

Detailed Description

This class is used to run specific functions inside a C dynamic library as a separate thread. Uses CThread to call the C functions.

Definition at line 32 of file MultithreadedSliderWidget.h.


Constructor & Destructor Documentation

Tinkercell::MultithreadedSliderWidget::MultithreadedSliderWidget ( MainWindow parent,
CThread thread = 0,
Qt::Orientation  orientation = Qt::Horizontal 
)

constructor

Parameters:
QWidget* parent
CThread* the thread that is already setup with the correct library and function
Qt::Orientationorientation

Definition at line 74 of file MultithreadedSliderWidget.cpp.

Here is the call graph for this function:

Tinkercell::MultithreadedSliderWidget::MultithreadedSliderWidget ( MainWindow parent,
const QString &  lib,
const QString &  functionName,
Qt::Orientation  orientation = Qt::Horizontal 
)

constructor

Parameters:
QWidget* parent
QStringthe name of the dynamic library to load
QStringname of function in the library with signature void f(Matrix)
Qt::Orientationorientation

Definition at line 84 of file MultithreadedSliderWidget.cpp.

Here is the call graph for this function:


Member Function Documentation

DataTable< qreal > Tinkercell::MultithreadedSliderWidget::data ( ) const [virtual]

table containing the variables, current values, min and max

Definition at line 433 of file MultithreadedSliderWidget.cpp.

void Tinkercell::MultithreadedSliderWidget::minmaxChanged ( ) [protected, virtual, slot]

whenver the text change, the function in the C library is called

Definition at line 105 of file MultithreadedSliderWidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::MultithreadedSliderWidget::saveValues ( ) [protected, virtual, slot]

copy the values from the slider to the model

Definition at line 443 of file MultithreadedSliderWidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::MultithreadedSliderWidget::setDefaultDataTable ( const QString &  s) [virtual]

This is the data table that will be altered when no appropriate data is available. For example, if one of the sliders is labeled "A" and the default table is set to "bla", then changing the slider for "A" will result in change to "A.bla[0,0]".

Definition at line 438 of file MultithreadedSliderWidget.cpp.

void Tinkercell::MultithreadedSliderWidget::setSliders ( const QStringList &  options,
const QList< double > &  minValues,
const QList< double > &  maxValues 
) [virtual, slot]

setup the sliders options and initial values

Parameters:
QStringListnames for the sliders
QList<double>minimum value for each of the sliders
QList<double>maximum value for each of the sliders

Definition at line 213 of file MultithreadedSliderWidget.cpp.

Here is the call graph for this function:

void Tinkercell::MultithreadedSliderWidget::setThread ( CThread t) [virtual]

the cthread that is run every time the sliders change

Definition at line 100 of file MultithreadedSliderWidget.cpp.

void Tinkercell::MultithreadedSliderWidget::setVisibleSliders ( const QString &  substring) [virtual, slot]

set the sliders visible if the slider name has the given string as a substring

Parameters:
QStringsubstring for the slider names

Definition at line 25 of file MultithreadedSliderWidget.cpp.

Here is the call graph for this function:

void Tinkercell::MultithreadedSliderWidget::setVisibleSliders ( const QStringList &  options) [virtual, slot]

set the sliders visible

Parameters:
QStringListnames for the sliders

Definition at line 41 of file MultithreadedSliderWidget.cpp.

Here is the caller graph for this function:

void Tinkercell::MultithreadedSliderWidget::sliderChanged ( int  ) [protected, virtual, slot]

whenver the sliders change, the function in the C library is called

Definition at line 197 of file MultithreadedSliderWidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

CThread * Tinkercell::MultithreadedSliderWidget::thread ( ) const [virtual]

the cthread that is run every time the sliders change

Definition at line 95 of file MultithreadedSliderWidget.cpp.

Here is the caller graph for this function:

void Tinkercell::MultithreadedSliderWidget::valueChanged ( ) [protected, virtual, slot]

whenver the value text change, the function in the C library is called

Definition at line 139 of file MultithreadedSliderWidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::MultithreadedSliderWidget::valuesChanged ( DataTable< qreal >  ) [signal]

the values in the slider have changed

Here is the caller graph for this function:


Member Data Documentation

whenver the slides change, cthread->start() is called

Definition at line 133 of file MultithreadedSliderWidget.h.

This is the data table that will be altered when no appropriate data is available. For example, if one of the sliders is labeled "A" and the default table is set to "bla", then changing the slider for "A" will result in change to "A.bla[0,0]".

Definition at line 175 of file MultithreadedSliderWidget.h.

QList< QLabel* > Tinkercell::MultithreadedSliderWidget::labels [protected]

slider labels in same order as sliders list

Definition at line 145 of file MultithreadedSliderWidget.h.

main window

Definition at line 169 of file MultithreadedSliderWidget.h.

QList<double> Tinkercell::MultithreadedSliderWidget::max [protected]

Definition at line 157 of file MultithreadedSliderWidget.h.

QList< QLineEdit* > Tinkercell::MultithreadedSliderWidget::maxline [protected]

Definition at line 153 of file MultithreadedSliderWidget.h.

QList<double> Tinkercell::MultithreadedSliderWidget::min [protected]

slider min and max in same order as sliders list

Definition at line 157 of file MultithreadedSliderWidget.h.

QList< QLineEdit* > Tinkercell::MultithreadedSliderWidget::minline [protected]

slider min, max, and values in same order as sliders list

Definition at line 153 of file MultithreadedSliderWidget.h.

orientation of the sliders

Definition at line 137 of file MultithreadedSliderWidget.h.

QList< QSlider* > Tinkercell::MultithreadedSliderWidget::sliders [protected]

all the sliders

Definition at line 149 of file MultithreadedSliderWidget.h.

slider layout

Definition at line 161 of file MultithreadedSliderWidget.h.

QHash< QString, QWidget* > Tinkercell::MultithreadedSliderWidget::sliderWidgets [protected]

sliders by name

Definition at line 165 of file MultithreadedSliderWidget.h.

QList< QLineEdit* > Tinkercell::MultithreadedSliderWidget::valueline [protected]

Definition at line 153 of file MultithreadedSliderWidget.h.

table storing slider values

Definition at line 141 of file MultithreadedSliderWidget.h.


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