Ejemplo n.º 1
0
viewCheckRun::viewCheckRun(QWidget* parent, const char* name, Qt::WFlags fl)
    : QMainWindow(parent, name, fl)
{
  setupUi(this);

  connect(_check, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(sHandleItemSelection()));
  connect(_bankaccnt, SIGNAL(newID(int)), this, SLOT(sFillList()));
  connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
  connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
  connect(_postCheck, SIGNAL(clicked()), this, SLOT(sPost()));
  connect(_printCheck, SIGNAL(clicked()), this, SLOT(sPrint()));
  connect(_printCheckRun, SIGNAL(clicked()), this, SLOT(sPrintCheckRun()));
  connect(_printEditList, SIGNAL(clicked()), this, SLOT(sPrintEditList()));
  connect(_replace, SIGNAL(clicked()), this, SLOT(sReplace()));
  connect(_replaceAll, SIGNAL(clicked()), this, SLOT(sReplaceAll()));
  connect(_void, SIGNAL(clicked()), this, SLOT(sVoid()));

  _check->setRootIsDecorated(TRUE);
  _check->addColumn(tr("Void"),             _ynColumn, Qt::AlignCenter );
  _check->addColumn(tr("Misc."),            _ynColumn, Qt::AlignCenter );
  _check->addColumn(tr("Prt'd"),            _ynColumn, Qt::AlignCenter );
  _check->addColumn(tr("Chk./Voucher/RA #"), _itemColumn, Qt::AlignCenter );
  _check->addColumn(tr("Recipient/Invc./CM #"),       -1, Qt::AlignLeft   );
  _check->addColumn(tr("Check Date") ,    _dateColumn, Qt::AlignCenter );
  _check->addColumn(tr("Amount"),        _moneyColumn, Qt::AlignRight  );
  _check->addColumn(tr("Currency"),   _currencyColumn, Qt::AlignLeft );

  if (omfgThis->singleCurrency())
      _check->hideColumn(7);

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

  sFillList();
}
Ejemplo n.º 2
0
viewCheckRun::viewCheckRun(QWidget* parent, const char* name, Qt::WFlags fl)
    : XWidget(parent, name, fl)
{
  setupUi(this);  
  
  connect(_check, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(sHandleItemSelection()));
  connect(_bankaccnt,     SIGNAL(newID(int)), this, SLOT(sFillList()));
  connect(_delete,         SIGNAL(clicked()), this, SLOT(sDelete()));
  connect(_edit,           SIGNAL(clicked()), this, SLOT(sEdit()));
  connect(_newMiscCheck,   SIGNAL(clicked()), this, SLOT(sNewMiscCheck()));
  connect(_prepareCheckRun,SIGNAL(clicked()), this, SLOT(sPrepareCheckRun()));
  connect(_replace,        SIGNAL(clicked()), this, SLOT(sReplace()));
  connect(_replaceAll,     SIGNAL(clicked()), this, SLOT(sReplaceAll()));
  connect(_vendorgroup,    SIGNAL(updated()), this, SLOT(sFillList()));
  connect(_vendorgroup,    SIGNAL(updated()), this, SLOT(sHandleVendorGroup()));
  connect(_void,           SIGNAL(clicked()), this, SLOT(sVoid()));

  _check->addColumn(tr("Void"),               _ynColumn, Qt::AlignCenter,true, "checkhead_void");
  _check->addColumn(tr("Misc."),              _ynColumn, Qt::AlignCenter,true, "checkhead_misc" );
  _check->addColumn(tr("Prt'd"),              _ynColumn, Qt::AlignCenter,true, "checkhead_printed" );
  _check->addColumn(tr("Chk./Voucher/RA #"),_itemColumn, Qt::AlignCenter,true, "number" );
  _check->addColumn(tr("Recipient/Invc./CM #"),      -1, Qt::AlignLeft,  true, "description"   );
  _check->addColumn(tr("Check Date") ,      _dateColumn, Qt::AlignCenter,true, "checkdate" );
  _check->addColumn(tr("Amount"),          _moneyColumn, Qt::AlignRight, true, "amount"  );
  _check->addColumn(tr("Currency"),     _currencyColumn, Qt::AlignLeft,  true, "currAbbr" );
  if (_metrics->boolean("ACHSupported") && _metrics->boolean("ACHEnabled"))
    _check->addColumn(tr("EFT Batch"),     _orderColumn, Qt::AlignLeft,  true, "checkhead_ach_batch" );

  if (omfgThis->singleCurrency())
      _check->hideColumn("curr_concat");

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

  sFillList(); 
}