本文整理汇总了C++中XListViewItem::altId方法的典型用法代码示例。如果您正苦于以下问题:C++ XListViewItem::altId方法的具体用法?C++ XListViewItem::altId怎么用?C++ XListViewItem::altId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XListViewItem
的用法示例。
在下文中一共展示了XListViewItem::altId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sPopulateMenu
void dspBacklogByCustomer::sPopulateMenu(Q3PopupMenu *pMenu)
{
int selectionCount = 0;
bool multiSelection = FALSE;
bool hasParents = FALSE;
bool hasChildren = FALSE;
for (XListViewItem *cursor = _soitem->firstChild(); cursor; cursor = cursor->itemBelow())
{
if (cursor->isSelected())
{
if ( (++selectionCount > 1) && (!multiSelection) )
multiSelection = TRUE;
if ( (cursor->altId() == -1) && (!hasParents) )
hasParents = TRUE;
if ( (cursor->altId() != -1) && (!hasChildren) )
hasChildren = TRUE;
}
}
int menuItem;
if (selectionCount == 1)
{
menuItem = pMenu->insertItem(tr("Edit Order..."), this, SLOT(sEditOrder()), 0);
if (!_privleges->check("MaintainSalesOrders"))
pMenu->setItemEnabled(menuItem, FALSE);
menuItem = pMenu->insertItem(tr("View Order..."), this, SLOT(sViewOrder()), 0);
if ((!_privleges->check("MaintainSalesOrders")) && (!_privleges->check("ViewSalesOrders")))
pMenu->setItemEnabled(menuItem, FALSE);
if (hasChildren)
{
pMenu->insertSeparator();
menuItem = pMenu->insertItem(tr("Edit Item..."), this, SLOT(sEditItem()), 0);
if (!_privleges->check("MaintainSalesOrders"))
pMenu->setItemEnabled(menuItem, FALSE);
menuItem = pMenu->insertItem(tr("View Item..."), this, SLOT(sViewItem()), 0);
if ((!_privleges->check("MaintainSalesOrders")) && (!_privleges->check("ViewSalesOrders")))
pMenu->setItemEnabled(menuItem, FALSE);
}
}
if (hasParents)
{
pMenu->insertSeparator();
menuItem = pMenu->insertItem(tr("Print Packing List..."), this, SLOT(sPrintPackingList()), 0);
if (!_privleges->check("PrintPackingLists"))
pMenu->setItemEnabled(menuItem, FALSE);
menuItem = pMenu->insertItem(tr("Add to Packing List Batch..."), this, SLOT(sAddToPackingListBatch()), 0);
if (!_privleges->check("MaintainPackingListBatch"))
pMenu->setItemEnabled(menuItem, FALSE);
}
}
示例2: sAddToPackingListBatch
void dspBacklogByCustomer::sAddToPackingListBatch()
{
for (XListViewItem *cursor = _soitem->firstChild(); cursor; cursor = cursor->itemBelow())
{
if ( (cursor->isSelected()) && (cursor->altId() == -1) )
{
q.prepare("SELECT addToPackingListBatch(:sohead_id, :cosmisc_id) AS result;");
q.bindValue(":sohead_id", cursor->id());
q.bindValue(":cosmisc_id", cursor->altId());
q.exec();
if (q.lastError().type() != QSqlError::None)
{
systemError(this, q.lastError().databaseText(), __FILE__, __LINE__);
return;
}
}
}
}
示例3: sPrintPackingList
void dspBacklogByCustomer::sPrintPackingList()
{
for (XListViewItem *cursor = _soitem->firstChild(); cursor; cursor = cursor->itemBelow())
{
if ( (cursor->isSelected()) && (cursor->altId() == -1) )
{
ParameterList params;
params.append("sohead_id", cursor->id());
printPackingList newdlg(this, "", TRUE);
newdlg.set(params);
newdlg.exec();
}
}
}
示例4: sPrint
void reprintInvoices::sPrint()
{
QPrinter printer;
bool setupPrinter = TRUE;
XListViewItem *cursor = _invoice->firstChild();
bool userCanceled = false;
if (orReport::beginMultiPrint(&printer, userCanceled) == false)
{
if(!userCanceled)
systemError(this, tr("Could not initialize printing system for multiple reports."));
return;
}
while (cursor != 0)
{
if (_invoice->isSelected(cursor))
{
int counter = 0;
for ( XListViewItem *watermark = _watermarks->firstChild();
watermark; watermark = watermark->nextSibling(), counter++ )
{
q.prepare("SELECT findCustomerForm(:cust_id, 'I') AS _reportname;");
q.bindValue(":cust_id", cursor->altId());
q.exec();
if (q.first())
{
ParameterList params;
params.append("invchead_id", cursor->id());
params.append("showcosts", ((watermark->text(2) == tr("Yes")) ? "TRUE" : "FALSE") );
params.append("watermark", watermark->text(1));
orReport report(q.value("_reportname").toString(), params);
if (report.isValid())
{
if (report.print(&printer, setupPrinter))
setupPrinter = FALSE;
else
{
report.reportError(this);
orReport::endMultiPrint(&printer);
return;
}
}
else
QMessageBox::critical( this, tr("Cannot Find Invoice Form"),
tr( "The Invoice Form '%1' cannot be found.\n"
"One or more of the selected Invoices cannot be printed until a Customer Form Assignment\n"
"is updated to remove any references to this Invoice Form or this Invoice Form is created." )
.arg(q.value("_reportname").toString()) );
}
else if (q.lastError().type() != QSqlError::None)
{
systemError(this, q.lastError().databaseText(), __FILE__, __LINE__);
return;
}
}
if (_metrics->boolean("EnableBatchManager"))
{
// TODO: Check for EDI and handle submission to Batch here
q.prepare("SELECT CASE WHEN (COALESCE(shipto_ediprofile_id, -2) = -2)"
" THEN COALESCE(cust_ediprofile_id,-1)"
" ELSE COALESCE(shipto_ediprofile_id,-2)"
" END AS result,"
" COALESCE(cust_emaildelivery, false) AS custom"
" FROM cust, invchead"
" LEFT OUTER JOIN shipto"
" ON (invchead_shipto_id=shipto_id)"
" WHERE ((invchead_cust_id=cust_id)"
" AND (invchead_id=:invchead_id)); ");
q.bindValue(":invchead_id", cursor->id());
q.exec();
if(q.first())
{
if(q.value("result").toInt() == -1)
{
if(q.value("custom").toBool())
{
ParameterList params;
params.append("invchead_id", cursor->id());
deliverInvoice newdlg(this, "", TRUE);
newdlg.set(params);
newdlg.exec();
}
}
else
{
ParameterList params;
params.append("action_name", "TransmitInvoice");
params.append("invchead_id", cursor->id());
submitAction newdlg(this, "", TRUE);
newdlg.set(params);
newdlg.exec();
}
}
}
else if (q.lastError().type() != QSqlError::None)
{
//.........这里部分代码省略.........