Commit f42335be authored by Jan Möbius's avatar Jan Möbius
Browse files

Started Documentation of process Interface

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11149 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 21caba36
...@@ -46,22 +46,21 @@ ...@@ -46,22 +46,21 @@
#include <QtGui> #include <QtGui>
#include <OpenFlipper/threads/OpenFlipperThread.hh> #include <OpenFlipper/threads/OpenFlipperThread.hh>
/** \brief Interface class controlling threadding in OpenFlipper /** \file ProcessInterface.hh
* *
* * Interface class for Thread and Process handling.\ref processInterfacePage
* Example:\n */
* OpenFlipperThread* thread = new OpenFlipperThread(name() + "unique id"); // Create your thread containing a unique id \n
* connect(thread,SIGNAL( state(QString, int)), this,SIGNAL(setJobState(QString, int))); // connect your threads state info to the global one \n /** \brief Interface class for Thread handling.
* connect(thread,SIGNAL( finished(QString)), this,SIGNAL(finishJob(QString))); // connect your threads finish info to the global one ( you can do the same for a local one ) \n *
* connect(thread,SIGNAL( function()), this,SLOT(testFunctionThread()),Qt::DirectConnection); // You can directly give a slot of your app that gets called \n * \ref processInterfacePage "Detailed description"
* emit startJob( name() + "unique id", "Description" , 0 , 100 , false); // Tell the core about your thread * \n
* thread->start(); // start thread *
* thread->startProcessing(); // start processing * This Interface is used to handle threads in OpenFlipper. You can run arbitrary slots within
* separate threads.
*/ */
class ProcessInterface { class ProcessInterface {
public : public :
/// Destructor /// Destructor
...@@ -125,6 +124,31 @@ class ProcessInterface { ...@@ -125,6 +124,31 @@ class ProcessInterface {
}; };
/** \page processInterfacePage Process Interface
* \n
\image html ProcessInterface.png
\n
The Process interface can be used to run arbitrary slots of your plugin within a separate thread of OpenFlipper.
OpenFlipper supports a process manager, visualizing currently running operations to the user. Process dialogs
and user information can be provided via special signals.
TODO : All!
Example:\n
OpenFlipperThread* thread = new OpenFlipperThread(name() + "unique id"); // Create your thread containing a unique id \n
connect(thread,SIGNAL( state(QString, int)), this,SIGNAL(setJobState(QString, int))); // connect your threads state info to the global one \n
connect(thread,SIGNAL( finished(QString)), this,SIGNAL(finishJob(QString))); // connect your threads finish info to the global one ( you can do the same for a local one ) \n
connect(thread,SIGNAL( function()), this,SLOT(testFunctionThread()),Qt::DirectConnection); // You can directly give a slot of your app that gets called \n
emit startJob( name() + "unique id", "Description" , 0 , 100 , false); // Tell the core about your thread
thread->start(); // start thread
thread->startProcessing(); // start processing
*/
Q_DECLARE_INTERFACE(ProcessInterface,"OpenFlipper.ProcessInterface/1.0") Q_DECLARE_INTERFACE(ProcessInterface,"OpenFlipper.ProcessInterface/1.0")
#endif // PROCESSINTERFACE_HH #endif // PROCESSINTERFACE_HH
...@@ -55,8 +55,6 @@ The following groups of Interfaces are available: ...@@ -55,8 +55,6 @@ The following groups of Interfaces are available:
\section todoInterfaces Interfaces TODO for documentation: \section todoInterfaces Interfaces TODO for documentation:
\subsection ProcessInterface Process Interface
\subsection TexturePlugin Texture Interface \subsection TexturePlugin Texture Interface
\image html TextureInterface.png \image html TextureInterface.png
Allows your plugin to provide a texture. ( TextureInterface ) Allows your plugin to provide a texture. ( TextureInterface )
...@@ -206,6 +204,13 @@ For plugins which provide scriptable functions ( \ref scriptInterfacePage ) ...@@ -206,6 +204,13 @@ For plugins which provide scriptable functions ( \ref scriptInterfacePage )
Enables the developer to connect signals and slots across plugins. ( \ref pluginConnectionInterfacePage ) Enables the developer to connect signals and slots across plugins. ( \ref pluginConnectionInterfacePage )
\n \n
\subpage processInterfacePage
\n
\image html ProcessInterface.png
\n
The ProcessInterface can be used to start arbitrary functions within threads. ( \ref processInterfacePage )
\n
\subpage securityInterfacePage \subpage securityInterfacePage
\n \n
\image html SecurityInterface.png \image html SecurityInterface.png
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment