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

void lemonView::itemSearchDoubleClicked ( QTableWidgetItem *  item  )  [private, slot]

Slot used to add clicked item to shopping list...

Definition at line 1024 of file lemonview.cpp.

References getItemRow(), incrementTableItemQty(), insertItem(), and itemDoubleClicked().

{
  int row = item->row();
  QTableWidgetItem *cItem = ui_mainview.tableSearch->item(row,2); //get item code
  qulonglong code = cItem->data(Qt::DisplayRole).toULongLong();
  qDebug()<<"Linea 981: Data at column 2:"<<cItem->data(Qt::DisplayRole).toString();
  if (productsHash.contains(code)) {
    int pos = getItemRow(QString::number(code));
    if (pos>=0) {
      QTableWidgetItem *thisItem = ui_mainview.tableWidget->item(pos, colCode);
      ProductInfo info = productsHash.value(code);
      if (info.units == uPiece) incrementTableItemQty(QString::number(code), 1);
      else itemDoubleClicked(thisItem);
    }
  }
  else {
    insertItem(QString::number(code));
  }
  ui_mainview.mainPanel->setCurrentIndex(pageMain);
}


Generated by  Doxygen 1.6.0   Back to index