summaryrefslogtreecommitdiffstats
path: root/src/progs/icd1/gui/icd1_group_ui.cpp
blob: a386190c21b94d5efae995de5e7b572dab963a78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/***************************************************************************
 *   Copyright (C) 2006 Nicolas Hadacek <[email protected]>                  *
 *                                                                         *
 *   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 "icd1_group_ui.h"

#include "progs/gui/prog_config_widget.h"
#include "progs/base/prog_group.h"
#include "progs/icd1/base/icd1_prog.h"

//----------------------------------------------------------------------------
Icd1::AdvancedDialog::AdvancedDialog(ProgrammerBase &base, TQWidget *parent)
  : ::Programmer::PicAdvancedDialog(base, parent, "icd1_advanced_dialog")
{
  uint row = _selfTestContainer->numRows();
  TQLabel *label = new TQLabel(i18n("Result:"), _selfTestContainer);
  _selfTestContainer->addWidget(label, row,row, 0,0);
  _selfTestLabel = new TQLabel(_selfTestContainer);
  _selfTestContainer->addWidget(_selfTestLabel, row,row, 1,1);
}

void Icd1::AdvancedDialog::updateDisplay()
{
  ::Programmer::PicAdvancedDialog::updateDisplay();
  _selfTestLabel->setText(i18n(::Programmer::RESULT_TYPE_LABELS[base().selfTestResult()]));
}

//----------------------------------------------------------------------------
::Programmer::ConfigWidget *Icd1::GroupUI::createConfigWidget(TQWidget *parent) const
{
  return new ::Programmer::ConfigWidget(static_cast<const Group &>(group()), parent);
}

::Programmer::AdvancedDialog *Icd1::GroupUI::createAdvancedDialog(::Programmer::Base &base, TQWidget *parent) const
{
  return new AdvancedDialog(static_cast<ProgrammerBase &>(base), parent);
}