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

#include <cctwqtsetupoutputdialog.h>

Inheritance diagram for CctwqtSetupOutputDialog:
Inheritance graph
Collaboration diagram for CctwqtSetupOutputDialog:
Collaboration graph

Public Slots

void accept ()
 
void doBrowseOutputFile ()
 

Public Member Functions

 CctwqtSetupOutputDialog (CctwqtMainWindow *parent, CctwChunkedData *data)
 
 ~CctwqtSetupOutputDialog ()
 

Private Attributes

Ui::CctwqtSetupOutputDialog * ui
 
CctwqtMainWindowm_Window
 
CctwChunkedDatam_Data
 

Detailed Description

Definition at line 13 of file cctwqtsetupoutputdialog.h.

Constructor & Destructor Documentation

CctwqtSetupOutputDialog::CctwqtSetupOutputDialog ( CctwqtMainWindow parent,
CctwChunkedData data 
)
explicit

Definition at line 7 of file cctwqtsetupoutputdialog.cpp.

References CctwqtMainWindow::cctwApplication(), CctwChunkedData::chunkSize, CctwChunkedData::dimensions, doBrowseOutputFile(), m_Data, CctwApplication::m_Transformer, m_Window, ui, CctwVector3D< T >::x(), CctwVector3D< T >::y(), and CctwVector3D< T >::z().

7  :
8  QDialog(parent),
9  ui(new Ui::CctwqtSetupOutputDialog),
10  m_Window(parent),
11  m_Data(data)
12 {
13  ui->setupUi(this);
14 
15  setAttribute(Qt::WA_DeleteOnClose);
16 
17  connect(ui->m_BrowseOutputFileName, SIGNAL(clicked()), this, SLOT(doBrowseOutputFile()));
18 
19  if(m_Data) {
20  ui->m_OutputFileName->setText(m_Data->get_DataFileName());
21  ui->m_OutputDatasetName->setText(m_Data->get_DataSetName());
22  ui->m_OutputCompression->setValue(m_Data->get_Compression());
23 
25 
26  ui->m_OutputDimensionsX->setValue(dims.x());
27  ui->m_OutputDimensionsY->setValue(dims.y());
28  ui->m_OutputDimensionsZ->setValue(dims.z());
29 
31 
32  ui->m_OutputChunkX->setValue(cksz.x());
33  ui->m_OutputChunkY->setValue(cksz.y());
34  ui->m_OutputChunkZ->setValue(cksz.z());
35 
36  CctwIntVector3D hcksz = m_Data->get_HDFChunkSize();
37 
38  ui->m_HDFOutputChunkX->setValue(hcksz.x());
39  ui->m_HDFOutputChunkY->setValue(hcksz.y());
40  ui->m_HDFOutputChunkZ->setValue(hcksz.z());
41 
43 
44  if (xform) {
45  ui->m_OversampleX->setValue(xform->get_OversampleX());
46  ui->m_OversampleY->setValue(xform->get_OversampleY());
47  ui->m_OversampleZ->setValue(xform->get_OversampleZ());
48  }
49  }
50 }
Ui::CctwqtSetupOutputDialog * ui
CctwIntVector3D dimensions
CctwTransformer * m_Transformer
T x() const
Definition: cctwvector3d.h:17
CctwApplication * cctwApplication()
T z() const
Definition: cctwvector3d.h:19
CctwIntVector3D chunkSize
T y() const
Definition: cctwvector3d.h:18
CctwqtSetupOutputDialog::~CctwqtSetupOutputDialog ( )

Definition at line 52 of file cctwqtsetupoutputdialog.cpp.

References ui.

53 {
54  delete ui;
55 }
Ui::CctwqtSetupOutputDialog * ui

Member Function Documentation

void CctwqtSetupOutputDialog::accept ( )
slot

Definition at line 57 of file cctwqtsetupoutputdialog.cpp.

References CctwqtMainWindow::cctwApplication(), m_Data, CctwApplication::m_Transformer, m_Window, CctwChunkedData::setChunkSize(), CctwChunkedData::setDimensions(), and ui.

58 {
59  if (m_Data) {
60  CctwIntVector3D dims(ui->m_OutputDimensionsX->value(),
61  ui->m_OutputDimensionsY->value(),
62  ui->m_OutputDimensionsZ->value());
63 
64  CctwIntVector3D cksz(ui->m_OutputChunkX->value(),
65  ui->m_OutputChunkY->value(),
66  ui->m_OutputChunkZ->value());
67 
68  CctwIntVector3D hcksz(ui->m_HDFOutputChunkX->value(),
69  ui->m_HDFOutputChunkY->value(),
70  ui->m_HDFOutputChunkZ->value());
71 
72  m_Data->setDimensions(dims);
73  m_Data->setChunkSize(cksz);
74  m_Data->set_Compression(ui->m_OutputCompression->value());
75 
76  m_Data->set_DataFileName(ui->m_OutputFileName->text());
77  m_Data->set_DataSetName(ui->m_OutputDatasetName->text());
78 
79  m_Data->set_HDFChunkSize(hcksz);
80 
82 
83  if (xform) {
84  xform->set_OversampleX(ui->m_OversampleX->value());
85  xform->set_OversampleY(ui->m_OversampleY->value());
86  xform->set_OversampleZ(ui->m_OversampleZ->value());
87  }
88  }
89 
90  QDialog::accept();
91 }
Ui::CctwqtSetupOutputDialog * ui
void setDimensions(CctwIntVector3D dim)
CctwTransformer * m_Transformer
void setChunkSize(CctwIntVector3D cksz)
CctwApplication * cctwApplication()
void CctwqtSetupOutputDialog::doBrowseOutputFile ( )
slot

Definition at line 93 of file cctwqtsetupoutputdialog.cpp.

References m_Window, and ui.

Referenced by CctwqtSetupOutputDialog().

94 {
95  if (m_Window) {
96  QString path = QFileDialog::getSaveFileName(this, "Output File",
97  ui->m_OutputFileName->text());
98 
99  if (path.length() > 0) {
100  ui->m_OutputFileName->setText(path);
101  }
102  }
103 }
Ui::CctwqtSetupOutputDialog * ui

Member Data Documentation

CctwChunkedData* CctwqtSetupOutputDialog::m_Data
private

Definition at line 28 of file cctwqtsetupoutputdialog.h.

Referenced by accept(), and CctwqtSetupOutputDialog().

CctwqtMainWindow* CctwqtSetupOutputDialog::m_Window
private

Definition at line 27 of file cctwqtsetupoutputdialog.h.

Referenced by accept(), CctwqtSetupOutputDialog(), and doBrowseOutputFile().

Ui::CctwqtSetupOutputDialog* CctwqtSetupOutputDialog::ui
private

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