Exemplo n.º 1
0
void dspSalesHistoryByCustomer::sPopulateMenu(QMenu *pMenu)
{
  int menuItem;

  menuItem = pMenu->insertItem(tr("Edit..."), this, SLOT(sEdit()), 0);
  if (!_privileges->check("EditSalesHistory"))
    pMenu->setItemEnabled(menuItem, FALSE);

  pMenu->insertItem(tr("View..."), this, SLOT(sView()), 0);

  pMenu->insertSeparator();

  menuItem = pMenu->insertItem(tr("Invoice Information..."), this, SLOT(sInvoiceInformation()), 0);
}
Exemplo n.º 2
0
void dspSalesHistoryByCustomer::sPopulateMenu(QMenu *pMenu)
{
    int menuItem;
    XTreeWidgetItem * item = (XTreeWidgetItem*)_sohist->currentItem();

    menuItem = pMenu->insertItem(tr("Edit..."), this, SLOT(sEdit()), 0);
    if (!_privileges->check("EditSalesHistory"))
        pMenu->setItemEnabled(menuItem, FALSE);

    pMenu->insertItem(tr("View..."), this, SLOT(sView()), 0);

    if (item->rawValue("invoicenumber").toString().length() > 0)
    {
        pMenu->insertSeparator();

        menuItem = pMenu->insertItem(tr("Invoice Information..."), this, SLOT(sInvoiceInformation()), 0);
    }
}