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

void KalleryFunctions::deleteFromList ( QListBox *  listBox,
QStringList &  itemList,
QLabel *  label,
QValueList< OptionType::Description > *  descList 

Common method to delete the current item from a QStringList and also delete the item from the visual list box. If descList is not NULL, delete the description from that list.

listBox the listbox object
itemList the list of items
label a label to display the number of items in the list.
descList the list with descriptions of the items. Can be NULL.

Definition at line 128 of file kalleryfunctions.cpp.

Referenced by SelectSourcePage::slotRemoveSourceFile(), and ThumbsSourcePage::slotRemoveThumbnail().

  int index;
  QStringList::Iterator it;
  QValueList<OptionType::Description>::Iterator descIt;

  /*FIXME: Multiple deletion is not working correctly, so it is disabled for now
  in the QT Designer */

  int count =  listBox->count();
  for (index=0; index < count; index++)
    if (listBox->isSelected(index))
      it = itemList.at(index);
      if (descList)
        descIt = descList->at(index);
  label->setText(i18n("%1 items.").arg(itemList.count()));

Generated by  Doxygen 1.6.0   Back to index