本文整理汇总了C++中sFillList函数的典型用法代码示例。如果您正苦于以下问题:C++ sFillList函数的具体用法?C++ sFillList怎么用?C++ sFillList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sFillList函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: QDate
void arWorkBench::sPostCashrcpt()
{
XSqlQuery arPostCashrcpt;
int journalNumber = -1;
bool changeDate = false;
QDate newDate = QDate();
if (_privileges->check("ChangeCashRecvPostDate"))
{
getGLDistDate newdlg(this, "", TRUE);
newdlg.sSetDefaultLit(tr("Distribution Date"));
if (newdlg.exec() == XDialog::Accepted)
{
newDate = newdlg.date();
changeDate = (newDate.isValid());
}
else
return;
}
arPostCashrcpt.exec("BEGIN;");
arPostCashrcpt.exec("SELECT fetchJournalNumber('C/R') AS journalnumber;");
if (arPostCashrcpt.first())
journalNumber = arPostCashrcpt.value("journalnumber").toInt();
else if (arPostCashrcpt.lastError().type() != QSqlError::NoError)
{
systemError(this, arPostCashrcpt.lastError().databaseText(), __FILE__, __LINE__);
return;
}
XSqlQuery setDate;
setDate.prepare("UPDATE cashrcpt SET cashrcpt_distdate=:distdate,"
" cashrcpt_applydate=CASE WHEN (cashrcpt_applydate < :distdate) THEN :distdate"
" ELSE cashrcpt_applydate END "
"WHERE cashrcpt_id=:cashrcpt_id;");
QList<XTreeWidgetItem*> selected = _cashrcpt->selectedItems();
for (int i = 0; i < selected.size(); i++)
{
int id = ((XTreeWidgetItem*)(selected[i]))->id();
if (changeDate)
{
setDate.bindValue(":distdate", newDate);
setDate.bindValue(":cashrcpt_id", id);
setDate.exec();
ErrorReporter::error(QtCriticalMsg, this, tr("Changing Dist. Date"),
setDate, __FILE__, __LINE__);
}
}
for (int i = 0; i < selected.size(); i++)
{
arPostCashrcpt.prepare("SELECT postCashReceipt(:cashrcpt_id, :journalNumber) AS result;");
arPostCashrcpt.bindValue(":cashrcpt_id", ((XTreeWidgetItem*)(selected[i]))->id());
arPostCashrcpt.bindValue(":journalNumber", journalNumber);
arPostCashrcpt.exec();
if (arPostCashrcpt.first())
{
int result = arPostCashrcpt.value("result").toInt();
if (result < 0)
{
systemError(this, storedProcErrorLookup("postCashReceipt", result),
__FILE__, __LINE__);
arPostCashrcpt.exec("ROLLBACK;");
return;
}
}
else if (arPostCashrcpt.lastError().type() != QSqlError::NoError)
{
systemError(this, arPostCashrcpt.lastError().databaseText(), __FILE__, __LINE__);
arPostCashrcpt.exec("ROLLBACK;");
return;
}
}
arPostCashrcpt.exec("COMMIT;");
sFillList();
}
开发者ID:Dinesh-Ramakrishnan,项目名称:qt-client,代码行数:79,代码来源:arWorkBench.cpp
示例2: QDialog
quoteList::quoteList( QWidget* parent, const char* name, bool modal, Qt::WFlags fl ) : QDialog( parent, fl )
{
setObjectName(name ? name : "quoteList" );
setModal(modal);
_quheadid = -1;
_custid = -1;
_openOnly = false;
setWindowTitle(tr("Quotes"));
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setContentsMargins(5, 5, 5, 5);
mainLayout->setSpacing(5);
mainLayout->setObjectName("mainLayout");
QVBoxLayout *warehouseLayout = new QVBoxLayout();
warehouseLayout->setObjectName("warehouseLayout");
QHBoxLayout *topLayout = new QHBoxLayout();
topLayout->setSpacing(7);
topLayout->setObjectName("topLayout");
QVBoxLayout *buttonsLayout = new QVBoxLayout();
buttonsLayout->setSpacing(5);
buttonsLayout->setObjectName("buttonsLayout");
QVBoxLayout *listLayout = new QVBoxLayout();
listLayout->setObjectName("listLayout");
_warehouse = new WarehouseGroup(this, "_warehouse");
warehouseLayout->addWidget(_warehouse);
QSpacerItem* spacer = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Preferred);
warehouseLayout->addItem(spacer);
topLayout->addLayout(warehouseLayout);
QSpacerItem* spacer_2 = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
topLayout->addItem(spacer_2);
_close = new QPushButton(tr("&Cancel"), this);
_close->setObjectName("_close");
buttonsLayout->addWidget(_close);
_select = new QPushButton(tr("&Select"), this);
_select->setObjectName("_select");
_select->setEnabled( FALSE );
_select->setDefault( TRUE );
buttonsLayout->addWidget(_select);
buttonsLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding));
topLayout->addLayout(buttonsLayout);
mainLayout->addLayout(topLayout);
QLabel *_quotesLit = new QLabel(tr("Quotes:"), this);
_quotesLit->setObjectName("_quotesLit");
listLayout->addWidget(_quotesLit);
_qu = new XTreeWidget(this);
_qu->setObjectName("_qu");
listLayout->addWidget(_qu, 1);
mainLayout->addLayout(listLayout, 1);
resize( QSize(490, 390).expandedTo(minimumSizeHint()) );
connect( _close, SIGNAL( clicked() ), this, SLOT( reject() ) );
connect( _select, SIGNAL( clicked() ), this, SLOT( sSelect() ) );
connect( _qu, SIGNAL( itemSelected(int) ), _select, SLOT( animateClick() ) );
connect( _qu, SIGNAL( valid(bool) ), _select, SLOT( setEnabled(bool) ) );
connect( _warehouse, SIGNAL(updated()), this, SLOT( sFillList() ) );
_qu->addColumn(tr("Order #"), _orderColumn, Qt::AlignLeft, true, "quhead_number");
_qu->addColumn(tr("Customer"), -1, Qt::AlignLeft, true, "cust_name");
_qu->addColumn(tr("Ordered"), _dateColumn, Qt::AlignCenter,true, "quhead_quotedate");
_qu->addColumn(tr("Scheduled"),_dateColumn, Qt::AlignCenter,true, "duedate");
setTabOrder(_warehouse, _qu);
setTabOrder(_qu, _select);
setTabOrder(_select, _close);
setTabOrder(_close, _warehouse);
_warehouse->setFocus();
}
开发者ID:Dinesh-Ramakrishnan,项目名称:qt-client,代码行数:82,代码来源:quoteList.cpp
示例3: Preferences
//.........这里部分代码省略.........
}
else
{
if(_altPref)
delete _altPref;
_altPref = new Preferences(_user->currentText());
_pref = _altPref;
_username->setText(_user->currentText());
}
_username->setEnabled(FALSE);
_currentpassword->setEnabled(_currentUser->isChecked());
_newpassword->setEnabled(_currentUser->isChecked());
_retypepassword->setEnabled(_currentUser->isChecked());
if (_pref->value("BackgroundImageid").toInt() > 0)
{
_backgroundImage->setChecked(TRUE);
setBackgroundImage(_pref->value("BackgroundImageid").toInt());
}
else
{
_noBackgroundImage->setChecked(TRUE);
_background->clear();
_backgroundImageid = -1;
}
if (_pref->value("PreferredWarehouse").toInt() == -1)
_noWarehouse->setChecked(TRUE);
else
{
_selectedWarehouse->setChecked(TRUE);
_warehouse->setId(_pref->value("PreferredWarehouse").toInt());
}
if (_pref->value("InterfaceWindowOption") == "Workspace")
_interfaceWorkspace->setChecked(true);
else
_interfaceTopLevel->setChecked(true);
if (_pref->boolean("CopyListsPlainText"))
_plainText->setChecked(true);
else
_richText->setChecked(true);
_enableSpell->setChecked(_pref->boolean("SpellCheck"));
//_rememberCheckBoxes->setChecked(! _pref->boolean("XCheckBox/forgetful"));
_inventoryMenu->setChecked(_pref->boolean("ShowIMMenu"));
_productsMenu->setChecked(_pref->boolean("ShowPDMenu"));
_scheduleMenu->setChecked(_pref->boolean("ShowMSMenu"));
_manufactureMenu->setChecked(_pref->boolean("ShowWOMenu"));
_crmMenu2->setChecked(_pref->boolean("ShowCRMMenu"));
_purchaseMenu->setChecked(_pref->boolean("ShowPOMenu"));
_salesMenu->setChecked(_pref->boolean("ShowSOMenu"));
_accountingMenu->setChecked(_pref->boolean("ShowGLMenu"));
_inventoryToolbar->setChecked(_pref->boolean("ShowIMToolbar"));
_productsToolbar->setChecked(_pref->boolean("ShowPDToolbar"));
_scheduleToolbar->setChecked(_pref->boolean("ShowMSToolbar"));
_manufactureToolbar->setChecked(_pref->boolean("ShowWOToolbar"));
_crmToolbar2->setChecked(_pref->boolean("ShowCRMToolbar"));
_purchaseToolbar->setChecked(_pref->boolean("ShowPOToolbar"));
_salesToolbar->setChecked(_pref->boolean("ShowSOToolbar"));
_accountingToolbar->setChecked(_pref->boolean("ShowGLToolbar"));
_listNumericItemsFirst->setChecked(_pref->boolean("ListNumericItemNumbersFirst"));
_ignoreTranslation->setChecked(_pref->boolean("IngoreMissingTranslationFiles"));
_idleTimeout->setValue(_pref->value("IdleTimeout").toInt());
_emailEvents->setChecked(_pref->boolean("EmailEvents"));
_alarmEvent->setChecked(_pref->boolean("AlarmEventDefault"));
_alarmEmail->setChecked(_pref->boolean("AlarmEmailDefault"));
_alarmSysmsg->setChecked(_pref->boolean("AlarmSysmsgDefault"));
if(_pref->value("DefaultEllipsesAction") == "search")
_ellipsesAction->setId(2);
else
_ellipsesAction->setId(1);
_alternating->setChecked(!_pref->boolean("NoAlternatingRowColors"));
//Hide for PostBooks
if (_metrics->value("Application") == "PostBooks")
{
_scheduleMenu->hide();
_scheduleToolbar->hide();
}
if (!_metrics->boolean("MultiWhs"))
_warehouseGroup->hide();
_debug->setChecked(_pref->boolean("EnableScriptDebug"));
sFillList();
sFillWarehouseList();
}
开发者ID:AlFoX,项目名称:qt-client,代码行数:101,代码来源:userPreferences.cpp
示例4: parameterWidget
enum SetResponse dspSalesHistory::set(const ParameterList &pParams)
{
XWidget::set(pParams);
QVariant param;
bool valid;
parameterWidget()->setSavedFilters();
param = pParams.value("cohead_id", &valid);
if (valid)
parameterWidget()->setDefault(tr("Sales Order"), param.toInt());
param = pParams.value("cust_id", &valid);
if (valid)
parameterWidget()->setDefault(tr("Customer"), param.toInt());
param = pParams.value("custtype_id", &valid);
if (valid)
parameterWidget()->setDefault(tr("Customer Type"), param.toInt());
param = pParams.value("custtype_pattern", &valid);
if (valid)
parameterWidget()->setDefault(tr("Customer Type Pattern"), param.toString());
param = pParams.value("item_id", &valid);
if (valid)
parameterWidget()->setDefault(tr("Item"), param.toInt());
param = pParams.value("prodcat_id", &valid);
if (valid)
parameterWidget()->setDefault(tr("Product Category"), param.toInt());
param = pParams.value("prodcat_pattern", &valid);
if (valid)
parameterWidget()->setDefault(tr("Product Category Pattern"), param.toString());
param = pParams.value("salesrep_id", &valid);
if (valid)
parameterWidget()->setDefault(tr("Sales Rep."), param.toInt());
param = pParams.value("startDate", &valid);
if (valid)
parameterWidget()->setDefault(tr("Invoice Start Date"), param.toDate());
else
parameterWidget()->setDefault(tr("Invoice Start Date"), QVariant());
param = pParams.value("endDate", &valid);
if (valid)
parameterWidget()->setDefault(tr("Invoice End Date"), param.toDate());
else
parameterWidget()->setDefault(tr("Invoice End Date"), QVariant());
param = pParams.value("shipStartDate", &valid);
if (valid)
parameterWidget()->setDefault(tr("Ship Start Date"), param.toDate());
else
parameterWidget()->setDefault(tr("Ship Start Date"), QVariant());
param = pParams.value("shipEndDate", &valid);
if (valid)
parameterWidget()->setDefault(tr("Ship End Date"), param.toDate());
else
parameterWidget()->setDefault(tr("Ship End Date"), QVariant());
param = pParams.value("shipzone_id", &valid);
if (valid)
parameterWidget()->setDefault(tr("Shipping Zones"), param.toInt());
param = pParams.value("warehous_id", &valid);
if (valid)
parameterWidget()->setDefault(tr("Site"), param.toInt());
parameterWidget()->applyDefaultFilterSet();
if (pParams.inList("run"))
{
sFillList();
return NoError_Run;
}
return NoError;
}
开发者ID:Wushaowei001,项目名称:xtuple-1,代码行数:82,代码来源:dspSalesHistory.cpp
示例5: XWidget
arWorkBench::arWorkBench(QWidget* parent, const char* name, Qt::WFlags fl)
: XWidget(parent, name, fl)
{
setupUi(this);
_aritems = new dspAROpenItems(this, "_aritems", Qt::Widget);
_aropenFrame->layout()->addWidget(_aritems);
_aritems->setCloseVisible(false);
_aritems->findChild<QWidget*>("_customerSelector")->hide();
_aritems->queryAction()->setVisible(false);
_aritems->findChild<QWidget*>("_asofGroup")->hide();
_aritems->findChild<DLineEdit*>("_asOf")->setDate(omfgThis->endOfTime());
_aritems->findChild<QWidget*>("_dateGroup")->hide();
_aritems->findChild<QWidget*>("_showGroup")->hide();
_aritems->findChild<QWidget*>("_printGroup")->hide();
_aritems->findChild<QRadioButton*>("_dueDate")->click();
_cctrans = new dspCreditCardTransactions(this, "_cctrans", Qt::Widget);
_creditCardTab->layout()->addWidget(_cctrans);
_cctrans->findChild<QWidget*>("_close")->hide();
_cctrans->findChild<QWidget*>("_customerSelector")->hide();
_cctrans->findChild<QWidget*>("_query")->hide();
_cctrans->findChild<QWidget*>("_alltrans")->hide();
_cctrans->findChild<QWidget*>("_pending")->hide();
_cctrans->findChild<QWidget*>("_processed")->hide();
_cctrans->findChild<XTreeWidget*>("_preauth")->hideColumn("type");
_cctrans->findChild<XTreeWidget*>("_preauth")->hideColumn("status");
connect(_query, SIGNAL(clicked()), this, SLOT(sFillList()));
connect(_newCashrcpt, SIGNAL(clicked()), this, SLOT(sNewCashrcpt()));
connect(_editCashrcpt, SIGNAL(clicked()), this, SLOT(sEditCashrcpt()));
connect(_viewCashrcpt, SIGNAL(clicked()), this, SLOT(sViewCashrcpt()));
connect(_deleteCashrcpt, SIGNAL(clicked()), this, SLOT(sDeleteCashrcpt()));
connect(_postCashrcpt, SIGNAL(clicked()), this, SLOT(sPostCashrcpt()));
connect(_cashrcpt, SIGNAL(populateMenu(QMenu*, QTreeWidgetItem*)),
this, SLOT(sPopulateCashRcptMenu(QMenu*)));
connect(_customerSelector, SIGNAL(newState(int)), this, SLOT(sClear()));
connect(_customerSelector, SIGNAL(newCustId(int)), this, SLOT(sClear()));
connect(_customerSelector, SIGNAL(newCustTypeId(int)), this, SLOT(sClear()));
connect(_customerSelector, SIGNAL(newTypePattern(QString)), this, SLOT(sClear()));
connect(_customerSelector, SIGNAL(newCustGroupId(int)), this, SLOT(sClear()));
connect(_customerSelector, SIGNAL(newState(int)),
_aritems->findChild<CustomerSelector*>("_customerSelector"), SLOT(setState(int)));
connect(_customerSelector, SIGNAL(newCustId(int)),
_aritems->findChild<CustomerSelector*>("_customerSelector"), SLOT(setCustId(int)));
connect(_customerSelector, SIGNAL(newCustTypeId(int)),
_aritems->findChild<CustomerSelector*>("_customerSelector"), SLOT(setCustTypeId(int)));
connect(_customerSelector, SIGNAL(newCustGroupId(int)),
_aritems->findChild<CustomerSelector*>("_customerSelector"), SLOT(setCustGroupId(int)));
connect(_customerSelector, SIGNAL(newTypePattern(QString)),
_aritems->findChild<CustomerSelector*>("_customerSelector"), SLOT(setTypePattern(QString)));
connect(_customerSelector, SIGNAL(newState(int)),
_cctrans->findChild<CustomerSelector*>("_customerSelector"), SLOT(setState(int)));
connect(_customerSelector, SIGNAL(newCustId(int)),
_cctrans->findChild<CustomerSelector*>("_customerSelector"), SLOT(setCustId(int)));
connect(_customerSelector, SIGNAL(newCustTypeId(int)),
_cctrans->findChild<CustomerSelector*>("_customerSelector"), SLOT(setCustTypeId(int)));
connect(_customerSelector, SIGNAL(newCustGroupId(int)),
_cctrans->findChild<CustomerSelector*>("_customerSelector"), SLOT(setCustGroupId(int)));
connect(_customerSelector, SIGNAL(newTypePattern(QString)),
_cctrans->findChild<CustomerSelector*>("_customerSelector"), SLOT(setTypePattern(QString)));
connect(_debits, SIGNAL(clicked()),
_aritems->findChild<QRadioButton*>("_debits"), SLOT(click()));
connect(_credits, SIGNAL(clicked()),
_aritems->findChild<QRadioButton*>("_credits"), SLOT(click()));
connect(_both, SIGNAL(clicked()),
_aritems->findChild<QRadioButton*>("_both"), SLOT(click()));
connect(_searchDocNum, SIGNAL(textChanged(const QString&)), this, SLOT(sSearchDocNumChanged()));
_cashrcpt->addColumn(tr("Cust. #"), _bigMoneyColumn, Qt::AlignLeft, true, "cust_number");
_cashrcpt->addColumn(tr("Name"), -1, Qt::AlignLeft, true, "cust_name");
_cashrcpt->addColumn(tr("Check/Doc. #"), _orderColumn, Qt::AlignLeft, true, "cashrcpt_docnumber");
_cashrcpt->addColumn(tr("Bank Account"), _orderColumn, Qt::AlignLeft, true, "bankaccnt_name");
_cashrcpt->addColumn(tr("Dist. Date"), _dateColumn, Qt::AlignCenter,true, "cashrcpt_distdate");
_cashrcpt->addColumn(tr("Funds Type"), _bigMoneyColumn, Qt::AlignCenter,true, "cashrcpt_fundstype");
_cashrcpt->addColumn(tr("Amount"), _bigMoneyColumn, Qt::AlignRight, true, "cashrcpt_amount");
_cashrcpt->addColumn(tr("Currency"), _currencyColumn, Qt::AlignLeft, true, "currabbr");
if (_privileges->check("MaintainCashReceipts"))
{
connect(_cashrcpt, SIGNAL(valid(bool)), _editCashrcpt, SLOT(setEnabled(bool)));
connect(_cashrcpt, SIGNAL(valid(bool)), _deleteCashrcpt, SLOT(setEnabled(bool)));
if (_privileges->check("PostCashReceipts"))
connect(_cashrcpt, SIGNAL(valid(bool)), _postCashrcpt, SLOT(setEnabled(bool)));
}
else
{
_newCashrcpt->setEnabled(FALSE);
connect(_cashrcpt, SIGNAL(itemSelected(int)), _viewCashrcpt, SLOT(animateClick()));
}
if(_privileges->check("PostCashReceipts"))
connect(_cashrcpt, SIGNAL(itemSelected(int)), _editCashrcpt, SLOT(animateClick()));
connect(omfgThis, SIGNAL(cashReceiptsUpdated(int, bool)), this, SLOT(sFillList()));
if (omfgThis->singleCurrency())
_cashrcpt->hideColumn(2);
if (!_metrics->boolean("CCAccept") || !_privileges->check("ProcessCreditCards"))
//.........这里部分代码省略.........
开发者ID:Dinesh-Ramakrishnan,项目名称:qt-client,代码行数:101,代码来源:arWorkBench.cpp
注:本文中的sFillList函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论