本文整理汇总了C++中XListViewItem::isSelected方法的典型用法代码示例。如果您正苦于以下问题:C++ XListViewItem::isSelected方法的具体用法?C++ XListViewItem::isSelected怎么用?C++ XListViewItem::isSelected使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XListViewItem
的用法示例。
在下文中一共展示了XListViewItem::isSelected方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: buildParameters
ParameterList rptTimePhasedBookingsByProductCategory::buildParameters()
{
ParameterList params;
_productCategory->appendValue(params);
_warehouse->appendValue(params);
if(_inventoryUnits->isChecked())
params.append("inventoryUnits");
else if(_capacityUnits->isChecked())
params.append("capacityUnits");
else if(_altCapacityUnits->isChecked())
params.append("altCapacityUnits");
else if(_salesDollars->isChecked())
params.append("salesDollars");
XListViewItem *cursor = _periods->firstChild();
QList<QVariant> periodList;
while (cursor)
{
if (cursor->isSelected())
periodList.append(cursor->id());
cursor = cursor->nextSibling();
}
params.append("period_id_list", periodList);
return params;
}
示例2: 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);
}
}
示例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: 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;
}
}
}
}
示例5: sPrint
void rptTimePhasedRoughCutByWorkCenter::sPrint()
{
if (_periods->isPeriodSelected())
{
ParameterList params;
if (_selectedWorkCenter->isChecked())
params.append("wkrcnt_id", _workCenters->id());
_warehouse->appendValue(params);
XListViewItem *cursor = _periods->firstChild();
QList<QVariant> periodList;
while (cursor)
{
if (cursor->isSelected())
periodList.append(cursor->id());
cursor = cursor->nextSibling();
}
params.append("period_id_list", periodList);
orReport report("TimePhasedRoughCutByWorkCenter", params);
if (report.isValid())
report.print();
else
{
report.reportError(this);
reject();
}
if (_captive)
accept();
}
else
QMessageBox::critical( this, tr("Incomplete criteria"),
tr( "The criteria you specified is not complete. Please make sure all\n"
"fields are correctly filled out before running the report." ) );
}