/* * Constructs a voucheringEditList as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * */ voucheringEditList::voucheringEditList(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(_vo, SIGNAL(populateMenu(QMenu *, QTreeWidgetItem *)), this, SLOT(sPopulateMenu(QMenu*,QTreeWidgetItem*))); connect(_close, SIGNAL(clicked()), this, SLOT(close())); statusBar()->hide(); _vo->setRootIsDecorated(TRUE); _vo->addColumn(tr("Vchr. #"), (_orderColumn + _vo->indentation()), Qt::AlignRight ); _vo->addColumn(tr("P/O #"), _orderColumn, Qt::AlignRight ); _vo->addColumn(tr("Invc./Item #"), _itemColumn, Qt::AlignRight ); _vo->addColumn(tr("Vendor #"), _itemColumn, Qt::AlignRight ); _vo->addColumn(tr("Name/Description"), -1, Qt::AlignLeft ); _vo->addColumn(tr("Vend. Type"), _itemColumn, Qt::AlignLeft ); _vo->addColumn(tr("UOM"), _uomColumn, Qt::AlignCenter ); _vo->addColumn(tr("Qty. Vchrd."), _qtyColumn, Qt::AlignRight ); _vo->addColumn(tr("Cost"), _moneyColumn, Qt::AlignRight ); connect(omfgThis, SIGNAL(vouchersUpdated()), this, SLOT(sFillList())); sFillList(); }
openVouchers::openVouchers(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, name, fl) { setupUi(this); // (void)statusBar(); connect(_vendorgroup, SIGNAL(updated()), this, SLOT(sFillList())); connect(_print, SIGNAL(clicked()), this, SLOT(sPrint())); connect(_vohead, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*)), this, SLOT(sPopulateMenu(QMenu*))); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_view, SIGNAL(clicked()), this, SLOT(sView())); connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_newMisc, SIGNAL(clicked()), this, SLOT(sNewMisc())); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); _vohead->addColumn(tr("Vchr. #"), _orderColumn, Qt::AlignRight, true, "vohead_number" ); _vohead->addColumn(tr("P/O #"), _orderColumn, Qt::AlignRight, true, "ponumber" ); _vohead->addColumn(tr("Vendor"), -1, Qt::AlignLeft, true, "vendor" ); _vohead->addColumn(tr("Vend. Type"), _itemColumn, Qt::AlignLeft, true, "vendtype_code" ); _vohead->addColumn(tr("Vendor Invc. #"), _itemColumn, Qt::AlignRight, true, "vohead_invcnumber" ); _vohead->addColumn(tr("Dist. Date"), _dateColumn, Qt::AlignCenter, true, "vohead_distdate" ); _vohead->addColumn(tr("G/L Post Date"), _dateColumn, Qt::AlignCenter, true, "postdate" ); _vohead->addColumn(tr("Amount"), _moneyColumn, Qt::AlignRight, true, "vohead_amount" ); if (! _privileges->check("ChangeVOPostDate")) _vohead->hideColumn(6); if (_privileges->check("MaintainVouchers")) { connect(_vohead, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool))); connect(_vohead, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool))); connect(_vohead, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick())); } else { _new->setEnabled(FALSE); _newMisc->setEnabled(FALSE); connect(_vohead, SIGNAL(itemSelected(int)), _view, SLOT(animateClick())); } if (_privileges->check("PostVouchers")) connect(_vohead, SIGNAL(valid(bool)), _post, SLOT(setEnabled(bool))); connect(omfgThis, SIGNAL(vouchersUpdated()), this, SLOT(sFillList())); sFillList(); }
voucheringEditList::voucheringEditList(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, name, fl) { setupUi(this); connect(_print, SIGNAL(clicked()), this, SLOT(sPrint())); connect(_vo, SIGNAL(populateMenu(QMenu *, QTreeWidgetItem *)), this, SLOT(sPopulateMenu(QMenu*,QTreeWidgetItem*))); _vo->setRootIsDecorated(TRUE); _vo->addColumn(tr("Vchr. #"), _orderColumn + _vo->indentation(), Qt::AlignRight, true, "vouchernumber" ); _vo->addColumn(tr("P/O #"), _orderColumn, Qt::AlignRight, true, "ponumber"); _vo->addColumn(tr("Invc./Item #"), _itemColumn, Qt::AlignRight, true, "itemnumber"); _vo->addColumn(tr("Vendor #"), _itemColumn, Qt::AlignRight, true, "vendnumber"); _vo->addColumn(tr("Name/Description"), -1, Qt::AlignLeft, true, "description"); _vo->addColumn(tr("Vend. Type"), _itemColumn, Qt::AlignLeft, true, "itemtype"); _vo->addColumn(tr("UOM"), _uomColumn, Qt::AlignCenter,true, "iteminvuom"); _vo->addColumn(tr("Qty. Vchrd."), _qtyColumn, Qt::AlignRight, true, "f_qty"); _vo->addColumn(tr("Cost"), _moneyColumn, Qt::AlignRight, true, "cost"); connect(omfgThis, SIGNAL(vouchersUpdated()), this, SLOT(sFillList())); sFillList(); }