Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F27035919
threadcontroller.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
threadcontroller.cpp
View Options
#include
"threadcontroller.h"
#include
"worker.h"
ThreadController
::
ThreadController
(
QObject
*
parent
)
:
QObject
(
parent
)
{
Worker
*
worker
=
new
Worker
;
worker
->
moveToThread
(
&
this
->
workerThread
);
this
->
workerThread
.
setObjectName
(
"workerThread"
);
connect
(
&
this
->
workerThread
,
SIGNAL
(
finished
()),
worker
,
SLOT
(
deleteLater
()));
connect
(
this
,
SIGNAL
(
finished
()),
&
this
->
workerThread
,
SLOT
(
quit
()));
connect
(
this
,
SIGNAL
(
finished
()),
worker
,
SLOT
(
deleteLater
()));
connect
(
this
,
SIGNAL
(
operate
(
const
QString
&
)),
worker
,
SLOT
(
doParallelAlgorithm
(
const
QString
&
)));
connect
(
worker
,
SIGNAL
(
resultReady
(
const
QString
&
)),
this
,
SLOT
(
handleResults
(
const
QString
&
)));
connect
(
&
this
->
workerThread
,
SIGNAL
(
finished
()),
this
,
SLOT
(
closeApplication
()));
this
->
workerThread
.
start
();
emit
operate
(
"doParallel Multitrheading"
);
}
ThreadController
::~
ThreadController
()
{
}
void
ThreadController
::
handleResults
(
const
QString
&
parameter
)
{
qDebug
()
<<
"Handling results"
;
qDebug
()
<<
parameter
;
emit
finished
();
}
void
ThreadController
::
closeApplication
()
{
QCoreApplication
::
quit
();
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Tue, Oct 27, 7:18 PM (19 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
407627
Default Alt Text
threadcontroller.cpp (1 KB)
Attached To
Mode
R20 SoC_Rosa_repo
Attached
Detach File
Event Timeline