Пример #1
0
vendor::vendor(QWidget* parent, const char* name, Qt::WFlags fl)
    : XMainWindow(parent, name, fl)
{
  setupUi(this);

  connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_printAddresses, SIGNAL(clicked()), this, SLOT(sPrintAddresses()));
  connect(_newAddress, SIGNAL(clicked()), this, SLOT(sNewAddress()));
  connect(_editAddress, SIGNAL(clicked()), this, SLOT(sEditAddress()));
  connect(_viewAddress, SIGNAL(clicked()), this, SLOT(sViewAddress()));
  connect(_deleteAddress, SIGNAL(clicked()), this, SLOT(sDeleteAddress()));
  connect(_deleteTaxreg, SIGNAL(clicked()), this, SLOT(sDeleteTaxreg()));
  connect(_editTaxreg,   SIGNAL(clicked()), this, SLOT(sEditTaxreg()));
  connect(_newTaxreg,    SIGNAL(clicked()), this, SLOT(sNewTaxreg()));
  connect(_viewTaxreg,   SIGNAL(clicked()), this, SLOT(sViewTaxreg()));
  connect(_next, SIGNAL(clicked()), this, SLOT(sNext()));
  connect(_previous, SIGNAL(clicked()), this, SLOT(sPrevious()));

  _defaultCurr->setLabel(_defaultCurrLit);

  _vendaddr->addColumn(tr("Number"),           70,  Qt::AlignLeft );
  _vendaddr->addColumn(tr("Name"),             150, Qt::AlignLeft );
  _vendaddr->addColumn(tr("City, State, Zip"), -1,  Qt::AlignLeft );

  _taxreg->addColumn(tr("Tax Authority"), 100, Qt::AlignLeft );
  _taxreg->addColumn(tr("Registration #"), -1, Qt::AlignLeft );

  _crmacctid = -1;
  _ignoreClose = false;
  _NumberGen = -1;
  
  if (!_metrics->boolean("EnableBatchManager"))
    _tabs->removePage(_tabs->page(_tabs->count()-1));
}
Пример #2
0
RunPage::RunPage(QWidget *parent)
    : QWidget(parent)
{
    QGroupBox *packagesGroup = new QGroupBox(tr("Finished configuration"));
    QGridLayout *packagesLayout = new QGridLayout;
    packagesGroup->setLayout(packagesLayout);

    QPushButton *runButton = new QPushButton(tr("Start docking"));
    connect( runButton, SIGNAL(clicked()), this, SLOT(dock()));
    QVBoxLayout *mainLayout = new QVBoxLayout;

    QPushButton *previousButton = new QPushButton(tr("Previous"));
    connect(previousButton, SIGNAL(clicked()), this, SLOT(sPrevious()));

    QLabel    *popLabel = new QLabel(tr("              "));

    QHBoxLayout *buttonsLayout = new QHBoxLayout;
    buttonsLayout->addStretch(1);
//    buttonsLayout->addWidget(previousButton);
    buttonsLayout->addWidget(popLabel);

    mainLayout->addSpacing(12);
    mainLayout->addWidget(packagesGroup);
    mainLayout->addWidget(runButton);
    mainLayout->addStretch(1);
    mainLayout->addLayout(buttonsLayout);
    setLayout(mainLayout);
}
Пример #3
0
BindingSitePage::BindingSitePage(QWidget *parent)
    : QWidget(parent)
{

    QGroupBox *packageGroup = new QGroupBox(tr("Binding Site"));

    QLabel *xLabel=new QLabel( tr("center x:") );
    xEdit=new QLineEdit;

    QLabel *yLabel=new QLabel( tr("y:") );
    yEdit=new QLineEdit;

    QLabel *zLabel=new QLabel( tr("z:") );
    zEdit=new QLineEdit;

    QHBoxLayout *centerLayout = new QHBoxLayout;
    centerLayout->addWidget(xLabel);
    centerLayout->addWidget(xEdit);
    centerLayout->addWidget(yLabel);
    centerLayout->addWidget(yEdit);
    centerLayout->addWidget(zLabel);
    centerLayout->addWidget(zEdit);

    QLabel *rLabel=new QLabel(tr("radius:"));
    rEdit=new QLineEdit;
    QHBoxLayout *rLayout = new QHBoxLayout;
    rLayout->addWidget(rLabel);
    rLayout->addWidget(rEdit);

    QPushButton *updateButton = new QPushButton(tr("view binding site"));
    connect(updateButton, SIGNAL(clicked()), this, SLOT(getData()) );

    QVBoxLayout *packageLayout = new QVBoxLayout;
    packageLayout->addLayout(centerLayout);
    packageLayout->addLayout(rLayout);
    packageGroup->setLayout(packageLayout);

    QPushButton *previousButton = new QPushButton(tr("Previous"));
    connect(previousButton, SIGNAL(clicked()), this, SLOT(sPrevious()));
    QPushButton *nextButton = new QPushButton(tr("Next"));
    connect(nextButton, SIGNAL(clicked()), this, SLOT(sNext()));

    QHBoxLayout *buttonsLayout = new QHBoxLayout;
    buttonsLayout->addStretch(1);
    buttonsLayout->addWidget(previousButton);
    buttonsLayout->addWidget(nextButton);

    QVBoxLayout *mainLayout = new QVBoxLayout;
    mainLayout->addWidget(packageGroup);
    mainLayout->addWidget(updateButton);
    mainLayout->addStretch(12);
    mainLayout->addLayout(buttonsLayout);
    setLayout(mainLayout);
}
Пример #4
0
vendor::vendor(QWidget* parent, const char* name, Qt::WFlags fl)
    : XWidget(parent, name, fl)
{
  setupUi(this);

  connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_printAddresses, SIGNAL(clicked()), this, SLOT(sPrintAddresses()));
  connect(_newAddress, SIGNAL(clicked()), this, SLOT(sNewAddress()));
  connect(_editAddress, SIGNAL(clicked()), this, SLOT(sEditAddress()));
  connect(_viewAddress, SIGNAL(clicked()), this, SLOT(sViewAddress()));
  connect(_deleteAddress, SIGNAL(clicked()), this, SLOT(sDeleteAddress()));
  connect(_deleteTaxreg, SIGNAL(clicked()), this, SLOT(sDeleteTaxreg()));
  connect(_editTaxreg,   SIGNAL(clicked()), this, SLOT(sEditTaxreg()));
  connect(_newTaxreg,    SIGNAL(clicked()), this, SLOT(sNewTaxreg()));
  connect(_viewTaxreg,   SIGNAL(clicked()), this, SLOT(sViewTaxreg()));
  connect(_next, SIGNAL(clicked()), this, SLOT(sNext()));
  connect(_previous, SIGNAL(clicked()), this, SLOT(sPrevious()));
  connect(_mainButton, SIGNAL(clicked()), this, SLOT(sHandleButtons()));
  connect(_altButton, SIGNAL(clicked()), this, SLOT(sHandleButtons()));

  _defaultCurr->setLabel(_defaultCurrLit);
  _routingNumber->setValidator(new QIntValidator(100000000, 999999999, this));
  _achAccountNumber->setValidator(new QRegExpValidator(QRegExp("^\\d{4,17}$"), this));

  _vendaddr->addColumn(tr("Number"), 70, Qt::AlignLeft, true, "vendaddr_code");
  _vendaddr->addColumn(tr("Name"),   50, Qt::AlignLeft, true, "vendaddr_name");
  _vendaddr->addColumn(tr("City"),   -1, Qt::AlignLeft, true, "vendaddr_city");
  _vendaddr->addColumn(tr("State"),  -1, Qt::AlignLeft, true, "vendaddr_state");
  _vendaddr->addColumn(tr("Country"),-1, Qt::AlignLeft, true, "vendaddr_country");
  _vendaddr->addColumn(tr("Postal Code"),-1, Qt::AlignLeft, true, "vendaddr_zipcode");

  _taxreg->addColumn(tr("Tax Authority"), 100, Qt::AlignLeft, true, "taxauth_code");
  _taxreg->addColumn(tr("Registration #"), -1, Qt::AlignLeft, true, "taxreg_number");

  _crmacctid = -1;
  _ignoreClose = false;
  _NumberGen = -1;
  
  if (_metrics->boolean("EnableBatchManager") &&
      ! _metrics->boolean("ACHEnabled"))
    _transmitTabGroup->removeTab(_transmitTabGroup->indexOf(_checksTab));
  else if (! _metrics->boolean("EnableBatchManager") &&
           _metrics->boolean("ACHEnabled"))
    _purchaseOrderTab->setVisible(false);
  else if (! _metrics->boolean("EnableBatchManager") &&
           ! _metrics->boolean("ACHEnabled"))
    ediTab->setVisible(false);
  // else defaults are OK

  if (_metrics->boolean("ACHEnabled") && omfgThis->_key.isEmpty())
    _checksTab->setEnabled(false);
}
Пример #5
0
/*
 *  Constructs a itemImages as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
itemImages::itemImages(QWidget* parent, const char* name, Qt::WFlags fl)
    : QMainWindow(parent, name, fl)
{
    setupUi(this);

    (void)statusBar();

    // signals and slots connections
    connect(_close, SIGNAL(clicked()), this, SLOT(close()));
    connect(_prev, SIGNAL(clicked()), this, SLOT(sPrevious()));
    connect(_next, SIGNAL(clicked()), this, SLOT(sNext()));
    connect(_item, SIGNAL(newId(int)), this, SLOT(sFillList()));
    init();
}
Пример #6
0
itemImages::itemImages(QWidget* parent, const char* name, Qt::WFlags fl)
  : XWidget(parent, name, fl)
{
  setupUi(this);

  // signals and slots connections
  connect(_close, SIGNAL(clicked()), this, SLOT(close()));
  connect(_prev, SIGNAL(clicked()), this, SLOT(sPrevious()));
  connect(_next, SIGNAL(clicked()), this, SLOT(sNext()));
  connect(_item, SIGNAL(newId(int)), this, SLOT(sFillList()));

#ifndef Q_WS_MAC
  _prev->setMaximumWidth(25);
  _next->setMaximumWidth(25);
#endif
}
Пример #7
0
AlgorithmPage::AlgorithmPage(QWidget *parent)
    : QWidget(parent)
{
    QGroupBox *configGroup = new QGroupBox(tr("Algorithm configuration"));

    QLabel    *popLabel = new QLabel(tr("Population size:"));
    popEdit = new QLineEdit(tr("25"));

    QLabel    *genLabel = new QLabel( tr("Maximum generation:") );
    genEdit = new QLineEdit(tr("100"));

    QLabel    *croLabel = new QLabel(tr("Crossover rate:"));
    croEdit = new QLineEdit(tr("0.5"));

    QGridLayout *packagesLayout = new QGridLayout;
    packagesLayout->addWidget(popLabel,0,0);
    packagesLayout->addWidget(popEdit,0,1);
    packagesLayout->addWidget(genLabel,1,0);
    packagesLayout->addWidget(genEdit,1,1);
    packagesLayout->addWidget(croLabel,2,0);
    packagesLayout->addWidget(croEdit,2,1);

    configGroup->setLayout(packagesLayout);

    QPushButton *previousButton = new QPushButton(tr("Previous"));
    connect(previousButton, SIGNAL(clicked()), this, SLOT(sPrevious()));
    QPushButton *nextButton = new QPushButton(tr("Next"));
    connect(nextButton, SIGNAL(clicked()), this, SLOT(sNext()));

    QHBoxLayout *buttonsLayout = new QHBoxLayout;
    buttonsLayout->addStretch(1);
    buttonsLayout->addWidget(previousButton);
    buttonsLayout->addWidget(nextButton);

    QVBoxLayout *mainLayout = new QVBoxLayout;
    mainLayout->addWidget(configGroup);
    mainLayout->addStretch(12);
    mainLayout->addLayout(buttonsLayout);

    setLayout(mainLayout);
}
Пример #8
0
ScorePage::ScorePage(QWidget *parent)
    : QWidget(parent)
{
    QGroupBox *packagesGroup = new QGroupBox(tr("Scoring function"));

    QLabel *ffLabel=new QLabel(tr("Force field:"));
    QComboBox *ffCombo=new QComboBox;
//    ffCombo->addItem( tr("Amber") );
//    ffCombo->addItem( tr("Charmm") );
    ffCombo->addItem( tr("Sybyl") );

    QHBoxLayout *ffLayout=new QHBoxLayout;
    ffLayout->addWidget(ffLabel);
    ffLayout->addWidget(ffCombo);

//    QPushButton *startQueryButton = new QPushButton(tr("Set"));

    QGridLayout *packagesLayout = new QGridLayout;
//    packagesLayout->addLayout(ffLayout);
    packagesGroup->setLayout(packagesLayout);

    QPushButton *previousButton = new QPushButton(tr("Previous"));
    connect(previousButton, SIGNAL(clicked()), this, SLOT(sPrevious()));
    QPushButton *nextButton = new QPushButton(tr("Next"));
    connect(nextButton, SIGNAL(clicked()), this, SLOT(sNext()));

    QHBoxLayout *buttonsLayout = new QHBoxLayout;
    buttonsLayout->addStretch(1);
    buttonsLayout->addWidget(previousButton);
    buttonsLayout->addWidget(nextButton);

    QVBoxLayout *mainLayout = new QVBoxLayout;
    mainLayout->addWidget(packagesGroup);
    mainLayout->addLayout(ffLayout);
    mainLayout->addSpacing(12);
//    mainLayout->addWidget(startQueryButton);
    mainLayout->addStretch(12);
    mainLayout->addLayout(buttonsLayout);
    setLayout(mainLayout);
}
Пример #9
0
LigandPage::LigandPage(QWidget *parent)
    : QWidget(parent)
{
    QGroupBox *configGroup = new QGroupBox(tr("Ligand configuration"));

    QLabel    *ligandLabel = new QLabel(tr("Ligand:"));
    ligandEdit = new QLineEdit;
    QPushButton *ligandLoad = new QPushButton(tr("Load"));

    connect( ligandLoad, SIGNAL(clicked()), this, SLOT(loadFile()) );

    QHBoxLayout *serverLayout = new QHBoxLayout;
    serverLayout->addWidget(ligandLabel);
    serverLayout->addWidget(ligandEdit);
    serverLayout->addWidget(ligandLoad);

    QVBoxLayout *configLayout = new QVBoxLayout;
    configLayout->addLayout(serverLayout);
    configGroup->setLayout(configLayout);

    QPushButton *previousButton = new QPushButton(tr("Previous"));
    connect(previousButton, SIGNAL(clicked()), this, SLOT(sPrevious()));
    QPushButton *nextButton = new QPushButton(tr("Next"));
    connect(nextButton, SIGNAL(clicked()), this, SLOT(sNext()));

    QHBoxLayout *buttonsLayout = new QHBoxLayout;
    buttonsLayout->addStretch(1);
    buttonsLayout->addWidget(previousButton);
    buttonsLayout->addWidget(nextButton);

    QVBoxLayout *mainLayout = new QVBoxLayout;
    mainLayout->addWidget(configGroup);
    mainLayout->addStretch(12);
    mainLayout->addLayout(buttonsLayout);
    setLayout(mainLayout);
}
Пример #10
0
vendor::vendor(QWidget* parent, const char* name, Qt::WFlags fl)
    : XWidget(parent, name, fl)
{
  setupUi(this);

  connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_printAddresses, SIGNAL(clicked()), this, SLOT(sPrintAddresses()));
  connect(_newAddress, SIGNAL(clicked()), this, SLOT(sNewAddress()));
  connect(_editAddress, SIGNAL(clicked()), this, SLOT(sEditAddress()));
  connect(_viewAddress, SIGNAL(clicked()), this, SLOT(sViewAddress()));
  connect(_deleteAddress, SIGNAL(clicked()), this, SLOT(sDeleteAddress()));
  connect(_deleteTaxreg, SIGNAL(clicked()), this, SLOT(sDeleteTaxreg()));
  connect(_editTaxreg,   SIGNAL(clicked()), this, SLOT(sEditTaxreg()));
  connect(_newTaxreg,    SIGNAL(clicked()), this, SLOT(sNewTaxreg()));
  connect(_viewTaxreg,   SIGNAL(clicked()), this, SLOT(sViewTaxreg()));
  connect(_next, SIGNAL(clicked()), this, SLOT(sNext()));
  connect(_previous, SIGNAL(clicked()), this, SLOT(sPrevious()));
  connect(_mainButton, SIGNAL(clicked()), this, SLOT(sHandleButtons()));
  connect(_altButton, SIGNAL(clicked()), this, SLOT(sHandleButtons()));
  connect(_checksButton, SIGNAL(clicked()), this, SLOT(sHandleButtons()));
  connect(_number, SIGNAL(textEdited(const QString&)), this, SLOT(sNumberEdited()));
  connect(_number, SIGNAL(lostFocus()), this, SLOT(sCheck()));

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

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

  _defaultCurr->setLabel(_defaultCurrLit);

  QRegExp tmpregex = QRegExp(_metrics->value("EFTAccountRegex"));
  _accountValidator = new QRegExpValidator (tmpregex, this);
  tmpregex = QRegExp(_metrics->value("EFTRoutingRegex"));
  _routingValidator = new QRegExpValidator(tmpregex, this);

  _routingNumber->setValidator(_routingValidator);
  _achAccountNumber->setValidator(_accountValidator);

  _vendaddr->addColumn(tr("Number"), 70, Qt::AlignLeft, true, "vendaddr_code");
  _vendaddr->addColumn(tr("Name"),   50, Qt::AlignLeft, true, "vendaddr_name");
  _vendaddr->addColumn(tr("City"),   -1, Qt::AlignLeft, true, "vendaddr_city");
  _vendaddr->addColumn(tr("State"),  -1, Qt::AlignLeft, true, "vendaddr_state");
  _vendaddr->addColumn(tr("Country"),-1, Qt::AlignLeft, true, "vendaddr_country");
  _vendaddr->addColumn(tr("Postal Code"),-1, Qt::AlignLeft, true, "vendaddr_zipcode");

  _taxreg->addColumn(tr("Tax Authority"), 100, Qt::AlignLeft, true, "taxauth_code");
  _taxreg->addColumn(tr("Tax Zone"),      100, Qt::AlignLeft, true, "taxzone_code");
  _taxreg->addColumn(tr("Registration #"), -1, Qt::AlignLeft, true, "taxreg_number");

  _accountType->append(0, "Checking", "K");
  _accountType->append(1, "Savings",  "C");

  _crmacctid = -1;
  _ignoreClose = false;
  _NumberGen = -1;
  
  if (_metrics->boolean("EnableBatchManager") &&
      ! _metrics->boolean("ACHEnabled"))
  {
    _checksButton->hide();
  }
  else if (! _metrics->boolean("EnableBatchManager") &&
           _metrics->boolean("ACHEnabled"))
  {
    _checksButton->hide();
    _transmitStack->setCurrentIndex(1);
  }
  else if (! _metrics->boolean("EnableBatchManager") &&
           ! _metrics->boolean("ACHEnabled"))
    ediTab->setVisible(false);
  // else defaults are OK

  if (_metrics->boolean("ACHEnabled") && omfgThis->_key.isEmpty())
    _checksButton->setEnabled(false);

  _vendid = -1;
}