LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
Lima::LimaMainTaskRunner Class Reference

This class allows to run a function (obtained through a function pointer) inside the Qt event loop, thus allowing the objects it instantiates to emit and receive signals. More...

#include <common/tools/LimaMainTaskRunner.h>

Inheritance diagram for Lima::LimaMainTaskRunner:

Public Slots

void run ()

Signals

void finished (int)

Public Member Functions

 LimaMainTaskRunner (int aargc, char **aargv, int(*foo)(int, char **), QObject *parent=0)
virtual ~LimaMainTaskRunner ()

Detailed Description

This class allows to run a function (obtained through a function pointer) inside the Qt event loop, thus allowing the objects it instantiates to emit and receive signals.

With its argc and argv parameters it allows it to act as a simple delegate to the program main function. All programs wishing to use the Lima framework should use it like this:

void run(int argc,char** argv)
{
<other stuff>
}
int main(int argc, char **argv)
{
QCoreApplication a(argc, argv);
QObject::connect(task, SIGNAL(finished()), &a, SLOT(quit()));
QTimer::singleShot(0, task, SLOT(run()));
return a.exec();
}
This class allows to run a function (obtained through a function pointer) inside the Qt event loop,...
static const AmosePluginsManager & single()
Definition Singleton.h:51
int run(int aargc, char **aargv)
Definition main.cpp:31
int main(int argc, char *argv[])
Definition main.cpp:14
LIMA_COMMONQSLOG_EXPORT bool initQsLog(const QString &configString)

Definition at line 43 of file LimaMainTaskRunner.h.

Constructor & Destructor Documentation

◆ LimaMainTaskRunner()

Lima::LimaMainTaskRunner::LimaMainTaskRunner ( int aargc,
char ** aargv,
int(* foo )(int, char **),
QObject * parent = 0 )

Definition at line 11 of file LimaMainTaskRunner.cpp.

◆ ~LimaMainTaskRunner()

virtual Lima::LimaMainTaskRunner::~LimaMainTaskRunner ( )
inlinevirtual

Definition at line 48 of file LimaMainTaskRunner.h.

Member Function Documentation

◆ finished

void Lima::LimaMainTaskRunner::finished ( int )
signal

◆ run

void Lima::LimaMainTaskRunner::run ( )
slot

Definition at line 19 of file LimaMainTaskRunner.cpp.


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