Logo Search packages:      
Sourcecode: lemonpos-kde4 version File versions  Download package

int lemonView::getItemRow ( QString  c  )  [private, slot]

Slot used to get the row where an item with code is at the main table. Returns -1 if not found, else returns table row where is located.

Definition at line 571 of file lemonview.cpp.

Referenced by itemSearchDoubleClicked().

{
  int result = 0;
  for (int row=0; row<ui_mainview.tableWidget->rowCount(); ++row)
  {
    QTableWidgetItem * item = ui_mainview.tableWidget->item(row, colCode);
    QString icode = item->data(Qt::DisplayRole).toString();
    if (icode == c) {
      result = row;
      break;
    }
  }
  return result; //0 if not found
}


Generated by  Doxygen 1.6.0   Back to index