vendor::vendor(QWidget* parent, const char* name, Qt::WFlags fl) : XMainWindow(parent, name, fl) { setupUi(this); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_printAddresses, SIGNAL(clicked()), this, SLOT(sPrintAddresses())); connect(_newAddress, SIGNAL(clicked()), this, SLOT(sNewAddress())); connect(_editAddress, SIGNAL(clicked()), this, SLOT(sEditAddress())); connect(_viewAddress, SIGNAL(clicked()), this, SLOT(sViewAddress())); connect(_deleteAddress, SIGNAL(clicked()), this, SLOT(sDeleteAddress())); connect(_deleteTaxreg, SIGNAL(clicked()), this, SLOT(sDeleteTaxreg())); connect(_editTaxreg, SIGNAL(clicked()), this, SLOT(sEditTaxreg())); connect(_newTaxreg, SIGNAL(clicked()), this, SLOT(sNewTaxreg())); connect(_viewTaxreg, SIGNAL(clicked()), this, SLOT(sViewTaxreg())); connect(_next, SIGNAL(clicked()), this, SLOT(sNext())); connect(_previous, SIGNAL(clicked()), this, SLOT(sPrevious())); _defaultCurr->setLabel(_defaultCurrLit); _vendaddr->addColumn(tr("Number"), 70, Qt::AlignLeft ); _vendaddr->addColumn(tr("Name"), 150, Qt::AlignLeft ); _vendaddr->addColumn(tr("City, State, Zip"), -1, Qt::AlignLeft ); _taxreg->addColumn(tr("Tax Authority"), 100, Qt::AlignLeft ); _taxreg->addColumn(tr("Registration #"), -1, Qt::AlignLeft ); _crmacctid = -1; _ignoreClose = false; _NumberGen = -1; if (!_metrics->boolean("EnableBatchManager")) _tabs->removePage(_tabs->page(_tabs->count()-1)); }
registration::registration(QWidget* parent, const char * name, Qt::WindowFlags fl) : XDialog(parent, name, fl) { setupUi(this); connect(_back, SIGNAL(clicked()), this, SLOT(sBack())); connect(_cancel, SIGNAL(clicked()), this, SLOT(sCancel())); connect(_next, SIGNAL(clicked()), this, SLOT(sNext())); connect(_register, SIGNAL(clicked()), this, SLOT(sRegister())); connect(_contact, SIGNAL(changed()), this, SLOT(sCheck())); connect(_username, SIGNAL(editingFinished()), this, SLOT(sCheck())); _next->setEnabled(false); _postreq = 0; _userchk = 0; _contact->setAccountVisible(false); _contact->setActiveVisible(false); _contact->setInitialsVisible(false); _contact->setMinimalLayout(true); if (_metrics->value("Registered") == "Yes") _weaskLit->setText(tr("<p><i>It seems you or someone else using this " "same database have already registered with " "xTuple.</i> You can fill out this window and send " "us registration information again, perhaps to " "register another user, or click the %1 button.") .arg(_later->text())); }
BindingSitePage::BindingSitePage(QWidget *parent) : QWidget(parent) { QGroupBox *packageGroup = new QGroupBox(tr("Binding Site")); QLabel *xLabel=new QLabel( tr("center x:") ); xEdit=new QLineEdit; QLabel *yLabel=new QLabel( tr("y:") ); yEdit=new QLineEdit; QLabel *zLabel=new QLabel( tr("z:") ); zEdit=new QLineEdit; QHBoxLayout *centerLayout = new QHBoxLayout; centerLayout->addWidget(xLabel); centerLayout->addWidget(xEdit); centerLayout->addWidget(yLabel); centerLayout->addWidget(yEdit); centerLayout->addWidget(zLabel); centerLayout->addWidget(zEdit); QLabel *rLabel=new QLabel(tr("radius:")); rEdit=new QLineEdit; QHBoxLayout *rLayout = new QHBoxLayout; rLayout->addWidget(rLabel); rLayout->addWidget(rEdit); QPushButton *updateButton = new QPushButton(tr("view binding site")); connect(updateButton, SIGNAL(clicked()), this, SLOT(getData()) ); QVBoxLayout *packageLayout = new QVBoxLayout; packageLayout->addLayout(centerLayout); packageLayout->addLayout(rLayout); packageGroup->setLayout(packageLayout); QPushButton *previousButton = new QPushButton(tr("Previous")); connect(previousButton, SIGNAL(clicked()), this, SLOT(sPrevious())); QPushButton *nextButton = new QPushButton(tr("Next")); connect(nextButton, SIGNAL(clicked()), this, SLOT(sNext())); QHBoxLayout *buttonsLayout = new QHBoxLayout; buttonsLayout->addStretch(1); buttonsLayout->addWidget(previousButton); buttonsLayout->addWidget(nextButton); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(packageGroup); mainLayout->addWidget(updateButton); mainLayout->addStretch(12); mainLayout->addLayout(buttonsLayout); setLayout(mainLayout); }
vendor::vendor(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, name, fl) { setupUi(this); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_printAddresses, SIGNAL(clicked()), this, SLOT(sPrintAddresses())); connect(_newAddress, SIGNAL(clicked()), this, SLOT(sNewAddress())); connect(_editAddress, SIGNAL(clicked()), this, SLOT(sEditAddress())); connect(_viewAddress, SIGNAL(clicked()), this, SLOT(sViewAddress())); connect(_deleteAddress, SIGNAL(clicked()), this, SLOT(sDeleteAddress())); connect(_deleteTaxreg, SIGNAL(clicked()), this, SLOT(sDeleteTaxreg())); connect(_editTaxreg, SIGNAL(clicked()), this, SLOT(sEditTaxreg())); connect(_newTaxreg, SIGNAL(clicked()), this, SLOT(sNewTaxreg())); connect(_viewTaxreg, SIGNAL(clicked()), this, SLOT(sViewTaxreg())); connect(_next, SIGNAL(clicked()), this, SLOT(sNext())); connect(_previous, SIGNAL(clicked()), this, SLOT(sPrevious())); connect(_mainButton, SIGNAL(clicked()), this, SLOT(sHandleButtons())); connect(_altButton, SIGNAL(clicked()), this, SLOT(sHandleButtons())); _defaultCurr->setLabel(_defaultCurrLit); _routingNumber->setValidator(new QIntValidator(100000000, 999999999, this)); _achAccountNumber->setValidator(new QRegExpValidator(QRegExp("^\\d{4,17}$"), this)); _vendaddr->addColumn(tr("Number"), 70, Qt::AlignLeft, true, "vendaddr_code"); _vendaddr->addColumn(tr("Name"), 50, Qt::AlignLeft, true, "vendaddr_name"); _vendaddr->addColumn(tr("City"), -1, Qt::AlignLeft, true, "vendaddr_city"); _vendaddr->addColumn(tr("State"), -1, Qt::AlignLeft, true, "vendaddr_state"); _vendaddr->addColumn(tr("Country"),-1, Qt::AlignLeft, true, "vendaddr_country"); _vendaddr->addColumn(tr("Postal Code"),-1, Qt::AlignLeft, true, "vendaddr_zipcode"); _taxreg->addColumn(tr("Tax Authority"), 100, Qt::AlignLeft, true, "taxauth_code"); _taxreg->addColumn(tr("Registration #"), -1, Qt::AlignLeft, true, "taxreg_number"); _crmacctid = -1; _ignoreClose = false; _NumberGen = -1; if (_metrics->boolean("EnableBatchManager") && ! _metrics->boolean("ACHEnabled")) _transmitTabGroup->removeTab(_transmitTabGroup->indexOf(_checksTab)); else if (! _metrics->boolean("EnableBatchManager") && _metrics->boolean("ACHEnabled")) _purchaseOrderTab->setVisible(false); else if (! _metrics->boolean("EnableBatchManager") && ! _metrics->boolean("ACHEnabled")) ediTab->setVisible(false); // else defaults are OK if (_metrics->boolean("ACHEnabled") && omfgThis->_key.isEmpty()) _checksTab->setEnabled(false); }
/* * Constructs a itemImages as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * */ itemImages::itemImages(QWidget* parent, const char* name, Qt::WFlags fl) : QMainWindow(parent, name, fl) { setupUi(this); (void)statusBar(); // signals and slots connections connect(_close, SIGNAL(clicked()), this, SLOT(close())); connect(_prev, SIGNAL(clicked()), this, SLOT(sPrevious())); connect(_next, SIGNAL(clicked()), this, SLOT(sNext())); connect(_item, SIGNAL(newId(int)), this, SLOT(sFillList())); init(); }
itemImages::itemImages(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, name, fl) { setupUi(this); // signals and slots connections connect(_close, SIGNAL(clicked()), this, SLOT(close())); connect(_prev, SIGNAL(clicked()), this, SLOT(sPrevious())); connect(_next, SIGNAL(clicked()), this, SLOT(sNext())); connect(_item, SIGNAL(newId(int)), this, SLOT(sFillList())); #ifndef Q_WS_MAC _prev->setMaximumWidth(25); _next->setMaximumWidth(25); #endif }
AlgorithmPage::AlgorithmPage(QWidget *parent) : QWidget(parent) { QGroupBox *configGroup = new QGroupBox(tr("Algorithm configuration")); QLabel *popLabel = new QLabel(tr("Population size:")); popEdit = new QLineEdit(tr("25")); QLabel *genLabel = new QLabel( tr("Maximum generation:") ); genEdit = new QLineEdit(tr("100")); QLabel *croLabel = new QLabel(tr("Crossover rate:")); croEdit = new QLineEdit(tr("0.5")); QGridLayout *packagesLayout = new QGridLayout; packagesLayout->addWidget(popLabel,0,0); packagesLayout->addWidget(popEdit,0,1); packagesLayout->addWidget(genLabel,1,0); packagesLayout->addWidget(genEdit,1,1); packagesLayout->addWidget(croLabel,2,0); packagesLayout->addWidget(croEdit,2,1); configGroup->setLayout(packagesLayout); QPushButton *previousButton = new QPushButton(tr("Previous")); connect(previousButton, SIGNAL(clicked()), this, SLOT(sPrevious())); QPushButton *nextButton = new QPushButton(tr("Next")); connect(nextButton, SIGNAL(clicked()), this, SLOT(sNext())); QHBoxLayout *buttonsLayout = new QHBoxLayout; buttonsLayout->addStretch(1); buttonsLayout->addWidget(previousButton); buttonsLayout->addWidget(nextButton); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(configGroup); mainLayout->addStretch(12); mainLayout->addLayout(buttonsLayout); setLayout(mainLayout); }
ScorePage::ScorePage(QWidget *parent) : QWidget(parent) { QGroupBox *packagesGroup = new QGroupBox(tr("Scoring function")); QLabel *ffLabel=new QLabel(tr("Force field:")); QComboBox *ffCombo=new QComboBox; // ffCombo->addItem( tr("Amber") ); // ffCombo->addItem( tr("Charmm") ); ffCombo->addItem( tr("Sybyl") ); QHBoxLayout *ffLayout=new QHBoxLayout; ffLayout->addWidget(ffLabel); ffLayout->addWidget(ffCombo); // QPushButton *startQueryButton = new QPushButton(tr("Set")); QGridLayout *packagesLayout = new QGridLayout; // packagesLayout->addLayout(ffLayout); packagesGroup->setLayout(packagesLayout); QPushButton *previousButton = new QPushButton(tr("Previous")); connect(previousButton, SIGNAL(clicked()), this, SLOT(sPrevious())); QPushButton *nextButton = new QPushButton(tr("Next")); connect(nextButton, SIGNAL(clicked()), this, SLOT(sNext())); QHBoxLayout *buttonsLayout = new QHBoxLayout; buttonsLayout->addStretch(1); buttonsLayout->addWidget(previousButton); buttonsLayout->addWidget(nextButton); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(packagesGroup); mainLayout->addLayout(ffLayout); mainLayout->addSpacing(12); // mainLayout->addWidget(startQueryButton); mainLayout->addStretch(12); mainLayout->addLayout(buttonsLayout); setLayout(mainLayout); }
LigandPage::LigandPage(QWidget *parent) : QWidget(parent) { QGroupBox *configGroup = new QGroupBox(tr("Ligand configuration")); QLabel *ligandLabel = new QLabel(tr("Ligand:")); ligandEdit = new QLineEdit; QPushButton *ligandLoad = new QPushButton(tr("Load")); connect( ligandLoad, SIGNAL(clicked()), this, SLOT(loadFile()) ); QHBoxLayout *serverLayout = new QHBoxLayout; serverLayout->addWidget(ligandLabel); serverLayout->addWidget(ligandEdit); serverLayout->addWidget(ligandLoad); QVBoxLayout *configLayout = new QVBoxLayout; configLayout->addLayout(serverLayout); configGroup->setLayout(configLayout); QPushButton *previousButton = new QPushButton(tr("Previous")); connect(previousButton, SIGNAL(clicked()), this, SLOT(sPrevious())); QPushButton *nextButton = new QPushButton(tr("Next")); connect(nextButton, SIGNAL(clicked()), this, SLOT(sNext())); QHBoxLayout *buttonsLayout = new QHBoxLayout; buttonsLayout->addStretch(1); buttonsLayout->addWidget(previousButton); buttonsLayout->addWidget(nextButton); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(configGroup); mainLayout->addStretch(12); mainLayout->addLayout(buttonsLayout); setLayout(mainLayout); }
transferOrderItem::transferOrderItem(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); connect(_cancel, SIGNAL(clicked()), this, SLOT(sCancel())); connect(_freight, SIGNAL(valueChanged()), this, SLOT(sCalculateTax())); connect(_freight, SIGNAL(valueChanged()), this, SLOT(sChanged())); connect(_item, SIGNAL(newId(int)), this, SLOT(sChanged())); connect(_item, SIGNAL(newId(int)), this, SLOT(sPopulateItemInfo(int))); connect(_next, SIGNAL(clicked()), this, SLOT(sNext())); connect(_notes, SIGNAL(textChanged()), this, SLOT(sChanged())); connect(_prev, SIGNAL(clicked()), this, SLOT(sPrev())); connect(_promisedDate,SIGNAL(newDate(const QDate&)), this, SLOT(sChanged())); connect(_qtyOrdered, SIGNAL(lostFocus()), this, SLOT(sDetermineAvailability())); connect(_qtyOrdered, SIGNAL(textChanged(const QString&)), this, SLOT(sChanged())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_scheduledDate, SIGNAL(newDate(const QDate&)), this, SLOT(sChanged())); connect(_scheduledDate, SIGNAL(newDate(const QDate&)), this, SLOT(sDetermineAvailability())); connect(_showAvailability, SIGNAL(toggled(bool)), this, SLOT(sDetermineAvailability())); connect(_showAvailability, SIGNAL(toggled(bool)), this, SLOT(sDetermineAvailability())); connect(_showIndented,SIGNAL(toggled(bool)), this, SLOT(sDetermineAvailability())); connect(_taxLit, SIGNAL(leftClickedURL(QString)), this, SLOT(sTaxDetail())); connect(_warehouse, SIGNAL(newID(int)), this, SLOT(sChanged())); connect(_warehouse, SIGNAL(newID(int)), this, SLOT(sDetermineAvailability())); connect(_inventoryButton, SIGNAL(toggled(bool)), this, SLOT(sHandleButton())); _modified = false; _canceling = false; _error = false; _originalQtyOrd = 0.0; _saved = false; _availabilityLastItemid = -1; _availabilityLastWarehousid = -1; _availabilityLastSchedDate = QDate(); _availabilityLastShow = false; _availabilityLastShowIndent = false; _availabilityQtyOrdered = 0.0; _item->setType(ItemLineEdit::cActive | (ItemLineEdit::cAllItemTypes_Mask ^ ItemLineEdit::cKit)); _item->addExtraClause( QString("(itemsite_active)") ); // ItemLineEdit::cActive doesn't compare against the itemsite record _availability->addColumn(tr("#"), _seqColumn, Qt::AlignCenter,true, "bomitem_seqnumber"); _availability->addColumn(tr("Item Number"),_itemColumn, Qt::AlignLeft, true, "item_number"); _availability->addColumn(tr("Description"), -1, Qt::AlignLeft, true, "item_descrip"); _availability->addColumn(tr("UOM"), _uomColumn, Qt::AlignCenter,true, "uom_name"); _availability->addColumn(tr("Pend. Alloc."),_qtyColumn, Qt::AlignRight, true, "pendalloc"); _availability->addColumn(tr("Total Alloc."),_qtyColumn, Qt::AlignRight, true, "totalalloc"); _availability->addColumn(tr("On Order"), _qtyColumn, Qt::AlignRight, true, "ordered"); _availability->addColumn(tr("QOH"), _qtyColumn, Qt::AlignRight, true, "qoh"); _availability->addColumn(tr("Availability"),_qtyColumn, Qt::AlignRight, true, "totalavail"); _itemchar = new QStandardItemModel(0, 2, this); _itemchar->setHeaderData( 0, Qt::Horizontal, tr("Name"), Qt::DisplayRole); _itemchar->setHeaderData( 1, Qt::Horizontal, tr("Value"), Qt::DisplayRole); _itemcharView->setModel(_itemchar); ItemCharacteristicDelegate * delegate = new ItemCharacteristicDelegate(this); _itemcharView->setItemDelegate(delegate); _qtyOrdered->setValidator(omfgThis->qtyVal()); _shippedToDate->setPrecision(omfgThis->qtyVal()); _onHand->setPrecision(omfgThis->qtyVal()); _allocated->setPrecision(omfgThis->qtyVal()); _unallocated->setPrecision(omfgThis->qtyVal()); _onOrder->setPrecision(omfgThis->qtyVal()); _available->setPrecision(omfgThis->qtyVal()); if (!_metrics->boolean("UsePromiseDate")) { _promisedDateLit->hide(); _promisedDate->hide(); } _comments->setType(Comments::TransferOrderItem); _captive = FALSE; _dstwhsid = -1; _itemsiteid = -1; _transwhsid = -1; _toheadid = -1; _taxzoneid = -1; adjustSize(); _inventoryButton->setEnabled(_showAvailability->isChecked()); _dependencyButton->setEnabled(_showAvailability->isChecked()); _availability->setEnabled(_showAvailability->isChecked()); _showIndented->setEnabled(_showAvailability->isChecked()); }
vendor::vendor(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, name, fl) { setupUi(this); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_printAddresses, SIGNAL(clicked()), this, SLOT(sPrintAddresses())); connect(_newAddress, SIGNAL(clicked()), this, SLOT(sNewAddress())); connect(_editAddress, SIGNAL(clicked()), this, SLOT(sEditAddress())); connect(_viewAddress, SIGNAL(clicked()), this, SLOT(sViewAddress())); connect(_deleteAddress, SIGNAL(clicked()), this, SLOT(sDeleteAddress())); connect(_deleteTaxreg, SIGNAL(clicked()), this, SLOT(sDeleteTaxreg())); connect(_editTaxreg, SIGNAL(clicked()), this, SLOT(sEditTaxreg())); connect(_newTaxreg, SIGNAL(clicked()), this, SLOT(sNewTaxreg())); connect(_viewTaxreg, SIGNAL(clicked()), this, SLOT(sViewTaxreg())); connect(_next, SIGNAL(clicked()), this, SLOT(sNext())); connect(_previous, SIGNAL(clicked()), this, SLOT(sPrevious())); connect(_mainButton, SIGNAL(clicked()), this, SLOT(sHandleButtons())); connect(_altButton, SIGNAL(clicked()), this, SLOT(sHandleButtons())); connect(_checksButton, SIGNAL(clicked()), this, SLOT(sHandleButtons())); connect(_number, SIGNAL(textEdited(const QString&)), this, SLOT(sNumberEdited())); connect(_number, SIGNAL(lostFocus()), this, SLOT(sCheck())); connect(_address, SIGNAL(addressChanged(QString,QString,QString,QString,QString,QString, QString)), _contact2, SLOT(setNewAddr(QString,QString,QString,QString,QString,QString, QString))); connect(_address, SIGNAL(addressChanged(QString,QString,QString,QString,QString,QString, QString)), _contact1, SLOT(setNewAddr(QString,QString,QString,QString,QString,QString, QString))); _defaultCurr->setLabel(_defaultCurrLit); QRegExp tmpregex = QRegExp(_metrics->value("EFTAccountRegex")); _accountValidator = new QRegExpValidator (tmpregex, this); tmpregex = QRegExp(_metrics->value("EFTRoutingRegex")); _routingValidator = new QRegExpValidator(tmpregex, this); _routingNumber->setValidator(_routingValidator); _achAccountNumber->setValidator(_accountValidator); _vendaddr->addColumn(tr("Number"), 70, Qt::AlignLeft, true, "vendaddr_code"); _vendaddr->addColumn(tr("Name"), 50, Qt::AlignLeft, true, "vendaddr_name"); _vendaddr->addColumn(tr("City"), -1, Qt::AlignLeft, true, "vendaddr_city"); _vendaddr->addColumn(tr("State"), -1, Qt::AlignLeft, true, "vendaddr_state"); _vendaddr->addColumn(tr("Country"),-1, Qt::AlignLeft, true, "vendaddr_country"); _vendaddr->addColumn(tr("Postal Code"),-1, Qt::AlignLeft, true, "vendaddr_zipcode"); _taxreg->addColumn(tr("Tax Authority"), 100, Qt::AlignLeft, true, "taxauth_code"); _taxreg->addColumn(tr("Tax Zone"), 100, Qt::AlignLeft, true, "taxzone_code"); _taxreg->addColumn(tr("Registration #"), -1, Qt::AlignLeft, true, "taxreg_number"); _accountType->append(0, "Checking", "K"); _accountType->append(1, "Savings", "C"); _crmacctid = -1; _ignoreClose = false; _NumberGen = -1; if (_metrics->boolean("EnableBatchManager") && ! _metrics->boolean("ACHEnabled")) { _checksButton->hide(); } else if (! _metrics->boolean("EnableBatchManager") && _metrics->boolean("ACHEnabled")) { _checksButton->hide(); _transmitStack->setCurrentIndex(1); } else if (! _metrics->boolean("EnableBatchManager") && ! _metrics->boolean("ACHEnabled")) ediTab->setVisible(false); // else defaults are OK if (_metrics->boolean("ACHEnabled") && omfgThis->_key.isEmpty()) _checksButton->setEnabled(false); _vendid = -1; }