/*************************************************************************** * Copyright (C) 2006 Nicolas Hadacek * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ #include "gpsim_group_ui.h" #include #include "progs/base/prog_group.h" #include "progs/gpsim/base/gpsim.h" //---------------------------------------------------------------------------- GPSim::ConfigWidget::ConfigWidget(const ::Programmer::Group &group, TQWidget *tqparent) : ::Programmer::ConfigWidget(group, tqparent) { uint row = numRows(); TQLabel *label = new TQLabel(i18n("tqStatus:"), this); addWidget(label, row,row, 0,0); _status = new TQLabel(this); addWidget(_status, row,row, 1,1); TQTimer::singleShot(0, this, TQT_SLOT(updatetqStatus())); } void GPSim::ConfigWidget::updatetqStatus() { VersionData version; ProcessManager manager(0); if ( !manager.start() ) _status->setText(i18n("Could not start \"gpsim\"")); else if ( !manager.getVersion(version) || !version.isValid() ) _status->setText(i18n("Could not detect \"gpsim\" version")); else _status->setText(i18n("Found version \"%1\"").tqarg(version.pretty())); } //---------------------------------------------------------------------------- ::Programmer::ConfigWidget *GPSim::GroupUI::createConfigWidget(TQWidget *tqparent) const { return new ConfigWidget(static_cast(group()), tqparent); }