#ifndef IDEAL_DEFDEN_H
#define IDEAL_DEFDEN_H
#include <QThread>
#include "molecule.h"
#include "chgl.h"
#include "fourxle.h"

class IdealDefdenGenerator : public QThread{
Q_OBJECT
  public:
  IdealDefdenGenerator(ChGL *chgl_,FourXle *FX, QObject * parent = 0 ){
    chgl = chgl_;
    mommy = parent;// maybe I need it later?
    fxle=FX;
  }
  ~IdealDefdenGenerator(){
     // printf("destruct ideal\n");
  }
  void run() {
    /* expensive or blocking operation  */
    beloWriteCube();
  }
  double defden(V3 pos,CEnvironment &belo, QList<Matrix> &mi);
  void beloWriteCube();//bello braf!
  ChGL *chgl;
  QObject *mommy;//parent
  FourXle *fxle;

signals:
  void message(const QString &);//!< small text messages to the status bar.
};
#endif

/*
 *
 *
 class WorkerThread : public QThread
 {
 Q_OBJECT
 void run() {
 QString result;
// expensive or blocking operation  //
emit resultReady(result);
}
signals:
void resultReady(const QString &s);
};

void MyObject::startWorkInAThread()
{
WorkerThread *workerThread = new WorkerThread(this);
connect(workerThread, SIGNAL(resultReady(QString)), this, SLOT(handleResults(QString)));
connect(workerThread, SIGNAL(finished()), workerThread, SLOT(deleteLater()));
workerThread->start();
}


*/
