7
7
* Description : Camera interface dialog
9
9
* Copyright (C) 2004-2005 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
10
* Copyright (C) 2006-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
10
* Copyright (C) 2006-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
12
12
* This program is free software; you can redistribute it
13
13
* and/or modify it under the terms of the GNU General
279
279
albumVlay->addStretch();
281
281
QWhatsThis::add( albumBox, i18n("<p>Set how digiKam creates albums automatically when downloading."));
282
QWhatsThis::add( d->autoAlbumExtCheck, i18n("<p>Toggle on this option if you want to download your "
282
QWhatsThis::add( d->autoAlbumExtCheck, i18n("<p>Enable this option if you want to download your "
283
283
"pictures into automatically created file extension-based sub-albums of the destination "
284
284
"album. This way, you can separate JPEG and RAW files as they are downloaded from your camera."));
285
QWhatsThis::add( d->autoAlbumDateCheck, i18n("<p>Toggle on this option if you want to "
285
QWhatsThis::add( d->autoAlbumDateCheck, i18n("<p>Enable this option if you want to "
286
286
"download your pictures into automatically created file date-based sub-albums "
287
287
"of the destination album."));
288
QWhatsThis::add( d->folderDateFormat, i18n("<p>Select here your preferred date format used to "
288
QWhatsThis::add( d->folderDateFormat, i18n("<p>Select your preferred date format used to "
289
289
"create new albums. The options available are:<p>"
290
290
"<b>ISO</b>: the date format is in accordance with ISO 8601 "
291
291
"(YYYY-MM-DD). E.g.: <i>2006-08-24</i><p>"
322
322
QWhatsThis::add( onFlyBox, i18n("<p>Set here all options to fix/transform JPEG files automatically "
323
323
"as they are downloaded."));
324
QWhatsThis::add( d->autoRotateCheck, i18n("<p>Toggle on this option if you want images automatically "
324
QWhatsThis::add( d->autoRotateCheck, i18n("<p>Enable this option if you want images automatically "
325
325
"rotated or flipped using EXIF information provided by the camera."));
326
QWhatsThis::add( d->setPhotographerId, i18n("<p>Toggle on this option to store the default "
327
"photographer identity into IPTC tags using digiKam's metadata settings."));
328
QWhatsThis::add( d->setCredits, i18n("<p>Toggle on this option to store the default credit "
329
"and copyright information into IPTC tags using digiKam's metadata settings."));
330
QWhatsThis::add( d->fixDateTimeCheck, i18n("<p>Toggle on this option to set date and time metadata "
326
QWhatsThis::add( d->setPhotographerId, i18n("<p>Enable this option to store the default "
327
"photographer identity in the IPTC tags using digiKam's metadata settings."));
328
QWhatsThis::add( d->setCredits, i18n("<p>Enable this option to store the default credit "
329
"and copyright information in the IPTC tags using digiKam's metadata settings."));
330
QWhatsThis::add( d->fixDateTimeCheck, i18n("<p>Enable this option to set date and time metadata "
331
331
"tags to the right values if your camera does not set "
332
332
"these tags correctly when pictures are taken. The values will "
333
333
"be saved in the DateTimeDigitized and DateTimeCreated EXIF/IPTC fields."));
334
QWhatsThis::add( d->convertJpegCheck, i18n("<p>Toggle on this option to automatically convert "
334
QWhatsThis::add( d->convertJpegCheck, i18n("<p>Enable this option to automatically convert "
335
335
"all JPEG files to a lossless image format. <b>Note:</b> Image conversion can take a "
336
336
"while on a slow computer."));
337
337
QWhatsThis::add( d->losslessFormat, i18n("<p>Select your preferred lossless image file format to "
353
353
d->status = new KSqueezedTextLabel(plainPage());
354
354
d->progress = new KProgress(plainPage());
355
d->progress->setMaximumHeight( fontMetrics().height() );
355
d->progress->setMaximumHeight( fontMetrics().height()+4 );
356
356
d->progress->hide();
358
358
QWidget *frame = new QWidget(plainPage());
406
406
d->imageMenu->insertSeparator();
407
407
d->imageMenu->insertItem(i18n("Select &New Items"), d->view, SLOT(slotSelectNew()), 0, 3);
408
408
d->imageMenu->insertSeparator();
409
d->imageMenu->insertItem(i18n("Increase Thumbs"), this, SLOT(slotIncreaseThumbSize()), CTRL+Key_Plus, 4);
410
d->imageMenu->insertItem(i18n("Decrease Thumbs"), this, SLOT(slotDecreaseThumbSize()), CTRL+Key_Minus, 5);
409
d->imageMenu->insertItem(i18n("Increase thumbnail size"), this, SLOT(slotIncreaseThumbSize()), CTRL+Key_Plus, 4);
410
d->imageMenu->insertItem(i18n("Decrease thumbnail size"), this, SLOT(slotDecreaseThumbSize()), CTRL+Key_Minus, 5);
411
411
d->imageMenu->insertSeparator();
412
412
d->imageMenu->insertItem(i18n("Toggle Lock"), this, SLOT(slotToggleLock()), 0, 6);
413
413
actionButton(User3)->setPopup(d->imageMenu);
812
812
void CameraUI::slotIncreaseThumbSize()
814
ThumbnailSize thumbSize;
816
switch(d->view->thumbnailSize().size())
818
case (ThumbnailSize::Small):
820
thumbSize = ThumbnailSize(ThumbnailSize::Medium);
823
case (ThumbnailSize::Medium):
825
thumbSize = ThumbnailSize(ThumbnailSize::Large);
828
case (ThumbnailSize::Large):
830
thumbSize = ThumbnailSize(ThumbnailSize::Huge);
833
case (ThumbnailSize::Huge):
835
thumbSize = ThumbnailSize(ThumbnailSize::Huge);
842
if (thumbSize.size() == ThumbnailSize::Huge)
814
int thumbSize = d->view->thumbnailSize().size();
815
if (thumbSize >= ThumbnailSize::Huge) return;
817
thumbSize += ThumbnailSize::Step;
819
if (thumbSize >= ThumbnailSize::Huge)
844
821
d->imageMenu->setItemEnabled(4, false);
851
828
void CameraUI::slotDecreaseThumbSize()
853
ThumbnailSize thumbSize;
855
switch(d->view->thumbnailSize().size())
857
case (ThumbnailSize::Small):
859
thumbSize = ThumbnailSize(ThumbnailSize::Small);
862
case (ThumbnailSize::Medium):
864
thumbSize = ThumbnailSize(ThumbnailSize::Small);
867
case (ThumbnailSize::Large):
869
thumbSize = ThumbnailSize(ThumbnailSize::Medium);
872
case (ThumbnailSize::Huge):
874
thumbSize = ThumbnailSize(ThumbnailSize::Large);
881
if (thumbSize.size() == ThumbnailSize::Small)
830
int thumbSize = d->view->thumbnailSize().size();
831
if (thumbSize <= ThumbnailSize::Small) return;
833
thumbSize -= ThumbnailSize::Step;
835
if (thumbSize <= ThumbnailSize::Small)
883
837
d->imageMenu->setItemEnabled(5, false);
885
d->imageMenu->setItemEnabled(4, true);
839
d->imageMenu->setItemEnabled(4, true);
887
841
d->view->setThumbnailSize(thumbSize);
990
944
QString allPictures = patternList[0];
992
946
// Add RAW file format to All Images" type mime and remplace current.
993
allPictures.insert(allPictures.find("|"), QString(raw_file_extentions));
947
allPictures.insert(allPictures.find("|"), QString(KDcrawIface::DcrawBinary::instance()->rawFiles()));
994
948
patternList.remove(patternList[0]);
995
949
patternList.prepend(allPictures);
997
951
// Added RAW file formats supported by dcraw program like a type mime.
998
952
// Nota: we cannot use here "image/x-raw" type mime from KDE because it uncomplete
999
953
// or unavailable(dcraw_0)(see file #121242 in B.K.O).
1000
patternList.append(QString("\n%1|Camera RAW files").arg(QString(raw_file_extentions)));
954
patternList.append(QString("\n%1|Camera RAW files").arg(QString(KDcrawIface::DcrawBinary::instance()->rawFiles())));
1002
956
fileformats = patternList.join("\n");
1300
1254
CameraIconViewItem* iconItem = d->view->findItem(folder, file);
1303
1256
iconItem->setDownloaded(status);
1304
d->view->ensureItemVisible(iconItem);
1307
1258
if (status == GPItemInfo::DownloadedYes || status == GPItemInfo::DownloadFailed)
1316
1267
CameraIconViewItem* iconItem = d->view->findItem(folder, file);
1319
1269
iconItem->setDownloaded(GPItemInfo::DownloadedNo);
1320
d->view->ensureItemVisible(iconItem);
1323
1271
int curr = d->progress->progress();
1324
1272
d->progress->setProgress(curr+1);
1403
1351
// If we want to delete some locked files, just give a feedback to user.
1404
1352
if (!lockedList.isEmpty())
1406
QString infoMsg(i18n("The items listed below are locked by the camera (read-only). "
1354
QString infoMsg(i18n("The items listed below are locked by camera (read-only). "
1407
1355
"These items will not be deleted. If you really want to delete these items, "
1408
1356
"please unlock them and try again."));
1409
1357
KMessageBox::informationList(this, infoMsg, lockedList, i18n("Information"));