mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0024665: A sample for advanced function mechanism
PRO file is added + a description of how to generate the Visual Studio projects and compile. In addition, the sample folder is renamed to FuncDemo. Adding 64 bit configuration to VC projects
This commit is contained in:
41
samples/qt/FuncDemo/src/FThread.h
Normal file
41
samples/qt/FuncDemo/src/FThread.h
Normal file
@@ -0,0 +1,41 @@
|
||||
#ifndef _FTHREAD_H_
|
||||
#define _FTHREAD_H_
|
||||
|
||||
#include <QThread>
|
||||
|
||||
#include <TFunction_Logbook.hxx>
|
||||
#include <TFunction_Iterator.hxx>
|
||||
#include <TFunction_Driver.hxx>
|
||||
|
||||
class GraphWidget; // shows graphically execution of functions
|
||||
|
||||
class FThread : public QThread
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
FThread(QObject* parent = 0);
|
||||
~FThread();
|
||||
|
||||
void setIterator(const TFunction_Iterator& ); // to iterate and call functions
|
||||
void setLogbook(const Handle(TFunction_Logbook)& ); // to set logbook with modifications
|
||||
void setGraph(GraphWidget* ); // to change color of a graph circle
|
||||
void setThreadIndex(const int ); // to set the index of the thread
|
||||
|
||||
protected:
|
||||
|
||||
void run();
|
||||
virtual TDF_Label getFreeFunction(); // Returns any free (not executed yet) function
|
||||
|
||||
private:
|
||||
|
||||
TFunction_Iterator itr;
|
||||
Handle(TFunction_Logbook) log;
|
||||
int thread_index;
|
||||
|
||||
GraphWidget* graph;
|
||||
};
|
||||
|
||||
#endif // _FTHREAD_H_
|
Reference in New Issue
Block a user