|
Lines 155-171
Link Here
|
| 155 |
|
155 |
|
| 156 |
// --------------------------------------------------------------- |
156 |
// --------------------------------------------------------------- |
| 157 |
|
157 |
|
| 158 |
hboxLayout = new QHBoxLayout(0,0,6,"layout1"); |
|
|
| 159 |
gammaSpinBox_ = new CSpinBox(settingsBox); |
| 160 |
gammaSpinBox_->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); |
| 161 |
|
| 162 |
hboxLayout->addWidget(gammaSpinBox_); |
| 163 |
hboxLayout->addWidget(new QLabel(i18n("Gamma"), settingsBox)); |
| 164 |
QToolTip::add(gammaSpinBox_, |
| 165 |
i18n("Specify the gamma value")); |
| 166 |
settingsBoxLayout->addLayout(hboxLayout); |
| 167 |
|
| 168 |
// --------------------------------------------------------------- |
| 169 |
|
158 |
|
| 170 |
hboxLayout = new QHBoxLayout(0,0,6,"layout2"); |
159 |
hboxLayout = new QHBoxLayout(0,0,6,"layout2"); |
| 171 |
brightnessSpinBox_ = new CSpinBox(settingsBox); |
160 |
brightnessSpinBox_ = new CSpinBox(settingsBox); |
|
Lines 208-229
Link Here
|
| 208 |
saveButtonGroup_ = new QVButtonGroup(i18n("Save Format"),this); |
197 |
saveButtonGroup_ = new QVButtonGroup(i18n("Save Format"),this); |
| 209 |
saveButtonGroup_->setRadioButtonExclusive(true); |
198 |
saveButtonGroup_->setRadioButtonExclusive(true); |
| 210 |
|
199 |
|
| 211 |
QRadioButton *radioButton; |
200 |
jpegButton_ = new QRadioButton("JPEG",saveButtonGroup_); |
| 212 |
radioButton = new QRadioButton("JPEG",saveButtonGroup_); |
201 |
QToolTip::add(jpegButton_, |
| 213 |
QToolTip::add(radioButton, |
|
|
| 214 |
i18n("Output the processed images in JPEG Format.\n" |
202 |
i18n("Output the processed images in JPEG Format.\n" |
| 215 |
"This is a lossy format, but will give\n" |
203 |
"This is a lossy format, but will give\n" |
| 216 |
"smaller-sized files")); |
204 |
"smaller-sized files")); |
| 217 |
radioButton->setChecked(true); |
205 |
jpegButton_->setChecked(true); |
| 218 |
|
206 |
|
| 219 |
radioButton = new QRadioButton("TIFF",saveButtonGroup_); |
207 |
tiffButton_ = new QRadioButton("TIFF",saveButtonGroup_); |
| 220 |
QToolTip::add(radioButton, |
208 |
QToolTip::add(tiffButton_, |
| 221 |
i18n("Output the processed images in TIFF Format.\n" |
209 |
i18n("Output the processed images in TIFF Format.\n" |
| 222 |
"This generates large files, without\n" |
210 |
"This generates large files, without\n" |
| 223 |
"losing quality")); |
211 |
"losing quality")); |
| 224 |
|
212 |
|
| 225 |
radioButton = new QRadioButton("PPM",saveButtonGroup_); |
213 |
ppmButton_ = new QRadioButton("PPM",saveButtonGroup_); |
| 226 |
QToolTip::add(radioButton, |
214 |
QToolTip::add(ppmButton_, |
| 227 |
i18n("Output the processed images in PPM Format.\n" |
215 |
i18n("Output the processed images in PPM Format.\n" |
| 228 |
"This generates the largest files, without\n" |
216 |
"This generates the largest files, without\n" |
| 229 |
"losing quality")); |
217 |
"losing quality")); |
|
Lines 236-244
Link Here
|
| 236 |
conflictButtonGroup_ = new QVButtonGroup(i18n("If Target File Exists"),this); |
224 |
conflictButtonGroup_ = new QVButtonGroup(i18n("If Target File Exists"),this); |
| 237 |
conflictButtonGroup_->setRadioButtonExclusive(true); |
225 |
conflictButtonGroup_->setRadioButtonExclusive(true); |
| 238 |
|
226 |
|
| 239 |
radioButton = new QRadioButton(i18n("Overwrite"),conflictButtonGroup_); |
227 |
overwriteButton_ = new QRadioButton(i18n("Overwrite"),conflictButtonGroup_); |
| 240 |
radioButton->setChecked(true); |
228 |
overwriteButton_->setChecked(true); |
| 241 |
radioButton = new QRadioButton(i18n("Open file dialog"),conflictButtonGroup_); |
229 |
promptButton_ = new QRadioButton(i18n("Open file dialog"),conflictButtonGroup_); |
| 242 |
|
230 |
|
| 243 |
// --------------------------------------------------------------- |
231 |
// --------------------------------------------------------------- |
| 244 |
|
232 |
|
|
Lines 286-292
Link Here
|
| 286 |
|
274 |
|
| 287 |
KHelpMenu* helpMenu = new KHelpMenu(this, about, false); |
275 |
KHelpMenu* helpMenu = new KHelpMenu(this, about, false); |
| 288 |
helpMenu->menu()->removeItemAt(0); |
276 |
helpMenu->menu()->removeItemAt(0); |
| 289 |
helpMenu->menu()->insertItem(i18n("RAW Images Batch Converter Handbook"), this, SLOT(slotHelp()), 0, -1, 0); |
277 |
helpMenu->menu()->insertItem(i18n("RAW Images Batch Converter Handbook"), |
|
|
278 |
this, SLOT(slotHelp()), 0, -1, 0); |
| 290 |
helpButton_->setPopup( helpMenu->menu() ); |
279 |
helpButton_->setPopup( helpMenu->menu() ); |
| 291 |
|
280 |
|
| 292 |
// --------------------------------------------------------------- |
281 |
// --------------------------------------------------------------- |
|
Lines 356-363
Link Here
|
| 356 |
{ |
345 |
{ |
| 357 |
QString ext; |
346 |
QString ext; |
| 358 |
|
347 |
|
| 359 |
QButton *btn = saveButtonGroup_->selected(); |
348 |
if (saveButtonGroup_->selected() == jpegButton_) |
| 360 |
if (btn) ext = btn->text().lower(); |
349 |
ext = "JPEG"; |
|
|
350 |
else if (saveButtonGroup_->selected() == tiffButton_) |
| 351 |
ext = "TIFF"; |
| 352 |
else |
| 353 |
ext = "PPM"; |
| 361 |
|
354 |
|
| 362 |
KURL::List urlList; |
355 |
KURL::List urlList; |
| 363 |
|
356 |
|
|
Lines 393-399
Link Here
|
| 393 |
|
386 |
|
| 394 |
config->setGroup("RawConverter Settings"); |
387 |
config->setGroup("RawConverter Settings"); |
| 395 |
|
388 |
|
| 396 |
gammaSpinBox_->setValue(config->readNumEntry("Gamma", 8)); |
|
|
| 397 |
brightnessSpinBox_->setValue(config->readNumEntry("Brightness",10)); |
389 |
brightnessSpinBox_->setValue(config->readNumEntry("Brightness",10)); |
| 398 |
|
390 |
|
| 399 |
redSpinBox_->setValue(config->readNumEntry("Red Scale",10)); |
391 |
redSpinBox_->setValue(config->readNumEntry("Red Scale",10)); |
|
Lines 412-418
Link Here
|
| 412 |
|
404 |
|
| 413 |
config->setGroup("RawConverter Settings"); |
405 |
config->setGroup("RawConverter Settings"); |
| 414 |
|
406 |
|
| 415 |
config->writeEntry("Gamma", gammaSpinBox_->value()); |
|
|
| 416 |
config->writeEntry("Brightness", brightnessSpinBox_->value()); |
407 |
config->writeEntry("Brightness", brightnessSpinBox_->value()); |
| 417 |
|
408 |
|
| 418 |
config->writeEntry("Red Scale", redSpinBox_->value()); |
409 |
config->writeEntry("Red Scale", redSpinBox_->value()); |
|
Lines 431-439
Link Here
|
| 431 |
|
422 |
|
| 432 |
void BatchDialog::slotSaveFormatChanged() |
423 |
void BatchDialog::slotSaveFormatChanged() |
| 433 |
{ |
424 |
{ |
| 434 |
QString ext = saveButtonGroup_->selected()->text().lower(); |
425 |
QString ext; |
| 435 |
if (ext.isEmpty()) return; |
|
|
| 436 |
|
426 |
|
|
|
427 |
if (saveButtonGroup_->selected() == jpegButton_) |
| 428 |
ext = "JPEG"; |
| 429 |
else if (saveButtonGroup_->selected() == tiffButton_) |
| 430 |
ext = "TIFF"; |
| 431 |
else |
| 432 |
ext = "PPM"; |
| 433 |
|
| 437 |
QListViewItemIterator it( listView_ ); |
434 |
QListViewItemIterator it( listView_ ); |
| 438 |
while ( it.current() ) { |
435 |
while ( it.current() ) { |
| 439 |
CListViewItem *item = (CListViewItem*) it.current(); |
436 |
CListViewItem *item = (CListViewItem*) it.current(); |
|
Lines 470-480
Link Here
|
| 470 |
Settings& s = controller_->settings; |
467 |
Settings& s = controller_->settings; |
| 471 |
s.cameraWB = cameraWBCheckBox_->isChecked(); |
468 |
s.cameraWB = cameraWBCheckBox_->isChecked(); |
| 472 |
s.fourColorRGB = fourColorCheckBox_->isChecked(); |
469 |
s.fourColorRGB = fourColorCheckBox_->isChecked(); |
| 473 |
s.gamma = gammaSpinBox_->value()/10.0; |
|
|
| 474 |
s.brightness = brightnessSpinBox_->value()/10.0; |
470 |
s.brightness = brightnessSpinBox_->value()/10.0; |
| 475 |
s.redMultiplier = redSpinBox_->value()/10.0; |
471 |
s.redMultiplier = redSpinBox_->value()/10.0; |
| 476 |
s.blueMultiplier = blueSpinBox_->value()/10.0; |
472 |
s.blueMultiplier = blueSpinBox_->value()/10.0; |
| 477 |
s.outputFormat = saveButtonGroup_->selected()->text(); |
473 |
if (saveButtonGroup_->selected() == jpegButton_) |
|
|
474 |
s.outputFormat = "JPEG"; |
| 475 |
else if (saveButtonGroup_->selected() == tiffButton_) |
| 476 |
s.outputFormat = "TIFF"; |
| 477 |
else |
| 478 |
s.outputFormat = "PPM"; |
| 478 |
|
479 |
|
| 479 |
processOne(); |
480 |
processOne(); |
| 480 |
} |
481 |
} |
|
Lines 509-515
Link Here
|
| 509 |
conflictButtonGroup_->setEnabled(!busy); |
510 |
conflictButtonGroup_->setEnabled(!busy); |
| 510 |
cameraWBCheckBox_->setEnabled(!busy); |
511 |
cameraWBCheckBox_->setEnabled(!busy); |
| 511 |
fourColorCheckBox_->setEnabled(!busy); |
512 |
fourColorCheckBox_->setEnabled(!busy); |
| 512 |
gammaSpinBox_->setEnabled(!busy); |
|
|
| 513 |
brightnessSpinBox_->setEnabled(!busy); |
513 |
brightnessSpinBox_->setEnabled(!busy); |
| 514 |
redSpinBox_->setEnabled(!busy); |
514 |
redSpinBox_->setEnabled(!busy); |
| 515 |
blueSpinBox_->setEnabled(!busy); |
515 |
blueSpinBox_->setEnabled(!busy); |
|
Lines 577-591
Link Here
|
| 577 |
QString destFile(rawItem->directory + QString("/") + |
577 |
QString destFile(rawItem->directory + QString("/") + |
| 578 |
rawItem->dest); |
578 |
rawItem->dest); |
| 579 |
|
579 |
|
| 580 |
if (conflictButtonGroup_->selected()->text() != i18n("Overwrite")) |
580 |
if (conflictButtonGroup_->selected() != overwriteButton_) |
| 581 |
{ |
581 |
{ |
| 582 |
struct stat statBuf; |
582 |
struct stat statBuf; |
| 583 |
if (::stat(QFile::encodeName(destFile), &statBuf) == 0) { |
583 |
if (::stat(QFile::encodeName(destFile), &statBuf) == 0) { |
| 584 |
QString filter("*."); |
|
|
| 585 |
filter += saveButtonGroup_->selected()->text().lower(); |
| 586 |
destFile = KFileDialog:: |
584 |
destFile = KFileDialog:: |
| 587 |
getSaveFileName(rawItem->directory, |
585 |
getSaveFileName(rawItem->directory, QString(), |
| 588 |
filter, this, |
586 |
this, |
| 589 |
i18n("Save Raw Image converted " |
587 |
i18n("Save Raw Image converted " |
| 590 |
"from '%1' as").arg(rawItem->src)); |
588 |
"from '%1' as").arg(rawItem->src)); |
| 591 |
} |
589 |
} |