Example #1
0
warehouses::warehouses(QWidget* parent, const char* name, Qt::WFlags fl)
    : XWidget(parent, name, fl)
{
  setupUi(this);

  connect(_print, SIGNAL(clicked()), this, SLOT(sPrint()));
  connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
  connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
  connect(_warehouse, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*)));
  connect(_view, SIGNAL(clicked()), this, SLOT(sView()));
  connect(_showInactive, SIGNAL(toggled(bool)), this, SLOT(sFillList()));
  
  _warehouse->addColumn(tr("Site"),        _whsColumn, Qt::AlignCenter, true,  "warehous_code" );
  _warehouse->addColumn(tr("Active"),      _ynColumn,  Qt::AlignCenter, true,  "warehous_active" );
  _warehouse->addColumn(tr("Type"),        _whsColumn, Qt::AlignCenter, true,  "sitetype_name" );
  _warehouse->addColumn(tr("Description"), 130,        Qt::AlignLeft,   true,  "warehous_descrip"   );
  _warehouse->addColumn(tr("Address"),     -1,         Qt::AlignLeft,   true,  "addr_line1"   );

  if (_privileges->check("MaintainWarehouses"))
  {
    connect(_warehouse, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool)));
    connect(_warehouse, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick()));
  }
  else
  {
    _new->setEnabled(FALSE);
    connect(_warehouse, SIGNAL(itemSelected(int)), _view, SLOT(animateClick()));
  }

  connect(omfgThis, SIGNAL(warehousesUpdated()),  SLOT(sFillList())  );

  sFillList();
}
Example #2
0
contact::contact(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  connect(_close,		  SIGNAL(clicked()), this, SLOT(sClose()));
  connect(_deleteCharacteristic,  SIGNAL(clicked()), this, SLOT(sDeleteCharass()));
  connect(_detachUse,		  SIGNAL(clicked()), this, SLOT(sDetachUse()));
  connect(_editCharacteristic,    SIGNAL(clicked()), this, SLOT(sEditCharass()));
  connect(_editUse,  		  SIGNAL(clicked()), this, SLOT(sEditUse()));
  connect(_newCharacteristic,     SIGNAL(clicked()), this, SLOT(sNewCharass()));
  connect(_save,	          SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_uses, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*)), this, SLOT(sPopulateUsesMenu(QMenu*)));
  connect(_uses, SIGNAL(valid(bool)), this, SLOT(sHandleValidUse(bool)));
  connect(_viewUse,	          SIGNAL(clicked()), this, SLOT(sViewUse()));
  connect(omfgThis,        SIGNAL(vendorsUpdated()), this, SLOT(sFillList()));
  connect(omfgThis,      SIGNAL(prospectsUpdated()), this, SLOT(sFillList()));
  connect(omfgThis,     SIGNAL(warehousesUpdated()), this, SLOT(sFillList()));
  connect(omfgThis, SIGNAL(crmAccountsUpdated(int)), this, SLOT(sFillList()));
  connect(omfgThis, SIGNAL(customersUpdated(int,bool)), this, SLOT(sFillList()));

  _charass->addColumn(tr("Characteristic"), _itemColumn, Qt::AlignLeft );
  _charass->addColumn(tr("Value"),          -1,          Qt::AlignLeft );

  _uses->addColumn(tr("Used by"),         100, Qt::AlignLeft  );
  _uses->addColumn(tr("Number"), _orderColumn, Qt::AlignLeft  );
  _uses->addColumn(tr("Name"),	           -1, Qt::AlignLeft  );
  _uses->addColumn(tr("Role"),	           -1, Qt::AlignLeft  );
  _uses->addColumn(tr("Active"),    _ynColumn, Qt::AlignCenter);

  _activeCache = false;
}
Example #3
0
contact::contact(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  connect(_close,		  SIGNAL(clicked()), this, SLOT(sClose()));
  connect(_deleteCharacteristic,  SIGNAL(clicked()), this, SLOT(sDeleteCharass()));
  connect(_detachUse,		  SIGNAL(clicked()), this, SLOT(sDetachUse()));
  connect(_editCharacteristic,    SIGNAL(clicked()), this, SLOT(sEditCharass()));
  connect(_editUse,  		  SIGNAL(clicked()), this, SLOT(sEditUse()));
  connect(_newCharacteristic,     SIGNAL(clicked()), this, SLOT(sNewCharass()));
  connect(_save,	          SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_uses, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*)), this, SLOT(sPopulateUsesMenu(QMenu*)));
  connect(_uses, SIGNAL(valid(bool)), this, SLOT(sHandleValidUse(bool)));
  connect(_viewUse,	          SIGNAL(clicked()), this, SLOT(sViewUse()));
  connect(omfgThis,        SIGNAL(vendorsUpdated()), this, SLOT(sFillList()));
  connect(omfgThis,      SIGNAL(prospectsUpdated()), this, SLOT(sFillList()));
  connect(omfgThis,     SIGNAL(warehousesUpdated()), this, SLOT(sFillList()));
  connect(omfgThis, SIGNAL(crmAccountsUpdated(int)), this, SLOT(sFillList()));
  connect(omfgThis, SIGNAL(customersUpdated(int,bool)), this, SLOT(sFillList())); 
  connect(_crmAccount, SIGNAL(newId(int)), _contact, SLOT(setSearchAcct(int)));

  _charass->addColumn(tr("Characteristic"), _itemColumn, Qt::AlignLeft, true, "char_name");
  _charass->addColumn(tr("Value"),          -1,          Qt::AlignLeft, true, "charass_value");

  _uses->addColumn(tr("Used by"),         100, Qt::AlignLeft, true, "type");
  _uses->addColumn(tr("Number"), _orderColumn, Qt::AlignLeft, true, "number");
  _uses->addColumn(tr("Name"),	           -1, Qt::AlignLeft, true, "name");
  _uses->addColumn(tr("Role"),	           -1, Qt::AlignLeft, true, "role");
  _uses->addColumn(tr("Active"),    _ynColumn, Qt::AlignCenter,true, "active");

  _activeCache = false;

  _contact->setMinimalLayout(false);
  _contact->setAccountVisible(false);
  _contact->setInitialsVisible(false);
  _contact->setActiveVisible(false);
  _contact->setOwnerVisible(false);
  _contact->setListVisible(false);

  if(!_privileges->check("EditOwner")) _owner->setEnabled(false);
}