![]() |
TinkerCell Core 1.0
TinkerCell's Core library providing all basic functionalities
|
This class is used to run a process (command + args) as a separate thread as a separate thread. More...
#include <CThread.h>
Public Member Functions | |
ProcessThread (const QString &, const QString &, MainWindow *main) | |
constructor -- used to initialize the main window, the command name and the args for the command | |
virtual QString | output () const |
get the results (output stream) from the process | |
virtual QString | errors () const |
get the errors (error stream) from the process | |
virtual | ~ProcessThread () |
destructor -- free the library that this thread loaded | |
Static Public Member Functions | |
static QWidget * | dialog (MainWindow *, ProcessThread *, const QString &text=QString("Process"), QIcon icon=QIcon()) |
creates a dialog that shows the name of the running thread and a button for terminating the thread | |
Protected Slots | |
virtual void | stopProcess () |
unload the library (if loaded) and delete it | |
Protected Member Functions | |
virtual void | run () |
initializes the function pointers through the main window and then runs the target function | |
Protected Attributes | |
QString | exe |
the name of the executable | |
QString | args |
the arguments | |
QString | outputStream |
the output from the process | |
QString | errStream |
the error from the process | |
MainWindow * | mainWindow |
Tinkercell's main window. | |
QProcess | process |
Tinkercell's main window. |
This class is used to run a process (command + args) as a separate thread as a separate thread.
Tinkercell::ProcessThread::ProcessThread | ( | const QString & | exe, |
const QString & | args, | ||
MainWindow * | main | ||
) |
constructor -- used to initialize the main window, the command name and the args for the command
QString | command |
QString | arguments |
MainWindow | main window |
Definition at line 487 of file CThread.cpp.
Tinkercell::ProcessThread::~ProcessThread | ( | ) | [virtual] |
destructor -- free the library that this thread loaded
Definition at line 523 of file CThread.cpp.
QWidget * Tinkercell::ProcessThread::dialog | ( | MainWindow * | mainWindow, |
ProcessThread * | newThread, | ||
const QString & | text = QString("Process") , |
||
QIcon | icon = QIcon() |
||
) | [static] |
creates a dialog that shows the name of the running thread and a button for terminating the thread
MainWindow | main window |
ProcessThread | |
QString | text to display |
QIcon | icon to display |
Definition at line 458 of file CThread.cpp.
QString Tinkercell::ProcessThread::errors | ( | ) | const [virtual] |
get the errors (error stream) from the process
Definition at line 533 of file CThread.cpp.
QString Tinkercell::ProcessThread::output | ( | ) | const [virtual] |
get the results (output stream) from the process
Definition at line 528 of file CThread.cpp.
void Tinkercell::ProcessThread::run | ( | ) | [protected, virtual] |
initializes the function pointers through the main window and then runs the target function
Definition at line 498 of file CThread.cpp.
void Tinkercell::ProcessThread::stopProcess | ( | ) | [protected, virtual, slot] |
unload the library (if loaded) and delete it
Definition at line 517 of file CThread.cpp.
QString Tinkercell::ProcessThread::args [protected] |
QString Tinkercell::ProcessThread::errStream [protected] |
QString Tinkercell::ProcessThread::exe [protected] |
MainWindow* Tinkercell::ProcessThread::mainWindow [protected] |
QString Tinkercell::ProcessThread::outputStream [protected] |
QProcess Tinkercell::ProcessThread::process [protected] |