Developer Documentation
OpenFunctionThread.cc
1 #include "OpenFunctionThread.hh"
4 
5 
6 void LoadFromPluginThread::loadFromPlugin()
7 {
8  for ( unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
10 
11  for (int i = 0; i < infos_.size(); ++i)
12  {
13  LoadInfos info = infos_[i];
14  if (info.type != DATA_UNKNOWN)
15  loadedIds_[i] = info.plugin->loadObject(info.filename,info.type );
16  else
17  loadedIds_[i] = info.plugin->loadObject(info.filename);
18  emit state(this->jobId(),i);
19  }
20  for ( int i = 0 ; i < PluginFunctions::viewers() ; ++i )
22  emit updateView();
23 }
24 
25 
26 LoadFromPluginThread::~LoadFromPluginThread()
27 {
28 
29 }
30 
31 
32 
33 LoadFromPluginThread::LoadFromPluginThread(const QVector<LoadInfos>& _loadInfos, const QString& _jobName)
34 : OpenFlipperThread(_jobName), infos_(_loadInfos), loadedIds_(_loadInfos.size(),-1)
35 {
36  connect( this ,SIGNAL(function()), this, SLOT(loadFromPlugin()), Qt::DirectConnection) ;
37 }
38 
39 
40 
41 int LoadFromPluginThread::getObjId(int index)const
42 {
43  return loadedIds_[index];
44 }
45 
46 
47 
48 const QString& LoadFromPluginThread::getFilename(int index) const
49 {
50  return infos_[index].filename;
51 }
52 
const DataType DATA_UNKNOWN(0)
None of the other Objects.
int viewers()
Get the number of viewers.
void unLockUpdate()
Unlock display locked by updateLock().
Thread handling class for OpenFlipper.
Viewer::ViewerProperties & viewerProperties(int _id)
Get the viewer properties Use this functions to get basic viewer properties such as backgroundcolor o...
void state(QString _jobId, int _state)
Tell core about job state.
QString jobId()
get JobId get the Id of the current Job