53 p_propagate =
new QRadioButton(
"&Propagate");
54 p_propagate->setToolTip(
"Propagate pixel type from input cube");
55 p_unsignedByte =
new QRadioButton(
"&Unsigned Byte");
56 p_unsignedByte->setToolTip(
"Unsigned 8-bit pixels");
57 p_signedWord =
new QRadioButton(
"&Signed Word");
58 p_signedWord->setToolTip(
"Signed 16-bit pixels");
59 p_unsignedWord =
new QRadioButton(
"Unsigned Word");
60 p_unsignedWord->setToolTip(
"Unsigned 16-bit pixels");
61 p_signedInteger =
new QRadioButton(
"&Signed Integer");
62 p_signedInteger->setToolTip(
"Signed 32-bit integer");
63 p_unsignedInteger =
new QRadioButton(
"Unsigned Integer");
64 p_unsignedInteger->setToolTip(
"Unsigned 32-bit integer");
65 p_real =
new QRadioButton(
"&Real");
66 p_real->setToolTip(
"Floating point 32-bit pixels");
68 QButtonGroup *buttonGroup =
new QButtonGroup();
69 buttonGroup->addButton(p_propagate);
70 buttonGroup->addButton(p_unsignedByte);
71 buttonGroup->addButton(p_signedWord);
72 buttonGroup->addButton(p_unsignedWord);
73 buttonGroup->addButton(p_unsignedInteger);
74 buttonGroup->addButton(p_signedInteger);
75 buttonGroup->addButton(p_real);
76 buttonGroup->setExclusive(
true);
78 p_minEdit =
new QLineEdit();
79 p_maxEdit =
new QLineEdit();
80 QLabel *minLabel =
new QLabel(
"Minimum");
81 QLabel *maxLabel =
new QLabel(
"Maximum");
82 connect(p_propagate, SIGNAL(toggled(
bool)), p_minEdit, SLOT(setDisabled(
bool)));
83 connect(p_propagate, SIGNAL(toggled(
bool)), p_maxEdit, SLOT(setDisabled(
bool)));
84 connect(p_unsignedByte, SIGNAL(toggled(
bool)), p_minEdit, SLOT(setEnabled(
bool)));
85 connect(p_unsignedByte, SIGNAL(toggled(
bool)), p_maxEdit, SLOT(setEnabled(
bool)));
86 connect(p_signedWord, SIGNAL(toggled(
bool)), p_minEdit, SLOT(setEnabled(
bool)));
87 connect(p_signedWord, SIGNAL(toggled(
bool)), p_maxEdit, SLOT(setEnabled(
bool)));
88 connect(p_unsignedWord, SIGNAL(toggled(
bool)), p_minEdit, SLOT(setEnabled(
bool)));
89 connect(p_unsignedWord, SIGNAL(toggled(
bool)), p_maxEdit, SLOT(setEnabled(
bool)));
90 connect(p_unsignedInteger, SIGNAL(toggled(
bool)), p_minEdit, SLOT(setEnabled(
bool)));
91 connect(p_unsignedInteger, SIGNAL(toggled(
bool)), p_maxEdit, SLOT(setEnabled(
bool)));
92 connect(p_signedInteger, SIGNAL(toggled(
bool)), p_minEdit, SLOT(setEnabled(
bool)));
93 connect(p_signedInteger, SIGNAL(toggled(
bool)), p_maxEdit, SLOT(setEnabled(
bool)));
94 connect(p_real, SIGNAL(toggled(
bool)), p_minEdit, SLOT(setDisabled(
bool)));
95 connect(p_real, SIGNAL(toggled(
bool)), p_maxEdit, SLOT(setDisabled(
bool)));
96 p_minEdit->setValidator(
new QDoubleValidator(p_minEdit));
97 p_maxEdit->setValidator(
new QDoubleValidator(p_maxEdit));
99 QGridLayout *gridLayout =
new QGridLayout();
100 gridLayout->addWidget(p_propagate, 0, 0);
101 gridLayout->addWidget(p_unsignedByte, 1, 0);
102 gridLayout->addWidget(p_signedWord, 2, 0);
103 gridLayout->addWidget(p_unsignedWord, 3, 0);
104 gridLayout->addWidget(p_signedInteger, 4, 0);
105 gridLayout->addWidget(p_unsignedInteger, 5, 0);
106 gridLayout->addWidget(p_real, 6, 0);
107 gridLayout->addWidget(minLabel, 0, 1);
108 gridLayout->addWidget(p_minEdit, 1, 1);
109 gridLayout->addWidget(maxLabel, 2, 1);
110 gridLayout->addWidget(p_maxEdit, 3, 1);
112 QGroupBox *pixelTypeBox =
new QGroupBox(
"Pixel Type");
113 pixelTypeBox->setLayout(gridLayout);
116 p_attached =
new QRadioButton(
"&Attached");
117 p_attached->setToolTip(
"Save labels and image data in one file");
118 p_detached =
new QRadioButton(
"&Detached");
119 p_detached->setToolTip(
"Save labels and image data in separate files");
120 p_attached->setChecked(
true);
122 buttonGroup =
new QButtonGroup();
123 buttonGroup->addButton(p_attached);
124 buttonGroup->addButton(p_detached);
125 buttonGroup->setExclusive(
true);
127 QVBoxLayout *layout =
new QVBoxLayout();
128 layout->addWidget(p_attached);
129 layout->addWidget(p_detached);
131 QGroupBox *labelFormatBox =
new QGroupBox(
"Label Format");
132 labelFormatBox->setLayout(layout);
135 p_tiled =
new QRadioButton(
"&Tiled");
136 p_tiled->setToolTip(
"Save image data in tiled format");
137 p_bsq =
new QRadioButton(
"&BSQ");
138 p_bsq->setToolTip(
"Save image data in band sequential format");
140 buttonGroup =
new QButtonGroup();
141 buttonGroup->addButton(p_tiled);
142 buttonGroup->addButton(p_bsq);
143 buttonGroup->setExclusive(
true);
145 layout =
new QVBoxLayout();
146 layout->addWidget(p_tiled);
147 layout->addWidget(p_bsq);
149 QGroupBox *cubeFormatBox =
new QGroupBox(
"Cube Format");
150 cubeFormatBox->setLayout(layout);
153 p_lsb =
new QRadioButton(
"&LSB");
154 p_lsb->setToolTip(
"Save image data in little endian format");
155 p_msb =
new QRadioButton(
"&MSB");
156 p_msb->setToolTip(
"Save image data in big endian format");
158 buttonGroup =
new QButtonGroup();
159 buttonGroup->addButton(p_lsb);
160 buttonGroup->addButton(p_msb);
161 buttonGroup->setExclusive(
true);
163 layout =
new QVBoxLayout();
164 layout->addWidget(p_lsb);
165 layout->addWidget(p_msb);
167 QGroupBox *byteOrderBox =
new QGroupBox(
"Byte Order");
168 byteOrderBox->setLayout(layout);
171 QPushButton *okButton =
new QPushButton(
"Ok");
172 connect(okButton, SIGNAL(clicked()),
this, SLOT(accept()));
174 QPushButton *cancelButton =
new QPushButton(
"Cancel");
175 connect(cancelButton, SIGNAL(clicked()),
this, SLOT(reject()));
178 QHBoxLayout *actionLayout =
new QHBoxLayout();
179 actionLayout->addWidget(okButton);
180 actionLayout->addWidget(cancelButton);
183 QVBoxLayout *dialogLayout =
new QVBoxLayout(
this);
184 dialogLayout->addWidget(pixelTypeBox);
185 dialogLayout->addWidget(labelFormatBox);
186 dialogLayout->addWidget(cubeFormatBox);
187 dialogLayout->addWidget(byteOrderBox);
188 dialogLayout->addLayout(actionLayout);