Esempio n. 1
0
standardJournal::standardJournal(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);


  // signals and slots connections
  connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
  connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
  connect(_view, SIGNAL(clicked()), this, SLOT(sView()));
  connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
  connect(_stdjrnlitem, SIGNAL(valid(bool)), _view, SLOT(setEnabled(bool)));
  connect(_name, SIGNAL(lostFocus()), this, SLOT(sCheck()));
  connect(_name, SIGNAL(lostFocus()), this, SLOT(sCheck()));
  connect(_close, SIGNAL(clicked()), this, SLOT(reject()));
  connect(this, SIGNAL(rejected()), this, SLOT(sReject()));

  _stdjrnlitem->addColumn(tr("Account"), 200,          Qt::AlignLeft,   true,  "account"  );
  _stdjrnlitem->addColumn(tr("Notes"),   -1,           Qt::AlignLeft,   true,  "note"  );
  _stdjrnlitem->addColumn(tr("Debit"),   _priceColumn, Qt::AlignRight,  true,  "debit" );
  _stdjrnlitem->addColumn(tr("Credit"),  _priceColumn, Qt::AlignRight,  true,  "credit" );

  _debits->setValidator(omfgThis->moneyVal());
  _credits->setValidator(omfgThis->moneyVal());
}
Esempio n. 2
0
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()));
}
Esempio n. 3
0
location::location(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(_save, SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_location, SIGNAL(editingFinished()), this, SLOT(sCheck()));
  connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
  connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
  connect(_warehouse, SIGNAL(newID(int)), this, SLOT(sHandleWarehouse(int)));

  _locitem->addColumn(tr("Item Number"), _itemColumn, Qt::AlignLeft, true, "item_number" );
  _locitem->addColumn(tr("Description"), -1,          Qt::AlignLeft, true, "item_descrip" );

  _warehouse->setAllowNull(_metrics->boolean("MultiWhs"));
  if (!_metrics->boolean("MultiWhs"))
  {
    _warehouseLit->hide();
    _warehouse->hide();
    sHandleWarehouse(_warehouse->id());
  }
  else
    _warehouse->setNull();

}
standardJournalGroup::standardJournalGroup(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl)
  : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  _stdjrnlgrpid = -1;

  connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
  connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
  connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_close, SIGNAL(clicked()), this, SLOT(sClose()));
  connect(_name, SIGNAL(editingFinished()), this, SLOT(sCheck()));
  connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
  connect(_view, SIGNAL(clicked()), this, SLOT(sView()));
  connect(_showExpired, SIGNAL(toggled(bool)), this, SLOT(sFillList()));
  connect(_showFuture, SIGNAL(toggled(bool)), this, SLOT(sFillList()));
  connect(_stdjrnlgrpitem, SIGNAL(valid(bool)), _view, SLOT(setEnabled(bool)));

  setAcceptDrops(true);

  _stdjrnlgrpitem->addColumn(tr("Name"),        _itemColumn,  Qt::AlignLeft,   true,  "stdjrnl_name"   );
  _stdjrnlgrpitem->addColumn(tr("Description"), -1,           Qt::AlignLeft,   true,  "stdjrnl_descrip"   );
  _stdjrnlgrpitem->addColumn(tr("To Apply"),    _dateColumn,  Qt::AlignRight,  true,  "toapply"  );
  _stdjrnlgrpitem->addColumn(tr("Applied"),     _dateColumn,  Qt::AlignRight,  true,  "stdjrnlgrpitem_applied"  );
  _stdjrnlgrpitem->addColumn(tr("Effective"),   _dateColumn,  Qt::AlignCenter, true,  "stdjrnlgrpitem_effective" );
  _stdjrnlgrpitem->addColumn(tr("Expires"),     _dateColumn,  Qt::AlignCenter, true,  "stdjrnlgrpitem_expires" );
}
Esempio n. 5
0
/*
 *  Constructs a group as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal dialog.
 */
group::group(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  // signals and slots connections
  connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_name, SIGNAL(lostFocus()), this, SLOT(sCheck()));
  connect(_add, SIGNAL(clicked()), this, SLOT(sAdd()));
  connect(_addAll, SIGNAL(clicked()), this, SLOT(sAddAll()));
  connect(_revoke, SIGNAL(clicked()), this, SLOT(sRevoke()));
  connect(_revokeAll, SIGNAL(clicked()), this, SLOT(sRevokeAll()));
  connect(_module, SIGNAL(activated(const QString&)), this, SLOT(sModuleSelected(const QString&)));
  connect(_available, SIGNAL(valid(bool)), _add, SLOT(setEnabled(bool)));
  connect(_granted, SIGNAL(itemSelected(int)), this, SLOT(sRevoke()));
  connect(_granted, SIGNAL(valid(bool)), _revoke, SLOT(setEnabled(bool)));
  connect(_available, SIGNAL(itemSelected(int)), this, SLOT(sAdd()));


  _available->addColumn("Available Privileges", -1, Qt::AlignLeft);
  _granted->addColumn("Granted Privileges", -1, Qt::AlignLeft);

  q.exec( "SELECT DISTINCT priv_module "
          "FROM priv "
          "ORDER BY priv_module;" );
  while (q.next())
    _module->insertItem(q.value("priv_module").toString());

}
Esempio n. 6
0
ListeFiltre::ListeFiltre(QString s,QWidget *parent) :
    AbstractFilter(parent)
{
    _qvb=new QVBoxLayout;
    _qvb->setMargin(0);_qvb->setSpacing(0);

    _head=new QPushButton(s);
    _head->setFixedHeight(20);
    _checkTous=new QCheckBox("Tous");
    _head->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed);
    _checkTous->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Fixed);

    QHBoxLayout *qhb=new QHBoxLayout;
    qhb->setMargin(0);qhb->setSpacing(0);

    qhb->addWidget(_head);
    qhb->addWidget(_checkTous);

    connect(_head,SIGNAL(clicked()),this,SLOT(hide_lv()));
    connect(_checkTous,SIGNAL(clicked(bool)),this,SLOT(check(bool)));


    _lv=new QListView;
    _lv->setMaximumHeight(100);
    _lv->setSelectionMode(QAbstractItemView::MultiSelection);
    _lv->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);

    connect(_lv,SIGNAL(pressed(QModelIndex)),this,SLOT(sCheck()));

    _qvb->addLayout(qhb);
    setLayout(_qvb);
    //_lv->

}
plannerCode::plannerCode(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl)
  : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  if (_metrics->value("Application") != "PostBooks")
  {
    QButtonGroup* _explosionGroupInt = new QButtonGroup(this);
    _explosionGroupInt->addButton(_singleLevel);
    _explosionGroupInt->addButton(_multipleLevel);
    _singleLevel->setChecked(true);
    _explosionGroup->setEnabled(false);
  }
  else
  {
    _mrpexcpResched->hide();
    _mrpexcpDelete->hide();
    _autoExplode->hide();
    _explosionGroup->hide();
  }
  
  connect(_buttonBox, SIGNAL(accepted()), this, SLOT(sSave()));
  connect(_buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
  connect(_code, SIGNAL(editingFinished()), this, SLOT(sCheck()));
}
Esempio n. 8
0
warehouse::warehouse(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl)
    : XDialog(parent, name, modal, fl),
    _mode(cView),
    _warehousid(-1)
{
  setupUi(this);

  connect(_code,       SIGNAL(editingFinished()), this, SLOT(sCheck()));
  connect(_delete,       SIGNAL(clicked()), this, SLOT(sDeleteZone()));
  connect(_edit,         SIGNAL(clicked()), this, SLOT(sEditZone()));
  connect(_new,          SIGNAL(clicked()), this, SLOT(sNewZone()));
  connect(_save,         SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_standard, SIGNAL(toggled(bool)), this, SLOT(sHandleWhsType()));
  connect(_transit,  SIGNAL(toggled(bool)), this, SLOT(sHandleWhsType()));

  connect(_address, SIGNAL(addressChanged(QString,QString,QString,QString,QString,QString, QString)),
          _contact, SLOT(setNewAddr(QString,QString,QString,QString,QString,QString, QString)));

  _whsezone->addColumn(tr("Name"), _itemColumn, Qt::AlignCenter, true, "whsezone_name");
  _whsezone->addColumn(tr("Description"),   -1, Qt::AlignLeft,   true, "whsezone_descrip");

  if (!_metrics->boolean("MultiWhs"))
  {
    _active->setChecked(true);
    _active->hide();
  }

  _standard->setVisible(_metrics->boolean("MultiWhs"));
  _transit->setVisible(_metrics->boolean("MultiWhs"));
}
Esempio n. 9
0
location::location(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : QDialog(parent, name, modal, fl)
{
    setupUi(this);

    connect(_close, SIGNAL(clicked()), this, SLOT(sClose()));
    connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
    connect(_location, SIGNAL(lostFocus()), this, SLOT(sCheck()));
    connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
    connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
    connect(_warehouse, SIGNAL(newID(int)), this, SLOT(sHandleWarehouse(int)));

    _locitem->addColumn(tr("Item Number"), _itemColumn, Qt::AlignLeft );
    _locitem->addColumn(tr("Description"), -1,          Qt::AlignLeft );

    //If not multi-warehouse hide whs control
    if (!_metrics->boolean("MultiWhs"))
    {
        _warehouseLit->hide();
        _warehouse->hide();
        sHandleWarehouse(_warehouse->id());
    }
    else
    {
        _warehouse->setAllowNull(TRUE);
        _warehouse->setNull();
    }

}
Esempio n. 10
0
taxCode::taxCode(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  connect(_buttonBox, SIGNAL(accepted()), this, SLOT(sSave()));
  connect(_buttonBox, SIGNAL(rejected()), this, SLOT(sClose()));
  connect(_code, SIGNAL(editingFinished()), this, SLOT(sCheck())); 
  connect(_taxClass, SIGNAL(newID(int)), this, SLOT(populateBasis()));
  connect(_taxitems, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*)));
  connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); 
  connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); 
  connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
  connect(_expire, SIGNAL(clicked()), this, SLOT(sExpire())); 
  connect(_view, SIGNAL(clicked()), this, SLOT(sView()));
  
  _taxitems->addColumn(tr("Effective"), _dateColumn,    Qt::AlignLeft,  true, "effective" );
  _taxitems->addColumn(tr("Expires"),   _dateColumn,    Qt::AlignLeft,  true, "expires" );
  _taxitems->addColumn(tr("Percent"),   _prcntColumn,   Qt::AlignRight, true, "taxrate_percent" );
  _taxitems->addColumn(tr("Amount"),    _moneyColumn,   Qt::AlignRight, true, "taxrate_amount" );
  _taxitems->addColumn(tr("Currency"),  -1,             Qt::AlignLeft,  true, "curr_name" );
  sFillList(); 

  _account->setType(GLCluster::cRevenue | GLCluster::cLiability | GLCluster::cExpense);
}
Esempio n. 11
0
/*********************************************************************************

	bool CEmailAddressFilter::CheckForEmailAddresses()

		Author:		Martin Robb
        Created:	
        Inputs:		-
        Outputs:	True if email address found.
        Returns:	-
        Purpose:	This would be a good candidate for porting. The .NET library includes
					Regular Express support which would be ideal for this task.

*********************************************************************************/
bool CEmailAddressFilter::CheckForEmailAddresses( const TDVCHAR *pCheckString )
{
	CTDVString sCheck(pCheckString);
	bool bemailfound = false;
	int start = sCheck.FindText("@",0);
	while ( start >= 0 && start < sCheck.GetLength()-1 )
	{
		//Look at email domain to decide whether it might be an email address.
		if (  isalnum(sCheck.GetAt(start+1)) )
		{
			int end = sCheck.FindText(" ",start+1);
			if ( end <= 0 )
				end = sCheck.GetLength();
			
			CTDVString sDomain = sCheck.Mid(start+1,(end-(start+1)));
			if ( sDomain.Find(".") > 0 )
			{
				bemailfound  = true;
				break;
			}
		}
		start = sCheck.FindText("@",start+1);
	}

	return bemailfound;
}
Esempio n. 12
0
group::group(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(_name, SIGNAL(editingFinished()), this, SLOT(sCheck()));
  connect(_add, SIGNAL(clicked()), this, SLOT(sAdd()));
  connect(_addAll, SIGNAL(clicked()), this, SLOT(sAddAll()));
  connect(_revoke, SIGNAL(clicked()), this, SLOT(sRevoke()));
  connect(_revokeAll, SIGNAL(clicked()), this, SLOT(sRevokeAll()));
  connect(_module, SIGNAL(activated(const QString&)), this, SLOT(sModuleSelected(const QString&)));
  connect(_available, SIGNAL(valid(bool)), _add, SLOT(setEnabled(bool)));
  connect(_granted, SIGNAL(itemSelected(int)), this, SLOT(sRevoke()));
  connect(_granted, SIGNAL(valid(bool)), _revoke, SLOT(setEnabled(bool)));
  connect(_available, SIGNAL(itemSelected(int)), this, SLOT(sAdd()));


  _available->addColumn("Available Privileges", -1, Qt::AlignLeft, true, "priv_name");
  _granted->addColumn("Granted Privileges", -1, Qt::AlignLeft, true, "priv_name");

  q.exec( "SELECT DISTINCT priv_module "
          "FROM priv "
          "ORDER BY priv_module;" );
  for (int i = 0; q.next(); i++)
    _module->append(i, q.value("priv_module").toString());

  _trapClose = false;
}
warehouseZone::warehouseZone(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_name, SIGNAL(editingFinished()), this, SLOT(sCheck()));
}
Esempio n. 14
0
taxClass::taxClass(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(_taxClass, SIGNAL(editingFinished()), this, SLOT(sCheck()));
}
Esempio n. 15
0
vendorAddress::vendorAddress(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(_number, SIGNAL(lostFocus()), this, SLOT(sCheck()));
}
Esempio n. 16
0
characteristic::characteristic(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(_name, SIGNAL(lostFocus()), this, SLOT(sCheck()));
}
Esempio n. 17
0
user::user(QWidget* parent, const char * name, Qt::WindowFlags fl)
  : XDialog(parent, name, fl)
{
  setupUi(this);

  _authCache     = false;
  _cUsername     = "";
  _crmacctid     = -1;
  _inTransaction = false;
  _mode          = cView;

  connect(_close, SIGNAL(clicked()), this, SLOT(sClose()));
  connect(_crmacct, SIGNAL(clicked()),   this,     SLOT(sCrmAccount()));
  connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_add, SIGNAL(clicked()), this, SLOT(sAdd()));
  connect(_addAll, SIGNAL(clicked()), this, SLOT(sAddAll()));
  connect(_revoke, SIGNAL(clicked()), this, SLOT(sRevoke()));
  connect(_revokeAll, SIGNAL(clicked()), this, SLOT(sRevokeAll()));
  connect(_module, SIGNAL(activated(const QString&)), this, SLOT(sModuleSelected(const QString&)));
  connect(_granted, SIGNAL(itemSelected(int)), this, SLOT(sRevoke()));
  connect(_available, SIGNAL(itemSelected(int)), this, SLOT(sAdd()));
  connect(_username, SIGNAL(editingFinished()), this, SLOT(sCheck()));
  connect(_enhancedAuth, SIGNAL(toggled(bool)), this, SLOT(sEnhancedAuthUpdate()));
  connect(_grantedGroup, SIGNAL(itemSelected(int)), this, SLOT(sRevokeGroup()));
  connect(_availableGroup, SIGNAL(itemSelected(int)), this, SLOT(sAddGroup()));
  connect(_addGroup, SIGNAL(clicked()), this, SLOT(sAddGroup()));
  connect(_revokeGroup, SIGNAL(clicked()), this, SLOT(sRevokeGroup()));
  connect(_grantedSite, SIGNAL(itemSelected(int)), this, SLOT(sRevokeSite()));
  connect(_availableSite, SIGNAL(itemSelected(int)), this, SLOT(sAddSite()));
  connect(_addSite, SIGNAL(clicked()), this, SLOT(sAddSite()));
  connect(_revokeSite, SIGNAL(clicked()), this, SLOT(sRevokeSite()));

  _available->addColumn("Available Privileges", -1, Qt::AlignLeft);
  _granted->addColumn("Granted Privileges", -1, Qt::AlignLeft);

  _availableGroup->addColumn("Available Roles", -1, Qt::AlignLeft);
  _grantedGroup->addColumn("Granted Roles", -1, Qt::AlignLeft);

  _availableSite->addColumn("Available Sites", -1, Qt::AlignLeft);
  _grantedSite->addColumn("Granted Sites",      -1, Qt::AlignLeft);

  _locale->setType(XComboBox::Locales);

  XSqlQuery modq;
  modq.exec( "SELECT DISTINCT priv_module FROM priv ORDER BY priv_module;" );
  for (int i = 0; modq.next(); i++)
    _module->append(i, modq.value("priv_module").toString());

  if(_evaluation == true)
  {
    _enhancedAuth->setEnabled(false);
    _passwd->setEnabled(false);
    _verify->setEnabled(false);
  }

  if (!_metrics->boolean("MultiWhs"))
    _tab->removeTab(_tab->indexOf(_siteTab));
}
Esempio n. 18
0
enum SetResponse user::set(const ParameterList &pParams)
{
  XDialog::set(pParams);
  QVariant param;
  bool     valid;

  param = pParams.value("username", &valid);
  if (valid)
  {
    _cUsername = param.toString();
    populate();
  }
      
  param = pParams.value("mode", &valid);
  if (valid)
  {
    if (param.toString() == "new")
    {
      _mode = cNew;
      _module->setCurrentIndex(0);
      sModuleSelected(_module->text(0));

      if (_cUsername.isEmpty())
        _username->setFocus();
      else
      {
        _username->setEnabled(false);
        _username->setText(_cUsername);
        _active->setFocus();
        sCheck();
      }
      if (_metrics->boolean("MultiWhs"))
        populateSite();
    }
    else if (param.toString() == "edit")
    {
      _mode = cEdit;

      _username->setEnabled(FALSE);

      _save->setFocus();
    }
    else if (param.toString() == "view")
    {
      _mode = cView;

      _close->setText(tr("&Close"));
      _save->hide();

      _close->setFocus();
    }
  }

  if(cView != _mode)
    _inTransaction = q.exec("BEGIN;");

  return NoError;
}
Esempio n. 19
0
honorific::honorific(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl)
    : XDialog(parent, name, modal, fl)
{
    setupUi(this);

    connect(_buttonBox, SIGNAL(accepted()), this, SLOT(sSave()));
    connect(_buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
    connect(_code, SIGNAL(editingFinished()), this, SLOT(sCheck()));
}
Esempio n. 20
0
/*
 *  Constructs a standardJournal as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal dialog.
 */
standardJournal::standardJournal(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
    setupUi(this);


    // signals and slots connections
    connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
    connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
    connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
    connect(_view, SIGNAL(clicked()), this, SLOT(sView()));
    connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
    connect(_stdjrnlitem, SIGNAL(valid(bool)), _view, SLOT(setEnabled(bool)));
    connect(_name, SIGNAL(lostFocus()), this, SLOT(sCheck()));
    connect(_name, SIGNAL(lostFocus()), this, SLOT(sCheck()));
    connect(_close, SIGNAL(clicked()), this, SLOT(reject()));
    init();
}
Esempio n. 21
0
bankAdjustmentType::bankAdjustmentType(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
  : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  connect(_buttonBox, SIGNAL(accepted()), this, SLOT(sSave()));
  connect(_buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
  connect(_name, SIGNAL(lostFocus()), this, SLOT(sCheck()));
}
Esempio n. 22
0
/*
 *  Constructs a taxZone as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal dialog.
 */
taxZone::taxZone(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  // signals and slots connections
  connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_taxZone, SIGNAL(lostFocus()), this, SLOT(sCheck()));
}
incidentSeverity::incidentSeverity(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  connect(_buttonBox, SIGNAL(accepted()), this, SLOT(sSave()));
  connect(_buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
  connect(_name, SIGNAL(editingFinished()), this, SLOT(sCheck()));
}
Esempio n. 24
0
void rejectCode::sSave()
{
  XSqlQuery rejectSave;
  if (_code->text().length() == 0)
  {
    QMessageBox::information( this, tr("Invalid Reject Code"),
                              tr("You must enter a valid code for this Reject Code.") );
    _code->setFocus();
    return;
  }

  if (_mode == cNew)
  {
    if (sCheck())
    {
      QMessageBox::warning( this, tr("Cannot Save Reject Code"),
                            tr("This Reject code already exists.  You have been placed in edit mode.") );
      return;
    }

    rejectSave.exec("SELECT NEXTVAL('rjctcode_rjctcode_id_seq') AS rjctcode_id");
    if (rejectSave.first())
      _rjctcodeid = rejectSave.value("rjctcode_id").toInt();

    rejectSave.prepare( "INSERT INTO rjctcode "
               "(rjctcode_id, rjctcode_code, rjctcode_descrip) "
               "VALUES "
               "(:rjctcode_id, :rjctcode_code, :rjctcode_descrip);" );
  }
  else if (_mode == cEdit)
    rejectSave.prepare("SELECT rjctcode_id"
              "  FROM rjctcode"
              " WHERE((rjctcode_id != :rjctcode_id)"
              " AND (rjctcode_code = :rjctcode_code));");
    rejectSave.bindValue(":rjctcode_id", _rjctcodeid); 
    rejectSave.bindValue(":rjctcode_code", _code->text());
    rejectSave.exec();
    if (rejectSave.first())
    {
      QMessageBox::warning( this, tr("Cannot Save Reject Code"),
                            tr("You may not rename this Reject code with the entered name as it is in use by another Reject code.") );
      return;
    }

    rejectSave.prepare( "UPDATE rjctcode "
               "SET rjctcode_code=:rjctcode_code,"
               "    rjctcode_descrip=:rjctcode_descrip "
               "WHERE (rjctcode_id=:rjctcode_id);" );

  rejectSave.bindValue(":rjctcode_id", _rjctcodeid);
  rejectSave.bindValue(":rjctcode_code", _code->text());
  rejectSave.bindValue(":rjctcode_descrip", _description->text().trimmed());
  rejectSave.exec();

  done(_rjctcodeid);
}
Esempio n. 25
0
/*
 *  Constructs a incidentPriority as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal dialog.
 */
incidentPriority::incidentPriority(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
    setupUi(this);

    // signals and slots connections
    connect(_buttonBox, SIGNAL(accepted()), this, SLOT(sSave()));
    connect(_buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
    connect(_name, SIGNAL(lostFocus()), this, SLOT(sCheck()));
}
Esempio n. 26
0
shippingForm::shippingForm(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  _shipformid = -1;

  connect(_name,	SIGNAL(editingFinished()),	this, SLOT(sCheck()));
  connect(_buttonBox,	SIGNAL(accepted()),	this, SLOT(sSave()));
}
Esempio n. 27
0
shippingForm::shippingForm(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  _shipformid = -1;

  connect(_name,	SIGNAL(lostFocus()),	this, SLOT(sCheck()));
  connect(_save,	SIGNAL(clicked()),	this, SLOT(sSave()));
}
Esempio n. 28
0
salesRep::salesRep(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(_number, SIGNAL(lostFocus()), this, SLOT(sCheck()));

  _commPrcnt->setValidator(omfgThis->percentVal());
}
Esempio n. 29
0
/*
 *  Constructs a incidentSeverity as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal dialog.
 */
incidentSeverity::incidentSeverity(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
    setupUi(this);

    // signals and slots connections
    connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
    connect(_close, SIGNAL(clicked()), this, SLOT(reject()));
    connect(_name, SIGNAL(lostFocus()), this, SLOT(sCheck()));
}
Esempio n. 30
0
/*
 *  Constructs a opportunityStage as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal dialog.
 */
opportunityStage::opportunityStage(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  // signals and slots connections
  connect(_buttonBox, SIGNAL(accepted()), this, SLOT(sSave()));
  connect(_buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
  connect(_name, SIGNAL(editingFinished()), this, SLOT(sCheck()));
}