Main Page · Modules · All Classes · Class Hierarchy
Public Member Functions | Public Attributes | List of all members
MSThread Class Reference

Manages a new thread with objects. More...

#include <MSThread.hpp>

Inherits QThread.

Public Member Functions

virtual void run () override
 Run the thread. More...
 
void AddObject (QObject &object)
 Add an object to this thread. More...
 
void RemoveObjects ()
 Move the objects back to their original thread.
 
bool IsEmpty ()
 Whether object is attached to the thread. More...
 

Public Attributes

QMap< QObject *, QThread * > ObjectThreads
 Remember for the original thread of the moved objects.
 

Detailed Description

Manages a new thread with objects.

Definition at line 32 of file MSThread.hpp.

Member Function Documentation

void MSThread::AddObject ( QObject &  object)

Add an object to this thread.

Parameters
objectObject

Definition at line 33 of file MSThread.cpp.

bool MSThread::IsEmpty ( )

Whether object is attached to the thread.

Returns
True if any object is in the thread otherwise false.

Definition at line 63 of file MSThread.cpp.

void MSThread::run ( )
overridevirtual

Run the thread.

Runs the thread and moves the objects back to their original thread if the thread's main loop exits.

Definition at line 26 of file MSThread.cpp.


The documentation for this class was generated from the following files: