本文整理汇总了C++中ParameterList::inList方法的典型用法代码示例。如果您正苦于以下问题:C++ ParameterList::inList方法的具体用法?C++ ParameterList::inList怎么用?C++ ParameterList::inList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParameterList
的用法示例。
在下文中一共展示了ParameterList::inList方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: set
enum SetResponse dspBacklogByParameterList::set(const ParameterList &pParams)
{
XWidget::set(pParams);
QVariant param;
bool valid;
param = pParams.value("custtype_id", &valid);
if (valid)
{
_parameter->setType(ParameterGroup::CustomerType);
_parameter->setId(param.toInt());
}
param = pParams.value("custtype_pattern", &valid);
if (valid)
{
_parameter->setType(ParameterGroup::CustomerType);
_parameter->setPattern(param.toString());
}
param = pParams.value("custtype", &valid);
if (valid)
_parameter->setType(ParameterGroup::CustomerType);
param = pParams.value("custgrp_id", &valid);
if (valid)
{
_parameter->setType(ParameterGroup::CustomerGroup);
_parameter->setId(param.toInt());
}
param = pParams.value("custgrp_pattern", &valid);
if (valid)
{
_parameter->setType(ParameterGroup::CustomerGroup);
_parameter->setPattern(param.toString());
}
param = pParams.value("custgrp", &valid);
if (valid)
_parameter->setType(ParameterGroup::CustomerGroup);
param = pParams.value("prodcat_id", &valid);
if (valid)
{
_parameter->setType(ParameterGroup::ProductCategory);
_parameter->setId(param.toInt());
}
param = pParams.value("prodcat_pattern", &valid);
if (valid)
{
_parameter->setType(ParameterGroup::ProductCategory);
_parameter->setPattern(param.toString());
}
param = pParams.value("prodcat", &valid);
if (valid)
_parameter->setType(ParameterGroup::ProductCategory);
if (pParams.inList("run"))
{
sFillList();
return NoError_Run;
}
switch (_parameter->type())
{
case ParameterGroup::CustomerType:
setWindowTitle(tr("Backlog by Customer Type"));
break;
case ParameterGroup::CustomerGroup:
setWindowTitle(tr("Backlog by Customer Group"));
break;
case ParameterGroup::ProductCategory:
setWindowTitle(tr("Backlog by Product Category"));
break;
default:
break;
}
return NoError;
}
示例2: set
enum SetResponse taxDetail::set(const ParameterList & pParams )
{
XDialog::set(pParams);
QVariant param;
bool valid;
_readonly = pParams.inList("readOnly");
_new->hide();
_delete->hide();
param = pParams.value("taxzone_id", &valid);
if (valid)
_taxzoneId = param.toInt();
param = pParams.value("taxtype_id", &valid);
if (valid)
_taxType->setId(param.toInt());
else
clear();
param = pParams.value("date", &valid);
if (valid)
_subtotal->setEffective(param.toDate());
param = pParams.value("subtotal", &valid);
if (valid)
_subtotal->setLocalValue(param.toDouble());
param = pParams.value("curr_id", &valid);
if (valid)
_subtotal->setId(param.toInt());
param = pParams.value("order_id", &valid);
if (valid)
_orderid = param.toInt();
param = pParams.value("order_type", &valid);
if (valid)
_ordertype = param.toString();
param = pParams.value("display_type", &valid);
if (valid)
_displayType = param.toString();
_adjustment = pParams.inList("adjustment");
param = pParams.value("sense", &valid);
if (valid)
_sense = param.toInt();
if (_readonly)
{
_taxType->setEnabled(false);
_cancel->setText(tr("&Close"));
}
if(_adjustment && !_readonly)
{
_taxType->setEnabled(false);
_new->show();
_delete->show();
}
sPopulate();
return NoError;
}
示例3: set
enum SetResponse issueLineToShipping::set(const ParameterList &pParams)
{
XDialog::set(pParams);
QVariant param;
bool valid;
param = pParams.value("transTS", &valid);
if (valid)
_transTS = param.toDateTime();
param = pParams.value("order_type", &valid);
if (valid)
{
_ordertype = param.toString();
if (_ordertype == "SO")
_orderNumberLit->setText(tr("Sales Order #:"));
else if (_ordertype == "TO")
_orderNumberLit->setText(tr("Transfer Order #:"));
}
param = pParams.value("order_id", &valid);
if (valid)
{
_itemid = param.toInt();
populate();
}
// TODO: deprecate by remoing from salesOrder and transferOrder windows
param = pParams.value("soitem_id", &valid);
if (valid)
{
_itemid = param.toInt();
_ordertype = "SO";
_orderNumberLit->setText(tr("Sales Order #:"));
populate();
}
// TODO: deprecate by remoing from salesOrder and transferOrder windows
param = pParams.value("toitem_id", &valid);
if (valid)
{
_itemid = param.toInt();
_ordertype = "TO";
_orderNumberLit->setText(tr("Transfer Order #:"));
populate();
}
if (pParams.inList("requireInventory"))
_requireInventory = true;
param = pParams.value("qty", &valid);
if (valid)
_qtyToIssue->setDouble(param.toDouble());
_snooze = pParams.inList("snooze");
if(pParams.inList("issue"))
sIssue();
return NoError;
}
示例4: populateDatabaseInfo
int login2::set(const ParameterList &pParams, QSplashScreen *pSplash)
{
_splash = pSplash;
QVariant param;
bool valid;
param = pParams.value("username", &valid);
if (valid)
{
_username->setText(param.toString());
_password->setFocus();
_captive = TRUE;
}
else
{
_username->setFocus();
_captive = FALSE;
}
param = pParams.value("password", &valid);
if (valid)
{
_password->setText(param.toString());
_captive = TRUE;
}
param = pParams.value("copyright", &valid);
if (valid)
_copyrightLit->setText(param.toString());
param = pParams.value("version", &valid);
if (valid)
_versionLit->setText(tr("Version ") + param.toString());
param = pParams.value("build", &valid);
if (valid)
_build->setText(param.toString());
/*
param = pParams.value("cloud", &valid);
if (valid)
_cloudOption->setChecked(true);
*/
/*
param = pParams.value("company", &valid);
if (valid)
_company->setText(param.toString());
*/
param = pParams.value("name", &valid);
if (valid)
_nameLit->setText(param.toString());
param = pParams.value("databaseURL", &valid);
if (valid)
_databaseURL = param.toString();
populateDatabaseInfo();
param = pParams.value("nonxTupleDB", &valid);
if (valid)
_nonxTupleDB = true;
param = pParams.value("multipleConnections", &valid);
if (valid)
_multipleConnections = true;
param = pParams.value("setSearchPath", &valid);
if (valid)
_setSearchPath = true;
if(pParams.inList("login"))
sLogin();
sChangeURL();
updateRecentOptions();
updateRecentOptionsActions();
return 0;
}
示例5: set
enum SetResponse dspInventoryAvailability::set(const ParameterList &pParams)
{
XWidget::set(pParams);
QVariant param;
bool valid;
parameterWidget()->setSavedFilters();
param = pParams.value("classcode_id", &valid);
if (valid)
parameterWidget()->setDefault(tr("Class Code"), param);
param = pParams.value("classcode_pattern", &valid);
if (valid)
parameterWidget()->setDefault(tr("Class Code Pattern"), param);
param = pParams.value("plancode_id", &valid);
if (valid)
parameterWidget()->setDefault(tr("Planner Code"), param);
param = pParams.value("plancode_pattern", &valid);
if (valid)
parameterWidget()->setDefault(tr("Planner Code Pattern"), param);
param = pParams.value("itemgrp_id", &valid);
if (valid)
parameterWidget()->setDefault(tr("Item Group"), param);
param = pParams.value("itemgrp_pattern", &valid);
if (valid)
parameterWidget()->setDefault(tr("Item Group Pattern"), param);
param = pParams.value("item_id", &valid);
if (valid)
parameterWidget()->setDefault(tr("Item"), param);
param = pParams.value("itemsite_id", &valid);
if (valid)
{
XSqlQuery qry;
qry.prepare("SELECT itemsite_item_id, itemsite_warehous_id "
"FROM itemsite "
"WHERE itemsite_id=:itemsite_id;");
qry.bindValue(":itemsite_id", param.toInt());
qry.exec();
if (qry.first())
{
parameterWidget()->setDefault(tr("Item"), qry.value("itemsite_item_id"));
parameterWidget()->setDefault(tr("Site"), qry.value("itemsite_warehous_id"));
}
}
param = pParams.value("warehous_id", &valid);
if (valid)
parameterWidget()->setDefault(tr("Site"), param);
param = pParams.value("byDays", &valid);
if (valid)
{
_forgetful = true;
_asof->setCurrentIndex(LOOKAHEADDAYS);
_days->setValue(param.toInt());
}
param = pParams.value("byDate", &valid);
if (valid)
{
_forgetful = true;
_asof->setCurrentIndex(CUTOFFDATE);
_date->setDate(param.toDate());
}
// sources may not exist, so turn by Vendor off to avoid confusion
_byVendor->setForgetful(true);
_byVendor->setChecked(false);
parameterWidget()->applyDefaultFilterSet();
if (pParams.inList("run"))
{
sFillList();
return NoError_Run;
}
return NoError;
}
示例6: set
enum SetResponse substituteList::set(const ParameterList &pParams)
{
XSqlQuery substituteet;
XDialog::set(pParams);
QVariant param;
bool valid;
param = pParams.value("womatl_id", &valid);
if (valid)
{
substituteet.prepare( "SELECT womatl_itemsite_id,"
" bomitem_id, COALESCE(bomitem_subtype, 'I') AS subtype,"
" COALESCE(wo_id, 0) AS wo_id "
"FROM womatl LEFT OUTER JOIN bomitem ON (bomitem_id=womatl_bomitem_id) "
" LEFT OUTER JOIN wo ON ( (wo_ordtype='W') AND"
" (wo_ordid=womatl_wo_id) AND"
" (wo_itemsite_id=womatl_itemsite_id) ) "
"WHERE (womatl_id=:womatl_id);" );
substituteet.bindValue(":womatl_id", param.toInt());
substituteet.exec();
if (substituteet.first())
{
if (substituteet.value("wo_id").toInt() > 0)
{
QMessageBox::warning(this, tr("Child Work Order"),
tr("A child Work Order exists for this Material \n"
"Requirement. You should delete this \n"
"child Work Order before substituting.") );
}
_item->setItemsiteid(substituteet.value("womatl_itemsite_id").toInt());
_item->setReadOnly(TRUE);
_warehouse->setEnabled(FALSE);
_bomitemid = substituteet.value("bomitem_id").toInt();
_itemsiteid = substituteet.value("womatl_itemsite_id").toInt();
_source = substituteet.value("subtype").toString();
sFillList();
}
}
_byLeadTime->setChecked(pParams.inList("byLeadTime"));
param = pParams.value("byDays", &valid);
if (valid)
{
_byDays->setChecked(TRUE);
_days->setValue(param.toInt());
}
param = pParams.value("byDate", &valid);
if (valid)
{
_byDate->setChecked(TRUE);
_date->setDate(param.toDate());
}
if (pParams.inList("run"))
{
sFillList();
return NoError_Run;
}
return NoError;
}
示例7: set
//.........这里部分代码省略.........
_number->setText(numq.value("number"));
_NumberGen = numq.value("number").toInt();
}
}
if (_privileges->check("MaintainVendorAddresses"))
{
connect(_vendaddr, SIGNAL(valid(bool)), _editAddress, SLOT(setEnabled(bool)));
connect(_vendaddr, SIGNAL(valid(bool)), _deleteAddress, SLOT(setEnabled(bool)));
connect(_vendaddr, SIGNAL(itemSelected(int)), _editAddress, SLOT(animateClick()));
}
else
{
_newAddress->setEnabled(FALSE);
connect(_vendaddr, SIGNAL(itemSelected(int)), _viewAddress, SLOT(animateClick()));
}
connect(_charass, SIGNAL(valid(bool)), _editCharacteristic, SLOT(setEnabled(bool)));
connect(_charass, SIGNAL(valid(bool)), _deleteCharacteristic, SLOT(setEnabled(bool)));
emit newId(_vendid);
}
else if (param.toString() == "edit")
{
_mode = cEdit;
if (_privileges->check("MaintainVendorAddresses"))
{
connect(_vendaddr, SIGNAL(valid(bool)), _editAddress, SLOT(setEnabled(bool)));
connect(_vendaddr, SIGNAL(valid(bool)), _deleteAddress, SLOT(setEnabled(bool)));
connect(_vendaddr, SIGNAL(itemSelected(int)), _editAddress, SLOT(animateClick()));
}
else
{
_newAddress->setEnabled(FALSE);
connect(_vendaddr, SIGNAL(itemSelected(int)), _viewAddress, SLOT(animateClick()));
}
connect(_charass, SIGNAL(valid(bool)), _editCharacteristic, SLOT(setEnabled(bool)));
connect(_charass, SIGNAL(valid(bool)), _deleteCharacteristic, SLOT(setEnabled(bool)));
}
else if (param.toString() == "view")
{
_mode = cView;
_number->setEnabled(FALSE);
_vendtype->setEnabled(FALSE);
_active->setEnabled(FALSE);
_name->setEnabled(FALSE);
_accountNumber->setEnabled(FALSE);
_defaultTerms->setEnabled(FALSE);
_defaultShipVia->setEnabled(FALSE);
_defaultCurr->setEnabled(FALSE);
_contact1->setEnabled(FALSE);
_contact2->setEnabled(FALSE);
_address->setEnabled(FALSE);
_notes->setReadOnly(TRUE);
_poComments->setReadOnly(TRUE);
_poItems->setEnabled(FALSE);
_restrictToItemSource->setEnabled(FALSE);
_receives1099->setEnabled(FALSE);
_qualified->setEnabled(FALSE);
_newAddress->setEnabled(FALSE);
_defaultFOBGroup->setEnabled(false);
_taxzone->setEnabled(false);
_match->setEnabled(false);
_newTaxreg->setEnabled(false);
_comments->setReadOnly(TRUE);
_newCharacteristic->setEnabled(FALSE);
_achGroup->setEnabled(false);
_routingNumber->setEnabled(false);
_achAccountNumber->setEnabled(false);
_individualId->setEnabled(false);
_individualName->setEnabled(false);
_accountType->setEnabled(false);
_distribGroup->setEnabled(false);
_save->hide();
_close->setText(tr("&Close"));
disconnect(_taxreg, SIGNAL(valid(bool)), _deleteTaxreg, SLOT(setEnabled(bool)));
disconnect(_taxreg, SIGNAL(valid(bool)), _editTaxreg, SLOT(setEnabled(bool)));
disconnect(_taxreg, SIGNAL(itemSelected(int)), _editTaxreg, SLOT(animateClick()));
connect(_taxreg, SIGNAL(itemSelected(int)), _viewTaxreg, SLOT(animateClick()));
}
}
if(_metrics->value("CRMAccountNumberGeneration") == "A")
_number->setEnabled(FALSE);
if(cNew == _mode || !pParams.inList("showNextPrev"))
{
_next->hide();
_previous->hide();
}
return NoError;
}