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

This class is used to run a process (command + args) as a separate thread as a separate thread. More...

#include <CThread.h>

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

List of all members.

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
MainWindowmainWindow
 Tinkercell's main window.
QProcess process
 Tinkercell's main window.

Detailed Description

This class is used to run a process (command + args) as a separate thread as a separate thread.

Definition at line 290 of file CThread.h.


Constructor & Destructor Documentation

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

Parameters:
QStringcommand
QStringarguments
MainWindowmain window

Definition at line 487 of file CThread.cpp.

Here is the call graph for this function:

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

destructor -- free the library that this thread loaded

Definition at line 523 of file CThread.cpp.

Here is the call graph for this function:


Member Function Documentation

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

Parameters:
MainWindowmain window
ProcessThread
QStringtext to display
QIconicon to display

Definition at line 458 of file CThread.cpp.

QString Tinkercell::ProcessThread::errors ( ) const [virtual]

get the errors (error stream) from the process

Returns:
QString output

Definition at line 533 of file CThread.cpp.

QString Tinkercell::ProcessThread::output ( ) const [virtual]

get the results (output stream) from the process

Returns:
QString output

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.

Here is the call graph for this function:

void Tinkercell::ProcessThread::stopProcess ( ) [protected, virtual, slot]

unload the library (if loaded) and delete it

Definition at line 517 of file CThread.cpp.

Here is the caller graph for this function:


Member Data Documentation

QString Tinkercell::ProcessThread::args [protected]

the arguments

Definition at line 328 of file CThread.h.

the error from the process

Definition at line 332 of file CThread.h.

QString Tinkercell::ProcessThread::exe [protected]

the name of the executable

Definition at line 326 of file CThread.h.

Tinkercell's main window.

Definition at line 334 of file CThread.h.

the output from the process

Definition at line 330 of file CThread.h.

QProcess Tinkercell::ProcessThread::process [protected]

Tinkercell's main window.

Definition at line 336 of file CThread.h.


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