FingerprintDialog::FingerprintDialog(QWidget *parent, intf_thread_t *p_intf, input_item_t *p_item ) : QDialog(parent), ui(new Ui::FingerprintDialog), p_r( NULL ) { ui->setupUi(this); ui->stackedWidget->setCurrentWidget( ui->wait ); ui->buttonBox->addButton( "&Close", QDialogButtonBox::RejectRole ); ui->buttonsBox->addButton( "&Apply this identity to the file", QDialogButtonBox::AcceptRole ); ui->buttonsBox->addButton( "&Discard all identities", QDialogButtonBox::RejectRole ); CONNECT( ui->buttonsBox, accepted(), this, applyIdentity() ); CONNECT( ui->buttonBox, rejected(), this, close() ); CONNECT( ui->buttonsBox, rejected(), this, close() ); t = new (std::nothrow) Chromaprint( p_intf ); if ( t ) { CONNECT( t, finished(), this, handleResults() ); t->enqueue( p_item ); } }
Controller::Controller() { SegEvolver *worker = new SegEvolver(); std::cout << "Controller Constructor" << std::endl; worker->moveToThread(&workerThread); std::cout << "Controller Constructor" << std::endl; connect(&workerThread, SIGNAL(finished()), worker, SLOT(deleteLater())); std::cout << "Controller Constructor" << std::endl; connect(this, SIGNAL(operate(QString)), worker, SLOT(doWork(QString))); std::cout << "Controller Constructor" << std::endl; connect(worker, SIGNAL(resultReady(QString)), this, SLOT(handleResults(QString))); std::cout << "Controller Constructor" << std::endl; //workerThread.start(); std::cout << "Controller Constructor" << std::endl; }