This class keeps track of all the QThreads that are needed somewhere.
More...
|
def | __init__ (self) |
|
def | newThread (self, name) |
| Create a new thread with a name, return its object. More...
|
|
def | quitThread (self, name) |
| Stop event loop of QThread. More...
|
|
def | joinThread (self, name, time=None) |
| Stop event loop of QThread. More...
|
|
def | cleanupThread (self, name) |
| Remove thread from thread list. More...
|
|
def | quitAllThreads (self) |
| Stop event loop of all QThreads.
|
|
def | getItemByNumber (self, n) |
| Get thread by number ins list. More...
|
|
def | getItemNumberByKey (self, key) |
| Get number in list from thread name. More...
|
|
def | rowCount (self, parent=QtCore.QModelIndex()) |
| Gives the number of threads registered. More...
|
|
def | columnCount (self, parent=QtCore.QModelIndex()) |
| Gives the number of data fields of a thread. More...
|
|
def | flags (self, index) |
| Determines what can be done with entry cells in the table view. More...
|
|
def | data (self, index, role) |
| Get data from model for a given cell. More...
|
|
def | headerData (self, section, orientation, role=QtCore.Qt.DisplayRole) |
| Data for the table view headers. More...
|
|
This class keeps track of all the QThreads that are needed somewhere.
◆ cleanupThread()
def core.threadmanager.ThreadManager.cleanupThread |
( |
|
self, |
|
|
|
name |
|
) |
| |
Remove thread from thread list.
- Parameters
-
str | name: unique thread name |
◆ columnCount()
def core.threadmanager.ThreadManager.columnCount |
( |
|
self, |
|
|
|
parent = QtCore.QModelIndex() |
|
) |
| |
Gives the number of data fields of a thread.
- Returns
- int: number of thread data fields
◆ data()
def core.threadmanager.ThreadManager.data |
( |
|
self, |
|
|
|
index, |
|
|
|
role |
|
) |
| |
Get data from model for a given cell.
Data can have a role that affects display.
@param QModelIndex index: cell for which data is requested
@param ItemDataRole role: role for which data is requested
@return QVariant: data for given cell and role
◆ flags()
def core.threadmanager.ThreadManager.flags |
( |
|
self, |
|
|
|
index |
|
) |
| |
Determines what can be done with entry cells in the table view.
- Parameters
-
QModelIndex | index: cell fo which the flags are requested |
- Returns
- Qt.ItemFlags: actins allowed fotr this cell
◆ getItemByNumber()
def core.threadmanager.ThreadManager.getItemByNumber |
( |
|
self, |
|
|
|
n |
|
) |
| |
Get thread by number ins list.
- Parameters
-
- Returns
- (threadname, thread): thread name and thread
◆ getItemNumberByKey()
def core.threadmanager.ThreadManager.getItemNumberByKey |
( |
|
self, |
|
|
|
key |
|
) |
| |
Get number in list from thread name.
- Parameters
-
- Returns
- int: thread number in list
◆ headerData()
def core.threadmanager.ThreadManager.headerData |
( |
|
self, |
|
|
|
section, |
|
|
|
orientation, |
|
|
|
role = QtCore.Qt.DisplayRole |
|
) |
| |
Data for the table view headers.
- Parameters
-
int | section: number of the column to get header data for |
Qt.Orientation | orientation of header (horizontal or vertical) |
ItemDataRole | role for which to get data |
- Returns
- QVariant: header data for given column and role
◆ joinThread()
def core.threadmanager.ThreadManager.joinThread |
( |
|
self, |
|
|
|
name, |
|
|
|
time = None |
|
) |
| |
Stop event loop of QThread.
- Parameters
-
str | name: unique thread name |
int | time: timeout for waiting in msec |
◆ newThread()
def core.threadmanager.ThreadManager.newThread |
( |
|
self, |
|
|
|
name |
|
) |
| |
Create a new thread with a name, return its object.
- Parameters
-
str | name: unique name of thread |
- Returns
- QThread: new thred, none if failed
◆ quitThread()
def core.threadmanager.ThreadManager.quitThread |
( |
|
self, |
|
|
|
name |
|
) |
| |
Stop event loop of QThread.
- Parameters
-
str | name: unique thread name |
◆ rowCount()
def core.threadmanager.ThreadManager.rowCount |
( |
|
self, |
|
|
|
parent = QtCore.QModelIndex() |
|
) |
| |
Gives the number of threads registered.
- Returns
- int: number of threads
The documentation for this class was generated from the following file: