![]() |
TinkerCell Core 1.0
TinkerCell's Core library providing all basic functionalities
|
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>
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 CThread * | thread () 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 | |
CThread * | cthread |
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 | |
MainWindow * | mainWindow |
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]". |
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.
Tinkercell::MultithreadedSliderWidget::MultithreadedSliderWidget | ( | MainWindow * | parent, |
CThread * | thread = 0 , |
||
Qt::Orientation | orientation = Qt::Horizontal |
||
) |
constructor
QWidget | * parent |
CThread | * the thread that is already setup with the correct library and function |
Qt::Orientation | orientation |
Definition at line 74 of file MultithreadedSliderWidget.cpp.
Tinkercell::MultithreadedSliderWidget::MultithreadedSliderWidget | ( | MainWindow * | parent, |
const QString & | lib, | ||
const QString & | functionName, | ||
Qt::Orientation | orientation = Qt::Horizontal |
||
) |
constructor
QWidget | * parent |
QString | the name of the dynamic library to load |
QString | name of function in the library with signature void f(Matrix) |
Qt::Orientation | orientation |
Definition at line 84 of file MultithreadedSliderWidget.cpp.
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.
void Tinkercell::MultithreadedSliderWidget::saveValues | ( | ) | [protected, virtual, slot] |
copy the values from the slider to the model
Definition at line 443 of file MultithreadedSliderWidget.cpp.
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
QStringList | names 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.
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
QString | substring for the slider names |
Definition at line 25 of file MultithreadedSliderWidget.cpp.
void Tinkercell::MultithreadedSliderWidget::setVisibleSliders | ( | const QStringList & | options | ) | [virtual, slot] |
set the sliders visible
QStringList | names for the sliders |
Definition at line 41 of file MultithreadedSliderWidget.cpp.
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.
CThread * Tinkercell::MultithreadedSliderWidget::thread | ( | ) | const [virtual] |
the cthread that is run every time the sliders change
Definition at line 95 of file MultithreadedSliderWidget.cpp.
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.
void Tinkercell::MultithreadedSliderWidget::valuesChanged | ( | DataTable< qreal > | ) | [signal] |
the values in the slider have changed
CThread* Tinkercell::MultithreadedSliderWidget::cthread [protected] |
whenver the slides change, cthread->start() is called
Definition at line 133 of file MultithreadedSliderWidget.h.
QString Tinkercell::MultithreadedSliderWidget::defaultDataTable [protected] |
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.
Qt::Orientation Tinkercell::MultithreadedSliderWidget::orientation [protected] |
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.
QVBoxLayout* Tinkercell::MultithreadedSliderWidget::slidersLayout [protected] |
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.
DataTable<qreal> Tinkercell::MultithreadedSliderWidget::values [protected] |
table storing slider values
Definition at line 141 of file MultithreadedSliderWidget.h.