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

void DescSourcePage::setupPage (  )  [virtual]

Setup this page, because the user will see it just in a moment.

Implements WizardPageBase.

Definition at line 203 of file descsourcepage.cpp.

References OptionType::descList, DescPosition, OptionType::EnterDescriptions, OptionType::ImageInfoComment, OptionType::ImageInfoDimensions, OptionType::ImageInfoExposure, OptionType::ImageInfoFileSize, OptionType::ImageInfoShootingDate, OptionType::LoadDescriptions, OptionType::LoadImageInfo, OptionType::NoDescriptions, KalleryGlobals::options, KalleryGlobals::ref(), and slotDescSettingsChanged().

Referenced by slotLoadDescriptions().

{
  EnterDescBtn->setChecked(KalleryGlobals::ref()->options.descSetting == OptionType::EnterDescriptions);
  LoadDescBtn->setChecked(KalleryGlobals::ref()->options.descSetting == OptionType::LoadDescriptions);
  ImageInfoDescBtn->setChecked(KalleryGlobals::ref()->options.descSetting == OptionType::LoadImageInfo);
  NoDescBtn->setChecked(KalleryGlobals::ref()->options.descSetting == OptionType::NoDescriptions);
  
  FileSize->setChecked(KalleryGlobals::ref()->options.infoSetting &  OptionType::ImageInfoFileSize);
  ImageDimension->setChecked(KalleryGlobals::ref()->options.infoSetting &  OptionType::ImageInfoDimensions);
  ImageComment->setChecked(KalleryGlobals::ref()->options.infoSetting &  OptionType::ImageInfoComment);
  ShootingDate->setChecked(KalleryGlobals::ref()->options.infoSetting &  OptionType::ImageInfoShootingDate);
  ExposureInfo->setChecked(KalleryGlobals::ref()->options.infoSetting &  OptionType::ImageInfoExposure);
  
  PrevDescBtn->setEnabled(false);
  NextDescBtn->setEnabled(true);
  ImageNameTxt->setText(i18n("Describe the image: %1").arg(QFileInfo(KalleryGlobals::ref()->options.imageList[0]).fileName()));
  DescPosition = 0;
  if (KalleryGlobals::ref()->options.descList.count() > 1)
  {
    DescEdit->setText(KalleryGlobals::ref()->options.descList[0].comment);
    pm.load(KalleryGlobals::ref()->options.imageList[0]);
    dx = double(descPixmap->width()) / double(pm.width());
    matrix.reset();
    matrix.scale(dx, dx);
    pm_scale = pm.xForm(matrix);
//    DescPic->setPaletteBackgroundPixmap(pm_scale);
    descPixmap->setPixmap(pm_scale);
  }
  else
  {
    DescEdit->clear();
  }
  slotDescSettingsChanged();
}


Generated by  Doxygen 1.6.0   Back to index