lotSerial::lotSerial(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_lotSerial, SIGNAL(valid(bool)), this, SLOT(populate())); connect(_notes, SIGNAL(textChanged()), this, SLOT(sChanged())); connect(_deleteChar, SIGNAL(clicked()), this, SLOT(sDeleteCharass())); connect(_editChar, SIGNAL(clicked()), this, SLOT(sEditCharass())); connect(_newChar, SIGNAL(clicked()), this, SLOT(sNewCharass())); connect(_deleteReg, SIGNAL(clicked()), this, SLOT(sDeleteReg())); connect(_editReg, SIGNAL(clicked()), this, SLOT(sEditReg())); connect(_newReg, SIGNAL(clicked()), this, SLOT(sNewReg())); _charass->addColumn(tr("Characteristic"), _itemColumn, Qt::AlignLeft, true, "char_name" ); _charass->addColumn(tr("Value"), -1, Qt::AlignLeft, true, "charass_value" ); _reg->addColumn(tr("Number") , _orderColumn, Qt::AlignLeft, true, "lsreg_number" ); _reg->addColumn(tr("CRM Account#"), _itemColumn, Qt::AlignLeft, true, "crmacct_number" ); _reg->addColumn(tr("Name" ), -1, Qt::AlignLeft, true, "crmacct_name" ); _reg->addColumn(tr("First Name" ), 80, Qt::AlignLeft, true, "cntct_first_name" ); _reg->addColumn(tr("Last Name" ), 80, Qt::AlignLeft, true, "cntct_last_name" ); _reg->addColumn(tr("Phone" ), 80, Qt::AlignLeft, true, "cntct_phone" ); _changed=false; }
void ColorRing::setS(float f) { QColor c2 = col; col.setHsvF(col.hueF(), f, col.valueF()); if(col.saturationF() != c2.saturationF()) { emit sChanged(col.saturationF()); emit colorChanged(col); repaint(); } }
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()); }
/* * Constructs a incident as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * */ incident::incident(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : XDialog(parent, name, modal, fl) { _statusCodes << "N" << "F" << "C" << "A" << "R" << "L"; setupUi(this); if(!_privileges->check("EditOwner")) _owner->setEnabled(false); // signals and slots connections connect(_cancel, SIGNAL(clicked()), this, SLOT(sCancel())); connect(_crmacct, SIGNAL(newId(int)), this, SLOT(sCRMAcctChanged(int))); connect(_deleteTodoItem, SIGNAL(clicked()), this, SLOT(sDeleteTodoItem())); connect(_editTodoItem, SIGNAL(clicked()), this, SLOT(sEditTodoItem())); connect(_item, SIGNAL(newId(int)), _lotserial, SLOT(setItemId(int))); connect(_newTodoItem, SIGNAL(clicked()), this, SLOT(sNewTodoItem())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_todoList, SIGNAL(itemSelected(int)), _editTodoItem, SLOT(animateClick())); connect(_todoList, SIGNAL(populateMenu(QMenu*, QTreeWidgetItem*, int)), this, SLOT(sPopulateTodoMenu(QMenu*))); connect(_todoList, SIGNAL(valid(bool)), this, SLOT(sHandleTodoPrivs())); connect(_viewTodoItem, SIGNAL(clicked()), this, SLOT(sViewTodoItem())); //connect(_return, SIGNAL(clicked()), this, SLOT(sReturn())); connect(_viewAR, SIGNAL(clicked()), this, SLOT(sViewAR())); connect(_cntct, SIGNAL(changed()), this, SLOT(sContactChanged())); connect(this, SIGNAL(prepareMail()), this, SLOT(sPrepareMail())); connect(_assignedTo, SIGNAL(newId(int)), this, SLOT(sAssigned())); connect(_comments, SIGNAL(commentAdded()), this, SLOT(sCommentAdded())); //Note changes for e-mail notification connect(_category, SIGNAL(textChanged(QString)), this, SLOT(sChanged())); connect(_description, SIGNAL(textChanged(QString)), this, SLOT(sChanged())); connect(_crmacct, SIGNAL(newId(int)) , this, SLOT(sChanged())); connect(_owner, SIGNAL(newId(int)) , this, SLOT(sChanged())); connect(_assignedTo, SIGNAL(newId(int)) , this, SLOT(sChanged())); connect(_severity, SIGNAL(currentIndexChanged(int)), this, SLOT(sChanged())); connect(_status, SIGNAL(currentIndexChanged(int)), this, SLOT(sChanged())); connect(_resolution, SIGNAL(currentIndexChanged(int)), this, SLOT(sChanged())); connect(_priority, SIGNAL(currentIndexChanged(int)), this, SLOT(sChanged())); connect(_resolution, SIGNAL(currentIndexChanged(int)), this, SLOT(sChanged())); connect(_cntct, SIGNAL(changed()) , this, SLOT(sChanged())); connect(_notes, SIGNAL(textChanged()) , this, SLOT(sChanged())); connect(_item, SIGNAL(newId(int)) , this, SLOT(sChanged())); connect(_lotserial, SIGNAL(newId(int)) , this, SLOT(sChanged())); _incdtid = -1; _commentAdded = false; _updated = false; _severity->setType(XComboBox::IncidentSeverity); _priority->setType(XComboBox::IncidentPriority); _resolution->setType(XComboBox::IncidentResolution); _category->setType(XComboBox::IncidentCategory); _lotserial->setStrict(false); _incdthist->addColumn(tr("Username"), _userColumn, Qt::AlignLeft, true, "incdthist_username"); _incdthist->addColumn(tr("Date/Time"),_timeDateColumn, Qt::AlignLeft, true, "incdthist_timestamp"); _incdthist->addColumn(tr("Description"), -1, Qt::AlignLeft, true, "incdthist_descrip"); _todoList->addColumn(tr("Priority"), _userColumn, Qt::AlignRight, true, "incdtpriority_name"); _todoList->addColumn(tr("User"), _userColumn, Qt::AlignLeft, true, "usr_username"); _todoList->addColumn(tr("Name"), 100, Qt::AlignLeft, true, "todoitem_name"); _todoList->addColumn(tr("Description"), -1, Qt::AlignLeft, true, "todoitem_description"); _todoList->addColumn(tr("Status"), _statusColumn, Qt::AlignLeft, true, "todoitem_status"); _todoList->addColumn(tr("Due Date"), _dateColumn, Qt::AlignLeft, true, "todoitem_due_date"); q.prepare("SELECT usr_id " "FROM usr " "WHERE (usr_username=CURRENT_USER);"); q.exec(); if (q.first()) { _myUsrId = q.value("usr_id").toInt(); _owner->setId(_myUsrId); } else if (q.lastError().type() != QSqlError::NoError) { systemError(this, q.lastError().databaseText(), __FILE__, __LINE__); close(); } if (_metrics->boolean("LotSerialControl")) { connect(_item, SIGNAL(valid(bool)), _lotserial, SLOT(setEnabled(bool))); connect(_item, SIGNAL(newId(int)), _lotserial, SLOT(setItemId(int))); } else _lotserial->setVisible(false); // because this causes a pop-behind situation we are hiding for now. //_return->hide(); _saved = false; _aropenid = -1; }