cctw  0.2.1
cctwqtsetupcheckimportdialog.cpp
Go to the documentation of this file.
2 #include "ui_cctwqtsetupcheckimportdialog.h"
3 #include "cctwqtmainwindow.h"
4 #include "cctwimporter.h"
5 #include <QDir>
6 #include <QtConcurrentRun>
7 
9  QDialog(parent),
11  m_Window(parent),
12  m_Data(data)
13 {
14  ui->setupUi(this);
15 
16  setAttribute(Qt::WA_DeleteOnClose);
17 
18  if (m_Data) {
19  ui->m_DarkImagePath->setText(m_Data->get_DarkImagePath());
20  setCurrentDirectory(m_Data->get_ImageDirectory());
21  ui->m_DataImages->addItems(m_Data->get_ImagePaths());
22  ui->m_OutputPath->setText(m_Data->get_OutputPath());
23 
24  ui->m_CheckRigorously->setChecked(m_Data->get_CheckRigorously());
25  ui->m_CheckApproximately->setChecked(m_Data->get_CheckApproximately());
26  }
27 }
28 
30 {
31  delete ui;
32 }
33 
35 {
36  if (m_Data) {
37  m_Data->set_CheckRigorously(ui->m_CheckRigorously->isChecked());
38  m_Data->set_CheckApproximately(ui->m_CheckApproximately->isChecked());
39  }
40 
41  QtConcurrent::run(m_Data, &CctwImporter::checkImportedData);
42 // QMetaObject::invokeMethod(m_Data, "checkImportedData", Qt::QueuedConnection);
43 
44  QDialog::accept();
45 }
46 
48 {
49  ui->m_DataDirectory->setText(dir);
50 }
CctwqtSetupCheckImportDialog(CctwqtMainWindow *parent, CctwImporter *data)
void checkImportedData()
Ui::CctwqtSetupCheckImportDialog * ui