Example #1
0
void assignLotSerial::sNew()
{
  ParameterList params;
  params.append("itemloc_series", _itemlocSeries);
  params.append("itemlocdist_id", _itemlocdistid);
  params.append("qtyRemaining",    _qtyBalance->text());

  createLotSerial newdlg(this, "", true);
  newdlg.set(params);
  if (newdlg.exec() != XDialog::Rejected)
  {
    sFillList();
    if (_qtyBalance->toDouble() > 0)
      sNew();
  }
}
Example #2
0
customCommands::customCommands(QWidget* parent, const char* name, Qt::WFlags fl)
    : XMainWindow(parent, name, fl)
{
  setupUi(this);

  (void)statusBar();

  connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
  connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
  connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));

  _commands->addColumn(tr("Module"), _itemColumn, Qt::AlignCenter );
  _commands->addColumn(tr("Menu Label"), -1,     Qt::AlignLeft );

  sFillList();
}
Example #3
0
accountNumbers::accountNumbers(QWidget* parent, const char* name, Qt::WFlags fl)
    : XMainWindow(parent, name, fl)
{
  setupUi(this);

  (void)statusBar();

  connect(_print, SIGNAL(clicked()), this, SLOT(sPrint()));
  connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
  connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
  connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));

  sBuildList();

  connect(omfgThis, SIGNAL(configureGLUpdated()), this, SLOT(sBuildList()));
}
void TestProgressDialog::TestSettingProgressViaStaticHelper()
{
    CStdString sOrig( _T( "This text arrived via SetProgressText." ) ),
               sNew ( _T( "This text arrived via SendMessage()" ));

    WorkshareProgress wProg;
    wProg.SetProgressText( sOrig );
    assertMessage( sOrig.Compare(wProg.GetProgressText()) == 0, _T("Unexpected value for GetProgressText()") ) ;
    HWND hWnd = wProg.GetHWND();
    assertMessage( hWnd != NULL , _T("Unexpected value for hWnd"));
    Sleep(1000);
    SetProgressTextHWND( sNew, hWnd );
    assertMessage( sNew.Compare(wProg.GetProgressText())==0,  _T("Unexpected value for GetProgressText()") );
    Sleep(1000);
    
}
Example #5
0
commentTypes::commentTypes(QWidget* parent, const char* name, Qt::WFlags fl)
    : XWidget(parent, name, fl)
{
  setupUi(this);

  connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
  connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
  connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
  connect(_cmnttype, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), this, SLOT(sHandleButtons()));

  _cmnttype->addColumn(tr("Name"), _itemColumn, Qt::AlignLeft,  true, "cmnttype_name");
  _cmnttype->addColumn(tr("Sys."),   _ynColumn, Qt::AlignCenter,true, "cmnttype_sys");
  _cmnttype->addColumn(tr("Description"),   -1, Qt::AlignLeft,  true, "cmnttype_descrip");

  sFillList();
}
Example #6
0
/*
 *  Constructs a shippingForms as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
shippingForms::shippingForms(QWidget* parent, const char* name, Qt::WFlags fl)
    : XWidget(parent, name, fl)
{
    setupUi(this);

//    (void)statusBar();

    // signals and slots connections
    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(_close, SIGNAL(clicked()), this, SLOT(close()));
    connect(_bolformat, SIGNAL(valid(bool)), _view, SLOT(setEnabled(bool)));
    init();
}
Example #7
0
/*
 *  Constructs a itemGroups as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
itemGroups::itemGroups(QWidget* parent, const char* name, Qt::WFlags fl)
    : QMainWindow(parent, name, fl)
{
    setupUi(this);

    (void)statusBar();

    // signals and slots connections
    connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
    connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
    connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
    connect(_close, SIGNAL(clicked()), this, SLOT(close()));
    connect(_view, SIGNAL(clicked()), this, SLOT(sView()));
    connect(_itemgrp, SIGNAL(valid(bool)), _view, SLOT(setEnabled(bool)));
    init();
}
Example #8
0
quotes::quotes(QWidget* parent, const char* name, Qt::WFlags fl)
    : QMainWindow(parent, name, fl)
{
  setupUi(this);

  connect(_quote, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*)), this, SLOT(sPopulateMenu(QMenu*)));
  connect(_convert, SIGNAL(clicked()), this, SLOT(sConvert()));
  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(_print, SIGNAL(clicked()), this, SLOT(sPrint()));
  connect(_showProspects, SIGNAL(toggled(bool)), this, SLOT(sFillList()));
  connect(_warehouse, SIGNAL(updated()), this, SLOT(sFillList()));

  _quote->addColumn(tr("Quote #"),    _orderColumn, Qt::AlignRight  );
  _quote->addColumn(tr("Customer"),   -1,           Qt::AlignLeft   );
  _quote->addColumn(tr("P/O Number"), _itemColumn,  Qt::AlignLeft   );
  _quote->addColumn(tr("Quote Date"), _dateColumn,  Qt::AlignCenter );
  _quote->setSelectionMode(QAbstractItemView::ExtendedSelection);

  if (_privleges->check("PrintQuotes"))
    connect(_quote, SIGNAL(valid(bool)), _print, SLOT(setEnabled(bool)));

  if (_privleges->check("ConvertQuotes"))
    connect(_quote, SIGNAL(valid(bool)), _convert, SLOT(setEnabled(bool)));

  if (_privleges->check("MaintainQuotes"))
  {
    connect(_quote, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool)));
    connect(_quote, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool)));
    connect(_quote, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick()));
  }
  else
  {
    _new->setEnabled(FALSE);
    connect(_quote, SIGNAL(itemSelected(int)), _view, SLOT(animateClick()));
  }

  connect(omfgThis, SIGNAL(quotesUpdated(int, bool)), this, SLOT(sFillList()));

  Preferences _pref = Preferences(omfgThis->username());
  if (_pref.boolean("XCheckBox/forgetful"))
    _showProspects->setChecked(true);

  sFillList();
}
Example #9
0
openVouchers::openVouchers(QWidget* parent, const char* name, Qt::WFlags fl)
    : QMainWindow(parent, name, fl)
{
  setupUi(this);

  (void)statusBar();

  connect(_print, SIGNAL(clicked()), this, SLOT(sPrint()));
  connect(_vohead, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*)), this, SLOT(sPopulateMenu(QMenu*)));
  connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
  connect(_view, SIGNAL(clicked()), this, SLOT(sView()));
  connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
  connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
  connect(_newMisc, SIGNAL(clicked()), this, SLOT(sNewMisc()));
  connect(_post, SIGNAL(clicked()), this, SLOT(sPost()));

  _vohead->addColumn(tr("Vchr. #"),        _orderColumn, Qt::AlignRight  );
  _vohead->addColumn(tr("P/O #"),          _orderColumn, Qt::AlignRight  );
  _vohead->addColumn(tr("Vendor"),         -1,           Qt::AlignLeft   );
  _vohead->addColumn(tr("Vend. Type"),     _itemColumn,  Qt::AlignLeft   );
  _vohead->addColumn(tr("Vendor Invc. #"), _itemColumn,  Qt::AlignRight  );
  _vohead->addColumn(tr("Dist. Date"),     _dateColumn,  Qt::AlignCenter );
  _vohead->addColumn(tr("G/L Post Date"),  _dateColumn,  Qt::AlignCenter );

  if (! _privleges->check("ChangeVOPostDate"))
    _vohead->hideColumn(6);

  if (_privleges->check("MaintainVouchers"))
  {
    connect(_vohead, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool)));
    connect(_vohead, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool)));
    connect(_vohead, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick()));
  }
  else
  {
    _new->setEnabled(FALSE);
    _newMisc->setEnabled(FALSE);
    connect(_vohead, SIGNAL(itemSelected(int)), _view, SLOT(animateClick()));
  }

  if (_privleges->check("PostVouchers"))
    connect(_vohead, SIGNAL(valid(bool)), _post, SLOT(setEnabled(bool)));

  connect(omfgThis, SIGNAL(vouchersUpdated()), this, SLOT(sFillList()));

  sFillList();
}
Example #10
0
/*
 *  Constructs a currencies as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
currencies::currencies(QWidget* parent, const char* name, Qt::WFlags fl)
    : QMainWindow(parent, name, fl)
{
    setupUi(this);

    (void)statusBar();

    // signals and slots connections
    connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
    connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
    connect(_close, SIGNAL(clicked()), this, SLOT(close()));
    connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
    connect(_view, SIGNAL(clicked()), this, SLOT(sView()));
    connect(_curr, SIGNAL(valid(bool)), _view, SLOT(setEnabled(bool)));
    connect(_curr, SIGNAL(populateMenu(Q3PopupMenu*,Q3ListViewItem*,int)), this, SLOT(sPopulateMenu(Q3PopupMenu*)));
    init();
}
Example #11
0
assignLotSerial::assignLotSerial(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : QDialog(parent, name, modal, fl)
{
  setupUi(this);

  connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
  connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
  connect(_assign, SIGNAL(clicked()), this, SLOT(sAssign()));

  _trapClose = TRUE;

  _item->setReadOnly(TRUE);

  _itemlocdist->addColumn( tr("Lot/Serial #"), -1,          Qt::AlignLeft   );
  _itemlocdist->addColumn( tr("Expires"),      _dateColumn, Qt::AlignCenter );
  _itemlocdist->addColumn( tr("Qty."),         _qtyColumn,  Qt::AlignRight  );
}
Example #12
0
/*
 *  Constructs a departments as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
departments::departments(QWidget* parent, const char* name, Qt::WFlags fl)
    : XMainWindow(parent, name, fl)
{
    setupUi(this);

    (void)statusBar();

    // signals and slots connections
    connect(_close, SIGNAL(clicked()), this, SLOT(sClose()));
    connect(_print, SIGNAL(clicked()), this, SLOT(sPrint()));
    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(_deptList, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*)));
    init();
}
Example #13
0
/*
 *  Constructs a hotkeys 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.
 */
hotkeys::hotkeys(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : QDialog(parent, name, modal, fl)
{
    setupUi(this);


    // signals and slots connections
    connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
    connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
    connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
    connect(_hotkey, SIGNAL(populateMenu(Q3PopupMenu*,Q3ListViewItem*,int)), this, SLOT(sPopulateMenu(Q3PopupMenu*)));
    connect(_close, SIGNAL(clicked()), this, SLOT(sClose()));
    connect(_hotkey, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool)));
    connect(_hotkey, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool)));
    connect(_hotkey, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick()));
    init();
}
Example #14
0
/*
 *  Constructs a projects as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
projects::projects(QWidget* parent, const char* name, Qt::WFlags fl)
    : XWidget(parent, name, fl)
{
    setupUi(this);

//    (void)statusBar();

    // signals and slots connections
    connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
    connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
    connect(_prj, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*)));
    connect(_close, SIGNAL(clicked()), this, SLOT(close()));
    connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
    connect(_view, SIGNAL(clicked()), this, SLOT(sView()));
    connect(_prj, SIGNAL(valid(bool)), _view, SLOT(setEnabled(bool)));
    init();
}
Example #15
0
characteristic::characteristic(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  _charid = -1;

  _charoptModel = new QSqlTableModel;
  _charoptModel->setTable("charopt");
  _charoptModel->setEditStrategy(QSqlTableModel::OnManualSubmit);

  connect(_buttonBox, SIGNAL(accepted()), this, SLOT(sSave()));
  connect(_name, SIGNAL(editingFinished()), this, SLOT(sCheck()));
  connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
  connect(_charoptView, SIGNAL(clicked(QModelIndex)), this, SLOT(sCharoptClicked(QModelIndex)));
  connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
}
Example #16
0
/*
 *  Constructs a forms as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
forms::forms(QWidget* parent, const char* name, Qt::WFlags fl)
    : XWidget(parent, name, fl)
{
    setupUi(this);

//    (void)statusBar();

    // signals and slots connections
    connect(_form, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool)));
    connect(_form, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick()));
    connect(_form, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool)));
    connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
    connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
    connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
    connect(_close, SIGNAL(clicked()), this, SLOT(close()));
    init();
}
Example #17
0
glSeries::glSeries(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  _post = _buttonBox->addButton(tr("&Post"), QDialogButtonBox::ActionRole);

  connect(_delete,	SIGNAL(clicked()),	this, SLOT(sDelete()));
  connect(_edit,	SIGNAL(clicked()),	this, SLOT(sEdit()));
  connect(_new,		SIGNAL(clicked()),	this, SLOT(sNew()));
  connect(_post,	SIGNAL(clicked()),	this, SLOT(sPost()));
  connect(_buttonBox,	SIGNAL(accepted()),	this, SLOT(sSave()));

  _glseries->addColumn(tr("Account"), -1,           Qt::AlignLeft,  true,  "account"  );
  _glseries->addColumn(tr("Debit"),   _moneyColumn, Qt::AlignRight, true,  "debit" );
  _glseries->addColumn(tr("Credit"),  _moneyColumn, Qt::AlignRight, true,  "credit" );

  _credits->setPrecision(omfgThis->moneyVal());
  _debits->setPrecision(omfgThis->moneyVal());
  _diff->setPrecision(omfgThis->moneyVal());

  _source->setText("G/L");
  _source->setEnabled(false);

  _doctype->addItem("AD");
  _doctype->addItem("CD");
  _doctype->addItem("CK");
  _doctype->addItem("CM");
  _doctype->addItem("CR");
  _doctype->addItem("CT");
  _doctype->addItem("DM");
  _doctype->addItem("DS");
  _doctype->addItem("IN");
  _doctype->addItem("JE");
  _doctype->addItem("MM");
  _doctype->addItem("PO");
  _doctype->addItem("SO");
  _doctype->addItem("ST");
  _doctype->addItem("VO");
  _doctype->addItem("WO");
  _doctype->setCurrentIndex(_doctype->findText("JE"));

  _submit = false;
  _journal = 0;
}
bankAdjustmentEditList::bankAdjustmentEditList(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(_view, SIGNAL(clicked()), this, SLOT(sView()));
  connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
  connect(_bankaccnt, SIGNAL(newID(int)), this, SLOT(sFillList()));
  connect(_adjustments, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*)));

 _bankaccnt->populate("SELECT bankaccnt_id,"
		     "       (bankaccnt_name || '-' || bankaccnt_descrip),"
		     "       bankaccnt_name "
		     "FROM bankaccnt "
		     "ORDER BY bankaccnt_name;");
  
  _adjustments->addColumn(tr("Bank Account"),_itemColumn, Qt::AlignLeft,  true, "f_bank");
  _adjustments->addColumn(tr("Adj. Type"),  _orderColumn, Qt::AlignLeft,  true, "bankadjtype_name");
  _adjustments->addColumn(tr("Dist. Date"),  _dateColumn, Qt::AlignCenter,true, "bankadj_date");
  _adjustments->addColumn(tr("Doc. Number"),          -1, Qt::AlignRight, true, "bankadj_docnumber");
  _adjustments->addColumn(tr("Amount"),  _bigMoneyColumn, Qt::AlignRight, true, "bankadj_amount");
  _adjustments->addColumn(tr("Currency"),_currencyColumn, Qt::AlignLeft,  true, "currabbr");

  if (omfgThis->singleCurrency())
      _adjustments->hideColumn("currabbr");
  
  if (_privileges->check("MaintainBankAdjustments"))
  {
    connect(_adjustments, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool)));
    connect(_adjustments, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool)));
    connect(_adjustments, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick()));
  }
  else
  {
    _new->setEnabled(FALSE);
    connect(_adjustments, SIGNAL(itemSelected(int)), _view, SLOT(animateClick()));
  }
  
  connect(omfgThis, SIGNAL(bankAdjustmentsUpdated(int, bool)), this, SLOT(sFillList()));
  
  sFillList();
}
cashReceiptsEditList::cashReceiptsEditList(QWidget* parent, const char* name, Qt::WFlags fl)
    : XWidget(parent, name, fl)
{
    setupUi(this);

    connect(_cashrcpt, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*)));
    connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
    connect(_edit,   SIGNAL(clicked()), this, SLOT(sEdit()));
    connect(_new,    SIGNAL(clicked()), this, SLOT(sNew()));
    connect(_print,  SIGNAL(clicked()), this, SLOT(sPrint()));
    connect(_view,   SIGNAL(clicked()), this, SLOT(sView()));
    connect(_post,   SIGNAL(clicked()), this, SLOT(sPost()));

    _cashrcpt->addColumn(tr("Number"),           _orderColumn, Qt::AlignLeft,  true, "cashrcpt_number");
    _cashrcpt->addColumn(tr("Cust. #"),       _bigMoneyColumn, Qt::AlignLeft,  true, "cust_number");
    _cashrcpt->addColumn(tr("Name"),                       -1, Qt::AlignLeft,  true, "cust_name");
    _cashrcpt->addColumn(tr("Check/Doc. #"),     _orderColumn, Qt::AlignLeft,  true, "cashrcpt_docnumber");
    _cashrcpt->addColumn(tr("Bank Account"),     _orderColumn, Qt::AlignLeft,  true, "bankaccnt_name");
    _cashrcpt->addColumn(tr("Dist. Date"),        _dateColumn, Qt::AlignCenter,true, "cashrcpt_distdate");
    _cashrcpt->addColumn(tr("Funds Type"),    _bigMoneyColumn, Qt::AlignCenter,true, "cashrcpt_fundstype");
    _cashrcpt->addColumn(tr("Amount"),        _bigMoneyColumn, Qt::AlignRight, true, "cashrcpt_amount");
    _cashrcpt->addColumn(tr("Currency"),      _currencyColumn, Qt::AlignLeft,  true, "currabbr");

    if (omfgThis->singleCurrency())
        _cashrcpt->hideColumn("cashrcpt_curr_id");

    if (_privileges->check("PostCashReceipts"))
        connect(_cashrcpt, SIGNAL(valid(bool)), _post, SLOT(setEnabled(bool)));

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

    connect(omfgThis, SIGNAL(cashReceiptsUpdated(int, bool)), this, SLOT(sFillList()));

    sFillList();
}
Example #20
0
Comments::Comments(QWidget *pParent, const char *name) :
  QWidget(pParent, name)
{
  _source = Uninitialized;
  _sourceid = -1;

  QHBoxLayout *main = new QHBoxLayout(this);
  main->setMargin(0);
  main->setSpacing(7);

  QWidget *buttons = new QWidget(this);
  QVBoxLayout * buttonsLayout = new QVBoxLayout(buttons);
  buttonsLayout->setMargin(0);
  buttonsLayout->setSpacing(0);

  _comment = new XTreeWidget(this);
  _comment->setObjectName("_comment");
  _comment->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
  _comment->addColumn(tr("Date/Time"), _timeDateColumn, Qt::AlignCenter,true, "comment_date");
  _comment->addColumn(tr("Type"),    _itemColumn, Qt::AlignCenter,true, "type");
  _comment->addColumn(tr("User"),    _userColumn, Qt::AlignCenter,true, "comment_user");
  _comment->addColumn(tr("Comment"), -1,          Qt::AlignLeft,  true, "first");
  main->addWidget(_comment);

  _newComment = new QPushButton(tr("New"), buttons, "_newComment");
  buttonsLayout->addWidget(_newComment);

  _viewComment = new QPushButton(tr("View"), buttons, "_viewComment");
  _viewComment->setEnabled(FALSE);
  buttonsLayout->addWidget(_viewComment);

  QSpacerItem *_buttonSpacer = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
  buttonsLayout->addItem(_buttonSpacer);
  buttons->setLayout(buttonsLayout);
  main->addWidget(buttons);

  setLayout(main);

  connect(_newComment, SIGNAL(clicked()), this, SLOT( sNew()));
  connect(_viewComment, SIGNAL(clicked()), this, SLOT( sView()));
  connect(_comment, SIGNAL(valid(bool)), _viewComment, SLOT(setEnabled(bool)));
  connect(_comment, SIGNAL(itemSelected(int)), _viewComment, SLOT(animateClick()));

  setFocusProxy(_comment);
}
Example #21
0
unpostedCreditMemos::unpostedCreditMemos(QWidget* parent, const char* name, Qt::WFlags fl)
    : XWidget(parent, name, fl)
{
    setupUi(this);

    connect(_cmhead, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*)), this, SLOT(sPopulateMenu(QMenu*)));
    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(_print, SIGNAL(clicked()), this, SLOT(sPrint()));
    connect(_post, SIGNAL(clicked()), this, SLOT(sPost()));

    _cmhead->addColumn(tr("C/M #"),         _orderColumn, Qt::AlignLeft,   true,  "cmhead_number"   );
    _cmhead->addColumn(tr("Prnt'd"),        _orderColumn, Qt::AlignCenter, true,  "printed" );
    _cmhead->addColumn(tr("Customer"),      -1,           Qt::AlignLeft,   true,  "cmhead_billtoname"   );
    _cmhead->addColumn(tr("Memo Date"),     _dateColumn,  Qt::AlignCenter, true,  "cmhead_docdate" );
    _cmhead->addColumn(tr("Hold"),          _whsColumn,   Qt::AlignCenter, true,  "cmhead_hold" );
    _cmhead->addColumn(tr("G/L Dist Date"), _dateColumn,  Qt::AlignCenter, true,  "distdate" );

    if (! _privileges->check("ChangeSOMemoPostDate"))
      _cmhead->hideColumn(5);

    if (_privileges->check("MaintainCreditMemos"))
    {
      connect(_cmhead, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool)));
      connect(_cmhead, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool)));
      connect(_cmhead, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick()));
    }
    else
    {
      _new->setEnabled(FALSE);
      connect(_cmhead, SIGNAL(itemSelected(int)), _view, SLOT(animateClick()));
    }
    
    if (_privileges->check("PrintCreditMemos"))
      connect(_cmhead, SIGNAL(valid(bool)), _print, SLOT(setEnabled(bool)));

    if (_privileges->check("PostARDocuments"))
      connect(_cmhead, SIGNAL(valid(bool)), _post, SLOT(setEnabled(bool)));

    connect(omfgThis, SIGNAL(creditMemosUpdated()), this, SLOT(sFillList()));

    sFillList();
}
Example #22
0
/*
 *  Constructs a itemImage 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.
 */
itemImage::itemImage(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
  : QDialog(parent, name, modal, fl)
{
  setupUi(this);


  // signals and slots connections
  connect(_image, SIGNAL(valid(bool)), _save, SLOT(setEnabled(bool)));
  connect(_close, SIGNAL(clicked()), this, SLOT(reject()));
  connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
  connect(_view, SIGNAL(clicked()), this, SLOT(sView()));

  _image->addColumn(tr("Name"),        _itemColumn, Qt::AlignLeft );
  _image->addColumn(tr("Description"), -1,          Qt::AlignLeft );

  sFillList();
}
Example #23
0
/*
 *  Constructs a salesCategories as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
salesCategories::salesCategories(QWidget* parent, const char* name, Qt::WFlags fl)
    : XMainWindow(parent, name, fl)
{
    setupUi(this);

    (void)statusBar();

    // signals and slots connections
    connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
    connect(_view, SIGNAL(clicked()), this, SLOT(sView()));
    connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
    connect(_print, SIGNAL(clicked()), this, SLOT(sPrint()));
    connect(_close, SIGNAL(clicked()), this, SLOT(close()));
    connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
    connect(_copy, SIGNAL(clicked()), this, SLOT(sCopy()));
    connect(_salescat, SIGNAL(valid(bool)), _view, SLOT(setEnabled(bool)));
    init();
}
Example #24
0
/*
 *  Constructs a locations as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
locations::locations(QWidget* parent, const char* name, Qt::WFlags fl)
    : XMainWindow(parent, name, fl)
{
    setupUi(this);

    (void)statusBar();

    // signals and slots connections
    connect(_print, SIGNAL(clicked()), this, SLOT(sPrint()));
    connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
    connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
    connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
    connect(_close, SIGNAL(clicked()), this, SLOT(close()));
    connect(_location, SIGNAL(valid(bool)), _view, SLOT(setEnabled(bool)));
    connect(_view, SIGNAL(clicked()), this, SLOT(sView()));
    connect(_warehouse, SIGNAL(updated()), this, SLOT(sFillList()));
    init();
}
Example #25
0
/*
 *  Constructs a bankAdjustmentTypes as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
bankAdjustmentTypes::bankAdjustmentTypes(QWidget* parent, const char* name, Qt::WFlags fl)
    : XMainWindow(parent, name, fl)
{
    setupUi(this);

    (void)statusBar();

    // signals and slots connections
    connect(_bankadjtype, SIGNAL(valid(bool)), _view, SLOT(setEnabled(bool)));
    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(_print, SIGNAL(clicked()), this, SLOT(sPrint()));
    connect(_bankadjtype, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*)));
    connect(_close, SIGNAL(clicked()), this, SLOT(close()));
    init();
}
Example #26
0
uom::uom(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(_name, SIGNAL(editingFinished()), this, SLOT(sCheck()));
  connect(_buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
  connect(_uomconv, SIGNAL(itemSelectionChanged()), this, SLOT(sSelected()));
  connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
  connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
  connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));

  _uomconv->addColumn(tr("UOM/UOM"),    -1,        Qt::AlignLeft,   true,  "uomuom");
  _uomconv->addColumn(tr("From Value"), -1,        Qt::AlignRight,  true,  "uomconv_from_value");
  _uomconv->addColumn(tr("To Value"),   -1,        Qt::AlignRight,  true,  "uomconv_to_value");
  _uomconv->addColumn(tr("Fractional"), _ynColumn, Qt::AlignCenter, true,  "uomconv_fractional");
}
Example #27
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();
}
Example #28
0
/*
 *  Constructs a ediProfile 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.
 */
ediProfile::ediProfile(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
    setupUi(this);


    // signals and slots connections
    connect(_cancel, SIGNAL(clicked()), this, SLOT(reject()));
    connect(_type, SIGNAL(activated(int)), _stack, SLOT(raiseWidget(int)));
    connect(_accept, SIGNAL(clicked()), this, SLOT(sSave()));
    connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
    connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
    connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
    connect(_forms, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool)));
    connect(_forms, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool)));
    connect(_forms, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick()));
    init();
}
Example #29
0
customerType::customerType(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  _custtypeid = -1;

  connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_close, SIGNAL(clicked()), this, SLOT(close()));
  connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
  connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
  connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
  connect(_code, SIGNAL(lostFocus()), this, SLOT(sCheck()));
  
  _charass->addColumn(tr("Characteristic"), _itemColumn, Qt::AlignLeft,  true, "char_name");
  _charass->addColumn(tr("Value"),          -1,          Qt::AlignLeft,  true, "charass_value");
  _charass->addColumn(tr("Default"),        _ynColumn,   Qt::AlignCenter,true, "charass_default");
}
Example #30
0
void dspWoEffortByWorkOrder::sPopulateMenu(QMenu *pMenu, QTreeWidgetItem *)
{
  int menuItem;

  if (_wotc->id() != -1)
  {
    menuItem = pMenu->insertItem(tr("New"), this, SLOT(sNew()), 0);
    pMenu->setItemEnabled(menuItem, _privleges->check("MaintainWoTimeClock"));
    
    menuItem = pMenu->insertItem(tr("Edit"), this, SLOT(sEdit()), 0);
    pMenu->setItemEnabled(menuItem, _privleges->check("MaintainWoTimeClock"));

    menuItem = pMenu->insertItem(tr("View"), this, SLOT(sView()), 0);

    menuItem = pMenu->insertItem(tr("Delete"), this, SLOT(sDelete()), 0);
    pMenu->setItemEnabled(menuItem, _privleges->check("MaintainWoTimeClock"));
  }
}