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

void DescSourcePage::slotPreviousDescription (  )  [private, slot]

Go to the previous image.

Definition at line 123 of file descsourcepage.cpp.

References OptionType::Description::comment, OptionType::descList, DescPosition, KalleryGlobals::options, and KalleryGlobals::ref().

{
  QValueList<OptionType::Description>::Iterator it;

  OptionType::Description desc;
  NextDescBtn->setEnabled(true);
  if (DescPosition +1 > KalleryGlobals::ref()->options.descList.count())
  {
    desc.comment = DescEdit->text();
    KalleryGlobals::ref()->options.descList.append(desc);
  }
  else
  {
    desc.comment = DescEdit->text();
    it = KalleryGlobals::ref()->options.descList.at(DescPosition);
    it = KalleryGlobals::ref()->options.descList.remove(it);
    KalleryGlobals::ref()->options.descList.insert(it, desc);
  }
  DescPosition --;
  if (DescPosition == 0)
  {
    PrevDescBtn->setEnabled(false);
  }
  DescEdit->setText(KalleryGlobals::ref()->options.descList[DescPosition].comment);
  ImageNameTxt->setText(i18n("Describe the image: %1").arg(QFileInfo(KalleryGlobals::ref()->options.imageList[DescPosition]).fileName()));
  pm.load(KalleryGlobals::ref()->options.imageList[DescPosition]);
  dx = double(descPixmap->width() - 5) / double(pm.width());
  matrix.reset();
  matrix.scale(dx, dx);
  pm_scale = pm.xForm(matrix);
//  DescPic->setPaletteBackgroundPixmap(pm_scale);
  descPixmap->setPixmap(pm_scale);
}


Generated by  Doxygen 1.6.0   Back to index