#include "molinfodialog.h"

MolInfoDialog::MolInfoDialog(QWidget *parent, QString name):
        QDialog(parent, name, TRUE)
{
  QGridLayout *grid = new QGridLayout(this, 5, 2);
  setCaption( i18n("Molecule Info") );
  QPushButton *ok, *dismiss;
  mw = i18n("Molecular weight = ");
  mw_check = new QCheckBox(mw, this);
  grid->addMultiCellWidget(mw_check, 1, 1, 1, 2);
  ef = i18n("Formula = ");
  ef_check = new QCheckBox(ef, this);
  grid->addMultiCellWidget(ef_check, 2, 2, 1, 2);
  ea = i18n("Analysis = ");
  ea_label = new QLabel(ea, this);
  grid->addMultiCellWidget(ea_label, 3, 3, 1, 2);
  ok = new QPushButton(i18n("OK"), this);
  //ok->setPalette(QPalette(lightGray));
  connect(ok, SIGNAL(clicked()), SLOT(accept()) );
  grid->addWidget(ok, 5, 1);
  //Do not use the XDrawChem online help
  /*
  help = new QPushButton(tr("Help"), this);
  help->setPalette(QPalette(lightGray));
  connect(help, SIGNAL(clicked()), SLOT(SendHelp()) );
  grid->addWidget(help, 5, 2);
  */
  dismiss = new QPushButton(tr("Cancel"), this);
  dismiss->setPalette(QPalette(lightGray));
  connect(dismiss, SIGNAL(clicked()), SLOT(reject()) );
  grid->addMultiCellWidget(dismiss, 6, 6, 1, 2);
}

//Do not use the XDrawChem online help
/*
void MolInfoDialog::SendHelp() {
  QString home, topic;
  topic = "molinfo.html";
#ifdef UNIX
  home = RingDir + "doc/" + topic;
#else
  home = RingDir + "doc\\" + topic;
#endif
  HelpWindow *help = new HelpWindow(home, ".", 0, "help viewer");
  help->setCaption(QString(XDC_VERSION) + " - Help viewer");
  help->show();
}
*/



#include "molinfodialog.moc"