ItemsPage::ItemsPage(Manager* const mngr, KPWizardDialog* const dlg) : KPWizardPage(dlg, i18nc("@title:window", "<b>Set Panorama Images</b>")), d(new Private) { d->mngr = mngr; KPVBox* const vbox = new KPVBox(this); QLabel* const label1 = new QLabel(vbox); label1->setWordWrap(true); label1->setText(i18n("<qt>" "<p>Set here the list of your images to blend into a panorama. " "Please follow these conditions:</p>" "<ul><li>Images are taken from the same point of view.</li>" "<li>Images are taken with the same camera (and lens).</li>" "<li>Do not mix images with different color depth.</li></ul>" "<p>Note that, in the case of a 360° panorama, the first image " "in the list will be the image that will be in the center of " "the panorama.</p>" "</qt>")); d->list = new KPImagesList(vbox); d->list->slotAddImages(d->mngr->itemsList()); setPageWidget(vbox); QPixmap leftPix(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kipiplugin_panorama/pics/assistant-stack.png"))); setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation)); connect(d->list, SIGNAL(signalImageListChanged()), this, SLOT(slotImageListChanged())); QTimer::singleShot(0, this, SLOT(slotSetupList())); }
PanoPreviewPage::PanoPreviewPage(PanoManager* const mngr, QWizard* const dlg) : DWizardPage(dlg, i18nc("@title:window", "<b>Preview and Post-Processing</b>")), d(new Private(mngr)) { d->dlg = dlg; DVBox* const vbox = new DVBox(this); d->title = new QLabel(vbox); d->title->setOpenExternalLinks(true); d->title->setWordWrap(true); d->previewWidget = new DPreviewManager(vbox); d->previewWidget->setButtonText(i18nc("@action:button", "Details...")); d->postProcessing = new DHistoryView(vbox); d->progressBar = new DProgressWdg(vbox); setPageWidget(vbox); QPixmap leftPix(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("digikam/data/assistant-hugin.png"))); setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation)); connect(d->progressBar, SIGNAL(signalProgressCanceled()), this, SLOT(slotCancel())); }
ExpoBlendingLastPage::ExpoBlendingLastPage(ExpoBlendingManager* const mngr, QWizard* const dlg) : DWizardPage(dlg, i18nc("@title:window", "Pre-Processing is Complete")), d(new Private) { d->mngr = mngr; DVBox* const vbox = new DVBox(this); QLabel* const title = new QLabel(vbox); title->setOpenExternalLinks(true); title->setWordWrap(true); title->setText(i18n("<qt>" "<p><h1><b>Bracketed Images Pre-Processing is Done</b></h1></p>" "<p>Congratulations. Your images are ready to be fused. </p>" "<p>To perform this operation, <b>%1</b> program from " "<a href='%2'>Enblend</a> " "project will be used.</p>" "<p>Press \"Finish\" button to fuse your items and make a pseudo HDR image.</p>" "</qt>", QDir::toNativeSeparators(d->mngr->enfuseBinary().path()), d->mngr->enfuseBinary().url().url())); vbox->setStretchFactor(new QWidget(vbox), 10); setPageWidget(vbox); QPixmap leftPix(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("digikam/data/assistant-enfuse.png"))); setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation)); }
LastPage::LastPage(Manager* const mngr, KAssistantDialog* const dlg) : KPWizardPage(dlg, i18n("Pre-Processing is Complete")), d(new Private) { d->mngr = mngr; KVBox* const vbox = new KVBox(this); QLabel* const title = new QLabel(vbox); title->setOpenExternalLinks(true); title->setWordWrap(true); title->setText(i18n("<qt>" "<p><h1><b>Bracketed Images Pre-Processing is Done</b></h1></p>" "<p>Congratulations. Your images are ready to be fused. </p>" "<p>To perform this operation, <b>%1</b> program from " "<a href='%2'>Enblend</a> " "project will be used.</p>" "<p>Press \"Finish\" button to fuse your items and make a pseudo HDR image.</p>" "</qt>", QDir::toNativeSeparators(d->mngr->enfuseBinary().path()), d->mngr->enfuseBinary().url().url())); QLabel* const space = new QLabel(vbox); vbox->setStretchFactor(space, 10); setPageWidget(vbox); QPixmap leftPix = KStandardDirs::locate("data", "kipiplugin_expoblending/pics/assistant-enfuse.png"); setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation)); }
ExpoBlendingIntroPage::ExpoBlendingIntroPage(ExpoBlendingManager* const mngr, QWizard* const dlg) : DWizardPage(dlg, i18nc("@title:window", "Welcome to Stacked Images Tool")), d(new Private(mngr)) { DVBox* const vbox = new DVBox(this); QLabel* const title = new QLabel(vbox); title->setWordWrap(true); title->setOpenExternalLinks(true); title->setText(i18n("<qt>" "<p><h1><b>Welcome to Stacked Images Tool</b></h1></p>" "<p>This tool fuses bracketed images with different exposure to make pseudo " "<a href='http://en.wikipedia.org/wiki/High_dynamic_range_imaging'>HDR image</a>.</p>" "<p>It can also be used to <a href='https://en.wikipedia.org/wiki/Focus_stacking'>merge focus bracketed stack</a> " "to get a single image with increased depth of field.</p>" "<p>This assistant will help you to configure how to import images before " "merging them to a single one.</p>" "<p>Bracketed images must be taken with the same camera, " "in the same conditions, and if possible using a tripod.</p>" "<p>For more information, please take a look at " "<a href='http://en.wikipedia.org/wiki/Bracketing'>this page</a></p>" "</qt>")); QGroupBox* const binaryBox = new QGroupBox(vbox); QGridLayout* const binaryLayout = new QGridLayout; binaryBox->setLayout(binaryLayout); binaryBox->setTitle(i18nc("@title:group", "Exposure Blending Binaries")); d->binariesWidget = new DBinarySearch(binaryBox); d->binariesWidget->addBinary(d->mngr->alignBinary()); d->binariesWidget->addBinary(d->mngr->enfuseBinary()); #ifdef Q_OS_OSX // Hugin bundle PKG install d->binariesWidget->addDirectory(QLatin1String("/Applications/Hugin/HuginTools")); d->binariesWidget->addDirectory(QLatin1String("/Applications/Hugin/Hugin.app/Contents/MacOS")); d->binariesWidget->addDirectory(QLatin1String("/Applications/Hugin/tools_mac")); // Std Macports install d->binariesWidget->addDirectory(QLatin1String("/opt/local/bin")); // digiKam Bundle PKG install d->binariesWidget->addDirectory(QLatin1String("/opt/digikam/bin")); #endif #ifdef Q_OS_WIN d->binariesWidget->addDirectory(QLatin1String("C:/Program Files/Hugin/bin")); d->binariesWidget->addDirectory(QLatin1String("C:/Program Files (x86)/Hugin/bin")); d->binariesWidget->addDirectory(QLatin1String("C:/Program Files/GnuWin32/bin")); d->binariesWidget->addDirectory(QLatin1String("C:/Program Files (x86)/GnuWin32/bin")); #endif connect(d->binariesWidget, SIGNAL(signalBinariesFound(bool)), this, SIGNAL(signalExpoBlendingIntroPageIsValid(bool))); emit signalExpoBlendingIntroPageIsValid(d->binariesWidget->allBinariesFound()); setPageWidget(vbox); QPixmap leftPix(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("digikam/data/assistant-stack.png"))); setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation)); }
VidSlideIntroPage::VidSlideIntroPage(QWizard* const dialog, const QString& title) : DWizardPage(dialog, title), d(new Private(dialog)) { DVBox* const vbox = new DVBox(this); QLabel* const desc = new QLabel(vbox); desc->setWordWrap(true); desc->setOpenExternalLinks(true); desc->setText(i18n("<qt>" "<p><h1><b>Welcome to Video Slideshow tool</b></h1></p>" "<p>This assistant will guide you to export</p>" "<p>your images as a video stream.</p>" "<p>You can generate quickly a " "<a href='https://en.wikipedia.org/wiki/Time-lapse_photography'>Time-lapse</a> " "movie from images</p>" "<p>captured with a tripod mounted camera controlled with an " "<a href='https://en.wikipedia.org/wiki/Intervalometer#Photography'>intervalometer</a>.</p>" "<p></p><p>You can also create a video presentation with transition</p>" "<p>effects and audio tracks to show on a TV screen.</p>" "</qt>")); // ComboBox for image selection method d->hbox = new DHBox(vbox); QLabel* const getImageLabel = new QLabel(i18n("&Choose image selection method:"), d->hbox); d->imageGetOption = new QComboBox(d->hbox); d->imageGetOption->insertItem(VidSlideSettings::ALBUMS, i18n("Albums")); d->imageGetOption->insertItem(VidSlideSettings::IMAGES, i18n("Images")); getImageLabel->setBuddy(d->imageGetOption); setPageWidget(vbox); setLeftBottomPix(QIcon::fromTheme(QLatin1String("view-presentation"))); }
IntroPage::IntroPage(KAssistantDialog* dlg) : KIPIPlugins::WizardPage(dlg, i18n("Welcome to Exposure Blending Tool")) { KVBox *vbox = new KVBox(this); QLabel *title = new QLabel(vbox); title->setWordWrap(true); title->setOpenExternalLinks(true); title->setText(i18n("<qt>" "<p><h1><b>Welcome to Exposure Blending tool</b></h1></p>" "<p>This tool fuses bracketed images with different exposure to make pseudo " "<a href='http://en.wikipedia.org/wiki/High_dynamic_range_imaging'>HDR image</a>.</p>" "<p>It can also be used to merge focus bracketed stack to get a single image " "with increased depth of field.</p>" "<p>This assistant will help you to configure how to import images before " "merging them to a single one.</p>" "<p>Bracketed images must be taken with the same camera, " "in the same conditions, and if possible using a tripod.</p>" "<p>For more information, please take a look at " "<a href='http://en.wikipedia.org/wiki/Bracketing'>this page</a></p>" "</qt>")); setPageWidget(vbox); QPixmap leftPix = KStandardDirs::locate("data", "kipiplugin_expoblending/pics/assistant-tripod.png"); setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation)); }
PreProcessingPage::PreProcessingPage(Manager* const mngr, KAssistantDialog* const dlg) : KPWizardPage(dlg, i18n("<b>Pre-Processing Images</b>")), d(new PreProcessingPagePriv) { d->mngr = mngr; d->progressTimer = new QTimer(this); KVBox* vbox = new KVBox(this); d->title = new QLabel(vbox); d->title->setWordWrap(true); d->title->setOpenExternalLinks(true); KConfig config("kipirc"); KConfigGroup group = config.group(QString("Panorama Settings")); d->celesteCheckBox = new QCheckBox(i18n("Detect moving skies"), vbox); d->celesteCheckBox->setChecked(group.readEntry("Celeste", false)); d->celesteCheckBox->setToolTip(i18n("Automatic detection of clouds to prevent wrong keypoints matching " "between images due to moving clouds.")); d->celesteCheckBox->setWhatsThis(i18n("<b>Detect moving skies</b>: During the control points selection and matching, " "this option discards any points that are associated to a possible cloud. This " "is useful to prevent moving clouds from altering the control points matching " "process.")); QLabel* space1 = new QLabel(vbox); KHBox* hbox = new KHBox(vbox); d->detailsBtn = new QPushButton(hbox); d->detailsBtn->setText(i18n("Details...")); d->detailsBtn->hide(); QLabel* space2 = new QLabel(hbox); hbox->setStretchFactor(space2, 10); QLabel* space3 = new QLabel(vbox); d->progressLabel = new QLabel(vbox); d->progressLabel->setAlignment(Qt::AlignCenter); QLabel* space4 = new QLabel(vbox); vbox->setStretchFactor(space1, 2); vbox->setStretchFactor(space3, 2); vbox->setStretchFactor(space4, 10); vbox->setSpacing(KDialog::spacingHint()); vbox->setMargin(KDialog::spacingHint()); setPageWidget(vbox); resetTitle(); QPixmap leftPix = KStandardDirs::locate("data", "kipiplugin_panorama/pics/assistant-preprocessing.png"); setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation)); // connect(d->mngr->thread(), SIGNAL(starting(KIPIPanoramaPlugin::ActionData)), // this, SLOT(slotAction(KIPIPanoramaPlugin::ActionData))); connect(d->progressTimer, SIGNAL(timeout()), this, SLOT(slotProgressTimerDone())); connect(d->detailsBtn, SIGNAL(clicked()), this, SLOT(slotShowDetails())); }
JAlbumIntroPage::JAlbumIntroPage(QWizard* const dialog, const QString& title) : DWizardPage(dialog, title), d(new Private(dialog)) { DVBox* const vbox = new DVBox(this); QLabel* const desc = new QLabel(vbox); desc->setWordWrap(true); desc->setOpenExternalLinks(true); desc->setText(i18n("<qt>" "<p><h1><b>Welcome to jAlbum album tool</b></h1></p>" "<p>This assistant will guide you to export quickly</p><p></p>" "<p>your images as a jAlbum project.</p>" "</qt>")); // ComboBox for image selection method d->hbox = new DHBox(vbox); QLabel* const getImageLabel = new QLabel(i18n("&Choose image selection method:"), d->hbox); d->imageGetOption = new QComboBox(d->hbox); d->imageGetOption->insertItem(JAlbumSettings::ALBUMS, i18n("Albums")); d->imageGetOption->insertItem(JAlbumSettings::IMAGES, i18n("Images")); getImageLabel->setBuddy(d->imageGetOption); // -------------------- QGroupBox* const binaryBox = new QGroupBox(vbox); QGridLayout* const binaryLayout = new QGridLayout; binaryBox->setLayout(binaryLayout); binaryBox->setTitle(i18nc("@title:group", "jAlbum Binaries")); d->binSearch = new DBinarySearch(binaryBox); d->binSearch->addBinary(d->jalbumBin); d->binSearch->addBinary(d->jalbumJava); vbox->setStretchFactor(desc, 2); vbox->setStretchFactor(d->hbox, 1); vbox->setStretchFactor(binaryBox, 3); setPageWidget(vbox); setLeftBottomPix(QIcon::fromTheme(QLatin1String("text-html"))); #ifdef Q_OS_WIN d->binSearch->addDirectory(QLatin1String(qgetenv("ProgramFiles").constData()) + QLatin1String("\\jAlbum\\")); #else d->binSearch->addDirectory(QLatin1String("/usr/share/")); d->binSearch->addDirectory(QLatin1String("/usr/share/jAlbum/")); d->binSearch->addDirectory(QLatin1String("/usr/share/jalbum/")); d->binSearch->addDirectory(QLatin1String("/usr/lib/jalbum/")); #endif connect(d->binSearch, SIGNAL(signalBinariesFound(bool)), this, SLOT(slotBinariesFound())); }
PreProcessingPage::PreProcessingPage(Manager* const mngr, KAssistantDialog* const dlg) : KPWizardPage(dlg, i18n("<b>Pre-Processing Bracketed Images</b>")), d(new PreProcessingPagePriv) { d->mngr = mngr; d->progressTimer = new QTimer(this); KVBox *vbox = new KVBox(this); d->title = new QLabel(vbox); d->title->setWordWrap(true); d->title->setOpenExternalLinks(true); d->alignCheckBox = new QCheckBox(i18n("Align bracketed images"), vbox); KConfig config("kipirc"); KConfigGroup group = config.group(QString("ExpoBlending Settings")); d->alignCheckBox->setChecked(group.readEntry("Auto Alignment", true)); QLabel* space1 = new QLabel(vbox); KHBox* hbox = new KHBox(vbox); d->detailsBtn = new QPushButton(hbox); d->detailsBtn->setText(i18n("Details...")); d->detailsBtn->hide(); QLabel* space2 = new QLabel(hbox); hbox->setStretchFactor(space2, 10); QLabel* space3 = new QLabel(vbox); d->progressLabel = new QLabel(vbox); d->progressLabel->setAlignment(Qt::AlignCenter); QLabel* space4 = new QLabel(vbox); vbox->setStretchFactor(space1, 2); vbox->setStretchFactor(space3, 2); vbox->setStretchFactor(space4, 10); vbox->setSpacing(KDialog::spacingHint()); vbox->setMargin(KDialog::spacingHint()); setPageWidget(vbox); resetTitle(); QPixmap leftPix = KStandardDirs::locate("data", "kipiplugin_expoblending/pics/assistant-preprocessing.png"); setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation)); connect(d->mngr->thread(), SIGNAL(starting(KIPIExpoBlendingPlugin::ActionData)), this, SLOT(slotAction(KIPIExpoBlendingPlugin::ActionData))); connect(d->progressTimer, SIGNAL(timeout()), this, SLOT(slotProgressTimerDone())); connect(d->detailsBtn, SIGNAL(clicked()), this, SLOT(slotShowDetails())); }
CollectionPage::CollectionPage(FirstRunDlg* const dlg) : FirstRunDlgPage(dlg, i18n("<b>Configure where you keep your images</b>")), d(new Private) { QWidget* const widget = new QWidget(this); QVBoxLayout* const vlayout = new QVBoxLayout(widget); QString picturesPath = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation); qCDebug(DIGIKAM_GENERAL_LOG) << picturesPath; if (picturesPath.isEmpty()) { picturesPath = QDir::homePath() + i18nc("This is a path name so you should " "include the slash in the translation", "/Pictures"); } QLabel* const textLabel1 = new QLabel(widget); textLabel1->setWordWrap(true); QString message = i18n("<p>Please enter a location where you keep your images.</p> " "<p>You can choose any local folder, even one that already contains images." "<br/> " "More folders can be added later under the <i>Settings</i> menu. " "</p> "); #ifndef _WIN32 message.append(i18n("<p><i>Note:</i> removable media (such as USB drives or DVDs) and remote file systems " "(such as NFS, or Samba mounted with cifs/smbfs) are supported.</p>")); #endif textLabel1->setText(message); d->rootAlbumPathRequester = new DFileSelector(widget); d->rootAlbumPathRequester->setFileDlgMode(QFileDialog::Directory); d->rootAlbumPathRequester->setFileDlgOptions(QFileDialog::ShowDirsOnly | QFileDialog::DontUseNativeDialog); d->rootAlbumPathRequester->lineEdit()->setText(picturesPath); vlayout->addWidget(textLabel1); vlayout->addWidget(d->rootAlbumPathRequester); vlayout->setContentsMargins(QMargins()); vlayout->setSpacing(QApplication::style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing)); setPageWidget(widget); setLeftBottomPix(QIcon::fromTheme(QLatin1String("folder-image"))); }
// link this page to SimpleViewer to gain access to settings container. FirstRunPage::FirstRunPage(KPWizardDialog* const dlg) : KPWizardPage(dlg, i18n("First Run")), d(new Private) { KPVBox* const vbox = new KPVBox(this); QLabel* const info1 = new QLabel(vbox); info1->setWordWrap(true); info1->setText( i18n("<p>SimpleViewer's plugins are Flash components which are free to use, " "but use a license which comes into conflict with several distributions. " "Due to the license it is not possible to ship it with this tool.</p>" "<p>You can now download plugin from its homepage and point this tool " "to the downloaded archive. The archive will be stored with the plugin configuration, " "so it is available for further use.</p>" "<p><b>Note: Please download the plugin that you selected on the first page.</b></p>")); QLabel* const info2 = new QLabel(vbox); info2->setText(i18n("<p>1.) Download plugin from the following url:</p>")); QLabel* const link = new QLabel(vbox); link->setAlignment(Qt::AlignLeft); link->setOpenExternalLinks(true); link->setTextFormat(Qt::RichText); link->setTextInteractionFlags(Qt::LinksAccessibleByMouse); link->setText(QString::fromLatin1("<a href=\"%1\">%2</a>") .arg(QLatin1String("http://www.simpleviewer.net")) .arg(QLatin1String("http://www.simpleviewer.net"))); QLabel* const info3 = new QLabel(vbox); info3->setText(i18n("<p>2.) Point this tool to the downloaded archive</p>")); d->urlRequester = new KPFileSelector(vbox); d->urlRequester->lineEdit()->setText(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)); d->urlRequester->setFileDlgTitle(i18n("Select downloaded archive")); d->urlRequester->setFileDlgMode(QFileDialog::ExistingFile); connect(d->urlRequester, SIGNAL(signalUrlSelected(QUrl)), this, SLOT(slotUrlSelected(QUrl))); setPageWidget(vbox); setLeftBottomPix(QIcon::fromTheme(QStringLiteral("kipi-flash")).pixmap(128)); setComplete(false); }
ItemsPage::ItemsPage(Manager* const mngr, KAssistantDialog* const dlg) : KPWizardPage(dlg, i18n("<b>Set Bracketed Images</b>")), d(new ItemsPagePriv) { d->mngr = mngr; KVBox* vbox = new KVBox(this); QLabel* label1 = new QLabel(vbox); label1->setWordWrap(true); label1->setText(i18n("<qt>" "<p>Set here the list of your bracketed images to fuse. Please follow these conditions:</p>" "<ul><li>At least 2 images from the same subject must be added to the stack.</li>" "<li>Do not mix images with different color depth.</li>" "<li>All images must have the same dimensions.</li></ul>" "</qt>")); d->list = new KPImagesList(vbox); d->list->listView()->setColumn(KPImagesListView::User1, i18n("Exposure (EV)"), true); d->list->slotAddImages(d->mngr->itemsList()); setPageWidget(vbox); QPixmap leftPix = KStandardDirs::locate("data", "kipiplugin_expoblending/pics/assistant-stack.png"); setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation)); connect(d->mngr->thread(), SIGNAL(starting(KIPIExpoBlendingPlugin::ActionData)), this, SLOT(slotAction(KIPIExpoBlendingPlugin::ActionData))); connect(d->mngr->thread(), SIGNAL(finished(KIPIExpoBlendingPlugin::ActionData)), this, SLOT(slotAction(KIPIExpoBlendingPlugin::ActionData))); connect(d->list, SIGNAL(signalAddItems(KUrl::List)), this, SLOT(slotAddItems(KUrl::List))); connect(d->list, SIGNAL(signalImageListChanged()), this, SLOT(slotImageListChanged())); QTimer::singleShot(0, this, SLOT(slotSetupList())); }
HTMLSelectionPage::HTMLSelectionPage(QWizard* const dialog, const QString& title) : DWizardPage(dialog, title), d(new Private(dialog)) { setObjectName(QLatin1String("AlbumSelectorPage")); d->stack = new QStackedWidget(this); d->albumSupport = (d->iface && d->iface->supportAlbums()); if (d->albumSupport) { d->albumSelector = d->iface->albumChooser(this); } else { d->albumSelector = new QWidget(this); } d->stack->insertWidget(GalleryInfo::ALBUMS, d->albumSelector); d->imageList = new DItemsList(this); d->imageList->setObjectName(QLatin1String("HTMLGalleries ImagesList")); d->imageList->setControlButtonsPlacement(DItemsList::ControlButtonsBelow); d->stack->insertWidget(GalleryInfo::IMAGES, d->imageList); setPageWidget(d->stack); setLeftBottomPix(QIcon::fromTheme(QLatin1String("folder-pictures"))); if (d->albumSupport) { connect(d->iface, SIGNAL(signalAlbumChooserSelectionChanged()), this, SIGNAL(completeChanged())); } connect(d->imageList, SIGNAL(signalImageListChanged()), this, SIGNAL(completeChanged())); }
// link this page to SimpleViewer to gain acess to settings container. FirstRunPage::FirstRunPage(KAssistantDialog* const dlg) : KPWizardPage(dlg, i18n("First Run")), d(new FirstRunPagePriv) { KVBox* vbox = new KVBox(this); // QVBoxLayout* topLayout = new QVBoxLayout(vbox); QLabel* info1 = new QLabel(vbox); info1->setWordWrap(true); info1->setText( i18n("<p>SimpleViewer's plugins are Flash components which are free to use, " "but use a license which comes into conflict with several distributions. " "Due to the license it is not possible to ship it with this tool.</p>" "<p>You can now download plugin from its homepage and point this tool " "to the downloaded archive. The archive will be stored with the plugin configuration, " "so it is available for further use.</p>" "<p><b>Note: Please download the plugin that you selected on the first page.</b></p>")); QLabel* info2 = new QLabel(vbox); info2->setText(i18n("<p>1.) Download plugin from the following url:</p>")); KUrlLabel* link = new KUrlLabel(vbox); link->setText("http://www.simpleviewer.net"); link->setUrl("http://www.simpleviewer.net"); connect(link, SIGNAL(leftClickedUrl(QString)), this, SLOT(slotDownload(QString))); QLabel* info3 = new QLabel(vbox); info3->setText(i18n("<p>2.) Point this tool to the downloaded archive</p>")); d->urlRequester = new KUrlRequester(vbox); connect(d->urlRequester, SIGNAL(urlSelected(KUrl)), this, SLOT(slotUrlSelected(KUrl))); setPageWidget(vbox); setLeftBottomPix(DesktopIcon("flash", 128)); }
void SelectionPage::setPageContent(int choice) { if(d->vbox) { removePageWidget(d->vbox); delete d->vbox; } d->vbox = new KVBox(this); if(choice == 0) // Collection Selector { Interface* interface = d->manager->iface(); d->imageCollectionSelector = interface->imageCollectionSelector(d->vbox); } else //Image Dialog { d->imageList = new KPImagesList(d->vbox); d->imageList->setControlButtonsPlacement(KPImagesList::ControlButtonsBelow); } setPageWidget(d->vbox); setLeftBottomPix(DesktopIcon("kipi-flash", 128)); }
MailIntroPage::MailIntroPage(QWizard* const dialog, const QString& title) : DWizardPage(dialog, title), d(new Private(dialog)) { DVBox* const vbox = new DVBox(this); QLabel* const desc = new QLabel(vbox); desc->setWordWrap(true); desc->setOpenExternalLinks(true); desc->setText(i18n("<qt>" "<p><h1><b>Welcome to Email Tool</b></h1></p>" "<p>This assistant will guide you to send " "your items with a mail client application.</p>" "<p>Before to export contents, you will be able to adjust attachments " "properties accordingly with your mail service capabilities.</p>" "</qt>")); // ComboBox for image selection method d->hbox = new DHBox(vbox); QLabel* const getImageLabel = new QLabel(i18n("&Choose image selection method:"), d->hbox); d->imageGetOption = new QComboBox(d->hbox); d->imageGetOption->insertItem(MailSettings::ALBUMS, i18n("Albums")); d->imageGetOption->insertItem(MailSettings::IMAGES, i18n("Images")); getImageLabel->setBuddy(d->imageGetOption); // -------------------- QGroupBox* const binaryBox = new QGroupBox(vbox); QGridLayout* const binaryLayout = new QGridLayout; binaryBox->setLayout(binaryLayout); binaryBox->setTitle(i18nc("@title:group", "Mail client application Binaries")); d->binSearch = new DBinarySearch(binaryBox); d->binSearch->addBinary(d->balsaBin); d->binSearch->addBinary(d->clawsBin); d->binSearch->addBinary(d->kmailBin); d->binSearch->addBinary(d->evoluBin); d->binSearch->addBinary(d->netscBin); d->binSearch->addBinary(d->sylphBin); d->binSearch->addBinary(d->thundBin); #ifdef Q_OS_OSX // Std Macports install d->binSearch->addDirectory(QLatin1String("/opt/local/bin")); // digiKam Bundle PKG install d->binSearch->addDirectory(QLatin1String("/opt/digikam/bin")); #endif #ifdef Q_OS_WIN // FIXME : adjust paths d->binSearch->addDirectory(QLatin1String("C:/Program Files/")); d->binSearch->addDirectory(QLatin1String("C:/Program Files (x86)/")); #endif vbox->setStretchFactor(desc, 2); vbox->setStretchFactor(d->hbox, 1); vbox->setStretchFactor(binaryBox, 3); setPageWidget(vbox); setLeftBottomPix(QIcon::fromTheme(QLatin1String("mail-client"))); connect(d->binSearch, SIGNAL(signalBinariesFound(bool)), this, SLOT(slotBinariesFound())); }
PanoOptimizePage::PanoOptimizePage(PanoManager* const mngr, QWizard* const dlg) : DWizardPage(dlg, i18nc("@title:window", "<b>Optimization</b>")), d(new Private) { d->mngr = mngr; d->progressTimer = new QTimer(this); DVBox* const vbox = new DVBox(this); d->title = new QLabel(vbox); d->title->setOpenExternalLinks(true); d->title->setWordWrap(true); KConfig config; KConfigGroup group = config.group("Panorama Settings"); d->horizonCheckbox = new QCheckBox(i18nc("@option:check", "Level horizon"), vbox); d->horizonCheckbox->setChecked(group.readEntry("Horizon", true)); d->horizonCheckbox->setToolTip(i18nc("@info:tooltip", "Detect the horizon and adapt the project to make it horizontal.")); d->horizonCheckbox->setWhatsThis(i18nc("@info:whatsthis", "<b>Level horizon</b>: Detect the horizon and adapt the projection so that " "the detected horizon is an horizontal line in the final panorama")); /* if (!d->mngr->gPano()) { d->projectionAndSizeCheckbox = new QCheckBox(i18nc("@option:check", "Automatic projection and output aspect"), vbox); d->projectionAndSizeCheckbox->setChecked(group.readEntry("Output Projection And Size", true)); d->projectionAndSizeCheckbox->setToolTip(i18nc("@info:tooltip", "Adapt the projection of the panorama and the area rendered on the " "resulting projection so that every photo fits in the resulting " "panorama.")); d->projectionAndSizeCheckbox->setWhatsThis(i18nc("@info:whatsthis", "<b>Automatic projection and output aspect</b>: Automatically " "adapt the projection and the area rendered of the panorama to " "get every photos into the panorama.")); } else { d->projectionAndSizeCheckbox = new QCheckBox(i18nc("@option:check", "Automatic output aspect"), vbox); d->projectionAndSizeCheckbox->setChecked(group.readEntry("Output Projection And Size", true)); d->projectionAndSizeCheckbox->setToolTip(i18nc("@info:tooltip", "Adapt the area rendered on the resulting projection so that " "every photo fits in the resulting panorama.")); d->projectionAndSizeCheckbox->setWhatsThis(i18nc("@info:whatsthis", "<b>Automatic output aspect</b>: Automatically adapt the area " "rendered of the panorama to get every photos into the panorama.")); } */ // d->preprocessResults = new QLabel(vbox); vbox->setStretchFactor(new QWidget(vbox), 2); d->detailsText = new QTextBrowser(vbox); d->detailsText->hide(); vbox->setStretchFactor(new QWidget(vbox), 2); d->progressLabel = new QLabel(vbox); d->progressLabel->setAlignment(Qt::AlignCenter); vbox->setStretchFactor(new QWidget(vbox), 10); setPageWidget(vbox); QPixmap leftPix(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("digikam/data/assistant-hugin.png"))); setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation)); connect(d->progressTimer, SIGNAL(timeout()), this, SLOT(slotProgressTimerDone())); }
PanoLastPage::PanoLastPage(PanoManager* const mngr, QWizard* const dlg) : DWizardPage(dlg, i18nc("@title:window", "<b>Panorama Stitched</b>")), d(new Private) { KConfig config; KConfigGroup group = config.group("Panorama Settings"); d->mngr = mngr; DVBox* const vbox = new DVBox(this); d->title = new QLabel(vbox); d->title->setOpenExternalLinks(true); d->title->setWordWrap(true); QVBoxLayout* const formatVBox = new QVBoxLayout(); d->saveSettingsGroupBox = new QGroupBox(i18nc("@title:group", "Save Settings"), vbox); d->saveSettingsGroupBox->setLayout(formatVBox); formatVBox->addStretch(1); QLabel* const fileTemplateLabel = new QLabel(i18nc("@label:textbox", "File name template:"), d->saveSettingsGroupBox); formatVBox->addWidget(fileTemplateLabel); d->fileTemplateQLineEdit = new QLineEdit(QLatin1String("panorama"), d->saveSettingsGroupBox); d->fileTemplateQLineEdit->setToolTip(i18nc("@info:tooltip", "Name of the panorama file (without its extension).")); d->fileTemplateQLineEdit->setWhatsThis(i18nc("@info:whatsthis", "<b>File name template</b>: Set here the base name of the files that " "will be saved. For example, if your template is <i>panorama</i> and if " "you chose a JPEG output, then your panorama will be saved with the " "name <i>panorama.jpg</i>. If you choose to save also the project file, " "it will have the name <i>panorama.pto</i>.")); formatVBox->addWidget(d->fileTemplateQLineEdit); d->savePtoCheckBox = new QCheckBox(i18nc("@option:check", "Save project file"), d->saveSettingsGroupBox); d->savePtoCheckBox->setChecked(group.readEntry("Save PTO", false)); d->savePtoCheckBox->setToolTip(i18nc("@info:tooltip", "Save the project file for further processing within Hugin GUI.")); d->savePtoCheckBox->setWhatsThis(i18nc("@info:whatsthis", "<b>Save project file</b>: You can keep the project file generated to stitch " "your panorama for further tweaking within " "<a href=\"http://hugin.sourceforge.net/\">Hugin</a> by checking this. " "This is useful if you want a different projection, modify the horizon or " "the center of the panorama, or modify the control points to get better results.")); formatVBox->addWidget(d->savePtoCheckBox); d->warningLabel = new QLabel(d->saveSettingsGroupBox); d->warningLabel->hide(); formatVBox->addWidget(d->warningLabel); d->errorLabel = new QLabel(d->saveSettingsGroupBox); d->errorLabel->hide(); formatVBox->addWidget(d->errorLabel); vbox->setStretchFactor(new QWidget(vbox), 2); setPageWidget(vbox); QPixmap leftPix(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("digikam/data/assistant-hugin.png"))); setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation)); connect(d->fileTemplateQLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotTemplateChanged(QString))); connect(d->savePtoCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotPtoCheckBoxChanged(int))); }
PanoIntroPage::PanoIntroPage(PanoManager* const mngr, QWizard* const dlg) : DWizardPage(dlg, i18nc("@title:window", "<b>Welcome to Panorama Tool</b>")), d(new Private(mngr)) { DVBox* const vbox = new DVBox(this); QLabel* const title = new QLabel(vbox); title->setWordWrap(true); title->setOpenExternalLinks(true); title->setText(i18n("<qt>" "<p><h1><b>Welcome to Panorama Tool</b></h1></p>" "<p>This tool stitches several images together to create a panorama, making the " "seam between images not visible.</p>" "<p>This assistant will help you to configure how to import images before " "stitching them into a panorama.</p>" "<p>Images must be taken from the same point of view.</p>" "<p>For more information, please take a look at " "<a href='http://hugin.sourceforge.net/tutorials/overview/en.shtml'>this page</a></p>" "</qt>")); QGroupBox* const binaryBox = new QGroupBox(vbox); QGridLayout* const binaryLayout = new QGridLayout; binaryBox->setLayout(binaryLayout); binaryBox->setTitle(i18nc("@title:group", "Panorama Binaries")); d->binariesWidget = new DBinarySearch(binaryBox); d->binariesWidget->addBinary(d->mngr->autoOptimiserBinary()); d->binariesWidget->addBinary(d->mngr->cpCleanBinary()); d->binariesWidget->addBinary(d->mngr->cpFindBinary()); d->binariesWidget->addBinary(d->mngr->enblendBinary()); d->binariesWidget->addBinary(d->mngr->makeBinary()); d->binariesWidget->addBinary(d->mngr->nonaBinary()); d->binariesWidget->addBinary(d->mngr->panoModifyBinary()); d->mngr->checkForHugin2015(); if (d->mngr->hugin2015()) { d->binariesWidget->addBinary(d->mngr->huginExecutorBinary()); } else { d->binariesWidget->addBinary(d->mngr->pto2MkBinary()); } d->mngr->checkBinaries(); #ifdef Q_OS_OSX // Hugin bundle PKG install d->binariesWidget->addDirectory(QLatin1String("/Applications/Hugin/HuginTools")); d->binariesWidget->addDirectory(QLatin1String("/Applications/Hugin/Hugin.app/Contents/MacOS")); d->binariesWidget->addDirectory(QLatin1String("/Applications/Hugin/tools_mac")); // Std Macports install d->binariesWidget->addDirectory(QLatin1String("/opt/local/bin")); // digiKam Bundle PKG install d->binariesWidget->addDirectory(QLatin1String("/opt/digikam/bin")); #endif #ifdef Q_OS_WIN d->binariesWidget->addDirectory(QLatin1String("C:/Program Files/Hugin/bin")); d->binariesWidget->addDirectory(QLatin1String("C:/Program Files (x86)/Hugin/bin")); d->binariesWidget->addDirectory(QLatin1String("C:/Program Files/GnuWin32/bin")); d->binariesWidget->addDirectory(QLatin1String("C:/Program Files (x86)/GnuWin32/bin")); #endif /* QVBoxLayout* const settingsVBox = new QVBoxLayout(); d->settingsGroupBox = new QGroupBox(i18nc("@title:group", "Panorama Settings"), this); d->settingsGroupBox->setLayout(settingsVBox); d->addGPlusMetadataCheckBox = new QCheckBox(i18nc("@option:check", "Add Photosphere Metadata"), d->settingsGroupBox); d->addGPlusMetadataCheckBox->setToolTip(i18nc("@info:tooltip", "Add Exif metadata to the output panorama image for Google+ 3D viewer")); d->addGPlusMetadataCheckBox->setWhatsThis(i18nc("@info:whatsthis", "<b>Add Photosphere Metadata</b>: Enabling this allows the program to add " "metadata to the output image such that when uploaded to Google+, the " "Google+ 3D viewer is activated and the panorama can be seen in 3D. Note " "that this feature is most interesting for large panoramas.")); settingsVBox->addWidget(d->addGPlusMetadataCheckBox); vbox->addWidget(d->settingsGroupBox); */ QVBoxLayout* const formatVBox = new QVBoxLayout(); d->formatGroupBox = new QGroupBox(i18nc("@title:group", "File Format"), vbox); d->formatGroupBox->setLayout(formatVBox); QButtonGroup* const group = new QButtonGroup(); d->jpegRadioButton = new QRadioButton(i18nc("@option:radio", "JPEG output"), d->formatGroupBox); // The following comment is to get the next string extracted for translation // xgettext: no-c-format d->jpegRadioButton->setToolTip(i18nc("@info:tooltip", "Selects a JPEG output with 90% compression rate " "(lossy compression, smaller size).")); d->jpegRadioButton->setWhatsThis(i18nc("@info:whatsthis", "<b>JPEG output</b>: Using JPEG output, the panorama file will be smaller " "at the cost of information loss during compression. This is the easiest " "way to share the result, or print it online or in a shop.")); formatVBox->addWidget(d->jpegRadioButton); group->addButton(d->jpegRadioButton); d->tiffRadioButton = new QRadioButton(i18nc("@option:radio", "TIFF output"), d->formatGroupBox); d->tiffRadioButton->setToolTip(i18nc("@info:tooltip", "Selects a TIFF output compressed using the LZW algorithm " "(lossless compression, bigger size).")); d->tiffRadioButton->setWhatsThis(i18nc("@info:whatsthis", "<b>TIFF output</b>: Using TIFF output, you get the same color depth than " "your original photos using RAW images at the cost of a bigger panorama file.")); formatVBox->addWidget(d->tiffRadioButton); group->addButton(d->tiffRadioButton); // TODO HDR /* d->hdrRadioButton = new QRadioButton(i18nc("@option:radio", "HDR output"), d->formatGroupBox); d->hdrRadioButton->setToolTip(i18nc("@info:tooltip", "Selects an High Dynamic Range (HDR) image, that can be processed further " "with a dedicated software.")); d->hdrRadioButton->setWhatsThis(i18nc("@info:whatsthis", "<b>HDR output</b>: Output in High Dynamic Range, meaning that every piece of " "information contained in the original photos are preserved. Note that you " "need another software to process the resulting panorama, like " "<a href=\"http://qtpfsgui.sourceforge.net/\">Luminance HDR</a>")); formatVBox->addWidget(d->hdrRadioButton); group->addButton(d->hdrRadioButton); */ switch (d->mngr->format()) { case JPEG: d->jpegRadioButton->setChecked(true); break; case TIFF: d->tiffRadioButton->setChecked(true); break; case HDR: // TODO HDR // d->hdrRadioButton->setChecked(true); break; } setPageWidget(vbox); QPixmap leftPix(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("digikam/data/assistant-tripod.png"))); setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation)); /* connect(d->addGPlusMetadataCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotToggleGPano(int))); d->addGPlusMetadataCheckBox->setChecked(d->mngr->gPano()); */ slotToggleGPano(0); // Disabled for the moment connect(group, SIGNAL(buttonClicked(QAbstractButton*)), this, SLOT(slotChangeFileFormat(QAbstractButton*))); connect(d->binariesWidget, SIGNAL(signalBinariesFound(bool)), this, SLOT(slotBinariesChanged(bool))); // TODO HDR // d->hdrCheckBox->setChecked(d->mngr->hdr()); }
OptimizePage::OptimizePage(Manager* const mngr, KAssistantDialog* const dlg) : KPWizardPage(dlg, i18n("<b>Optimization</b>")), d(new OptimizePagePriv) { d->mngr = mngr; KVBox* vbox = new KVBox(this); d->progressTimer = new QTimer(this); d->title = new QLabel(vbox); d->title->setOpenExternalLinks(true); d->title->setWordWrap(true); KConfig config("kipirc"); KConfigGroup group = config.group(QString("Panorama Settings")); d->horizonCheckbox = new QCheckBox(i18n("Level horizon"), vbox); d->horizonCheckbox->setChecked(group.readEntry("Horizon", true)); d->horizonCheckbox->setToolTip(i18n("Detect the horizon and adapt the project to make it horizontal.")); d->horizonCheckbox->setWhatsThis(i18n("<b>Level horizon</b>: Detect the horizon and adapt the projection so that " "the detected horizon is an horizontal line in the final panorama")); d->projectionAndSizeCheckbox = new QCheckBox(i18n("Automatic projection and crop"), vbox); d->projectionAndSizeCheckbox->setChecked(group.readEntry("Output Projection And Size", true)); d->projectionAndSizeCheckbox->setToolTip(i18n("Adapt the projection of the panorama and the cropping on the resulting " "projection so that every photo fits in the resulting panorama.")); d->projectionAndSizeCheckbox->setWhatsThis(i18n("<b>Automatic projection and crop</b>: Automatically adapt the projection " "and the crop of the panorama to get every photos into the panorama.")); d->preprocessResults = new QLabel(vbox); QLabel* space1 = new QLabel(vbox); vbox->setStretchFactor(space1, 2); KHBox* hbox = new KHBox(vbox); d->detailsBtn = new QPushButton(hbox); d->detailsBtn->setText(i18n("Details...")); d->detailsBtn->hide(); QLabel* space2 = new QLabel(hbox); hbox->setStretchFactor(space2, 10); QLabel* space3 = new QLabel(vbox); vbox->setStretchFactor(space3, 2); d->progressLabel = new QLabel(vbox); d->progressLabel->setAlignment(Qt::AlignCenter); QLabel* space4 = new QLabel(vbox); vbox->setStretchFactor(space4, 10); vbox->setSpacing(KDialog::spacingHint()); vbox->setMargin(KDialog::spacingHint()); setPageWidget(vbox); resetTitle(); QPixmap leftPix = KStandardDirs::locate("data", "kipiplugin_panorama/pics/assistant-hugin.png"); setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation)); // connect(d->mngr->thread(), SIGNAL(starting(KIPIPanoramaPlugin::ActionData)), // this, SLOT(slotAction(KIPIPanoramaPlugin::ActionData))); connect(d->progressTimer, SIGNAL(timeout()), this, SLOT(slotProgressTimerDone())); connect(d->detailsBtn, SIGNAL(clicked()), this, SLOT(slotShowDetails())); }