cctw  0.2.1
Public Slots | Public Member Functions | Private Attributes | List of all members
CctwqtSetupCompareDialog Class Reference

#include <cctwqtsetupcomparedialog.h>

Inheritance diagram for CctwqtSetupCompareDialog:
Inheritance graph
Collaboration diagram for CctwqtSetupCompareDialog:
Collaboration graph

Public Slots

void accept ()
 
void browse1 ()
 
void browse2 ()
 

Public Member Functions

 CctwqtSetupCompareDialog (CctwqtMainWindow *parent, CctwComparer *data)
 
 ~CctwqtSetupCompareDialog ()
 

Private Attributes

Ui::CctwqtSetupCompareDialog * ui
 
CctwqtMainWindowm_Window
 
CctwComparerm_Data
 

Detailed Description

Definition at line 13 of file cctwqtsetupcomparedialog.h.

Constructor & Destructor Documentation

CctwqtSetupCompareDialog::CctwqtSetupCompareDialog ( CctwqtMainWindow parent,
CctwComparer data 
)
explicit

Definition at line 7 of file cctwqtsetupcomparedialog.cpp.

References browse1(), browse2(), m_Data, and ui.

7  :
8  QDialog(parent),
9  ui(new Ui::CctwqtSetupCompareDialog),
10  m_Window(parent),
11  m_Data(data)
12 {
13  ui->setupUi(this);
14 
15  setAttribute(Qt::WA_DeleteOnClose);
16 
17  if (m_Data) {
18  ui->m_FileName1->setText(m_Data->get_FilePath1());
19  ui->m_DatasetName1->setText(m_Data->get_Dataset1());
20 
21  ui->m_FileName2->setText(m_Data->get_FilePath2());
22  ui->m_DatasetName2->setText(m_Data->get_Dataset2());
23 
24  ui->m_CompareRigorously->setChecked(m_Data->get_CompareRigorously());
25  ui->m_CompareApproximately->setChecked(m_Data->get_CompareApproximately());
26  }
27 
28  connect(ui->m_BrowseFile1, SIGNAL(clicked()), this, SLOT(browse1()));
29  connect(ui->m_BrowseFile2, SIGNAL(clicked()), this, SLOT(browse2()));
30 }
Ui::CctwqtSetupCompareDialog * ui
CctwqtSetupCompareDialog::~CctwqtSetupCompareDialog ( )

Definition at line 32 of file cctwqtsetupcomparedialog.cpp.

References ui.

33 {
34  delete ui;
35 }
Ui::CctwqtSetupCompareDialog * ui

Member Function Documentation

void CctwqtSetupCompareDialog::accept ( )
slot

Definition at line 37 of file cctwqtsetupcomparedialog.cpp.

References CctwComparer::compareDatasets(), m_Data, and ui.

38 {
39  if (m_Data) {
40  m_Data->set_FilePath1(ui->m_FileName1->text());
41  m_Data->set_Dataset1(ui->m_DatasetName1->text());
42 
43  m_Data->set_FilePath2(ui->m_FileName2->text());
44  m_Data->set_Dataset2(ui->m_DatasetName2->text());
45 
46  m_Data->set_CompareRigorously(ui->m_CompareRigorously->isChecked());
47  m_Data->set_CompareApproximately(ui->m_CompareApproximately->isChecked());
48  }
49 
50  QtConcurrent::run(m_Data, &CctwComparer::compareDatasets);
51 // QMetaObject::invokeMethod(m_Data, "compareDatasets");
52 
53  QDialog::accept();
54 }
Ui::CctwqtSetupCompareDialog * ui
void compareDatasets()
void CctwqtSetupCompareDialog::browse1 ( )
slot

Definition at line 56 of file cctwqtsetupcomparedialog.cpp.

References ui.

Referenced by CctwqtSetupCompareDialog().

57 {
58  QString path = QFileDialog::getOpenFileName(this, "File 1", ui->m_FileName1->text());
59 
60  if (path.length() > 0) {
61  ui->m_FileName1->setText(path);
62  }
63 }
Ui::CctwqtSetupCompareDialog * ui
void CctwqtSetupCompareDialog::browse2 ( )
slot

Definition at line 65 of file cctwqtsetupcomparedialog.cpp.

References ui.

Referenced by CctwqtSetupCompareDialog().

66 {
67  QString path = QFileDialog::getOpenFileName(this, "File 2", ui->m_FileName2->text());
68 
69  if (path.length() > 0) {
70  ui->m_FileName2->setText(path);
71  }
72 }
Ui::CctwqtSetupCompareDialog * ui

Member Data Documentation

CctwComparer* CctwqtSetupCompareDialog::m_Data
private

Definition at line 29 of file cctwqtsetupcomparedialog.h.

Referenced by accept(), and CctwqtSetupCompareDialog().

CctwqtMainWindow* CctwqtSetupCompareDialog::m_Window
private

Definition at line 28 of file cctwqtsetupcomparedialog.h.

Ui::CctwqtSetupCompareDialog* CctwqtSetupCompareDialog::ui
private

The documentation for this class was generated from the following files: