Logo Search packages:      
Sourcecode: kallery version File versions  Download package

bool ThumbsSourcePage::processPage (  )  [virtual]

Reads the settings from the page.

Returns:
true if everything's ok, and the user can go to the next page, otherwise returns false.

Implements WizardPageBase.

Definition at line 66 of file thumbssourcepage.cpp.

References OptionType::GenerateThumbnails, OptionType::imageList, OptionType::LoadThumbnails, OptionType::NoThumbnails, KalleryGlobals::options, KalleryGlobals::ref(), OptionType::thumbList, and OptionType::thumbSetting.

{
  if (NoThumbBtn->isChecked()) KalleryGlobals::ref()->options.thumbSetting = OptionType::NoThumbnails;
  if (GenerateThumbBtn->isChecked()) KalleryGlobals::ref()->options.thumbSetting = OptionType::GenerateThumbnails;
  if (LoadThumbBtn->isChecked()) KalleryGlobals::ref()->options.thumbSetting = OptionType::LoadThumbnails;

  if ( (KalleryGlobals::ref()->options.thumbSetting == OptionType::LoadThumbnails) && (KalleryGlobals::ref()->options.thumbList.count() != KalleryGlobals::ref()->options.imageList.count()) )
  {
    KMessageBox::error(this,i18n("The number of thumbnail files is not equal with the number of image files!\n\n %1 thumbnails, but\n %2 image files were selected.") \
                                                  .arg(KalleryGlobals::ref()->options.thumbList.count()).arg(KalleryGlobals::ref()->options.imageList.count()),i18n("Number mismatch error"),true);
    return false;
  }


  return true;
}


Generated by  Doxygen 1.6.0   Back to index