summaryrefslogtreecommitdiffstats
path: root/src/tools/gui/toolchain_config_widget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/gui/toolchain_config_widget.cpp')
-rw-r--r--src/tools/gui/toolchain_config_widget.cpp100
1 files changed, 50 insertions, 50 deletions
diff --git a/src/tools/gui/toolchain_config_widget.cpp b/src/tools/gui/toolchain_config_widget.cpp
index aede699..d735f09 100644
--- a/src/tools/gui/toolchain_config_widget.cpp
+++ b/src/tools/gui/toolchain_config_widget.cpp
@@ -8,11 +8,11 @@
***************************************************************************/
#include "toolchain_config_widget.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qgroupbox.h>
-#include <qtabwidget.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqgroupbox.h>
+#include <tqtabwidget.h>
#include <kiconloader.h>
#include <ktextedit.h>
@@ -22,8 +22,8 @@
#include "common/gui/container.h"
//----------------------------------------------------------------------------
-ToolchainConfigWidget::ToolchainConfigWidget(const Tool::Group &group, QWidget *parent)
- : ::ConfigWidget(parent),
+ToolchainConfigWidget::ToolchainConfigWidget(const Tool::Group &group, TQWidget *tqparent)
+ : ::ConfigWidget(tqparent),
_group(group), _dirty(false), _outputType(0), _devicesData(group.nbCheckDevices())
{
_config = group.createConfig(0);
@@ -41,18 +41,18 @@ void ToolchainConfigWidget::init()
container->setColStretch(3, 1);
uint row = 0;
- QLabel *label = new QLabel(Compile::DirectoryType(Compile::DirectoryType::Executable).label() + ":", container);
+ TQLabel *label = new TQLabel(Compile::DirectoryType(Compile::DirectoryType::Executable).label() + ":", container);
container->addWidget(label, row,row, 0,0);
_dirs[Compile::DirectoryType::Executable] = new PURL::DirectoryWidget(container);
- connect(_dirs[Compile::DirectoryType::Executable], SIGNAL(changed()), SLOT(forceDetect()));
+ connect(_dirs[Compile::DirectoryType::Executable], TQT_SIGNAL(changed()), TQT_SLOT(forceDetect()));
container->addWidget(_dirs[Compile::DirectoryType::Executable], row,row, 1,3);
row++;
- label = new QLabel(i18n("Executable Type:"), container);
+ label = new TQLabel(i18n("Executable Type:"), container);
container->addWidget(label, row,row, 0,0);
- _execType = new QComboBox(container);
+ _execType = new TQComboBox(container);
FOR_EACH(Tool::ExecutableType, type) _execType->insertItem(type.label());
- connect(_execType, SIGNAL(activated(int)), SLOT(forceDetect()));
+ connect(_execType, TQT_SIGNAL(activated(int)), TQT_SLOT(forceDetect()));
container->addWidget(_execType, row,row, 1,2);
row++;
@@ -60,12 +60,12 @@ void ToolchainConfigWidget::init()
FOR_EACH(Tool::OutputExecutableType, type)
if ( _group.hasOutputExecutableType(type) ) nbOutputTypes++;
if ( nbOutputTypes>1 ) {
- label = new QLabel(i18n("Output Executable Type:"), container);
+ label = new TQLabel(i18n("Output Executable Type:"), container);
container->addWidget(label, row,row, 0,0);
_outputType = new KeyComboBox<Tool::OutputExecutableType>(container);
FOR_EACH(Tool::OutputExecutableType, type)
if ( _group.hasOutputExecutableType(type) ) _outputType->appendItem(type, type.label());
- connect(_outputType->widget(), SIGNAL(activated(int)), SLOT(forceDetect()));
+ connect(_outputType->widget(), TQT_SIGNAL(activated(int)), TQT_SLOT(forceDetect()));
container->addWidget(_outputType->widget(), row,row, 1,1);
row++;
}
@@ -75,22 +75,22 @@ void ToolchainConfigWidget::init()
FOR_EACH(Tool::Category, k) {
const Tool::Base *base = _group.base(k);
if ( base==0 ) continue;
- label = new QLabel(k.label(), container);
+ label = new TQLabel(k.label(), container);
container->addWidget(label, row,row, 0,0);
- _data[k].label = new QLabel(container);
+ _data[k].label = new TQLabel(container);
container->addWidget(_data[k].label, row,row, 1,1);
- _data[k].button = new KPushButton(KGuiItem(QString::null, "viewmag"), container);
- connect(_data[k].button, SIGNAL(clicked()), SLOT(showDetails()));
+ _data[k].button = new KPushButton(KGuiItem(TQString(), "viewmag"), container);
+ connect(_data[k].button, TQT_SIGNAL(clicked()), TQT_SLOT(showDetails()));
container->addWidget(_data[k].button, row,row, 2,2);
row++;
}
- label = new QLabel(i18n("Device detection:"), container);
+ label = new TQLabel(i18n("Device detection:"), container);
container->addWidget(label, row,row, 0,0);
- _devicesLabel = new QLabel(container);
+ _devicesLabel = new TQLabel(container);
container->addWidget(_devicesLabel, row,row, 1,1);
- KPushButton *button = new KPushButton(KGuiItem(QString::null, "viewmag"), container);
- connect(button, SIGNAL(clicked()), SLOT(showDeviceDetails()));
+ KPushButton *button = new KPushButton(KGuiItem(TQString(), "viewmag"), container);
+ connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(showDeviceDetails()));
container->addWidget(button, row,row, 2,2);
row++;
@@ -99,7 +99,7 @@ void ToolchainConfigWidget::init()
if ( type==Compile::DirectoryType::Executable ) continue;
if ( !_group.hasDirectory(type) ) _dirs[type] = 0;
else {
- label = new QLabel(type.label() + ":", this);
+ label = new TQLabel(type.label() + ":", this);
addWidget(label, row,row, 0,0);
_dirs[type] = new PURL::DirectoryWidget(this);
addWidget(_dirs[type], row,row, 1,3);
@@ -108,9 +108,9 @@ void ToolchainConfigWidget::init()
}
if ( !_group.comment().isEmpty() ) {
- KTextEdit *w = new KTextEdit(_group.comment(), QString::null, this);
+ KTextEdit *w = new KTextEdit(_group.comment(), TQString(), this);
w->setReadOnly(true);
- w->setWordWrap(QTextEdit::WidgetWidth);
+ w->setWordWrap(TQTextEdit::WidgetWidth);
addWidget(w, row,row, 0,3);
row++;
}
@@ -161,9 +161,9 @@ void ToolchainConfigWidget::checkExecutableDone()
}
_data[i].checkLines = _data[i].process->sout() + _data[i].process->serr();
const Tool::Base *base = _group.base(i);
- QString exec = base->baseExecutable(withWine(), outputType());
- if ( base->checkExecutableResult(withWine(), _data[i].checkLines) ) _data[i].label->setText(i18n("\"%1\" found").arg(exec));
- else _data[i].label->setText(i18n("\"%1\" not recognized").arg(exec));
+ TQString exec = base->baseExecutable(withWine(), outputType());
+ if ( base->checkExecutableResult(withWine(), _data[i].checkLines) ) _data[i].label->setText(i18n("\"%1\" found").tqarg(exec));
+ else _data[i].label->setText(i18n("\"%1\" not recognized").tqarg(exec));
break;
}
}
@@ -180,12 +180,12 @@ void ToolchainConfigWidget::checkDevicesDone()
_devicesData[i].done = true;
break;
}
- QValueList<const Device::Data *> list;
+ TQValueList<const Device::Data *> list;
for(uint i=0; i<_devicesData.count(); i++) {
if ( !_devicesData[i].done ) return;
list += _group.getSupportedDevices(_devicesData[i].checkLines.join("\n"));
}
- _devicesLabel->setText(i18n("Detected (%1)").arg(list.count()));
+ _devicesLabel->setText(i18n("Detected (%1)").tqarg(list.count()));
}
bool ToolchainConfigWidget::withWine() const
@@ -198,7 +198,7 @@ Tool::OutputExecutableType ToolchainConfigWidget::outputType() const
return (_outputType==0 ? Compile::Config::outputExecutableType(_group) : _outputType->currentItem());
}
-QString ToolchainConfigWidget::baseExecutable(Tool::Category category) const
+TQString ToolchainConfigWidget::baseExecutable(Tool::Category category) const
{
return _group.base(category)->baseExecutable(withWine(), outputType());
}
@@ -226,23 +226,23 @@ void ToolchainConfigWidget::detect()
_data[k].checkLines.clear();
_data[k].process = checkExecutableProcess(k);
_data[k].command = _data[k].process->prettyCommand();
- connect(_data[k].process, SIGNAL(done(int)), SLOT(checkExecutableDone()));
- connect(_data[k].process, SIGNAL(timeout()), SLOT(checkExecutableDone()));
- QString exec = baseExecutable(k);
- if ( !_data[k].process->start(10000) ) _data[k].label->setText(i18n("\"%1\" not found").arg(exec));
- else _data[k].label->setText(i18n("Detecting \"%1\"...").arg(exec));
+ connect(_data[k].process, TQT_SIGNAL(done(int)), TQT_SLOT(checkExecutableDone()));
+ connect(_data[k].process, TQT_SIGNAL(timeout()), TQT_SLOT(checkExecutableDone()));
+ TQString exec = baseExecutable(k);
+ if ( !_data[k].process->start(10000) ) _data[k].label->setText(i18n("\"%1\" not found").tqarg(exec));
+ else _data[k].label->setText(i18n("Detecting \"%1\"...").tqarg(exec));
}
}
if ( _group.checkDevicesCategory()==Tool::Category::Nb_Types ) {
- QValueVector<QString> supported = _group.supportedDevices();
- _devicesLabel->setText(i18n("Hardcoded (%1)").arg(supported.count()));
+ TQValueVector<TQString> supported = _group.supportedDevices();
+ _devicesLabel->setText(i18n("Hardcoded (%1)").tqarg(supported.count()));
} else {
for (uint i=0; i<_devicesData.count(); i++) {
delete _devicesData[i].process;
_devicesData[i].process = checkDevicesProcess(i);
_devicesData[i].command = _devicesData[i].process->prettyCommand();
- connect(_devicesData[i].process, SIGNAL(done(int)), SLOT(checkDevicesDone()));
- connect(_devicesData[i].process, SIGNAL(timeout()), SLOT(checkDevicesDone()));
+ connect(_devicesData[i].process, TQT_SIGNAL(done(int)), TQT_SLOT(checkDevicesDone()));
+ connect(_devicesData[i].process, TQT_SIGNAL(timeout()), TQT_SLOT(checkDevicesDone()));
_devicesData[i].done = false;
_devicesData[i].checkLines.clear();
if ( !_devicesData[i].process->start(10000) ) _devicesLabel->setText(i18n("Failed"));
@@ -262,11 +262,11 @@ void ToolchainConfigWidget::showDetails()
{
FOR_EACH(Tool::Category, k) {
if ( sender()!=_data[k].button ) continue;
- QString s;
+ TQString s;
const Tool::Base *base = _group.base(k);
if ( base->checkExecutable() ) {
- s += i18n("<qt><b>Command for executable detection:</b><br>%1<br>").arg(_data[k].command);
- s += i18n("<b>Version string:</b><br>%1<br></qt>").arg(_data[k].checkLines.join("<br>"));
+ s += i18n("<qt><b>Command for executable detection:</b><br>%1<br>").tqarg(_data[k].command);
+ s += i18n("<b>Version string:</b><br>%1<br></qt>").tqarg(_data[k].checkLines.join("<br>"));
} else s += i18n("This tool cannot be automatically detected.");
MessageBox::text(s, Log::Show);
break;
@@ -275,10 +275,10 @@ void ToolchainConfigWidget::showDetails()
void ToolchainConfigWidget::showDeviceDetails()
{
- QString s;
+ TQString s;
if ( _group.checkDevicesCategory()==Tool::Category::Nb_Types ) {
s += "<qt>";
- QValueVector<QString> supported = _group.supportedDevices();
+ TQValueVector<TQString> supported = _group.supportedDevices();
for (uint i=0; i<supported.count(); i++) {
if ( i!=0 ) {
if ( (i%10)==0 ) s += "<br>";
@@ -290,11 +290,11 @@ void ToolchainConfigWidget::showDeviceDetails()
} else {
uint nb = _group.nbCheckDevices();
for (uint i=0; i<nb; i++) {
- if ( nb==1 ) s += i18n("<qt><b>Command for devices detection:</b><br>%1<br>").arg(_devicesData[i].command);
- else s += i18n("<qt><b>Command #%1 for devices detection:</b><br>%2<br>").arg(i+1).arg(_devicesData[i].command);
- QString ss = _devicesData[i].checkLines.join("<br>");
- if ( nb==1 ) s += i18n("<b>Device string:</b><br>%1<br>").arg(ss);
- else s += i18n("<b>Device string #%1:</b><br>%2<br>").arg(i+1).arg(ss);
+ if ( nb==1 ) s += i18n("<qt><b>Command for devices detection:</b><br>%1<br>").tqarg(_devicesData[i].command);
+ else s += i18n("<qt><b>Command #%1 for devices detection:</b><br>%2<br>").tqarg(i+1).tqarg(_devicesData[i].command);
+ TQString ss = _devicesData[i].checkLines.join("<br>");
+ if ( nb==1 ) s += i18n("<b>Device string:</b><br>%1<br>").tqarg(ss);
+ else s += i18n("<b>Device string #%1:</b><br>%2<br>").tqarg(i+1).tqarg(ss);
}
}
MessageBox::text(s, Log::Show);