summaryrefslogtreecommitdiffstats
path: root/src/progs/direct/gui/direct_config_widget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
commit0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch)
treeb95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/progs/direct/gui/direct_config_widget.cpp
parentb79a2c28534cf09987eeeba3077fff9236df182a (diff)
downloadpiklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz
piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip
TQt4 port piklab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/progs/direct/gui/direct_config_widget.cpp')
-rw-r--r--src/progs/direct/gui/direct_config_widget.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/src/progs/direct/gui/direct_config_widget.cpp b/src/progs/direct/gui/direct_config_widget.cpp
index 985cacd..fc7b867 100644
--- a/src/progs/direct/gui/direct_config_widget.cpp
+++ b/src/progs/direct/gui/direct_config_widget.cpp
@@ -9,87 +9,87 @@
***************************************************************************/
#include "direct_config_widget.h"
-#include <qtooltip.h>
-#include <qcheckbox.h>
-#include <qtimer.h>
-#include <qpushbutton.h>
+#include <tqtooltip.h>
+#include <tqcheckbox.h>
+#include <tqtimer.h>
+#include <tqpushbutton.h>
#include "progs/direct/base/direct_prog_config.h"
#include "progs/direct/base/direct_prog.h"
//-----------------------------------------------------------------------------
-::Programmer::ConfigWidget *Direct::GroupUI::createConfigWidget(QWidget *parent) const
+::Programmer::ConfigWidget *Direct::GroupUI::createConfigWidget(TQWidget *tqparent) const
{
- return new ConfigWidget(static_cast<const ::Programmer::Group &>(group()), parent);
+ return new ConfigWidget(static_cast<const ::Programmer::Group &>(group()), tqparent);
}
//-----------------------------------------------------------------------------
const char * const INV_PIN_LABEL = I18N_NOOP("Check this option if your hardware uses negative logic for this pin.");
const char * const DELAY_LABEL = I18N_NOOP("Some programming cards need low clock rate:\nadding delay to clock pulses might help.");
-Direct::HConfigWidget::HConfigWidget(::Programmer::Base &base, QWidget *parent, bool edit)
- : ::Hardware::HConfigWidget(base, parent, edit)
+Direct::HConfigWidget::HConfigWidget(::Programmer::Base &base, TQWidget *tqparent, bool edit)
+ : ::Hardware::HConfigWidget(base, tqparent, edit)
{
// pins assignment
- QGroupBox *groupb = new QGroupBox(1, Horizontal, i18n("Pin assignment"), this);
+ TQGroupBox *groupb = new TQGroupBox(1,Qt::Horizontal, i18n("Pin assignment"), this);
_mainVBox->addWidget(groupb);
- QWidget *w = new QWidget(groupb);
- QGridLayout *grid = new QGridLayout(w, 1, 1, 0, 10);
+ TQWidget *w = new TQWidget(groupb);
+ TQGridLayout *grid = new TQGridLayout(w, 1, 1, 0, 10);
if (edit) grid->setColStretch(5, 1);
for (uint i=0; i<Nb_PinTypes; i++) {
- QLabel *label = new QLabel(i18n(PIN_DATA[i].label), w);
- QToolTip::add(label, PIN_DATA[i].comment);
+ TQLabel *label = new TQLabel(i18n(PIN_DATA[i].label), w);
+ TQToolTip::add(label, PIN_DATA[i].comment);
grid->addWidget(label, i, 0);
- _combos[i] = new QComboBox(w);
+ _combos[i] = new TQComboBox(w);
_combos[i]->setEnabled(edit);
- connect(_combos[i], SIGNAL(activated(int)), SLOT(slotPinChanged()));
- QToolTip::add(_combos[i], PIN_DATA[i].comment);
+ connect(_combos[i], TQT_SIGNAL(activated(int)), TQT_SLOT(slotPinChanged()));
+ TQToolTip::add(_combos[i], PIN_DATA[i].comment);
grid->addWidget(_combos[i], i, 1);
- _invcbs[i] = new QCheckBox(i18n("Inverted"), w);
+ _invcbs[i] = new TQCheckBox(i18n("Inverted"), w);
_invcbs[i]->setEnabled(edit);
- QToolTip::add(_invcbs[i], i18n(INV_PIN_LABEL));
+ TQToolTip::add(_invcbs[i], i18n(INV_PIN_LABEL));
grid->addWidget(_invcbs[i], i, 2);
if (edit) {
- _testcbs[i] = new QCheckBox(i18n("on"), w);
- QToolTip::add(_testcbs[i], PIN_DATA[i].testComment);
- connect(_testcbs[i], SIGNAL(clicked()), SLOT(slotTestPin()));
+ _testcbs[i] = new TQCheckBox(i18n("on"), w);
+ TQToolTip::add(_testcbs[i], PIN_DATA[i].testComment);
+ connect(_testcbs[i], TQT_SIGNAL(clicked()), TQT_SLOT(slotTestPin()));
grid->addWidget(_testcbs[i], i, 3);
- _testLabels[i] = new QLabel(w);
- QToolTip::add(_testcbs[i], PIN_DATA[i].testComment);
+ _testLabels[i] = new TQLabel(w);
+ TQToolTip::add(_testcbs[i], PIN_DATA[i].testComment);
grid->addWidget(_testLabels[i], i, 4);
- updateTestStatus(PinType(i), false);
+ updateTesttqStatus(PinType(i), false);
} else {
_testcbs[i] = 0;
_testLabels[i] = 0;
}
}
- QHBoxLayout *hbox = new QHBoxLayout(_mainVBox);
- QLabel *label = new QLabel(i18n("Clock delay"), this);
- QToolTip::add(label, i18n(DELAY_LABEL));
+ TQHBoxLayout *hbox = new TQHBoxLayout(_mainVBox);
+ TQLabel *label = new TQLabel(i18n("Clock delay"), this);
+ TQToolTip::add(label, i18n(DELAY_LABEL));
hbox->addWidget(label);
- _delay = new KIntNumInput(0, Horizontal, this);
+ _delay = new KIntNumInput(0,Qt::Horizontal, this);
_delay->setRange(0, 50, 5);
_delay->setEnabled(edit);
- QToolTip::add(_delay, i18n(DELAY_LABEL));
+ TQToolTip::add(_delay, i18n(DELAY_LABEL));
hbox->addWidget(_delay);
if (edit) {
- _sendBitsButton = new QPushButton(i18n("Send 0xA55A"), this);
+ _sendBitsButton = new TQPushButton(i18n("Send 0xA55A"), this);
_sendBitsButton->setToggleButton(true);
- connect(_sendBitsButton, SIGNAL(clicked()), SLOT(sendBits()));
- QToolTip::add(_sendBitsButton, i18n("Continuously send 0xA55A on \"Data out\" pin."));
+ connect(_sendBitsButton, TQT_SIGNAL(clicked()), TQT_SLOT(sendBits()));
+ TQToolTip::add(_sendBitsButton, i18n("Continuously send 0xA55A on \"Data out\" pin."));
_editVBox->addWidget(_sendBitsButton);
_editVBox->addStretch(1);
} else _sendBitsButton = 0;
// timer for sending bits
- _timerSendBits = new QTimer(this);
- connect(_timerSendBits, SIGNAL(timeout()), SLOT(slotSendBits()));
+ _timerSendBits = new TQTimer(this);
+ connect(_timerSendBits, TQT_SIGNAL(timeout()), TQT_SLOT(slotSendBits()));
// timer for automatically polling DataOut pin
- _timerPollDataOut = new QTimer(this);
- connect(_timerPollDataOut, SIGNAL(timeout()), SLOT(updateDataIn()));
+ _timerPollDataOut = new TQTimer(this);
+ connect(_timerPollDataOut, TQT_SIGNAL(timeout()), TQT_SLOT(updateDataIn()));
}
void Direct::HConfigWidget::sendBits()
@@ -150,11 +150,11 @@ void Direct::HConfigWidget::updateTestPin(PinType ptype)
Q_ASSERT( _connected && ptype!=DataIn );
bool on = _testcbs[ptype]->isChecked();
hardware()->setPin(ptype, on);
- updateTestStatus(ptype, on);
+ updateTesttqStatus(ptype, on);
if ( ptype==Vpp ) updateDataIn();
}
-void Direct::HConfigWidget::updateTestStatus(PinType ptype, bool on)
+void Direct::HConfigWidget::updateTesttqStatus(PinType ptype, bool on)
{
if (on) _testLabels[ptype]->setText(i18n(PIN_DATA[ptype].onLabel));
else _testLabels[ptype]->setText(i18n(PIN_DATA[ptype].offLabel));
@@ -163,7 +163,7 @@ void Direct::HConfigWidget::updateTestStatus(PinType ptype, bool on)
void Direct::HConfigWidget::updateDataIn()
{
bool on = hardware()->readBit();
- updateTestStatus(DataIn, on);
+ updateTesttqStatus(DataIn, on);
_testcbs[DataIn]->setChecked(on);
}
@@ -204,7 +204,7 @@ bool Direct::HConfigWidget::set(const Port::Description &pd, const ::Hardware::D
if (_edit) {
for (uint i=0; i<Nb_PinTypes; i++) {
_testcbs[i]->setEnabled(_connected);
- updateTestStatus(PinType(i), false);
+ updateTesttqStatus(PinType(i), false);
}
if ( _connected ) _timerPollDataOut->start(100);
_sendBitsButton->setEnabled(_connected);
@@ -239,11 +239,11 @@ Hardware::Data *Direct::HConfigWidget::data() const
}
//-----------------------------------------------------------------------------
-Direct::ConfigWidget::ConfigWidget(const ::Programmer::Group &group, QWidget *parent)
- : ::Hardware::ConfigWidget(new ::Direct::PicBase(group, 0), new Config, parent)
+Direct::ConfigWidget::ConfigWidget(const ::Programmer::Group &group, TQWidget *tqparent)
+ : ::Hardware::ConfigWidget(new ::Direct::PicBase(group, 0), new Config, tqparent)
{}
-Hardware::HConfigWidget *Direct::ConfigWidget::createHardwareConfigWidget(QWidget *parent, bool edit) const
+Hardware::HConfigWidget *Direct::ConfigWidget::createHardwareConfigWidget(TQWidget *tqparent, bool edit) const
{
- return new HConfigWidget(*_base, parent, edit);
+ return new HConfigWidget(*_base, tqparent, edit);
}