void unpostedGlSeries::sPopulateMenu(QMenu *pMenu) { int menuItem; menuItem = pMenu->insertItem(tr("Edit G/L Series..."), this, SLOT(sEdit())); menuItem = pMenu->insertItem(tr("View G/L Series..."), this, SLOT(sView())); menuItem = pMenu->insertItem(tr("Delete G/L Series..."),this, SLOT(sDelete())); pMenu->insertSeparator(); menuItem = pMenu->insertItem(tr("Post G/L Series..."), this, SLOT(sPost())); pMenu->insertSeparator(); }
checkFormats::checkFormats(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, name, fl) { setupUi(this); connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); _form->addColumn(tr("Name"), _itemColumn, Qt::AlignLeft, true, "form_name"); _form->addColumn(tr("Description"), -1, Qt::AlignLeft, true, "form_descrip"); sFillList(); }
creditMemo::creditMemo(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, name, fl) { setupUi(this); connect(_memoNumber, SIGNAL(lostFocus()), this, SLOT(sCheckCreditMemoNumber())); connect(_copyToShipto, SIGNAL(clicked()), this, SLOT(sCopyToShipto())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_invoiceList, SIGNAL(clicked()), this, SLOT(sInvoiceList())); connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_shipToNumber, SIGNAL(lostFocus()), this, SLOT(sParseShipToNumber())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_shipToList, SIGNAL(clicked()), this, SLOT(sShipToList())); connect(_taxLit, SIGNAL(leftClickedURL(const QString&)), this, SLOT(sTaxDetail())); connect(_subtotal, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_tax, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_miscCharge, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_freight, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_freight, SIGNAL(valueChanged()), this, SLOT(sFreightChanged())); connect(_taxauth, SIGNAL(newID(int)), this, SLOT(sTaxAuthChanged())); #ifndef Q_WS_MAC _invoiceList->setMaximumWidth(25); _shipToList->setMaximumWidth(25); #endif _taxcurrid = -1; _custtaxauthid = -1; _taxauthidCache = -1; _taxCache.clear(); _shiptoid = -1; _memoNumber->setValidator(omfgThis->orderVal()); _commission->setValidator(omfgThis->scrapVal()); _currency->setLabel(_currencyLit); _cmitem->addColumn(tr("#"), _seqColumn, Qt::AlignCenter, true, "cmitem_linenumber" ); _cmitem->addColumn(tr("Item"), _itemColumn, Qt::AlignLeft, true, "item_number" ); _cmitem->addColumn(tr("Description"), -1, Qt::AlignLeft, true, "description" ); _cmitem->addColumn(tr("Site"), _whsColumn, Qt::AlignCenter, true, "warehous_code" ); _cmitem->addColumn(tr("Qty UOM"), _uomColumn, Qt::AlignLeft, true, "qtyuom" ); _cmitem->addColumn(tr("Returned"), _qtyColumn, Qt::AlignRight, true, "cmitem_qtyreturned" ); _cmitem->addColumn(tr("Credited"), _qtyColumn, Qt::AlignRight, true, "cmitem_qtycredit" ); _cmitem->addColumn(tr("Price UOM"), _uomColumn, Qt::AlignLeft, true, "priceuom" ); _cmitem->addColumn(tr("Price"), _priceColumn, Qt::AlignRight, true, "cmitem_unitprice" ); _cmitem->addColumn(tr("Extended"), _moneyColumn, Qt::AlignRight, true, "extprice" ); }
void projects::sPopulateMenu(Q3PopupMenu *pMenu) { int menuItem; pMenu->insertItem("View...", this, SLOT(sView()), 0); menuItem = pMenu->insertItem("Edit...", this, SLOT(sEdit()), 0); if (!_privleges->check("MaintainProjects")) pMenu->setItemEnabled(menuItem, FALSE); menuItem = pMenu->insertItem("Delete...", this, SLOT(sDelete()), 0); if (!_privleges->check("MaintainProjects")) pMenu->setItemEnabled(menuItem, FALSE); }
customerGroup::customerGroup(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_close, SIGNAL(clicked()), this, SLOT(sClose())); connect(_name, SIGNAL(lostFocus()), this, SLOT(sCheck())); _custgrpitem->addColumn(tr("Number"), _itemColumn, Qt::AlignLeft, true, "cust_number"); _custgrpitem->addColumn(tr("Name"), -1, Qt::AlignLeft, true, "cust_name"); }
/* * Constructs a ReportParameterList as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * true to construct a modal dialog. */ ReportParameterList::ReportParameterList(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : QDialog(parent, name, modal, fl) { setupUi(this); // signals and slots connections connect(_btnClose, SIGNAL(clicked()), this, SLOT(accept())); connect(_btnAdd, SIGNAL(clicked()), this, SLOT(sAdd())); connect(_btnEdit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_btnDelete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_lbParameters, SIGNAL(doubleClicked(Q3ListBoxItem*)), this, SLOT(sEdit(Q3ListBoxItem*))); init(); }
void incidentPriorities::sPopulateMenu( Q3PopupMenu *pMenu) { int menuItem; menuItem = pMenu->insertItem(tr("Edit..."), this, SLOT(sEdit()), 0); if (!_privleges->check("MaintainIncidentPriorities")) pMenu->setItemEnabled(menuItem, FALSE); pMenu->insertItem(tr("View..."), this, SLOT(sView()), 0); menuItem = pMenu->insertItem(tr("Delete"), this, SLOT(sDelete()), 0); if (!_privleges->check("MaintainIncidentPriorities")) pMenu->setItemEnabled(menuItem, FALSE); }
void departments::sPopulateMenu(QMenu *pMenu ) { QAction *menuItem; menuItem = pMenu->addAction(tr("Edit"), this, SLOT(sEdit())); menuItem->setEnabled(_privileges->check("MaintainDepartments")); menuItem = pMenu->addAction(tr("View"), this, SLOT(sView())); menuItem->setEnabled(_privileges->check("ViewDepartments") || _privileges->check("MaintainDepartments")); menuItem = pMenu->addAction(tr("Delete"), this, SLOT(sDelete())); menuItem->setEnabled(_privileges->check("MaintainDepartments")); }
calendars::calendars(QWidget* parent, const char* name, Qt::WindowFlags fl) : XWidget(parent, name, fl) { setupUi(this); connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); _calhead->addColumn(tr("Name"), _itemColumn, Qt::AlignLeft, true, "calhead_name"); _calhead->addColumn(tr("Description"), -1, Qt::AlignLeft, true, "calhead_descrip"); sFillList(); }
dspCountTagEditList::dspCountTagEditList(QWidget* parent, const char* name, Qt::WindowFlags fl) : XWidget(parent, name, fl) { setupUi(this); _highlightGroupInt = new QButtonGroup(this); _highlightGroupInt->addButton(_noHighlight); _highlightGroupInt->addButton(_highlightValue); _highlightGroupInt->addButton(_highlightPercent); _codeGroup = new QButtonGroup(this); _codeGroup->addButton(_plancode); _codeGroup->addButton(_classcode); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_showSlips, SIGNAL(clicked()), this, SLOT(sToggleList())); connect(_enterSlip, SIGNAL(clicked()), this, SLOT(sEnterCountSlip())); connect(_cnttag, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*)), this, SLOT(sPopulateMenu(QMenu*,QTreeWidgetItem*))); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); connect(_print, SIGNAL(clicked()), this, SLOT(sPrint())); connect(_searchFor, SIGNAL(textChanged(const QString&)), this, SLOT(sSearch(const QString&))); connect(_autoUpdate, SIGNAL(toggled(bool)), this, SLOT(sHandleAutoUpdate(bool))); connect(_query, SIGNAL(clicked()), this, SLOT(sFillList())); connect(_codeGroup, SIGNAL(buttonClicked(int)), this, SLOT(sParameterTypeChanged())); _parameter->setType(ParameterGroup::ClassCode); _variancePercent->setValidator(omfgThis->percentVal()); _cnttag->setRootIsDecorated(true); _cnttag->addColumn(tr("Pri."), (_whsColumn + 10), Qt::AlignCenter,true, "invcnt_priority"); _cnttag->addColumn(tr("Tag/Slip #"),_orderColumn, Qt::AlignRight, true, "tagnumber"); _cnttag->addColumn(tr("Tag Date"), _dateColumn, Qt::AlignCenter,true, "tagdate"); _cnttag->addColumn(tr("Item Number"),_itemColumn, Qt::AlignLeft, true, "item_number"); _cnttag->addColumn(tr("Description"), -1, Qt::AlignLeft, true, "item_descrip"); _cnttag->addColumn(tr("Site"), _whsColumn, Qt::AlignCenter,true, "warehous_code"); _cnttag->addColumn(tr("Location"), _ynColumn, Qt::AlignCenter,true, "loc_specific"); _cnttag->addColumn(tr("QOH"), _qtyColumn, Qt::AlignRight, true, "qoh"); _cnttag->addColumn(tr("Count Qty."), _qtyColumn, Qt::AlignRight, true, "qohafter"); _cnttag->addColumn(tr("Variance"), _qtyColumn, Qt::AlignRight, true, "variance"); _cnttag->addColumn(tr("%"), _prcntColumn, Qt::AlignRight, true, "varianceprcnt"); _cnttag->addColumn(tr("Amount"), _costColumn, Qt::AlignRight, true, "variancecost"); _cnttag->setIndentation(10); if (_privileges->check("EnterCountTags")) { connect(_cnttag, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick())); connect(_cnttag, SIGNAL(valid(bool)), this, SLOT(sHandleButtons(bool))); }
itemSource::itemSource(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); connect(_add, SIGNAL(clicked()), this, SLOT(sAdd())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_vendorList, SIGNAL(clicked()), this, SLOT(sVendorList())); connect(_vendor, SIGNAL(nameChanged(const QString&)), _vendorName, SLOT(setText(const QString&))); connect(_close, SIGNAL(clicked()), this, SLOT(sClose())); connect(_vendorCurrency, SIGNAL(newID(int)), this, SLOT(sFillPriceList())); connect(_vendor, SIGNAL(newId(int)), this, SLOT(sVendorChanged(int))); _item->setType(ItemLineEdit::cGeneralPurchased | ItemLineEdit::cGeneralManufactured); _item->setDefaultType(ItemLineEdit::cGeneralPurchased); #ifndef Q_WS_MAC _vendorList->setMaximumWidth(25); #endif _captive = false; QString base; q.exec("SELECT currConcat(baseCurrID()) AS base;"); if (q.first()) base = q.value("base").toString(); else base = tr("Base"); _itemsrcp->addColumn(tr("Qty Break"), _qtyColumn, Qt::AlignRight,true, "itemsrcp_qtybreak"); _itemsrcp->addColumn(tr("Unit Price"), -1, Qt::AlignRight,true, "itemsrcp_price"); _itemsrcp->addColumn(tr("Currency"), _currencyColumn, Qt::AlignLeft, true, "currabbr"); _itemsrcp->addColumn(tr("Unit Price\n(%1)").arg(base),_moneyColumn, Qt::AlignRight,true, "itemsrcp_price_base"); if (omfgThis->singleCurrency()) { _itemsrcp->hideColumn(1); _itemsrcp->hideColumn(2); _itemsrcp->headerItem()->setText(3, tr("Unit Price")); } _invVendorUOMRatio->setValidator(omfgThis->ratioVal()); _minOrderQty->setValidator(omfgThis->qtyVal()); _multOrderQty->setValidator(omfgThis->qtyVal()); _vendorCurrency->setType(XComboBox::Currencies); _vendorCurrency->setLabel(_vendorCurrencyLit); }
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(); }
ReportParameterList::ReportParameterList(QWidget* parent, Qt::WindowFlags fl) : QDialog(parent, fl) { setupUi(this); // signals and slots connections connect(_btnClose, SIGNAL(clicked()), this, SLOT(accept())); connect(_btnAdd, SIGNAL(clicked()), this, SLOT(sAdd())); connect(_btnEdit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_btnDelete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_lbParameters, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(sEdit(QListWidgetItem*))); _map = 0; }
void currencies::sPopulateMenu(QMenu* pMenu) { QAction *menuItem; menuItem = pMenu->addAction(tr("View...")); connect(menuItem, SIGNAL(triggered()), this, SLOT(sView())); menuItem = pMenu->addAction(tr("Edit...")); connect(menuItem, SIGNAL(triggered()), this, SLOT(sEdit())); menuItem->setEnabled(_privileges->check("MaintainCurrencies")); menuItem = pMenu->addAction(tr("Delete...")); connect(menuItem, SIGNAL(triggered()), this, SLOT(sDelete())); menuItem->setEnabled(_privileges->check("MaintainCurrencies")); }
/* * Constructs a itemGroup as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * */ itemGroup::itemGroup(QWidget* parent, const char* name, Qt::WFlags fl) : QMainWindow(parent, name, fl) { setupUi(this); (void)statusBar(); // signals and slots connections connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_close, SIGNAL(clicked()), this, SLOT(sClose())); connect(_name, SIGNAL(lostFocus()), this, SLOT(sCheck())); init(); }
void dspPurchaseReqsByItem::sPopulateMenu(QMenu *pMenu, QTreeWidgetItem *, int) { QAction *menuItem; menuItem = pMenu->addAction(tr("Running Availability..."), this, SLOT(sDspRunningAvailability())); menuItem->setEnabled(_privileges->check("ViewInventoryAvailability")); pMenu->addSeparator(); menuItem = pMenu->addAction(tr("Release P/R..."), this, SLOT(sRelease())); menuItem->setEnabled(_privileges->check("MaintainPurchaseOrders")); menuItem = pMenu->addAction(tr("Delete P/R..."), this, SLOT(sDelete())); menuItem->setEnabled(_privileges->check("MaintainPurchaseRequests")); }
void packages::sPopulateMenu(QMenu *pMenu) { int menuItem; menuItem = pMenu->insertItem(tr("View..."), this, SLOT(sView()), 0); pMenu->setItemEnabled(menuItem, package::userHasPriv(cView)); menuItem = pMenu->insertItem(tr("Delete"), this, SLOT(sDelete()), 0); pMenu->setItemEnabled(menuItem, package::userHasPriv(cNew)); menuItem = pMenu->insertItem(tr("Enable"), this, SLOT(sEnable()), 0); pMenu->setItemEnabled(menuItem, package::userHasPriv(cNew)); menuItem = pMenu->insertItem(tr("Disable"), this, SLOT(sDisable()), 0); pMenu->setItemEnabled(menuItem, package::userHasPriv(cNew)); }
/* * Constructs a itemGroups as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * */ itemGroups::itemGroups(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, name, fl) { setupUi(this); // (void)statusBar(); // signals and slots connections connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_close, SIGNAL(clicked()), this, SLOT(close())); connect(_view, SIGNAL(clicked()), this, SLOT(sView())); connect(_itemgrp, SIGNAL(valid(bool)), _view, SLOT(setEnabled(bool))); init(); }
/* * Constructs a deleteWoMaterialItem as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * true to construct a modal dialog. */ deleteWoMaterialItem::deleteWoMaterialItem(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : QDialog(parent, name, modal, fl) { setupUi(this); // signals and slots connections connect(_womatl, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool))); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_wo, SIGNAL(newId(int)), _womatl, SLOT(setWoid(int))); connect(_close, SIGNAL(clicked()), this, SLOT(reject())); _captive = FALSE; _wo->setType(cWoExploded | cWoIssued | cWoReleased); }
void salesReps::sPopulateMenu( QMenu * menu ) { QAction *menuItem; menuItem = menu->addAction(tr("Edit Sales Rep..."), this, SLOT(sEdit())); if (!_privileges->check("MaintainSalesReps")) menuItem->setEnabled(FALSE); menuItem = menu->addAction(tr("View Sales Rep..."), this, SLOT(sView())); if ((!_privileges->check("MaintainSalesReps")) && (!_privileges->check("ViewSalesReps"))) menuItem->setEnabled(FALSE); menuItem = menu->addAction(tr("Delete Sales Rep..."), this, SLOT(sDelete())); if (!_privileges->check("MaintainSalesReps")) menuItem->setEnabled(FALSE); }
customCommands::customCommands(QWidget* parent, const char* name, Qt::WFlags fl) : XMainWindow(parent, name, fl) { setupUi(this); (void)statusBar(); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); _commands->addColumn(tr("Module"), _itemColumn, Qt::AlignCenter ); _commands->addColumn(tr("Menu Label"), -1, Qt::AlignLeft ); sFillList(); }
void vendors::sPopulateMenu(QMenu *menuThis) { int intMenuItem; intMenuItem = menuThis->insertItem(tr("Edit Vendor..."), this, SLOT(sEdit()), 0); if (!_privileges->check("MaintainVendors")) menuThis->setItemEnabled(intMenuItem, FALSE); intMenuItem = menuThis->insertItem(tr("View Vendor..."), this, SLOT(sView()), 0); if ((!_privileges->check("MaintainVendors")) && (!_privileges->check("ViewVendors"))) menuThis->setItemEnabled(intMenuItem, FALSE); intMenuItem = menuThis->insertItem(tr("Delete Vendor..."), this, SLOT(sDelete()), 0); if (!_privileges->check("MaintainVendors")) menuThis->setItemEnabled(intMenuItem, FALSE); }
void siteTypes::sPopulateMenu(QMenu *menu) { int menuItem; menuItem = menu->insertItem(tr("Edit Site Type..."), this, SLOT(sEdit()), 0); if (!_privileges->check("MaintainSiteTypes")) menu->setItemEnabled(menuItem, FALSE); menuItem = menu->insertItem(tr("View Site Type..."), this, SLOT(sView()), 0); if ((!_privileges->check("MaintainSiteTypes")) && (!_privileges->check("ViewSiteTypes"))) menu->setItemEnabled(menuItem, FALSE); menuItem = menu->insertItem(tr("Delete Site Type..."), this, SLOT(sDelete()), 0); if (!_privileges->check("MaintainSiteTypes")) menu->setItemEnabled(menuItem, FALSE); }
/* * Constructs a shippingForms as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * */ shippingForms::shippingForms(QWidget* parent, const char* name, Qt::WFlags fl) : XMainWindow(parent, name, fl) { setupUi(this); (void)statusBar(); // signals and slots connections connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_view, SIGNAL(clicked()), this, SLOT(sView())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_close, SIGNAL(clicked()), this, SLOT(close())); connect(_bolformat, SIGNAL(valid(bool)), _view, SLOT(setEnabled(bool))); init(); }
accountNumbers::accountNumbers(QWidget* parent, const char* name, Qt::WFlags fl) : XMainWindow(parent, name, fl) { setupUi(this); (void)statusBar(); connect(_print, SIGNAL(clicked()), this, SLOT(sPrint())); connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); sBuildList(); connect(omfgThis, SIGNAL(configureGLUpdated()), this, SLOT(sBuildList())); }
void itemSources::sPopulateMenu(Q3PopupMenu *menuThis) { int intMenuItem; intMenuItem = menuThis->insertItem(tr("Edit Item Source..."), this, SLOT(sEdit()), 0); if (!_privleges->check("MaintainItemSource")) menuThis->setItemEnabled(intMenuItem, FALSE); intMenuItem = menuThis->insertItem(tr("View Item Source..."), this, SLOT(sView()), 0); if ((!_privleges->check("MaintainItemSource")) && (!_privleges->check("ViewItemSource"))) menuThis->setItemEnabled(intMenuItem, FALSE); intMenuItem = menuThis->insertItem(tr("Delete Item Source..."), this, SLOT(sDelete()), 0); if (!_privleges->check("MaintainItemSource")) menuThis->setItemEnabled(intMenuItem, FALSE); }
commentTypes::commentTypes(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, name, fl) { setupUi(this); connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_cmnttype, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), this, SLOT(sHandleButtons())); _cmnttype->addColumn(tr("Name"), _itemColumn, Qt::AlignLeft, true, "cmnttype_name"); _cmnttype->addColumn(tr("Sys."), _ynColumn, Qt::AlignCenter,true, "cmnttype_sys"); _cmnttype->addColumn(tr("Description"), -1, Qt::AlignLeft, true, "cmnttype_descrip"); sFillList(); }
sBool sMiniFTPServer::Run(sThread *t) { RequestHandler handler = Handler; if(!HostSocket.IsConnected() || !handler) return sFALSE; while(HostSocket.IsConnected() && (!t || t->CheckTerminate())) { // wait for something to happen sTCPSocket *newconn; if(HostSocket.WaitForNewConnection(newconn,100) && newconn) { // "garbage collect" dropped connections Connection *c, *next; for(c=ConnList.GetHead(); !ConnList.IsEnd(c); c=next) { next = ConnList.GetNext(c); if(!c->Socket->IsConnected()) { sDelete(c->Thread); HostSocket.CloseConnection(c->Socket); ConnList.Rem(c); FreeList.AddTail(c); } } // add the new connection if(!FreeList.IsEmpty()) { c = FreeList.RemHead(); sSetMem(c,0,sizeof(Connection)); c->Socket = newconn; c->Handler = handler; c->OnlyFullFiles = OnlyFullFiles; ConnList.AddTail(c); c->Thread = new sThread(ClientThreadFunc,0,32768,c); } else { sLogF(L"MiniFTP",L"Out of connections!\n"); HostSocket.CloseConnection(newconn); } } } return sTRUE; }
quotes::quotes(QWidget* parent, const char* name, Qt::WFlags fl) : QMainWindow(parent, name, fl) { setupUi(this); connect(_quote, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*)), this, SLOT(sPopulateMenu(QMenu*))); connect(_convert, SIGNAL(clicked()), this, SLOT(sConvert())); connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_view, SIGNAL(clicked()), this, SLOT(sView())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_print, SIGNAL(clicked()), this, SLOT(sPrint())); connect(_showProspects, SIGNAL(toggled(bool)), this, SLOT(sFillList())); connect(_warehouse, SIGNAL(updated()), this, SLOT(sFillList())); _quote->addColumn(tr("Quote #"), _orderColumn, Qt::AlignRight ); _quote->addColumn(tr("Customer"), -1, Qt::AlignLeft ); _quote->addColumn(tr("P/O Number"), _itemColumn, Qt::AlignLeft ); _quote->addColumn(tr("Quote Date"), _dateColumn, Qt::AlignCenter ); _quote->setSelectionMode(QAbstractItemView::ExtendedSelection); if (_privleges->check("PrintQuotes")) connect(_quote, SIGNAL(valid(bool)), _print, SLOT(setEnabled(bool))); if (_privleges->check("ConvertQuotes")) connect(_quote, SIGNAL(valid(bool)), _convert, SLOT(setEnabled(bool))); if (_privleges->check("MaintainQuotes")) { connect(_quote, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool))); connect(_quote, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool))); connect(_quote, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick())); } else { _new->setEnabled(FALSE); connect(_quote, SIGNAL(itemSelected(int)), _view, SLOT(animateClick())); } connect(omfgThis, SIGNAL(quotesUpdated(int, bool)), this, SLOT(sFillList())); Preferences _pref = Preferences(omfgThis->username()); if (_pref.boolean("XCheckBox/forgetful")) _showProspects->setChecked(true); sFillList(); }
/* * Constructs a forms as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * */ forms::forms(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, name, fl) { setupUi(this); // (void)statusBar(); // signals and slots connections connect(_form, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool))); connect(_form, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick())); connect(_form, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool))); connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_close, SIGNAL(clicked()), this, SLOT(close())); init(); }