prospect::prospect(QWidget* parent, const char* name, Qt::WFlags fl) : XMainWindow(parent, name, fl) { setupUi(this); (void)statusBar(); connect(_deleteQuote,SIGNAL(clicked()), this, SLOT(sDeleteQuote())); connect(_editQuote, SIGNAL(clicked()), this, SLOT(sEditQuote())); connect(_newQuote, SIGNAL(clicked()), this, SLOT(sNewQuote())); connect(_number, SIGNAL(lostFocus()), this, SLOT(sCheckNumber())); connect(_printQuote,SIGNAL(clicked()), this, SLOT(sPrintQuote())); connect(_quotes, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*)), this, SLOT(sPopulateQuotesMenu(QMenu*))); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_viewQuote, SIGNAL(clicked()), this, SLOT(sViewQuote())); connect(omfgThis, SIGNAL(quotesUpdated(int, bool)), this, SLOT(sFillQuotesList())); if (_privileges->check("MaintainProspectMasters")) connect(_quotes, SIGNAL(itemSelected(int)), _editQuote, SLOT(animateClick())); else connect(_quotes, SIGNAL(itemSelected(int)), _viewQuote, SLOT(animateClick())); _prospectid = -1; _crmacct->setId(-1); _taxauth->setAllowNull(true); _taxauth->setType(XComboBox::TaxAuths); _quotes->addColumn(tr("Quote #"), _orderColumn, Qt::AlignLeft ); _quotes->addColumn(tr("Quote Date"), _dateColumn, Qt::AlignLeft ); _NumberGen = -1; }
void prospect::sPopulateQuotesMenu(QMenu *menuThis) { menuThis->insertItem(tr("Edit..."), this, SLOT(sEditQuote()), 0 ); menuThis->insertItem(tr("View..."), this, SLOT(sViewQuote()), 0 ); menuThis->insertItem(tr("Delete..."), this, SLOT(sDeleteQuote()), 0 ); menuThis->insertItem(tr("Print..."), this, SLOT(sPrintQuote()), 0 ); }
prospect::prospect(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, name, fl) { setupUi(this); connect(_crmacct, SIGNAL(clicked()), this, SLOT(sCrmAccount())); connect(_deleteQuote, SIGNAL(clicked()), this, SLOT(sDeleteQuote())); connect(_editQuote, SIGNAL(clicked()), this, SLOT(sEditQuote())); connect(_newQuote, SIGNAL(clicked()), this, SLOT(sNewQuote())); connect(_number, SIGNAL(editingFinished()), this, SLOT(sCheckNumber())); connect(_printQuote, SIGNAL(clicked()), this, SLOT(sPrintQuote())); connect(_quotes, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*)), this, SLOT(sPopulateQuotesMenu(QMenu*))); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_viewQuote, SIGNAL(clicked()), this, SLOT(sViewQuote())); connect(omfgThis, SIGNAL(quotesUpdated(int, bool)), this, SLOT(sFillQuotesList())); if (_privileges->check("MaintainQuotes")) connect(_quotes, SIGNAL(itemSelected(int)), _editQuote, SLOT(animateClick())); else connect(_quotes, SIGNAL(itemSelected(int)), _viewQuote, SLOT(animateClick())); _prospectid = -1; _crmacctid = -1; _taxzone->setAllowNull(true); _taxzone->setType(XComboBox::TaxZones); _quotes->addColumn(tr("Quote #"), _orderColumn, Qt::AlignLeft, true, "quhead_number" ); _quotes->addColumn(tr("Quote Date"), _dateColumn, Qt::AlignLeft, true, "quhead_quotedate" ); _NumberGen = -1; }
void prospect::sPopulateQuotesMenu(QMenu *menuThis) { menuThis->addAction(tr("Edit..."), this, SLOT(sEditQuote())); menuThis->addAction(tr("View..."), this, SLOT(sViewQuote())); menuThis->addAction(tr("Delete..."), this, SLOT(sDeleteQuote())); menuThis->addAction(tr("Print..."), this, SLOT(sPrintQuote())); }
void opportunity::sPrintSale() { if (_salesList->altId() == 0) sPrintQuote(); else sPrintSalesOrder(); }