dspCountSlipEditList::dspCountSlipEditList(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, name, fl) { setupUi(this); connect(_print, SIGNAL(clicked()), this, SLOT(sPrint())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); connect(_cntslip, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*,QTreeWidgetItem*))); connect(_countTagList, SIGNAL(clicked()), this, SLOT(sCountTagList())); connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_postAll, SIGNAL(clicked()), this, SLOT(sPostAll())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); #ifndef Q_WS_MAC _countTagList->setMaximumWidth(25); #endif _item->setReadOnly(TRUE); _cntslip->addColumn(tr("User"), _dateColumn, Qt::AlignCenter,true, "user"); _cntslip->addColumn(tr("#"), _itemColumn, Qt::AlignLeft, true, "cntslip_number"); _cntslip->addColumn(tr("Location"),_itemColumn, Qt::AlignLeft, true, "locname"); _cntslip->addColumn(tr("Lot/Serial #"), -1, Qt::AlignLeft, true, "cntslip_lotserial"); _cntslip->addColumn(tr("Posted"), _ynColumn, Qt::AlignCenter,true, "cntslip_posted"); _cntslip->addColumn(tr("Entered"), _itemColumn, Qt::AlignCenter,true, "cntslip_entered"); _cntslip->addColumn(tr("Slip Qty."),_qtyColumn, Qt::AlignRight, true, "cntslip_qty"); if (_privileges->check("EnterCountSlips")) { connect(_cntslip, SIGNAL(valid(bool)), this, SLOT(sHandleButtons(bool))); connect(_item, SIGNAL(valid(bool)), _new, SLOT(setEnabled(bool))); }
dspBillingSelections::dspBillingSelections(QWidget* parent, const char* name, Qt::WindowFlags fl) : XWidget(parent, name, fl) { setupUi(this); connect(_close, SIGNAL(clicked()), this, SLOT(close())); connect(_cobill, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*,QTreeWidgetItem*))); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_cancel, SIGNAL(clicked()), this, SLOT(sCancel())); connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_postAll, SIGNAL(clicked()), this, SLOT(sPostAll())); connect(_cobill, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool))); connect(_cobill, SIGNAL(valid(bool)), _cancel, SLOT(setEnabled(bool))); connect(_cobill, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick())); connect(_print, SIGNAL(clicked()), this, SLOT(sPrint())); _cobill->addColumn(tr("Order #"), _orderColumn, Qt::AlignLeft, true, "cohead_number" ); _cobill->addColumn(tr("Cust. #"), _itemColumn, Qt::AlignLeft, true, "cust_number" ); _cobill->addColumn(tr("Name"), -1, Qt::AlignLeft, true, "cust_name" ); _cobill->addColumn(tr("Subtotal"), _moneyColumn, Qt::AlignLeft, false, "subtotal" ); _cobill->addColumn(tr("Misc."), _moneyColumn, Qt::AlignLeft, true, "cobmisc_misc" ); _cobill->addColumn(tr("Freight"), _moneyColumn, Qt::AlignLeft, true, "cobmisc_freight" ); _cobill->addColumn(tr("Tax"), _moneyColumn, Qt::AlignLeft, true, "cobmisc_tax" ); _cobill->addColumn(tr("Total"), _moneyColumn, Qt::AlignLeft, true, "total" ); _cobill->addColumn(tr("Payment Rec'd"), _bigMoneyColumn, Qt::AlignLeft, true, "cobmisc_payment" ); if (_privileges->check("PostARDocuments")) connect(_cobill, SIGNAL(valid(bool)), _post, SLOT(setEnabled(bool))); connect(omfgThis, SIGNAL(billingSelectionUpdated(int, int)), this, SLOT(sFillList())); sFillList(); }
/* * Constructs a dspCountSlipEditList as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * */ dspCountSlipEditList::dspCountSlipEditList(QWidget* parent, const char* name, Qt::WFlags fl) : QMainWindow(parent, name, fl) { setupUi(this); (void)statusBar(); // signals and slots connections connect(_print, SIGNAL(clicked()), this, SLOT(sPrint())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); connect(_cntslip, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*,QTreeWidgetItem*))); connect(_close, SIGNAL(clicked()), this, SLOT(close())); connect(_countTagList, SIGNAL(clicked()), this, SLOT(sCountTagList())); connect(_item, SIGNAL(warehouseIdChanged(int)), _warehouse, SLOT(setId(int))); connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_postAll, SIGNAL(clicked()), this, SLOT(sPostAll())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); #ifndef Q_WS_MAC _countTagList->setMaximumWidth(25); #endif _item->setReadOnly(TRUE); _cntslip->addColumn(tr("User"), _dateColumn, Qt::AlignCenter ); _cntslip->addColumn(tr("#"), _itemColumn, Qt::AlignLeft ); _cntslip->addColumn(tr("Location"), _itemColumn, Qt::AlignLeft ); _cntslip->addColumn(tr("Lot/Serial #"), -1, Qt::AlignLeft ); _cntslip->addColumn(tr("Posted"), _ynColumn, Qt::AlignCenter ); _cntslip->addColumn(tr("Entered"), _itemColumn, Qt::AlignCenter ); _cntslip->addColumn(tr("Slip Qty."), _qtyColumn, Qt::AlignRight ); if (_privleges->check("EnterCountSlips")) { connect(_cntslip, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool))); connect(_item, SIGNAL(valid(bool)), _new, SLOT(setEnabled(bool))); connect(_cntslip, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick())); } if (_privleges->check("DeleteCountSlips")) connect(_cntslip, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool))); if (_privleges->check("PostCountSlips")) { connect(_cntslip, SIGNAL(valid(bool)), _post, SLOT(setEnabled(bool))); _postAll->setEnabled(TRUE); } //If not multi-warehouse hide whs control if (!_metrics->boolean("MultiWhs")) { _warehouseLit->hide(); _warehouse->hide(); } }