예제 #1
0
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;
}
예제 #2
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;
}
예제 #3
0
crmaccount::crmaccount(QWidget* parent, const char* name, Qt::WFlags fl)
    : XWidget(parent, name, fl)
{
  setupUi(this);

  _todoList = new todoList(this, "todoList", Qt::Widget);
  _todoListTab->layout()->addWidget(_todoList);
  _todoList->setCloseVisible(false);
  _todoList->list()->hideColumn("crmacct_number");
  _todoList->list()->hideColumn("crmacct_name");
  _todoList->parameterWidget()->setDefault(tr("Assigned"), QVariant(), true);
  _todoList->setParameterWidgetVisible(false);
  _todoList->setQueryOnStartEnabled(false);
  
  _contacts = new contacts(this, "contacts", Qt::Widget);
  _allPage->layout()->addWidget(_contacts);
  _contacts->setCloseVisible(false);
  _contacts->list()->hideColumn("crmacct_number");
  _contacts->list()->hideColumn("crmacct_name");
  _contacts->setParameterWidgetVisible(false);
  _contacts->setQueryOnStartEnabled(false);
  
  _oplist = new opportunityList(this, "opportunityList", Qt::Widget);
  _oplistTab->layout()->addWidget(_oplist);
  _oplist->setCloseVisible(false);
  _oplist->list()->hideColumn("crmacct_number");
  _oplist->parameterWidget()->setDefault(tr("User"), QVariant(), true);
  _oplist->setParameterWidgetVisible(false);
  _oplist->setQueryOnStartEnabled(false);
    
  if(!_privileges->check("EditOwner")) _owner->setEnabled(false);

  _owner->setUsername(omfgThis->username());
  _owner->setType(UsernameLineEdit::UsersActive);
    
  connect(_close,		SIGNAL(clicked()), this, SLOT(sClose()));
  connect(_competitor,		SIGNAL(clicked()), this, SLOT(sCompetitor()));
  connect(_deleteCharacteristic,SIGNAL(clicked()), this, SLOT(sDeleteCharacteristic()));
  connect(_deleteReg,		SIGNAL(clicked()), this, SLOT(sDeleteReg()));
  connect(_editCharacteristic,	SIGNAL(clicked()), this, SLOT(sEditCharacteristic()));
  connect(_editReg,		SIGNAL(clicked()), this, SLOT(sEditReg()));
  connect(_newCharacteristic,	SIGNAL(clicked()), this, SLOT(sNewCharacteristic()));
  connect(_newReg,		SIGNAL(clicked()), this, SLOT(sNewReg()));
  connect(_partner,		SIGNAL(clicked()), this, SLOT(sPartner()));
  connect(_prospectButton,	SIGNAL(clicked()), this, SLOT(sProspect()));
  connect(_save,		SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_taxauthButton,	SIGNAL(clicked()), this, SLOT(sTaxAuth()));
  connect(omfgThis, SIGNAL(customersUpdated(int, bool)), this, SLOT(sUpdateRelationships()));
  connect(omfgThis, SIGNAL(prospectsUpdated()),  this, SLOT(sUpdateRelationships()));
  connect(omfgThis, SIGNAL(taxAuthsUpdated(int)),this, SLOT(sUpdateRelationships()));
  connect(omfgThis, SIGNAL(vendorsUpdated()),    this, SLOT(sUpdateRelationships()));
  connect(_customer, SIGNAL(toggled(bool)), this, SLOT(sCustomerToggled()));
  connect(_prospect, SIGNAL(toggled(bool)), this, SLOT(sProspectToggled()));
  connect(_number, SIGNAL(lostFocus()), this, SLOT(sCheckNumber()));
  connect(_primaryButton, SIGNAL(toggled(bool)), this, SLOT(sHandleButtons())); 	 
  connect(_secondaryButton, SIGNAL(toggled(bool)), this, SLOT(sHandleButtons())); 	 
  connect(_allButton, SIGNAL(toggled(bool)), this, SLOT(sHandleButtons()));
  connect(_customerButton, SIGNAL(clicked()), this, SLOT(sCustomer()));
  connect(_vendorButton, SIGNAL(clicked()), this, SLOT(sEditVendor()));
  connect(_contacts, SIGNAL(cntctDetached(int)), this, SLOT(sHandleCntctDetach(int)));

  _charass->addColumn(tr("Characteristic"), _itemColumn, Qt::AlignLeft, true, "char_name");
  _charass->addColumn(tr("Value"),          -1,          Qt::AlignLeft, true, "charass_value");
  
  _reg->addColumn(tr("Lot/Serial")  ,  _itemColumn,  Qt::AlignLeft, true, "ls_number" );
  _reg->addColumn(tr("Item")        ,  _itemColumn,  Qt::AlignLeft, true, "item_number" );
  _reg->addColumn(tr("Description") ,  -1,  	     Qt::AlignLeft, true, "item_descrip1" );
  _reg->addColumn(tr("Qty"       )  ,  _qtyColumn,   Qt::AlignLeft, true, "lsreg_qty" );
  _reg->addColumn(tr("Sold"        ),  _dateColumn,  Qt::AlignLeft, true, "lsreg_solddate" );
  _reg->addColumn(tr("Registered"  ),  _dateColumn,  Qt::AlignLeft, true, "lsreg_regdate" );
  _reg->addColumn(tr("Expires"   )  ,  _dateColumn,  Qt::AlignLeft, true, "lsreg_expiredate" );

  if (_preferences->boolean("XCheckBox/forgetful"))
    _active->setChecked(true);

  _NumberGen    = -1;
  _mode		= cNew;
  _crmacctId    = -1;
  _competitorId	= -1;
  _custId       = -1;
  _partnerId    = -1;
  _prospectId   = -1;
  _taxauthId    = -1;
  _vendId       = -1;
  _comments->setId(-1);
  _documents->setId(-1);
  _modal        = false;
  
  if (!_metrics->boolean("LotSerialControl"))
    _tab->removeTab(_tab->indexOf(_registrationsTab));

}