QtCodeToHtmlMainDialog::QtCodeToHtmlMainDialog(QWidget *parent) :
    QtHideAndShowDialog(parent),
    ui(new Ui::QtCodeToHtmlMainDialog)
{
  ui->setupUi(this);

  //Put this dialog in the screen center
  const QRect scr = QApplication::desktop()->screenGeometry();
  move( scr.center() - rect().center() );

  on_tab_source_currentChanged(0);
}
ribi::c2h::QtCodeToHtmlMainDialog::QtCodeToHtmlMainDialog(QWidget *parent) noexcept
  : QtHideAndShowDialog(parent),
    ui(new Ui::QtCodeToHtmlMainDialog)
{
  #ifndef NDEBUG
  Test();
  #endif
  ui->setupUi(this);

  //Put this dialog in the screen center
  const QRect scr = QApplication::desktop()->screenGeometry();
  move( scr.center() - rect().center() );

  {
    assert(!QApplication::instance()->arguments().empty());
    const std::string argv0 { QApplication::instance()->arguments()[0].toStdString() };
    const std::string path = ribi::fileio::GetPath(argv0);
    assert(ribi::fileio::IsFolder(path));
    this->ui->edit_source->setText(path.c_str());
  }
  on_tab_source_currentChanged(0);
}