summaryrefslogtreecommitdiffstats
path: root/src/libgui
diff options
context:
space:
mode:
Diffstat (limited to 'src/libgui')
-rw-r--r--src/libgui/breakpoint_view.cpp34
-rw-r--r--src/libgui/breakpoint_view.h11
-rw-r--r--src/libgui/config_center.cpp26
-rw-r--r--src/libgui/config_center.h25
-rw-r--r--src/libgui/config_gen.cpp44
-rw-r--r--src/libgui/config_gen.h19
-rw-r--r--src/libgui/console.cpp20
-rw-r--r--src/libgui/console.h9
-rw-r--r--src/libgui/device_editor.cpp52
-rw-r--r--src/libgui/device_editor.h21
-rw-r--r--src/libgui/device_gui.cpp202
-rw-r--r--src/libgui/device_gui.h84
-rw-r--r--src/libgui/editor.cpp18
-rw-r--r--src/libgui/editor.h31
-rw-r--r--src/libgui/editor_manager.cpp118
-rw-r--r--src/libgui/editor_manager.h43
-rw-r--r--src/libgui/global_config.cpp42
-rw-r--r--src/libgui/gui_debug_manager.cpp44
-rw-r--r--src/libgui/gui_debug_manager.h3
-rw-r--r--src/libgui/gui_prog_manager.h3
-rw-r--r--src/libgui/hex_editor.cpp58
-rw-r--r--src/libgui/hex_editor.h16
-rw-r--r--src/libgui/likeback.cpp280
-rw-r--r--src/libgui/likeback.h58
-rw-r--r--src/libgui/log_view.cpp54
-rw-r--r--src/libgui/log_view.h27
-rw-r--r--src/libgui/main_global.cpp10
-rw-r--r--src/libgui/main_global.h8
-rw-r--r--src/libgui/new_dialogs.cpp34
-rw-r--r--src/libgui/new_dialogs.h28
-rw-r--r--src/libgui/object_view.cpp36
-rw-r--r--src/libgui/object_view.h19
-rw-r--r--src/libgui/project.cpp96
-rw-r--r--src/libgui/project.h26
-rw-r--r--src/libgui/project_editor.cpp32
-rw-r--r--src/libgui/project_editor.h15
-rw-r--r--src/libgui/project_manager.cpp164
-rw-r--r--src/libgui/project_manager.h27
-rw-r--r--src/libgui/project_manager_ui.cpp32
-rw-r--r--src/libgui/project_manager_ui.h9
-rw-r--r--src/libgui/project_wizard.cpp78
-rw-r--r--src/libgui/project_wizard.h28
-rw-r--r--src/libgui/register_view.cpp24
-rw-r--r--src/libgui/register_view.h5
-rw-r--r--src/libgui/text_editor.cpp78
-rw-r--r--src/libgui/text_editor.h28
-rw-r--r--src/libgui/toplevel.cpp364
-rw-r--r--src/libgui/toplevel.h33
-rw-r--r--src/libgui/toplevel_ui.cpp32
-rw-r--r--src/libgui/toplevel_ui.h22
-rw-r--r--src/libgui/watch_view.cpp84
-rw-r--r--src/libgui/watch_view.h32
52 files changed, 1368 insertions, 1318 deletions
diff --git a/src/libgui/breakpoint_view.cpp b/src/libgui/breakpoint_view.cpp
index 6f49aac..99f711f 100644
--- a/src/libgui/breakpoint_view.cpp
+++ b/src/libgui/breakpoint_view.cpp
@@ -8,9 +8,9 @@
***************************************************************************/
#include "breakpoint_view.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include "main_global.h"
#include "editor_manager.h"
@@ -20,7 +20,7 @@
//----------------------------------------------------------------------------
void Breakpoint::updateActions(const Data *data)
{
- bool hasBreakpoint = (data ? Breakpoint::list().contains(*data) : false);
+ bool hasBreakpoint = (data ? Breakpoint::list().tqcontains(*data) : false);
Main::action("toggle_breakpoint")->setText(hasBreakpoint ? i18n("Remove breakpoint") : i18n("Set breakpoint"));
Main::action("toggle_breakpoint")->setEnabled(data);
bool isActive = (hasBreakpoint ? Breakpoint::list().state(*data)==Breakpoint::Active : false);
@@ -29,22 +29,22 @@ void Breakpoint::updateActions(const Data *data)
}
//----------------------------------------------------------------------------
-Breakpoint::ListViewItem::ListViewItem(ListView *parent, const Data &data)
- : KListViewItem(parent), _data(data)
+Breakpoint::ListViewItem::ListViewItem(ListView *tqparent, const Data &data)
+ : KListViewItem(tqparent), _data(data)
{}
//----------------------------------------------------------------------------
-Breakpoint::View::View(QWidget *parent)
- : QWidget(parent, "breakpoints_view"), GenericView(Breakpoint::list()),
+Breakpoint::View::View(TQWidget *tqparent)
+ : TQWidget(tqparent, "breakpoints_view"), GenericView(Breakpoint::list()),
_currentData(0)
{
- QVBoxLayout *top = new QVBoxLayout(this);
+ TQVBoxLayout *top = new TQVBoxLayout(this);
_listview = new ListView(this);
- connect(_listview, SIGNAL(clicked(QListViewItem *)), SLOT(itemClicked(QListViewItem *)));
- connect(_listview, SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)),
- SLOT(contextMenu(QListViewItem *, const QPoint &, int)));
+ connect(_listview, TQT_SIGNAL(clicked(TQListViewItem *)), TQT_SLOT(itemClicked(TQListViewItem *)));
+ connect(_listview, TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)),
+ TQT_SLOT(contextMenu(TQListViewItem *, const TQPoint &, int)));
_listview->setAllColumnsShowFocus(true);
- _listview->addColumn(i18n("Status"));
+ _listview->addColumn(i18n("tqStatus"));
_listview->addColumn(i18n("Location"));
_listview->addColumn(i18n("Address"));
top->addWidget(_listview);
@@ -58,7 +58,7 @@ void Breakpoint::View::updateView()
const Data &data = Breakpoint::list().data(i);
KListViewItem *item = new ListViewItem(_listview, data);
item->setPixmap(0, TextEditor::pixmap(Debugger::manager->breakpointType(data)));
- item->setText(1, data.url.filename() + ":" + QString::number(data.line));
+ item->setText(1, data.url.filename() + ":" + TQString::number(data.line));
Address address = Breakpoint::list().address(data);
if ( address.isValid() ) item->setText(2, toHexLabelAbs(address));
else if ( Debugger::manager->coff() ) item->setText(2, i18n("Non-code breakpoint"));
@@ -66,18 +66,18 @@ void Breakpoint::View::updateView()
}
}
-void Breakpoint::View::itemClicked(QListViewItem *item)
+void Breakpoint::View::itemClicked(TQListViewItem *item)
{
if ( item==0 ) return;
const Data &data = static_cast<ListViewItem *>(item)->data();
Address address = Breakpoint::list().address(data);
- TextEditor *editor = ::qt_cast<TextEditor *>(Main::currentEditor());
+ TextEditor *editor = ::tqqt_cast<TextEditor *>(Main::currentEditor());
const Coff::TextObject *coff = Debugger::manager->coff();
int line = -1;
if ( coff && editor && editor->fileType()==PURL::Coff && address.isValid() )
line = coff->lineForAddress(editor->url(), address);
if ( line==-1 ) {
- editor = ::qt_cast<TextEditor *>(Main::editorManager().openEditor(data.url));
+ editor = ::tqqt_cast<TextEditor *>(Main::editorManager().openEditor(data.url));
line = data.line;
}
if ( editor==0 ) return;
@@ -85,7 +85,7 @@ void Breakpoint::View::itemClicked(QListViewItem *item)
editor->setCursor(line, 0);
}
-void Breakpoint::View::contextMenu(QListViewItem *item, const QPoint &pos, int)
+void Breakpoint::View::contextMenu(TQListViewItem *item, const TQPoint &pos, int)
{
_currentData = (item ? &static_cast<ListViewItem *>(item)->data() : 0);
updateActions(_currentData);
diff --git a/src/libgui/breakpoint_view.h b/src/libgui/breakpoint_view.h
index 984a7ed..1f3543e 100644
--- a/src/libgui/breakpoint_view.h
+++ b/src/libgui/breakpoint_view.h
@@ -18,7 +18,7 @@ namespace Breakpoint
class ListViewItem : public KListViewItem
{
public:
- ListViewItem(ListView *parent, const Data &data);
+ ListViewItem(ListView *tqparent, const Data &data);
const Data &data() const { return _data; }
private:
@@ -26,17 +26,18 @@ private:
};
//----------------------------------------------------------------------------
-class View : public QWidget, public GenericView
+class View : public TQWidget, public GenericView
{
Q_OBJECT
+ TQ_OBJECT
public:
- View(QWidget *parent);
+ View(TQWidget *tqparent);
virtual void updateView();
const Data *currentData() const { return _currentData; }
private slots:
- void itemClicked(QListViewItem *item);
- void contextMenu(QListViewItem *item, const QPoint &pos, int col);
+ void itemClicked(TQListViewItem *item);
+ void contextMenu(TQListViewItem *item, const TQPoint &pos, int col);
private:
ListView *_listview;
diff --git a/src/libgui/config_center.cpp b/src/libgui/config_center.cpp
index 530cbbf..237a89d 100644
--- a/src/libgui/config_center.cpp
+++ b/src/libgui/config_center.cpp
@@ -9,12 +9,12 @@
***************************************************************************/
#include "config_center.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qgroupbox.h>
-#include <qtabwidget.h>
-#include <qtimer.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqgroupbox.h>
+#include <tqtabwidget.h>
+#include <tqtimer.h>
#include <kiconloader.h>
#include <klocale.h>
#include <klistview.h>
@@ -48,7 +48,7 @@ void GlobalConfigWidget::saveConfig()
GlobalConfig::writeDebugLevel(_showDebug->currentItem());
}
-QPixmap GlobalConfigWidget::pixmap() const
+TQPixmap GlobalConfigWidget::pixmap() const
{
KIconLoader loader;
return loader.loadIcon("configure", KIcon::Toolbar, KIcon::SizeMedium);
@@ -60,7 +60,7 @@ StandaloneConfigWidget::StandaloneConfigWidget()
{
uint row = 0;
- QLabel *label = new QLabel(i18n("Device:"), this);
+ TQLabel *label = new TQLabel(i18n("Device:"), this);
addWidget(label, row,row, 0,0);
_device = new DeviceChooser::Button(true, this);
addWidget(_device, row,row, 1,1);
@@ -85,7 +85,7 @@ void StandaloneConfigWidget::saveConfig()
_tools->saveConfig();
}
-QPixmap StandaloneConfigWidget::pixmap() const
+TQPixmap StandaloneConfigWidget::pixmap() const
{
KIconLoader loader;
return loader.loadIcon("configure", KIcon::Toolbar, KIcon::SizeMedium);
@@ -106,15 +106,15 @@ ConfigWidget *ConfigCenter::factory(Type type)
return 0;
}
-ConfigCenter::ConfigCenter(Type showType, QWidget *parent)
- : Dialog(IconList, i18n("Configure Piklab"), Ok|Cancel, Cancel, parent, "configure_piklab_dialog", true, false)
+ConfigCenter::ConfigCenter(Type showType, TQWidget *tqparent)
+ : Dialog(IconList, i18n("Configure Piklab"), Ok|Cancel, Cancel, tqparent, "configure_piklab_dialog", true, false)
{
for (uint i=0; i<Nb_Types; i++) {
_configWidgets[i] = factory(Type(i));
_configWidgets[i]->loadConfig();
_pages[i] = addPage(_configWidgets[i]->title(), _configWidgets[i]->header(), _configWidgets[i]->pixmap());
- QVBoxLayout *vbox = new QVBoxLayout(_pages[i]);
- _configWidgets[i]->reparent(_pages[i], QPoint(0,0));
+ TQVBoxLayout *vbox = new TQVBoxLayout(_pages[i]);
+ _configWidgets[i]->reparent(_pages[i], TQPoint(0,0));
vbox->addWidget(_configWidgets[i]);
}
showPage(showType);
diff --git a/src/libgui/config_center.h b/src/libgui/config_center.h
index 1e543b7..9f50056 100644
--- a/src/libgui/config_center.h
+++ b/src/libgui/config_center.h
@@ -10,9 +10,9 @@
#ifndef CONFIG_CENTER_H
#define CONFIG_CENTER_H
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qwidgetstack.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqwidgetstack.h>
#include "common/gui/key_gui.h"
#include "common/gui/dialog.h"
@@ -29,11 +29,12 @@ END_DECLARE_CONFIG_WIDGET
class GlobalConfigWidget : public BaseGlobalConfigWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
GlobalConfigWidget();
- virtual QString title() const { return i18n("General"); }
- virtual QString header() const { return i18n("General Configuration"); }
- virtual QPixmap pixmap() const;
+ virtual TQString title() const { return i18n("General"); }
+ virtual TQString header() const { return i18n("General Configuration"); }
+ virtual TQPixmap pixmap() const;
virtual void loadConfig();
public slots:
@@ -47,12 +48,13 @@ private:
class StandaloneConfigWidget : public ConfigWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
StandaloneConfigWidget();
virtual void loadConfig();
- virtual QString title() const { return i18n("Standalone File"); }
- virtual QString header() const { return i18n("Standalone File Compilation"); }
- virtual QPixmap pixmap() const;
+ virtual TQString title() const { return i18n("Standalone File"); }
+ virtual TQString header() const { return i18n("Standalone File Compilation"); }
+ virtual TQPixmap pixmap() const;
public slots:
virtual void saveConfig();
@@ -66,17 +68,18 @@ private:
class ConfigCenter : public Dialog
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Type { General = 0, ProgSelect, ProgOptions, DebugOptions,
Standalone, Nb_Types };
- ConfigCenter(Type showType, QWidget *parent);
+ ConfigCenter(Type showType, TQWidget *tqparent);
public slots:
virtual void slotOk();
virtual void slotApply();
private:
- QWidget *_pages[Nb_Types];
+ TQWidget *_pages[Nb_Types];
ConfigWidget *_configWidgets[Nb_Types];
static ConfigWidget *factory(Type type);
diff --git a/src/libgui/config_gen.cpp b/src/libgui/config_gen.cpp
index 036e62e..8ef334d 100644
--- a/src/libgui/config_gen.cpp
+++ b/src/libgui/config_gen.cpp
@@ -8,8 +8,8 @@
***************************************************************************/
#include "config_gen.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
#include "device_gui.h"
@@ -23,44 +23,44 @@
#include "tools/list/tool_list.h"
//-----------------------------------------------------------------------------
-GeneratorDialog::GeneratorDialog(const QString &title, QWidget *parent, const char *name)
- : Dialog(parent, name, true, title, Close|User1, Close, false, QSize(400, 300))
+GeneratorDialog::GeneratorDialog(const TQString &title, TQWidget *tqparent, const char *name)
+ : Dialog(tqparent, name, true, title, Close|User1, Close, false, TQSize(400, 300))
{
- QVBoxLayout *top = new QVBoxLayout(mainWidget(), 10, 10);
+ TQVBoxLayout *top = new TQVBoxLayout(mainWidget(), 10, 10);
- QHBoxLayout *hbox = new QHBoxLayout(top);
- QLabel *label = new QLabel(i18n("Device:"), mainWidget());
+ TQHBoxLayout *hbox = new TQHBoxLayout(top);
+ TQLabel *label = new TQLabel(i18n("Device:"), mainWidget());
hbox->addWidget(label);
_deviceChooser = new DeviceChooser::Button(false, mainWidget());
- connect(_deviceChooser, SIGNAL(changed()), SLOT(reset()));
+ connect(_deviceChooser, TQT_SIGNAL(changed()), TQT_SLOT(reset()));
hbox->addWidget(_deviceChooser);
hbox->addSpacing(20);
- label = new QLabel(i18n("Toolchain:"), mainWidget());
+ label = new TQLabel(i18n("Toolchain:"), mainWidget());
hbox->addWidget(label);
- _configType = new KeyComboBox<QString>(mainWidget());
+ _configType = new KeyComboBox<TQString>(mainWidget());
Tool::Lister::ConstIterator it;
for (it=Tool::lister().begin(); it!=Tool::lister().end(); ++it)
_configType->appendItem(it.key(), it.data()->label());
- connect(_configType->widget(), SIGNAL(activated(int)), SLOT(typeChanged()));
+ connect(_configType->widget(), TQT_SIGNAL(activated(int)), TQT_SLOT(typeChanged()));
hbox->addWidget(_configType->widget());
- label = new QLabel(i18n("Tool Type:"), mainWidget());
+ label = new TQLabel(i18n("Tool Type:"), mainWidget());
hbox->addWidget(label);
_toolType = new KeyComboBox<PURL::ToolType>(mainWidget());
FOR_EACH(PURL::ToolType, type) _toolType->appendItem(type, type.label());
_toolType->fixMinimumWidth();
- connect(_toolType->widget(), SIGNAL(activated(int)), SLOT(compute()));
+ connect(_toolType->widget(), TQT_SIGNAL(activated(int)), TQT_SLOT(compute()));
hbox->addWidget(_toolType->widget());
hbox->addStretch(1);
- _hbox = new QHBoxLayout(top);
+ _hbox = new TQHBoxLayout(top);
_text = new SimpleTextEditor(false, PURL::Nb_FileTypes, mainWidget());
_text->setReadOnly(true);
top->addWidget(_text);
- _warning = new QLabel(mainWidget());
+ _warning = new TQLabel(mainWidget());
top->addWidget(_warning);
setButtonText(User1, i18n("Copy to clipboard"));
@@ -68,9 +68,9 @@ GeneratorDialog::GeneratorDialog(const QString &title, QWidget *parent, const ch
void GeneratorDialog::set(const Device::Data *data, const Tool::Group &group, PURL::ToolType stype)
{
- QString device;
+ TQString device;
if ( data==0 ) {
- QValueVector<QString> devices = group.supportedDevices();
+ TQValueVector<TQString> devices = group.supportedDevices();
if ( devices.isEmpty() ) return;
device = devices[0];
} else device = data->name();
@@ -141,8 +141,8 @@ void GeneratorDialog::slotUser1()
}
//-----------------------------------------------------------------------------
-ConfigGenerator::ConfigGenerator(QWidget *parent)
- : GeneratorDialog(i18n("Config Generator"), parent, "config_generator"), _memory(0), _configEditor(0)
+ConfigGenerator::ConfigGenerator(TQWidget *tqparent)
+ : GeneratorDialog(i18n("Config Generator"), tqparent, "config_generator"), _memory(0), _configEditor(0)
{}
ConfigGenerator::~ConfigGenerator()
@@ -159,7 +159,7 @@ void ConfigGenerator::reset()
_configEditor = Device::groupui(*data).createConfigEditor(*_memory, mainWidget());
if (_configEditor) {
_configEditor->show();
- connect(_configEditor, SIGNAL(modified()), SLOT(compute()));
+ connect(_configEditor, TQT_SIGNAL(modified()), TQT_SLOT(compute()));
_configEditor->updateDisplay();
_hbox->addWidget(_configEditor);
}
@@ -175,8 +175,8 @@ SourceLine::List ConfigGenerator::generateLines(bool &ok) const
}
//-----------------------------------------------------------------------------
-TemplateGenerator::TemplateGenerator(QWidget *parent)
- : GeneratorDialog(i18n("Template Generator"), parent, "template_generator")
+TemplateGenerator::TemplateGenerator(TQWidget *tqparent)
+ : GeneratorDialog(i18n("Template Generator"), tqparent, "template_generator")
{}
SourceLine::List TemplateGenerator::generateLines(bool &ok) const
diff --git a/src/libgui/config_gen.h b/src/libgui/config_gen.h
index fa9fd56..412e75c 100644
--- a/src/libgui/config_gen.h
+++ b/src/libgui/config_gen.h
@@ -9,8 +9,8 @@
#ifndef CONFIG_GEN_H
#define CONFIG_GEN_H
-class QHBoxLayout;
-class QLabel;
+class TQHBoxLayout;
+class TQLabel;
#include "common/gui/dialog.h"
#include "tools/base/tool_group.h"
@@ -26,8 +26,9 @@ class SimpleTextEditor;
class GeneratorDialog : public Dialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- GeneratorDialog(const QString &title, QWidget *parent, const char *name);
+ GeneratorDialog(const TQString &title, TQWidget *tqparent, const char *name);
void set(const Device::Data *data, const Tool::Group &group, PURL::ToolType stype);
protected slots:
@@ -37,12 +38,12 @@ protected slots:
virtual void slotUser1();
protected:
- QHBoxLayout *_hbox;
+ TQHBoxLayout *_hbox;
DeviceChooser::Button *_deviceChooser;
- KeyComboBox<QString> *_configType;
+ KeyComboBox<TQString> *_configType;
KeyComboBox<PURL::ToolType> *_toolType;
SimpleTextEditor *_text;
- QLabel *_warning;
+ TQLabel *_warning;
PURL::ToolType toolType() const;
void setToolType(PURL::ToolType stype);
@@ -53,8 +54,9 @@ protected:
class ConfigGenerator : public GeneratorDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigGenerator(QWidget *parent);
+ ConfigGenerator(TQWidget *tqparent);
virtual ~ConfigGenerator();
private slots:
@@ -72,8 +74,9 @@ private:
class TemplateGenerator : public GeneratorDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- TemplateGenerator(QWidget *parent);
+ TemplateGenerator(TQWidget *tqparent);
private:
virtual SourceLine::List generateLines(bool &ok) const;
diff --git a/src/libgui/console.cpp b/src/libgui/console.cpp
index 99c996c..cff0c42 100644
--- a/src/libgui/console.cpp
+++ b/src/libgui/console.cpp
@@ -8,35 +8,35 @@
***************************************************************************/
#include "console.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qdir.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqdir.h>
#include <klibloader.h>
#include <klocale.h>
#include <kparts/part.h>
#include <kde_terminal_interface.h>
-ConsoleView::ConsoleView(QWidget *parent)
- : QWidget(parent, "console_view"), _initialized(false)
+ConsoleView::ConsoleView(TQWidget *tqparent)
+ : TQWidget(tqparent, "console_view"), _initialized(false)
{}
-void ConsoleView::showEvent(QShowEvent *e)
+void ConsoleView::showEvent(TQShowEvent *e)
{
if ( !_initialized ) {
_initialized = true;
KLibFactory *factory = KLibLoader::self()->factory("libkonsolepart");
- QVBoxLayout *top = new QVBoxLayout(this, 0, 10);
+ TQVBoxLayout *top = new TQVBoxLayout(this, 0, 10);
if ( factory==0 ) {
- QLabel *label = new QLabel(i18n("Could not find \"konsolepart\"; please install kdebase."), this);
+ TQLabel *label = new TQLabel(i18n("Could not tqfind \"konsolepart\"; please install kdebase."), this);
label->show();
top->addWidget(label);
return;
} else {
- QWidget *pwidget = static_cast<KParts::Part *>(factory->create(this, "konsole"))->widget();
+ TQWidget *pwidget = static_cast<KParts::Part *>(factory->create(TQT_TQOBJECT(this), "konsole"))->widget();
pwidget->show();
top->addWidget(pwidget);
setFocusProxy(pwidget);
}
}
- QWidget::showEvent(e);
+ TQWidget::showEvent(e);
}
diff --git a/src/libgui/console.h b/src/libgui/console.h
index e073754..ca86fd1 100644
--- a/src/libgui/console.h
+++ b/src/libgui/console.h
@@ -9,16 +9,17 @@
#ifndef CONSOLE_H
#define CONSOLE_H
-#include <qwidget.h>
+#include <tqwidget.h>
-class ConsoleView : public QWidget
+class ConsoleView : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConsoleView(QWidget *parent);
+ ConsoleView(TQWidget *tqparent);
protected:
- virtual void showEvent(QShowEvent *e);
+ virtual void showEvent(TQShowEvent *e);
private:
bool _initialized;
diff --git a/src/libgui/device_editor.cpp b/src/libgui/device_editor.cpp
index 7a2a3c6..d3c2158 100644
--- a/src/libgui/device_editor.cpp
+++ b/src/libgui/device_editor.cpp
@@ -9,8 +9,8 @@
***************************************************************************/
#include "device_editor.h"
-#include <qscrollview.h>
-#include <qregexp.h>
+#include <tqscrollview.h>
+#include <tqregexp.h>
#include "devices/list/device_list.h"
#include "toplevel.h"
@@ -19,51 +19,51 @@
#include "common/global/pfile.h"
#include "main_global.h"
-DeviceEditor::DeviceEditor(const QString &title, const QString &tag, QWidget *parent, const char *name)
- : Editor(title, tag, parent, name), _view(0)
+DeviceEditor::DeviceEditor(const TQString &title, const TQString &tag, TQWidget *tqparent, const char *name)
+ : Editor(title, tag, tqparent, name), _view(0)
{
init();
}
-DeviceEditor::DeviceEditor(QWidget *parent, const char *name)
- : Editor(parent, name), _view(0)
+DeviceEditor::DeviceEditor(TQWidget *tqparent, const char *name)
+ : Editor(tqparent, name), _view(0)
{
init();
}
void DeviceEditor::init()
{
- QHBoxLayout *hbox = new QHBoxLayout(this, 0);
- QScrollView *sview = new QScrollView(this, "scroll_view");
- sview->setResizePolicy(QScrollView::AutoOneFit);
+ TQHBoxLayout *hbox = new TQHBoxLayout(this, 0);
+ TQScrollView *sview = new TQScrollView(this, "scroll_view");
+ sview->setResizePolicy(TQScrollView::AutoOneFit);
hbox->addWidget(sview);
- _widget = new QWidget(sview->viewport(), "main_scroll_widget");
+ _widget = new TQWidget(sview->viewport(), "main_scroll_widget");
sview->addChild(_widget);
- _top = new QVBoxLayout(_widget, 0, 0);
- _labelDevice = new QLabel(_widget);
+ _top = new TQVBoxLayout(_widget, 0, 0);
+ _labelDevice = new TQLabel(_widget);
_labelDevice->setMargin(10);
_labelDevice->setTextFormat(RichText);
_top->addWidget(_labelDevice);
- _labelWarning = new QLabel(_widget);
+ _labelWarning = new TQLabel(_widget);
_labelWarning->setMargin(10);
_labelWarning->setTextFormat(RichText);
_top->addWidget(_labelWarning);
- _vbox = new QVBoxLayout(_top);
+ _vbox = new TQVBoxLayout(_top);
- connect(&Main::toplevel(), SIGNAL(stateChanged()), SLOT(updateDevice()));
+ connect(&Main::toplevel(), TQT_SIGNAL(stateChanged()), TQT_SLOT(updateDevice()));
}
void DeviceEditor::setDevice(bool force)
{
if ( Main::device()==Device::AUTO_DATA.name ) {
PURL::Url url = Main::projectManager().projectUrl();
- QString name = guessDeviceFromFile(url);
+ TQString name = guessDeviceFromFile(url);
if ( !force && name==_device ) return;
_device = name;
if ( name==Device::AUTO_DATA.name )
_labelDevice->setText(i18n("The target device is not configured and cannot be guessed from source file. "
"The source file either cannot be found or does not contain any processor directive."));
- else _labelDevice->setText(i18n("Device guessed from file: %1").arg(name));
+ else _labelDevice->setText(i18n("Device guessed from file: %1").tqarg(name));
_labelDevice->show();
} else {
if ( !force && Main::device()==_device ) return;
@@ -71,7 +71,7 @@ void DeviceEditor::setDevice(bool force)
_labelDevice->hide();
}
if ( _view && isModified() ) {
- if ( MessageBox::questionYesNo(i18n("File %1 not saved.").arg(filename()), KStdGuiItem::save(), KStdGuiItem::discard()) )
+ if ( MessageBox::questionYesNo(i18n("File %1 not saved.").tqarg(filename()), KStdGuiItem::save(), KStdGuiItem::discard()) )
Editor::save();
}
_labelWarning->hide();
@@ -103,7 +103,7 @@ PURL::Url DeviceEditor::findAsmFile(const PURL::Url &url)
return PURL::Url();
}
-QString DeviceEditor::guessDeviceFromFile(const PURL::Url &url)
+TQString DeviceEditor::guessDeviceFromFile(const PURL::Url &url)
{
PURL::Url src = findAsmFile(url);
if ( src.isEmpty() ) return Device::AUTO_DATA.name;
@@ -111,12 +111,12 @@ QString DeviceEditor::guessDeviceFromFile(const PURL::Url &url)
PURL::File file(src, sview);
if ( !file.openForRead() ) return Device::AUTO_DATA.name;
- QString device;
- // QRegExp re1("^[ \\t]+(?:PROCESSOR|processor)[ \\t]+((?:p|sx|P|SX)[a-z0-9A-Z]+)" ) ;
- QRegExp re1("^[ \\t]+(?:PROCESSOR|processor)[ \\t]+([a-z0-9A-Z]+)" ) ;
- QRegExp re2("^[ \\t]+(?:LIST|list)[ \\t]+" ) ;
+ TQString device;
+ // TQRegExp re1("^[ \\t]+(?:PROCESSOR|processor)[ \\t]+((?:p|sx|P|SX)[a-z0-9A-Z]+)" ) ;
+ TQRegExp re1("^[ \\t]+(?:PROCESSOR|processor)[ \\t]+([a-z0-9A-Z]+)" ) ;
+ TQRegExp re2("^[ \\t]+(?:LIST|list)[ \\t]+" ) ;
for (;;) {
- QString line = file.readLine();
+ TQString line = file.readLine();
if ( line.isNull() ) break;
// search PROCESSOR directive
if ( re1.search(line, 0)!=-1 ) {
@@ -126,8 +126,8 @@ QString DeviceEditor::guessDeviceFromFile(const PURL::Url &url)
// search LIST p=... directive
int k = re2.search(line,0);
if ( k!=-1 ) {
- //QRegExp re3("(?:p|P)[ \\t]*=[ \\t]*((?:p|sx|P|SX)[a-z0-9A-Z]+)") ;
- QRegExp re3("(?:p|P)[ \\t]*=[ \\t]*([a-z0-9A-Z]+)") ;
+ //TQRegExp re3("(?:p|P)[ \\t]*=[ \\t]*((?:p|sx|P|SX)[a-z0-9A-Z]+)") ;
+ TQRegExp re3("(?:p|P)[ \\t]*=[ \\t]*([a-z0-9A-Z]+)") ;
if ( re3.search(line, k+5)!=-1 ) {
device = re3.cap(1);
break;
diff --git a/src/libgui/device_editor.h b/src/libgui/device_editor.h
index 8b7cab7..adbd2d0 100644
--- a/src/libgui/device_editor.h
+++ b/src/libgui/device_editor.h
@@ -15,29 +15,30 @@ namespace Device { class Data; }
class DeviceEditor : public Editor
{
Q_OBJECT
+ TQ_OBJECT
public:
- DeviceEditor(const QString &title, const QString &tag, QWidget *parent, const char *name);
- DeviceEditor(QWidget *parent, const char *name);
+ DeviceEditor(const TQString &title, const TQString &tag, TQWidget *tqparent, const char *name);
+ DeviceEditor(TQWidget *tqparent, const char *name);
virtual PURL::FileType fileType() const { return PURL::Nb_FileTypes; }
virtual PURL::Url url() const { return PURL::Url(); }
virtual void setDevice(bool force = false);
- static QString guessDeviceFromFile(const PURL::Url &url);
+ static TQString guessDeviceFromFile(const PURL::Url &url);
virtual bool save(const PURL::Url &) { return false; }
virtual bool open(const PURL::Url &) { return true; }
- virtual QValueList<uint> bookmarkLines() const { return QValueList<uint>(); }
- virtual void setBookmarkLines(const QValueList<uint> &) {}
+ virtual TQValueList<uint> bookmarkLines() const { return TQValueList<uint>(); }
+ virtual void setBookmarkLines(const TQValueList<uint> &) {}
public slots:
virtual void statusChanged() { emit statusTextChanged(" "); }
protected:
- QString _device;
- QWidget *_widget, *_view;
- QVBoxLayout *_top, *_vbox;
- QLabel *_labelDevice, *_labelWarning;
+ TQString _device;
+ TQWidget *_widget, *_view;
+ TQVBoxLayout *_top, *_vbox;
+ TQLabel *_labelDevice, *_labelWarning;
void init();
- virtual QWidget *createView(const Device::Data *data, QWidget *parent) = 0;
+ virtual TQWidget *createView(const Device::Data *data, TQWidget *tqparent) = 0;
static PURL::Url findAsmFile(const PURL::Url &url);
private slots:
diff --git a/src/libgui/device_gui.cpp b/src/libgui/device_gui.cpp
index 8183725..dc781a9 100644
--- a/src/libgui/device_gui.cpp
+++ b/src/libgui/device_gui.cpp
@@ -8,12 +8,12 @@
***************************************************************************/
#include "device_gui.h"
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qsplitter.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqsplitter.h>
#include <kiconloader.h>
#include <kpushbutton.h>
#include <klistview.h>
@@ -31,21 +31,21 @@ namespace DeviceChooser
//-----------------------------------------------------------------------------
void DeviceChooser::Config::writeProgrammerGroup(const Programmer::Group *group)
{
- writeEntry("programmer", group ? group->name() : QString::null);
+ writeEntry("programmer", group ? group->name() : TQString());
}
const Programmer::Group *DeviceChooser::Config::programmerGroup()
{
- QString name = readEntry("programmer", QString::null);
+ TQString name = readEntry("programmer", TQString());
return Programmer::lister().group(name);
}
void DeviceChooser::Config::writeToolGroup(const Tool::Group *group)
{
- writeEntry("tool", group ? group->name() : QString::null);
+ writeEntry("tool", group ? group->name() : TQString());
}
const Tool::Group *DeviceChooser::Config::toolGroup()
{
- QString name = readEntry("tool", QString::null);
+ TQString name = readEntry("tool", TQString());
return Tool::lister().group(name);
}
@@ -53,20 +53,20 @@ const Tool::Group *DeviceChooser::Config::toolGroup()
class ListItem : public KListViewItem
{
public:
- ListItem(KListView *list, const QString &name, bool selectable, bool isDevice)
+ ListItem(KListView *list, const TQString &name, bool selectable, bool isDevice)
: KListViewItem(list, name), _device(isDevice) {
setSelectable(selectable);
}
- ListItem(KListViewItem *item, const QString &name)
+ ListItem(KListViewItem *item, const TQString &name)
: KListViewItem(item, name), _device(true) {}
bool isDevice() const { return _device; }
- virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align) {
- QColorGroup ncg = cg;
+ virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align) {
+ TQColorGroup ncg = cg;
if (_device) {
const Device::Data *device = Device::lister().data(text(0));
Q_ASSERT(device);
- ncg.setColor(QColorGroup::Text, Device::statusColor(device->status()));
+ ncg.setColor(TQColorGroup::Text, Device::statusColor(device->status()));
}
KListViewItem::paintCell(p, ncg, column, width, align);
}
@@ -83,38 +83,38 @@ const DeviceChooser::ListType::Data DeviceChooser::ListType::DATA[Nb_Types] = {
{ "flat", I18N_NOOP("Flat List") }
};
-DeviceChooser::Dialog::Dialog(const QString &device, Type type, QWidget *parent)
- : ::Dialog(parent, "device_chooser_dialog", true, i18n("Select a device"),
- Ok|Close, Close, false, QSize(400, 300)), _withAuto(type==ChooseWithAuto)
+DeviceChooser::Dialog::Dialog(const TQString &device, Type type, TQWidget *tqparent)
+ : ::Dialog(tqparent, "device_chooser_dialog", true, i18n("Select a device"),
+ Ok|Close, Close, false, TQSize(400, 300)), _withAuto(type==ChooseWithAuto)
{
setButtonOK(KGuiItem(i18n( "&Select"), "button_ok"));
- QVBoxLayout *top = new QVBoxLayout(mainWidget(), 0, 10);
+ TQVBoxLayout *top = new TQVBoxLayout(mainWidget(), 0, 10);
// view
- QHBoxLayout *hbox = new QHBoxLayout(top, 10);
- QVBoxLayout *vbox = new QVBoxLayout(hbox);
+ TQHBoxLayout *hbox = new TQHBoxLayout(top, 10);
+ TQVBoxLayout *vbox = new TQVBoxLayout(hbox);
_listTypeCombo = new EnumComboBox<ListType>("list_type", mainWidget());
- connect(_listTypeCombo->combo(), SIGNAL(activated(int)), SLOT(updateList()));
+ connect(_listTypeCombo->combo(), TQT_SIGNAL(activated(int)), TQT_SLOT(updateList()));
vbox->addWidget(_listTypeCombo->combo());
- QPushButton *button = new KPushButton(KGuiItem(i18n("Reset Filters"), "reload"), mainWidget());
- connect(button, SIGNAL(clicked()), SLOT(resetFilters()));
+ TQPushButton *button = new KPushButton(KGuiItem(i18n("Reset Filters"), "reload"), mainWidget());
+ connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(resetFilters()));
vbox->addWidget(button);
vbox->addStretch(1);
// filters
- QFrame *frame = new QFrame(mainWidget());
- frame->setFrameStyle(QFrame::Panel | QFrame::Raised);
+ TQFrame *frame = new TQFrame(mainWidget());
+ frame->setFrameStyle(TQFrame::Panel | TQFrame::Raised);
frame->setMargin(5);
hbox->addWidget(frame);
- hbox = new QHBoxLayout(frame, 10, 10);
- QLabel *label = new QLabel(i18n("Filters:"), frame);
+ hbox = new TQHBoxLayout(frame, 10, 10);
+ TQLabel *label = new TQLabel(i18n("Filters:"), frame);
hbox->addWidget(label);
- vbox = new QVBoxLayout(hbox);
+ vbox = new TQVBoxLayout(hbox);
- QHBoxLayout *shbox = new QHBoxLayout(vbox);
+ TQHBoxLayout *shbox = new TQHBoxLayout(vbox);
// programmer filter
- _programmerCombo = new KeyComboBox<QString>(frame);
+ _programmerCombo = new KeyComboBox<TQString>(frame);
_programmerCombo->appendItem("<all>", i18n("<Programmer>"));
Programmer::Lister::ConstIterator pit;
for (pit=Programmer::lister().begin(); pit!=Programmer::lister().end(); ++pit)
@@ -122,11 +122,11 @@ DeviceChooser::Dialog::Dialog(const QString &device, Type type, QWidget *parent)
Config config;
const Programmer::Group *pgroup = config.programmerGroup();
if (pgroup) _programmerCombo->setCurrentItem(pgroup->name());
- connect(_programmerCombo->widget(), SIGNAL(activated(int)), SLOT(updateList()));
+ connect(_programmerCombo->widget(), TQT_SIGNAL(activated(int)), TQT_SLOT(updateList()));
shbox->addWidget(_programmerCombo->widget());
// tool filter
- _toolCombo = new KeyComboBox<QString>(frame);
+ _toolCombo = new KeyComboBox<TQString>(frame);
_toolCombo->appendItem("<all>", i18n("<Toolchain>"));
Tool::Lister::ConstIterator tit;
for (tit=Tool::lister().begin(); tit!=Tool::lister().end(); ++tit) {
@@ -135,50 +135,50 @@ DeviceChooser::Dialog::Dialog(const QString &device, Type type, QWidget *parent)
}
const Tool::Group *tgroup = config.toolGroup();
if (tgroup) _toolCombo->setCurrentItem(tgroup->name());
- connect(_toolCombo->widget(), SIGNAL(activated(int)), SLOT(updateList()));
+ connect(_toolCombo->widget(), TQT_SIGNAL(activated(int)), TQT_SLOT(updateList()));
shbox->addWidget(_toolCombo->widget());
// memory filter
_memoryCombo = new EnumComboBox<Device::MemoryTechnology>(i18n("<Memory Type>"), "memory_technology", frame);
- connect(_memoryCombo->combo(), SIGNAL(activated(int)), SLOT(updateList()));
+ connect(_memoryCombo->combo(), TQT_SIGNAL(activated(int)), TQT_SLOT(updateList()));
shbox->addWidget(_memoryCombo->combo());
shbox->addStretch(1);
- shbox = new QHBoxLayout(vbox);
+ shbox = new TQHBoxLayout(vbox);
// status filter
- _statusCombo = new EnumComboBox<Device::Status>(i18n("<Status>"), "status", frame);
- connect(_statusCombo->combo(), SIGNAL(activated(int)), SLOT(updateList()));
+ _statusCombo = new EnumComboBox<Device::tqStatus>(i18n("<tqStatus>"), "status", frame);
+ connect(_statusCombo->combo(), TQT_SIGNAL(activated(int)), TQT_SLOT(updateList()));
shbox->addWidget(_statusCombo->combo());
// features filter
_featureCombo = new EnumComboBox<Pic::Feature>(i18n("<Feature>"), "feature", frame);
- connect(_featureCombo->combo(), SIGNAL(activated(int)), SLOT(updateList()));
+ connect(_featureCombo->combo(), TQT_SIGNAL(activated(int)), TQT_SLOT(updateList()));
shbox->addWidget(_featureCombo->combo());
shbox->addStretch(1);
// list view
- QValueList<int> widths;
+ TQValueList<int> widths;
widths += 80;
widths += 500;
- Splitter *splitter = new Splitter(widths, Horizontal, mainWidget(), "device_shooser_splitter");
+ Splitter *splitter = new Splitter(widths,Qt::Horizontal, mainWidget(), "device_shooser_splitter");
top->addWidget(splitter, 1);
_listView = new KListView(splitter);
- connect(_listView, SIGNAL(currentChanged(QListViewItem *)),
- SLOT(currentChanged(QListViewItem *)));
- connect(_listView, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int)),
- SLOT(listDoubleClicked(QListViewItem *)));
+ connect(_listView, TQT_SIGNAL(currentChanged(TQListViewItem *)),
+ TQT_SLOT(currentChanged(TQListViewItem *)));
+ connect(_listView, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)),
+ TQT_SLOT(listDoubleClicked(TQListViewItem *)));
_listView->setAllColumnsShowFocus(true);
_listView->setRootIsDecorated(true);
_listView->setSorting(-1);
_listView->addColumn(i18n("Device"));
- _listView->setResizeMode(QListView::LastColumn);
+ _listView->setResizeMode(TQListView::LastColumn);
// device view
_deviceView = new View(splitter);
- connect(_deviceView, SIGNAL(deviceChanged(const QString &)),
- SLOT(deviceChange(const QString &)));
+ connect(_deviceView, TQT_SIGNAL(deviceChanged(const TQString &)),
+ TQT_SLOT(deviceChange(const TQString &)));
updateList(device);
}
@@ -194,29 +194,29 @@ DeviceChooser::Dialog::~Dialog()
_featureCombo->writeConfig();
}
-QString DeviceChooser::Dialog::device() const
+TQString DeviceChooser::Dialog::device() const
{
- QListViewItem *item = _listView->selectedItem();
+ TQListViewItem *item = _listView->selectedItem();
if ( item==0 || !static_cast<ListItem *>(item)->isDevice() ) return Device::AUTO_DATA.name;
return item->text(0);
}
-void DeviceChooser::Dialog::listDoubleClicked(QListViewItem *item)
+void DeviceChooser::Dialog::listDoubleClicked(TQListViewItem *item)
{
if ( item==0 ) return;
if ( !static_cast<ListItem *>(item)->isDevice() ) item->setOpen(!item->isOpen());
else accept();
}
-void DeviceChooser::Dialog::currentChanged(QListViewItem *item)
+void DeviceChooser::Dialog::currentChanged(TQListViewItem *item)
{
if ( item==0 || !static_cast<ListItem *>(item)->isDevice() ) _deviceView->clear();
else _deviceView->setDevice(item->text(0), false);
}
-void DeviceChooser::Dialog::deviceChange(const QString &name)
+void DeviceChooser::Dialog::deviceChange(const TQString &name)
{
- QListViewItemIterator it(_listView);
+ TQListViewItemIterator it(_listView);
for (; it.current(); ++it)
if ( it.current()->text(0)==name ) {
_listView->setSelected(it.current(), true);
@@ -237,8 +237,8 @@ void DeviceChooser::Dialog::resetFilters()
void DeviceChooser::Dialog::updateList()
{
- QListViewItem *item = _listView->selectedItem();
- QString device = (item ? item->text(0) : QString::null);
+ TQListViewItem *item = _listView->selectedItem();
+ TQString device = (item ? item->text(0) : TQString());
_listView->clear();
updateList(device);
}
@@ -253,19 +253,19 @@ const Tool::Group *DeviceChooser::Dialog::toolGroup() const
return Tool::lister().group(_toolCombo->currentItem());
}
-void DeviceChooser::Dialog::updateList(const QString &device)
+void DeviceChooser::Dialog::updateList(const TQString &device)
{
- QValueVector<QString> list = Device::lister().supportedDevices();
- QMap<QString, KListViewItem *> groups;
- QListViewItem *selected = 0;
+ TQValueVector<TQString> list = Device::lister().supportedDevices();
+ TQMap<TQString, KListViewItem *> groups;
+ TQListViewItem *selected = 0;
const Programmer::Group *pgroup = programmerGroup();
if ( pgroup && pgroup->supportedDevices().isEmpty() && pgroup->isSoftware() ) {
- _deviceView->setText(i18n("Could not detect supported devices for \"%1\". Please check installation.").arg(pgroup->label()));
+ _deviceView->setText(i18n("Could not detect supported devices for \"%1\". Please check installation.").tqarg(pgroup->label()));
return;
}
const Tool::Group *tgroup = toolGroup();
if ( tgroup && tgroup->supportedDevices().isEmpty() ) {
- _deviceView->setText(i18n("Could not detect supported devices for toolchain \"%1\". Please check installation.").arg(tgroup->label()));
+ _deviceView->setText(i18n("Could not detect supported devices for toolchain \"%1\". Please check installation.").tqarg(tgroup->label()));
return;
}
for (int i=list.count()-1; i>=0; i--) {
@@ -274,7 +274,7 @@ void DeviceChooser::Dialog::updateList(const QString &device)
const Device::Data *data = Device::lister().data(list[i]);
Q_ASSERT(data);
if ( _memoryCombo->value()!=Device::MemoryTechnology::Nb_Types && data->memoryTechnology()!=_memoryCombo->value() ) continue;
- if ( _statusCombo->value()!=Device::Status::Nb_Types && data->status()!=_statusCombo->value() ) continue;
+ if ( _statusCombo->value()!=Device::tqStatus::Nb_Types && data->status()!=_statusCombo->value() ) continue;
if ( _featureCombo->value()!=Pic::Feature::Nb_Types ) {
if ( data->group().name()!="pic" ) continue;
if ( !static_cast<const Pic::Data *>(data)->hasFeature(_featureCombo->value()) ) continue;
@@ -282,8 +282,8 @@ void DeviceChooser::Dialog::updateList(const QString &device)
KListViewItem *item = 0;
switch (_listTypeCombo->value().type()) {
case ListType::FamilyTree: {
- QString gname = data->listViewGroup();
- if ( !groups.contains(gname) )
+ TQString gname = data->listViewGroup();
+ if ( !groups.tqcontains(gname) )
groups[gname] = new ListItem(_listView, gname, false, false);
item = new ListItem(groups[gname], list[i]);
break;
@@ -305,23 +305,23 @@ void DeviceChooser::Dialog::updateList(const QString &device)
}
//-----------------------------------------------------------------------------
-DeviceChooser::ComboBox::ComboBox(bool withAuto, QWidget *parent)
- : QComboBox(parent, "device_chooser_combo"), _withAuto(withAuto)
+DeviceChooser::ComboBox::ComboBox(bool withAuto, TQWidget *tqparent)
+ : TQComboBox(tqparent, "device_chooser_combo"), _withAuto(withAuto)
{
if (withAuto) insertItem(i18n(Device::AUTO_DATA.label));
Device::Lister::ConstIterator it;
for (it=Device::lister().begin(); it!=Device::lister().end(); ++it) {
- QValueVector<QString> devices = it.data()->supportedDevices();
+ TQValueVector<TQString> devices = it.data()->supportedDevices();
qHeapSort(devices);
for (uint k=0; k<devices.count(); k++) insertItem(devices[k]);
}
}
-void DeviceChooser::ComboBox::setDevice(const QString &device, const Device::Data *data)
+void DeviceChooser::ComboBox::setDevice(const TQString &device, const Device::Data *data)
{
- QString text = device;
+ TQString text = device;
if ( device.isEmpty() || device==Device::AUTO_DATA.name ) {
- if (_withAuto) text = QString::null;
+ if (_withAuto) text = TQString();
else text = Device::lister().supportedDevices()[0];
}
if ( text.isEmpty() ) {
@@ -331,24 +331,24 @@ void DeviceChooser::ComboBox::setDevice(const QString &device, const Device::Dat
} else setCurrentText(text);
}
-QString DeviceChooser::ComboBox::device() const
+TQString DeviceChooser::ComboBox::device() const
{
if ( _withAuto && currentItem()==0 ) return Device::AUTO_DATA.name;
return currentText();
}
//-----------------------------------------------------------------------------
-DeviceChooser::Button::Button(bool withAuto, QWidget *parent)
- : QWidget(parent, "device_chooser_button")
+DeviceChooser::Button::Button(bool withAuto, TQWidget *tqparent)
+ : TQWidget(tqparent, "device_chooser_button")
{
- QHBoxLayout *hbox = new QHBoxLayout(this, 0, 10);
+ TQHBoxLayout *hbox = new TQHBoxLayout(this, 0, 10);
_combo = new ComboBox(withAuto, this);
- connect(_combo, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(_combo, TQT_SIGNAL(activated(int)), TQT_SIGNAL(changed()));
hbox->addWidget(_combo);
KIconLoader loader;
- QIconSet iconset = loader.loadIcon("fileopen", KIcon::Toolbar);
- KPushButton *button = new KPushButton(iconset, QString::null, this);
- connect(button, SIGNAL(clicked()), SLOT(chooseDevice()));
+ TQIconSet iconset = loader.loadIcon("fileopen", KIcon::Toolbar);
+ KPushButton *button = new KPushButton(iconset, TQString(), this);
+ connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(chooseDevice()));
hbox->addWidget(button);
}
@@ -361,16 +361,16 @@ void DeviceChooser::Button::chooseDevice()
}
//-----------------------------------------------------------------------------
-DeviceChooser::Browser::Browser(QWidget *parent)
- : KTextBrowser(parent, "device_browser")
+DeviceChooser::Browser::Browser(TQWidget *tqparent)
+ : KTextBrowser(tqparent, "device_browser")
{}
-PURL::Url findDocumentUrl(const QString &prefix, const QString &baseName)
+PURL::Url findDocumentUrl(const TQString &prefix, const TQString &baseName)
{
PURL::Url previous = KURL::fromPathOrURL(prefix + baseName + ".pdf");
bool previousExists = previous.exists();
for (uint i=0; i<26; i++) {
- PURL::Url url = KURL::fromPathOrURL(prefix + baseName + QChar('a' + i) + ".pdf");
+ PURL::Url url = KURL::fromPathOrURL(prefix + baseName + TQChar('a' + i) + ".pdf");
bool exists = url.exists();
if ( !exists && previousExists ) return previous;
previous = url;
@@ -379,12 +379,12 @@ PURL::Url findDocumentUrl(const QString &prefix, const QString &baseName)
return previous;
}
-void DeviceChooser::Browser::setSource(const QString &name)
+void DeviceChooser::Browser::setSource(const TQString &name)
{
- ::BusyCursor bc;
+ ::PBusyCursor bc;
if ( name.startsWith("device://") ) emit deviceChanged(name.mid(9));
else if ( name.startsWith("document://") ) {
- QString prefix = "http://ww1.microchip.com/downloads/en/DeviceDoc/";
+ TQString prefix = "http://ww1.microchip.com/downloads/en/DeviceDoc/";
PURL::Url url = findDocumentUrl(prefix, name.mid(11, name.length()-11-1));
KTextBrowser::setSource(url.kurl().htmlURL());
}
@@ -392,15 +392,15 @@ void DeviceChooser::Browser::setSource(const QString &name)
}
//-----------------------------------------------------------------------------
-DeviceChooser::View::View(QWidget *parent)
- : TabWidget(parent, "device_view")
+DeviceChooser::View::View(TQWidget *tqparent)
+ : TabWidget(tqparent, "device_view")
{
// Information
_info = new Browser(this);
_info->setMimeSourceFactory(&_msf);
insertTab(_info, i18n("Information"));
- connect(_info, SIGNAL(deviceChanged(const QString &)),
- SIGNAL(deviceChanged(const QString &)));
+ connect(_info, TQT_SIGNAL(deviceChanged(const TQString &)),
+ TQT_SIGNAL(deviceChanged(const TQString &)));
// Memory Map
_memory = new Browser(this);
@@ -418,24 +418,24 @@ DeviceChooser::View::View(QWidget *parent)
insertTab(_pins, i18n("Pin Diagrams"));
}
-void DeviceChooser::View::setDevice(const QString &name, bool cannotChangeDevice)
+void DeviceChooser::View::setDevice(const TQString &name, bool cannotChangeDevice)
{
const Device::Data *data = Device::lister().data(name);
if ( data==0 ) return;
- QString doc = htmlInfo(*data, (cannotChangeDevice ? QString::null : "device:%1"), Device::documentHtml(*data));
+ TQString doc = htmlInfo(*data, (cannotChangeDevice ? TQString() : "device:%1"), Device::documentHtml(*data));
doc += Device::supportedHtmlInfo(*data);
_info->setText("<html><body>" + doc + "</body></html>");
- doc = htmlVoltageFrequencyGraphs(*data, QString::null, &_msf);
- QPixmap pix = data->group().memoryGraph(*data);
- QString label = data->name() + "_memory_map.png";
+ doc = htmlVoltageFrequencyGraphs(*data, TQString(), &_msf);
+ TQPixmap pix = data->group().memoryGraph(*data);
+ TQString label = data->name() + "_memory_map.png";
_msf.setPixmap(label, pix);
_memory->setText("<html><body><img src=\"" + label + "\" /></body></html>");
_vfg->setText("<html><body>" + doc + "</body></html>");
- doc = htmlPinDiagrams(*data, QString::null, &_msf);
+ doc = htmlPinDiagrams(*data, TQString(), &_msf);
_pins->setText("<html><body>" + doc + "</body></html>");
}
-void DeviceChooser::View::setText(const QString &text)
+void DeviceChooser::View::setText(const TQString &text)
{
_info->setText(text);
_vfg->setText(text);
@@ -450,14 +450,14 @@ void DeviceChooser::View::clear()
}
//-----------------------------------------------------------------------------
-DeviceChooser::Editor::Editor(const QString &title, const QString &tag, QWidget *widget)
+DeviceChooser::Editor::Editor(const TQString &title, const TQString &tag, TQWidget *widget)
: DeviceEditor(title, tag, widget, "device_view_editor")
{}
-QWidget *DeviceChooser::Editor::createView(const Device::Data *, QWidget *parent)
+TQWidget *DeviceChooser::Editor::createView(const Device::Data *, TQWidget *tqparent)
{
- DeviceChooser::View *view = new DeviceChooser::View(parent);
- connect(view, SIGNAL(deviceChanged(const QString &)), SIGNAL(deviceChanged(const QString &)));
+ DeviceChooser::View *view = new DeviceChooser::View(tqparent);
+ connect(view, TQT_SIGNAL(deviceChanged(const TQString &)), TQT_SIGNAL(deviceChanged(const TQString &)));
view->setDevice(_device, true);
return view;
}
diff --git a/src/libgui/device_gui.h b/src/libgui/device_gui.h
index a10c58a..53ad04f 100644
--- a/src/libgui/device_gui.h
+++ b/src/libgui/device_gui.h
@@ -9,11 +9,11 @@
#ifndef DEVICE_GUI_H
#define DEVICE_GUI_H
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-class QListViewItem;
-class QCheckBox;
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+class TQListViewItem;
+class TQCheckBox;
#include <ktextbrowser.h>
class KListView;
@@ -50,22 +50,22 @@ template <typename Enum>
class EnumComboBox
{
public:
- EnumComboBox(const QString &key, QWidget *parent) : _key(key) {
- _combo = new QComboBox(parent);
+ EnumComboBox(const TQString &key, TQWidget *tqparent) : _key(key) {
+ _combo = new TQComboBox(tqparent);
for (Enum type; type<Enum::Nb_Types; ++type) _combo->insertItem(type.label());
Config config;
Enum type = config.readEnumEntry(key, Enum(Enum::Nb_Types));
if ( type!=Enum::Nb_Types ) _combo->setCurrentItem(type.type());
}
- EnumComboBox(const QString &emptyLabel, const QString &key, QWidget *parent) : _key(key) {
- _combo = new QComboBox(parent);
+ EnumComboBox(const TQString &emptyLabel, const TQString &key, TQWidget *tqparent) : _key(key) {
+ _combo = new TQComboBox(tqparent);
_combo->insertItem(emptyLabel);
for (Enum type; type<Enum::Nb_Types; ++type) _combo->insertItem(type.label());
Config config;
Enum type = config.readEnumEntry(key, Enum(Enum::Nb_Types));
if ( type!=Enum::Nb_Types ) _combo->setCurrentItem(type.type()+1);
}
- QComboBox *combo() { return _combo; }
+ TQComboBox *combo() { return _combo; }
Enum value() const {
if ( _combo->count()==Enum::Nb_Types ) return typename Enum::Type(_combo->currentItem());
if ( _combo->currentItem()==0 ) return Enum::Nb_Types;
@@ -78,50 +78,52 @@ public:
}
private:
- QString _key;
- QComboBox *_combo;
+ TQString _key;
+ TQComboBox *_combo;
};
//-----------------------------------------------------------------------------
class Dialog : public ::Dialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- Dialog(const QString &device, Type type, QWidget *parent);
+ Dialog(const TQString &device, Type type, TQWidget *tqparent);
virtual ~Dialog();
- QString device() const;
+ TQString device() const;
private slots:
- void listDoubleClicked(QListViewItem *item);
- void currentChanged(QListViewItem *item);
- void deviceChange(const QString &device);
+ void listDoubleClicked(TQListViewItem *item);
+ void currentChanged(TQListViewItem *item);
+ void deviceChange(const TQString &device);
void updateList();
void resetFilters();
private:
bool _withAuto;
- KeyComboBox<QString> *_programmerCombo, *_toolCombo;
+ KeyComboBox<TQString> *_programmerCombo, *_toolCombo;
EnumComboBox<ListType> *_listTypeCombo;
EnumComboBox<Device::MemoryTechnology> *_memoryCombo;
- EnumComboBox<Device::Status> *_statusCombo;
+ EnumComboBox<Device::tqStatus> *_statusCombo;
EnumComboBox<Pic::Feature> *_featureCombo;
KListView *_listView;
View *_deviceView;
- void updateList(const QString &device);
+ void updateList(const TQString &device);
const Programmer::Group *programmerGroup() const;
const Tool::Group *toolGroup() const;
};
//-----------------------------------------------------------------------------
-class ComboBox : public QComboBox
+class ComboBox : public TQComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- ComboBox(bool withAuto, QWidget *parent);
- void setDevice(const QString &device, const Device::Data *data = 0);
- QString device() const;
+ ComboBox(bool withAuto, TQWidget *tqparent);
+ void setDevice(const TQString &device, const Device::Data *data = 0);
+ TQString device() const;
bool withAuto() const { return _withAuto; }
private:
@@ -129,13 +131,14 @@ private:
};
//-----------------------------------------------------------------------------
-class Button : public QWidget
+class Button : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- Button(bool withAuto, QWidget *parent);
- void setDevice(const QString &device) { _combo->setDevice(device); }
- QString device() const { return _combo->device(); }
+ Button(bool withAuto, TQWidget *tqparent);
+ void setDevice(const TQString &device) { _combo->setDevice(device); }
+ TQString device() const { return _combo->device(); }
signals:
void changed();
@@ -151,31 +154,33 @@ private:
class Browser : public KTextBrowser
{
Q_OBJECT
+ TQ_OBJECT
public:
- Browser(QWidget *parent);
+ Browser(TQWidget *tqparent);
signals:
- void deviceChanged(const QString &device);
+ void deviceChanged(const TQString &device);
public slots:
- virtual void setSource(const QString &name);
+ virtual void setSource(const TQString &name);
};
//-----------------------------------------------------------------------------
class View : public TabWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- View(QWidget *parent);
+ View(TQWidget *tqparent);
void clear();
- void setText(const QString &text);
- void setDevice(const QString &name, bool cannotChangeDevice);
+ void setText(const TQString &text);
+ void setDevice(const TQString &name, bool cannotChangeDevice);
signals:
- void deviceChanged(const QString &device);
+ void deviceChanged(const TQString &device);
private:
- QMimeSourceFactory _msf;
+ TQMimeSourceFactory _msf;
Browser *_info, *_memory, *_vfg, *_pins;
};
@@ -183,8 +188,9 @@ private:
class Editor : public DeviceEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- Editor(const QString &title, const QString &tag, QWidget *parent);
+ Editor(const TQString &title, const TQString &tag, TQWidget *tqparent);
virtual bool isModified() const { return false; }
virtual bool isReadOnly() const { return true; }
virtual void addGui() {}
@@ -192,10 +198,10 @@ public:
virtual void setFocus() {}
signals:
- void deviceChanged(const QString &device);
+ void deviceChanged(const TQString &device);
private:
- virtual QWidget *createView(const Device::Data *data, QWidget *parent);
+ virtual TQWidget *createView(const Device::Data *data, TQWidget *tqparent);
virtual void setModifiedInternal(bool) {}
virtual void setReadOnlyInternal(bool) {}
};
diff --git a/src/libgui/editor.cpp b/src/libgui/editor.cpp
index c64d98f..1bbacb2 100644
--- a/src/libgui/editor.cpp
+++ b/src/libgui/editor.cpp
@@ -13,17 +13,17 @@
#include "common/gui/purl_gui.h"
#include "common/gui/misc_gui.h"
-Editor::Editor(const QString &title, const QString &tag, QWidget *parent, const char *name)
- : QWidget(parent, name), _title(title), _tag(tag)
+Editor::Editor(const TQString &title, const TQString &tag, TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name), _title(title), _tag(tag)
{}
-Editor::Editor(QWidget *parent, const char *name)
- : QWidget(parent, name)
+Editor::Editor(TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name)
{}
-QSizePolicy Editor::sizePolicy() const
+TQSizePolicy Editor::sizePolicy() const
{
- return QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ return TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
}
void Editor::setModified(bool m)
@@ -49,7 +49,7 @@ bool Editor::save()
bool Editor::saveAs()
{
- QString filter = PURL::filter(fileType());
+ TQString filter = PURL::filter(fileType());
PURL::Url purl = PURL::getSaveUrl(":save_file_as", filter, this, i18n("Save File"), PURL::AskOverwrite);
if ( purl.isEmpty() ) return false;
if ( !save(purl) ) return false;
@@ -69,7 +69,7 @@ bool Editor::slotLoad()
return true;
}
-QString Editor::filename() const
+TQString Editor::filename() const
{
return (url().isEmpty() ? "<" + _title + ">" : "\"" + url().filepath() + "\"");
}
@@ -77,7 +77,7 @@ QString Editor::filename() const
bool Editor::checkSaved()
{
if ( !isModified() ) return true;
- MessageBox::Result res = MessageBox::questionYesNoCancel(i18n("File %1 not saved.").arg(filename()),
+ MessageBox::Result res = MessageBox::questionYesNoCancel(i18n("File %1 not saved.").tqarg(filename()),
KStdGuiItem::save(), KStdGuiItem::discard());
if ( res==MessageBox::Cancel ) return false;
if ( res==MessageBox::Yes ) save();
diff --git a/src/libgui/editor.h b/src/libgui/editor.h
index 9247c80..1a4c54d 100644
--- a/src/libgui/editor.h
+++ b/src/libgui/editor.h
@@ -9,28 +9,29 @@
#ifndef EDITOR_H
#define EDITOR_H
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qvaluevector.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqvaluevector.h>
#include "common/common/qflags.h"
#include <kstdaction.h>
class KPopupMenu;
#include "common/global/purl.h"
-class Editor : public QWidget
+class Editor : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- Editor(const QString &title, const QString &tag, QWidget *parent, const char *name);
- Editor(QWidget *parent, const char *name);
- virtual QSizePolicy sizePolicy() const;
+ Editor(const TQString &title, const TQString &tag, TQWidget *tqparent, const char *name);
+ Editor(TQWidget *tqparent, const char *name);
+ virtual TQSizePolicy sizePolicy() const;
virtual PURL::FileType fileType() const = 0;
virtual bool isModified() const = 0;
void setModified(bool modified);
virtual PURL::Url url() const = 0;
- QString name() const { return _title; }
- QString tag() const { return _tag; }
+ TQString name() const { return _title; }
+ TQString tag() const { return _tag; }
void setReadOnly(bool readOnly);
virtual bool isReadOnly() const = 0;
bool checkSaved();
@@ -40,8 +41,8 @@ public:
virtual bool save(const PURL::Url &url) = 0;
virtual void addGui() = 0;
virtual void removeGui() = 0;
- virtual QValueList<uint> bookmarkLines() const = 0;
- virtual void setBookmarkLines(const QValueList<uint> &lines) = 0;
+ virtual TQValueList<uint> bookmarkLines() const = 0;
+ virtual void setBookmarkLines(const TQValueList<uint> &lines) = 0;
public slots:
bool slotLoad();
@@ -53,16 +54,16 @@ public slots:
signals:
void modified();
void guiChanged();
- void statusTextChanged(const QString &text);
- void dropEventPass(QDropEvent *e);
+ void statusTextChanged(const TQString &text);
+ void dropEventPass(TQDropEvent *e);
protected:
- QString filename() const;
+ TQString filename() const;
virtual void setModifiedInternal(bool modified) = 0;
virtual void setReadOnlyInternal(bool readOnly) = 0;
private:
- QString _title, _tag;
+ TQString _title, _tag;
};
#endif
diff --git a/src/libgui/editor_manager.cpp b/src/libgui/editor_manager.cpp
index 2a42554..a9d6a24 100644
--- a/src/libgui/editor_manager.cpp
+++ b/src/libgui/editor_manager.cpp
@@ -9,9 +9,9 @@
***************************************************************************/
#include "editor_manager.h"
-#include <qiconset.h>
-#include <qdragobject.h>
-#include <qpainter.h>
+#include <tqiconset.h>
+#include <tqdragobject.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -33,43 +33,43 @@
#include "project.h"
//-----------------------------------------------------------------------------
-SwitchToDialog::SwitchToDialog(const QStringList &names, QWidget *parent)
- : Dialog(parent, "switch_to_dialog", true, i18n("Switch to editor"), Ok | Cancel, Ok, false)
+SwitchToDialog::SwitchToDialog(const TQStringList &names, TQWidget *tqparent)
+ : Dialog(tqparent, "switch_to_dialog", true, i18n("Switch to editor"), Ok | Cancel, Ok, false)
{
- QVBoxLayout *top = new QVBoxLayout(mainWidget(), 10, 10);
+ TQVBoxLayout *top = new TQVBoxLayout(mainWidget(), 10, 10);
_edit = new KLineEdit(mainWidget());
_edit->setCompletedItems(names);
top->addWidget(_edit);
}
//-----------------------------------------------------------------------------
-void EditorTabBar::paintLabel(QPainter *p, const QRect &br, QTab *t, bool has_focus) const
+void EditorTabBar::paintLabel(TQPainter *p, const TQRect &br, TQTab *t, bool has_focus) const
{
- QFont f = p->font();
+ TQFont f = p->font();
f.setItalic(_readOnly[t]);
p->setFont(f);
- QTabBar::paintLabel(p, br, t, has_focus);
+ TQTabBar::paintLabel(p, br, t, has_focus);
}
//-----------------------------------------------------------------------------
-QString EditorHistory::goBack()
+TQString EditorHistory::goBack()
{
- if ( !hasBack() ) return QString::null;
+ if ( !hasBack() ) return TQString();
_current--;
return _names[_current];
}
-QString EditorHistory::goForward()
+TQString EditorHistory::goForward()
{
- if ( !hasForward() ) return QString::null;
+ if ( !hasForward() ) return TQString();
_current++;
return _names[_current];
}
-void EditorHistory::add(const QString &name)
+void EditorHistory::add(const TQString &name)
{
if ( _names.count()!=0 ) {
- _current = QMIN(_current, _names.count()-1);
+ _current = TQMIN(_current, _names.count()-1);
if ( _names[_current]==name ) return;
if ( _current!=0 && _names[_current-1]==name ) {
_current--;
@@ -92,11 +92,11 @@ void EditorHistory::closedLast()
//-----------------------------------------------------------------------------
const char * const EditorManager::EDITOR_TAGS[Nb_EditorTypes] = { "device", "registers" };
-EditorManager::EditorManager(QWidget *parent)
- : TabWidget(parent, "editor_manager"), _current(0)
+EditorManager::EditorManager(TQWidget *tqparent)
+ : TabWidget(tqparent, "editor_manager"), _current(0)
{
setTabBar(new EditorTabBar(this));
- connect(this, SIGNAL(currentChanged(QWidget *)), SLOT(showEditor(QWidget *)));
+ connect(this, TQT_SIGNAL(currentChanged(TQWidget *)), TQT_SLOT(showEditor(TQWidget *)));
setHoverCloseButton(readConfigEntry(BaseGlobalConfig::ShowTabCloseButton).toBool());
setHoverCloseButtonDelayed(false);
}
@@ -106,7 +106,7 @@ bool EditorManager::openFile(const PURL::Url &url)
if ( url.isEmpty() ) return false;
Editor *e = findEditor(url);
if (e) { // document already loaded
- if ( !MessageBox::askContinue(i18n("File \"%1\" already loaded. Reload?").arg(url.kurl().prettyURL()),
+ if ( !MessageBox::askContinue(i18n("File \"%1\" already loaded. Reload?").tqarg(url.kurl().prettyURL()),
i18n("Warning"), i18n("Reload")) ) return true;
if ( !e->slotLoad() ) {
closeEditor(e, false);
@@ -127,10 +127,10 @@ void EditorManager::connectEditor(Editor *editor)
disconnectEditor(currentEditor());
if ( editor==0 ) return;
editor->addGui();
- connect(editor, SIGNAL(modified()), SLOT(modifiedSlot()));
- connect(editor, SIGNAL(guiChanged()), SIGNAL(guiChanged()));
- connect(editor, SIGNAL(dropEventPass(QDropEvent *)), SLOT(slotDropEvent(QDropEvent *)));
- connect(editor, SIGNAL(statusTextChanged(const QString &)), SIGNAL(statusChanged(const QString &)));
+ connect(editor, TQT_SIGNAL(modified()), TQT_SLOT(modifiedSlot()));
+ connect(editor, TQT_SIGNAL(guiChanged()), TQT_SIGNAL(guiChanged()));
+ connect(editor, TQT_SIGNAL(dropEventPass(TQDropEvent *)), TQT_SLOT(slotDropEvent(TQDropEvent *)));
+ connect(editor, TQT_SIGNAL(statusTextChanged(const TQString &)), TQT_SIGNAL(statusChanged(const TQString &)));
}
void EditorManager::modifiedSlot()
@@ -145,7 +145,7 @@ void EditorManager::disconnectEditor(Editor *editor)
editor->removeGui();
}
-QString EditorManager::title(const Editor &e) const
+TQString EditorManager::title(const Editor &e) const
{
return (e.url().isEmpty() ? "<" + e.name() + ">" : e.url().filename());
}
@@ -153,15 +153,15 @@ QString EditorManager::title(const Editor &e) const
void EditorManager::updateTitles()
{
KIconLoader loader;
- QPixmap def = loader.loadIcon("piklab", KIcon::Small);
- QPixmap modified = loader.loadIcon("filesave", KIcon::Small);
- QPixmap chip = loader.loadIcon("piklab_chip", KIcon::Small);
- QValueList<Editor *>::iterator it = _editors.begin();
+ TQPixmap def = loader.loadIcon("piklab", KIcon::Small);
+ TQPixmap modified = loader.loadIcon("filesave", KIcon::Small);
+ TQPixmap chip = loader.loadIcon("piklab_chip", KIcon::Small);
+ TQValueList<Editor *>::iterator it = _editors.begin();
for (; it!=_editors.end(); ++it) {
static_cast<EditorTabBar *>(tabBar())->setReadOnly(indexOf(*it), (*it)->isReadOnly());
- QPixmap pixmap;
+ TQPixmap pixmap;
if ( (*it)->isModified() ) pixmap = modified;
- else if ( ::qt_cast< ::DeviceEditor *>(*it)==0 ) pixmap = PURL::icon((*it)->fileType());
+ else if ( ::tqqt_cast< ::DeviceEditor *>(*it)==0 ) pixmap = PURL::icon((*it)->fileType());
else pixmap = chip;
changeTab(*it, pixmap.isNull() ? def : pixmap, title(**it));
}
@@ -186,9 +186,9 @@ bool EditorManager::closeAllEditors()
bool EditorManager::closeAllOtherEditors()
{
if ( nbEditors()==1 ) return true;
- QValueList<Editor *> list = _editors;
+ TQValueList<Editor *> list = _editors;
list.remove(currentEditor());
- QValueList<Editor *>::iterator it = list.begin();
+ TQValueList<Editor *>::iterator it = list.begin();
bool ok = true;
for (; it!=list.end(); ++it) {
if ( !closeEditor(*it, true) ) {
@@ -231,14 +231,14 @@ bool EditorManager::closeEditor(Editor *e, bool ask)
void EditorManager::saveBookmarks(const Editor &e)
{
if ( Main::project()==0 ) return;
- QValueList<uint> lines = e.bookmarkLines();
+ TQValueList<uint> lines = e.bookmarkLines();
Main::project()->setBookmarkLines(e.url(), lines);
}
void EditorManager::restoreBookmarks(Editor &e)
{
if ( Main::project()==0 ) return;
- QValueList<uint> lines = Main::project()->bookmarkLines(e.url());
+ TQValueList<uint> lines = Main::project()->bookmarkLines(e.url());
e.setBookmarkLines(lines);
}
@@ -260,21 +260,21 @@ void EditorManager::changeToEditor(Editor *e)
e->statusChanged();
_history.add(name(*e));
} else {
- emit statusChanged(QString::null);
+ emit statusChanged(TQString());
_history.closedLast();
}
}
-Editor *EditorManager::findEditor(const QString &tag)
+Editor *EditorManager::findEditor(const TQString &tag)
{
- QValueList<Editor *>::iterator it = _editors.begin();
+ TQValueList<Editor *>::iterator it = _editors.begin();
for (; it!=_editors.end(); ++it) if ( (*it)->tag()==tag ) return *it;
return 0;
}
Editor *EditorManager::findEditor(const PURL::Url &url)
{
- QValueList<Editor *>::iterator it = _editors.begin();
+ TQValueList<Editor *>::iterator it = _editors.begin();
for (; it!=_editors.end(); ++it) if ( (*it)->url()==url ) return *it;
return 0;
}
@@ -334,20 +334,20 @@ Editor *EditorManager::createEditor(PURL::FileType type, const PURL::Url &url)
void EditorManager::addEditor(Editor *e)
{
- QValueList<Editor *>::iterator it = _editors.begin();
+ TQValueList<Editor *>::iterator it = _editors.begin();
for (; it!=_editors.end(); ++it) if ( *it==e ) return;
_editors.append(e);
- addTab(e, QString::null);
+ addTab(e, TQString());
setTabEnabled(e, true);
restoreBookmarks(*e);
showEditor(e);
}
-void EditorManager::slotDropEvent(QDropEvent *event)
+void EditorManager::slotDropEvent(TQDropEvent *event)
{
- QStringList urls;
- if ( !QUriDrag::decodeLocalFiles(event, urls)) return;
- QStringList::const_iterator it = urls.begin();
+ TQStringList urls;
+ if ( !TQUriDrag::decodeLocalFiles(event, urls)) return;
+ TQStringList::const_iterator it = urls.begin();
for(; it!=urls.end(); ++it) openEditor(PURL::Url::fromPathOrUrl(*it));
}
@@ -368,7 +368,7 @@ Editor *EditorManager::openEditor(const PURL::Url &url)
void EditorManager::saveAllFiles()
{
- QValueList<Editor *>::iterator it = _editors.begin();
+ TQValueList<Editor *>::iterator it = _editors.begin();
for (; it!=_editors.end(); ++it) {
if ( !(*it)->isModified() ) continue;
(*it)->save();
@@ -379,7 +379,7 @@ void EditorManager::saveAllFiles()
PURL::UrlList EditorManager::files() const
{
PURL::UrlList names;
- QValueList<Editor *>::const_iterator it = _editors.begin();
+ TQValueList<Editor *>::const_iterator it = _editors.begin();
for(; it!=_editors.end(); ++it) {
if ( (*it)->url().isEmpty() ) continue;
names.push_back((*it)->url());
@@ -387,16 +387,16 @@ PURL::UrlList EditorManager::files() const
return names;
}
-void EditorManager::contextMenu(int i, const QPoint &p)
+void EditorManager::contextMenu(int i, const TQPoint &p)
{
Editor *editor = static_cast<Editor *>(page(i));
if ( editor==0 ) return;
KIconLoader loader;
- QPixmap closeIcon = loader.loadIcon("fileclose", KIcon::Small);
- QPixmap saveIcon = loader.loadIcon("filesave", KIcon::Small);
- QPixmap saveAsIcon = loader.loadIcon("filesaveas", KIcon::Small);
- QPixmap reloadIcon = loader.loadIcon("reload", KIcon::Small);
+ TQPixmap closeIcon = loader.loadIcon("fileclose", KIcon::Small);
+ TQPixmap saveIcon = loader.loadIcon("filesave", KIcon::Small);
+ TQPixmap saveAsIcon = loader.loadIcon("filesaveas", KIcon::Small);
+ TQPixmap reloadIcon = loader.loadIcon("reload", KIcon::Small);
KPopupMenu *popup = new KPopupMenu;
popup->insertTitle(title(*editor));
popup->insertItem(closeIcon, i18n("Close"), 1);
@@ -434,18 +434,18 @@ void EditorManager::switchHeaderImplementation()
void EditorManager::switchToEditor()
{
- QStringList names;
+ TQStringList names;
for (uint i=0; i<_editors.count(); i++) names.append(title(*_editors[i]));
SwitchToDialog dialog(names, this);
- if ( dialog.exec()!=QDialog::Accepted ) return;
+ if ( dialog.exec()!=TQDialog::Accepted ) return;
for (uint i=0; i<names.count(); i++) {
- if ( dialog.name()!=names[i] && dialog.name()!=QString("%1").arg(i+1) ) continue;
+ if ( dialog.name()!=names[i] && dialog.name()!=TQString("%1").tqarg(i+1) ) continue;
showEditor(_editors[i]);
return;
}
}
-QString EditorManager::name(const Editor &e) const
+TQString EditorManager::name(const Editor &e) const
{
return (!e.name().isEmpty() ? e.name() : e.url().filepath());
}
@@ -453,7 +453,7 @@ QString EditorManager::name(const Editor &e) const
void EditorManager::goBack()
{
Q_ASSERT( _history.hasBack() );
- QString s = _history.goBack();
+ TQString s = _history.goBack();
for (uint i=0; i<_editors.count(); i++)
if ( s==name(*_editors[i]) ) showEditor(_editors[i]);
}
@@ -461,7 +461,7 @@ void EditorManager::goBack()
void EditorManager::goForward()
{
Q_ASSERT( _history.hasForward() );
- QString s = _history.goForward();
+ TQString s = _history.goForward();
for (uint i=0; i<_editors.count(); i++)
if ( s==name(*_editors[i]) ) showEditor(_editors[i]);
}
@@ -470,7 +470,7 @@ Editor *EditorManager::openEditor(EditorType type)
{
bool created = false;
Editor *e = 0;
- QString tag = EDITOR_TAGS[type];
+ TQString tag = EDITOR_TAGS[type];
switch (type) {
case DeviceEditor: {
e = findEditor(tag);
@@ -485,7 +485,7 @@ Editor *EditorManager::openEditor(EditorType type)
case RegisterEditor: {
e = findEditor(tag);
if ( e==0 ) {
- ::BusyCursor bc;
+ ::PBusyCursor bc;
e = new Register::MainView(i18n("Registers"), tag);
static_cast<Debugger::GuiManager *>(Debugger::manager)->addRegisterView(*static_cast<Register::MainView *>(e));
created = true;
diff --git a/src/libgui/editor_manager.h b/src/libgui/editor_manager.h
index 0d180b9..8c5f626 100644
--- a/src/libgui/editor_manager.h
+++ b/src/libgui/editor_manager.h
@@ -10,7 +10,7 @@
#ifndef EDITOR_MANAGER_H
#define EDITOR_MANAGER_H
-class QEvent;
+class TQEvent;
#include <ktabbar.h>
#include <ktabwidget.h>
#include <klineedit.h>
@@ -23,9 +23,10 @@ class QEvent;
class SwitchToDialog : public Dialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- SwitchToDialog(const QStringList &names, QWidget *parent);
- QString name() const { return _edit->text(); }
+ SwitchToDialog(const TQStringList &names, TQWidget *tqparent);
+ TQString name() const { return _edit->text(); }
private:
KLineEdit *_edit;
@@ -35,13 +36,14 @@ private:
class EditorTabBar : public TabBar
{
Q_OBJECT
+ TQ_OBJECT
public:
- EditorTabBar(QWidget *parent) : TabBar(parent, "editor_tab_bar") {}
+ EditorTabBar(TQWidget *tqparent) : TabBar(tqparent, "editor_tab_bar") {}
void setReadOnly(uint index, bool readOnly) { _readOnly[tabAt(index)] = readOnly; }
private:
- QMap<QTab *, bool> _readOnly;
- virtual void paintLabel(QPainter *p, const QRect &br, QTab *t, bool has_focus) const;
+ TQMap<TQTab *, bool> _readOnly;
+ virtual void paintLabel(TQPainter *p, const TQRect &br, TQTab *t, bool has_focus) const;
};
//-----------------------------------------------------------------------------
@@ -51,31 +53,32 @@ public:
EditorHistory() : _current(0) {}
bool hasBack() const { return _current!=0; }
bool hasForward() const { return (_current+1)<_names.count(); }
- void add(const QString &name);
+ void add(const TQString &name);
void closedLast();
- QString goBack();
- QString goForward();
+ TQString goBack();
+ TQString goForward();
private:
uint _current;
- QValueVector<QString> _names;
+ TQValueVector<TQString> _names;
};
//-----------------------------------------------------------------------------
class EditorManager : public TabWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- EditorManager(QWidget *parent);
+ EditorManager(TQWidget *tqparent);
PURL::UrlList files() const;
- QValueList<Editor *> &editors() { return _editors; }
+ TQValueList<Editor *> &editors() { return _editors; }
uint nbEditors() const { return _editors.count(); }
Editor *createEditor(PURL::FileType type, const PURL::Url &url);
void addEditor(Editor *e);
Editor *currentEditor() const { return _current; }
Editor *findEditor(const PURL::Url &file);
- Editor *findEditor(const QString &tag);
+ Editor *findEditor(const TQString &tag);
void showEditor(Editor *e);
bool closeEditor(const PURL::Url &url);
bool closeEditor(Editor *e, bool ask);
@@ -89,7 +92,7 @@ public:
public slots:
void updateTitles();
- void slotDropEvent(QDropEvent *e);
+ void slotDropEvent(TQDropEvent *e);
void saveAllFiles();
bool closeCurrentEditor();
bool closeAllEditors();
@@ -102,25 +105,25 @@ public slots:
signals:
void modified(const PURL::Url &url);
void guiChanged();
- void statusChanged(const QString &);
+ void statusChanged(const TQString &);
private:
void changeToEditor(Editor *e);
void enableActions(bool enable);
- QString title(const Editor &e) const;
- QString name(const Editor &e) const;
- virtual void contextMenu(int i, const QPoint &p);
+ TQString title(const Editor &e) const;
+ TQString name(const Editor &e) const;
+ virtual void contextMenu(int i, const TQPoint &p);
void saveBookmarks(const Editor &e);
void restoreBookmarks(Editor &e);
private slots:
- void showEditor(QWidget *w) { showEditor(static_cast<Editor *>(w)); }
+ void showEditor(TQWidget *w) { showEditor(static_cast<Editor *>(w)); }
void closeRequest(int i);
void modifiedSlot();
private:
Editor *_current;
- QValueList<Editor *> _editors;
+ TQValueList<Editor *> _editors;
EditorHistory _history;
static const char * const EDITOR_TAGS[Nb_EditorTypes];
};
diff --git a/src/libgui/global_config.cpp b/src/libgui/global_config.cpp
index 8424450..8d246fc 100644
--- a/src/libgui/global_config.cpp
+++ b/src/libgui/global_config.cpp
@@ -17,30 +17,30 @@
#include "tools/list/tool_list.h"
const BaseGlobalConfig::Data BaseGlobalConfig::DATA[Nb_Types] = {
- { "auto_rebuild_modified", I18N_NOOP("Automatically rebuild project before programming if it is modified."), QVariant(true, 0) },
- { "program_after_build", I18N_NOOP("Program device after successful build."), QVariant(false, 0) },
- { "user_id_set_to_checksum", I18N_NOOP("Set User Ids to unprotected checksum (if User Ids are empty)."), QVariant(false, 0) },
- { "show_tab_close_buttons", I18N_NOOP("Show close buttons on tabs (need restart to take effect)."), QVariant(true, 0) }
+ { "auto_rebuild_modified", I18N_NOOP("Automatically rebuild project before programming if it is modified."), TQVariant(true, 0) },
+ { "program_after_build", I18N_NOOP("Program device after successful build."), TQVariant(false, 0) },
+ { "user_id_set_to_checksum", I18N_NOOP("Set User Ids to unprotected checksum (if User Ids are empty)."), TQVariant(false, 0) },
+ { "show_tab_close_buttons", I18N_NOOP("Show close buttons on tabs (need restart to take effect)."), TQVariant(true, 0) }
};
PURL::Url GlobalConfig::openedProject()
{
- GenericConfig config(QString::null);
- return PURL::Url::fromPathOrUrl(config.readEntry("project", QString::null));
+ GenericConfig config(TQString::null);
+ return PURL::Url::fromPathOrUrl(config.readEntry("project", TQString::null));
}
void GlobalConfig::writeOpenedProject(const PURL::Url &p)
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
config.writeEntry("project", p.filepath());
}
PURL::UrlList GlobalConfig::openedFiles()
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
PURL::UrlList files;
uint i = 0;
for (;;) {
- QString file = config.readEntry(QString("file%1").arg(i), QString::null);
+ TQString file = config.readEntry(TQString("file%1").tqarg(i), TQString::null);
if ( file.isEmpty() ) break;
files += PURL::Url::fromPathOrUrl(file);
i++;
@@ -49,22 +49,22 @@ PURL::UrlList GlobalConfig::openedFiles()
}
void GlobalConfig::writeOpenedFiles(const PURL::UrlList &files)
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
for (uint i=0; i<=files.count(); i++) {
- QString s = (i==files.count() ? QString::null : files[i].filepath());
- config.writeEntry(QString("file%1").arg(i), s);
+ TQString s = (i==files.count() ? TQString::null : files[i].filepath());
+ config.writeEntry(TQString("file%1").tqarg(i), s);
}
}
void GlobalConfig::writeProgrammerGroup(const Programmer::Group &group)
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
config.writeEntry("programmer", group.name());
}
const Programmer::Group &GlobalConfig::programmerGroup()
{
- GenericConfig config(QString::null);
- QString s = config.readEntry("programmer");
+ GenericConfig config(TQString::null);
+ TQString s = config.readEntry("programmer");
const Programmer::Group *group = Programmer::lister().group(s);
if ( group==0 ) return *Programmer::lister().begin().data();
return *group;
@@ -72,23 +72,23 @@ const Programmer::Group &GlobalConfig::programmerGroup()
void GlobalConfig::writeDebugLevel(Log::DebugLevel level)
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
config.writeEnumEntry<Log::DebugLevel>("log_debug_level", level);
}
Log::DebugLevel GlobalConfig::debugLevel()
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
return config.readEnumEntry<Log::DebugLevel>("log_debug_level", Log::DebugLevel::Normal);
}
void GlobalConfig::writeLogOutputType(Log::OutputType type)
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
config.writeEntry("log_output_type", type);
}
Log::OutputType GlobalConfig::logOutputType()
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
uint output = config.readUIntEntry("log_output_type", Log::GuiOnly);
if ( output>=Log::Nb_OutputTypes ) return Log::GuiOnly;
return Log::OutputType(output);
@@ -96,11 +96,11 @@ Log::OutputType GlobalConfig::logOutputType()
void GlobalConfig::writeShowLineNumbers(bool show)
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
config.writeEntry("show_line_numbers", show);
}
bool GlobalConfig::showLineNumbers()
{
- GenericConfig config(QString::null);
+ GenericConfig config(TQString::null);
return config.readBoolEntry("show_line_numbers", false);
}
diff --git a/src/libgui/gui_debug_manager.cpp b/src/libgui/gui_debug_manager.cpp
index adda68a..fdf0979 100644
--- a/src/libgui/gui_debug_manager.cpp
+++ b/src/libgui/gui_debug_manager.cpp
@@ -25,8 +25,8 @@
bool Debugger::GuiManager::addEditor(Editor &editor)
{
- if ( _editors.find(&editor)!=_editors.end() ) return false;
- connect(&editor, SIGNAL(destroyed()), SLOT(editorDestroyed()));
+ if ( _editors.tqfind(&editor)!=_editors.end() ) return false;
+ connect(&editor, TQT_SIGNAL(destroyed()), TQT_SLOT(editorDestroyed()));
_editors.append(&editor);
return true;
}
@@ -45,14 +45,14 @@ void Debugger::GuiManager::addTextEditor(TextEditor &editor)
void Debugger::GuiManager::clearEditors()
{
- QValueList<Editor *>::iterator it = _editors.begin();
+ TQValueList<Editor *>::iterator it = _editors.begin();
for (; it!=_editors.end(); ++it) (*it)->disconnect(this);
_editors.clear();
}
void Debugger::GuiManager::editorDestroyed()
{
- QValueList<Editor *>::iterator it = _editors.begin();
+ TQValueList<Editor *>::iterator it = _editors.begin();
for (; it!=_editors.end(); ++it) {
if ( (*it)!=sender() ) continue;
_editors.remove(it);
@@ -74,7 +74,7 @@ PURL::Url Debugger::GuiManager::coffUrl() const
bool Debugger::GuiManager::internalInit()
{
if ( !Manager::internalInit() ) return false;
- if ( !Main::projectManager().contains(coffUrl()) )
+ if ( !Main::projectManager().tqcontains(coffUrl()) )
Main::projectManager().addExternalFile(coffUrl(), ProjectManager::Generated);
Main::watchView().init(true);
if ( registerView() ) registerView()->view()->updateView();
@@ -93,7 +93,7 @@ Breakpoint::Data Debugger::GuiManager::currentBreakpointData()
{
const Breakpoint::Data *data = Main::breakpointsView().currentData();
if (data) return *data;
- TextEditor *editor = ::qt_cast<TextEditor *>(Main::currentEditor());
+ TextEditor *editor = ::tqqt_cast<TextEditor *>(Main::currentEditor());
Q_ASSERT(editor);
return Breakpoint::Data(editor->url(), editor->cursorLine());
}
@@ -105,7 +105,7 @@ void Debugger::GuiManager::toggleBreakpoint()
return;
}
Breakpoint::Data data = currentBreakpointData();
- if ( Breakpoint::list().contains(data) ) {
+ if ( Breakpoint::list().tqcontains(data) ) {
Breakpoint::list().remove(data);
return;
}
@@ -148,7 +148,7 @@ void Debugger::GuiManager::updateEditorMarks(TextEditor &editor) const
}
// update pc
if ( _coff && programmer() && programmer()->isActive() && pc().isInitialized() && !reached
- && _currentSourceLines.contains(editor.url()) ) {
+ && _currentSourceLines.tqcontains(editor.url()) ) {
int pcline = _currentSourceLines[editor.url()];
if ( programmer()->state()==Programmer::Halted ) editor.setMark(pcline, Breakpoint::ProgramCounterActive);
else editor.setMark(pcline, Breakpoint::ProgramCounterDisabled);
@@ -181,12 +181,12 @@ void Debugger::GuiManager::updateView(bool gotoPC)
{
Main::breakpointsView().updateView();
bool currentHasPC = false;
- QValueList<Editor *>::iterator ite;
+ TQValueList<Editor *>::iterator ite;
for (ite=_editors.begin(); ite!=_editors.end(); ++ite) {
- TextEditor *e = ::qt_cast<TextEditor *>(*ite);
+ TextEditor *e = ::tqqt_cast<TextEditor *>(*ite);
if ( e==0 ) continue;
updateEditorMarks(*e);
- if ( !_currentSourceLines.contains(e->url()) ) continue;
+ if ( !_currentSourceLines.tqcontains(e->url()) ) continue;
if (gotoPC) e->setCursor(_currentSourceLines[e->url()], 0);
if ( e==Main::currentEditor() ) currentHasPC = true;
}
@@ -195,16 +195,16 @@ void Debugger::GuiManager::updateView(bool gotoPC)
// 2: look at files inside project
// 3: look at existing files
for (uint i=0; i<3; i++) {
- QMap<PURL::Url, uint>::const_iterator it;
+ TQMap<PURL::Url, uint>::const_iterator it;
for (it=_currentSourceLines.begin(); it!=_currentSourceLines.end(); ++it) {
switch (i) {
- case 0: if ( !Main::projectManager().contains(it.key()) || Main::projectManager().isExternalFile(it.key()) ) continue; break;
- case 1: if ( !Main::projectManager().contains(it.key()) ) continue; break;
+ case 0: if ( !Main::projectManager().tqcontains(it.key()) || Main::projectManager().isExternalFile(it.key()) ) continue; break;
+ case 1: if ( !Main::projectManager().tqcontains(it.key()) ) continue; break;
case 2: if ( !it.key().exists() ) continue; break;
}
- TextEditor *e = ::qt_cast<TextEditor *>(Main::editorManager().findEditor(it.key()));
+ TextEditor *e = ::tqqt_cast<TextEditor *>(Main::editorManager().findEditor(it.key()));
if ( e==0 ) {
- if (gotoPC) e = ::qt_cast<TextEditor *>(Main::editorManager().openEditor(it.key()));
+ if (gotoPC) e = ::tqqt_cast<TextEditor *>(Main::editorManager().openEditor(it.key()));
if ( e==0 ) continue;
}
updateEditorMarks(*e);
@@ -219,9 +219,9 @@ void Debugger::GuiManager::updateView(bool gotoPC)
Register::MainView *Debugger::GuiManager::registerView() const
{
- QValueList<Editor *>::const_iterator it = _editors.begin();
+ TQValueList<Editor *>::const_iterator it = _editors.begin();
for (; it!=_editors.end(); ++it) {
- Register::MainView *rv = ::qt_cast<Register::MainView *>(*it);
+ Register::MainView *rv = ::tqqt_cast<Register::MainView *>(*it);
if (rv) return rv;
}
return 0;
@@ -229,21 +229,21 @@ Register::MainView *Debugger::GuiManager::registerView() const
bool Debugger::GuiManager::isProjectSource(const PURL::Url &url) const
{
- return ( Main::projectManager().contains(url) && !Main::projectManager().isExternalFile(url) );
+ return ( Main::projectManager().tqcontains(url) && !Main::projectManager().isExternalFile(url) );
}
void Debugger::GuiManager::showDisassemblyLocation()
{
- TextEditor *editor = ::qt_cast<TextEditor *>(Main::currentEditor());
+ TextEditor *editor = ::tqqt_cast<TextEditor *>(Main::currentEditor());
Q_ASSERT(editor);
Q_ASSERT(_coff);
- QValueVector<Address> addresses = _coff->addresses(editor->url(), editor->cursorLine());
+ TQValueVector<Address> addresses = _coff->addresses(editor->url(), editor->cursorLine());
if ( addresses.isEmpty() ) {
MessageBox::sorry(i18n("Cannot show disassembly location for non-code line."), Log::Show);
return;
}
int line = _coff->lineForAddress(_coff->url(), addresses[0]);
if ( line==-1 ) return; // possible ?
- TextEditor *e = ::qt_cast<TextEditor *>(Main::editorManager().openEditor(_coff->url()));
+ TextEditor *e = ::tqqt_cast<TextEditor *>(Main::editorManager().openEditor(_coff->url()));
if (e) e->setCursor(line, 0);
}
diff --git a/src/libgui/gui_debug_manager.h b/src/libgui/gui_debug_manager.h
index 661f86a..c391c76 100644
--- a/src/libgui/gui_debug_manager.h
+++ b/src/libgui/gui_debug_manager.h
@@ -20,6 +20,7 @@ namespace Debugger
class GuiManager : public Manager
{
Q_OBJECT
+ TQ_OBJECT
public:
GuiManager() {}
virtual void updateDevice();
@@ -39,7 +40,7 @@ private slots:
void editorDestroyed();
private:
- QValueList<Editor *> _editors;
+ TQValueList<Editor *> _editors;
static Breakpoint::Data currentBreakpointData();
void updateEditorMarks(TextEditor &editor) const; // return PC line
diff --git a/src/libgui/gui_prog_manager.h b/src/libgui/gui_prog_manager.h
index b19186e..b4e267d 100644
--- a/src/libgui/gui_prog_manager.h
+++ b/src/libgui/gui_prog_manager.h
@@ -17,8 +17,9 @@ namespace Programmer
class GuiManager : public Manager
{
Q_OBJECT
+ TQ_OBJECT
public:
- GuiManager(QObject *parent) : Manager(parent) {}
+ GuiManager(TQObject *tqparent) : Manager(tqparent) {}
virtual void createProgrammer(const Device::Data *data);
virtual void setState(State state) { Main::setState(state==Idle ? Main::Idle : Main::Programming); }
diff --git a/src/libgui/hex_editor.cpp b/src/libgui/hex_editor.cpp
index 48ad7e8..197eb83 100644
--- a/src/libgui/hex_editor.cpp
+++ b/src/libgui/hex_editor.cpp
@@ -9,14 +9,14 @@
***************************************************************************/
#include "hex_editor.h"
-#include <qgroupbox.h>
-#include <qhgroupbox.h>
-#include <qregexp.h>
-#include <qlayout.h>
-#include <qscrollview.h>
-#include <qstringlist.h>
-#include <qlabel.h>
-#include <qtimer.h>
+#include <tqgroupbox.h>
+#include <tqhgroupbox.h>
+#include <tqregexp.h>
+#include <tqlayout.h>
+#include <tqscrollview.h>
+#include <tqstringlist.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
#include <klocale.h>
#include <ktempfile.h>
@@ -30,13 +30,13 @@
//-----------------------------------------------------------------------------
HexEditorPart::HexEditorPart(HexEditor *editor)
- : KParts::ReadWritePart(editor, "hex_editor_part")
+ : KParts::ReadWritePart(TQT_TQOBJECT(editor), "hex_editor_part")
{
setXMLFile("hexeditorpartui.rc");
- (void)KStdAction::save(editor, SLOT(save()), actionCollection());
- (void)KStdAction::saveAs(editor, SLOT(saveAs()), actionCollection());
- (void)new KToggleAction(i18n("Read Only Mode"), 0, 0, editor, SLOT(toggleReadOnly()), actionCollection(), "tools_toggle_write_lock");
+ (void)KStdAction::save(TQT_TQOBJECT(editor), TQT_SLOT(save()), actionCollection());
+ (void)KStdAction::saveAs(TQT_TQOBJECT(editor), TQT_SLOT(saveAs()), actionCollection());
+ (void)new KToggleAction(i18n("Read Only Mode"), 0, 0, TQT_TQOBJECT(editor), TQT_SLOT(toggleReadOnly()), actionCollection(), "tools_toggle_write_lock");
}
void HexEditorPart::setReadWrite(bool rw)
@@ -46,14 +46,14 @@ void HexEditorPart::setReadWrite(bool rw)
}
//-----------------------------------------------------------------------------
-HexEditor::HexEditor(const QString &name, QWidget *parent)
- : DeviceEditor(name, QString::null, parent, "hex_editor")
+HexEditor::HexEditor(const TQString &name, TQWidget *tqparent)
+ : DeviceEditor(name, TQString(), tqparent, "hex_editor")
{
init();
}
-HexEditor::HexEditor(QWidget *parent)
- : DeviceEditor(parent, "hex_editor")
+HexEditor::HexEditor(TQWidget *tqparent)
+ : DeviceEditor(tqparent, "hex_editor")
{
init();
}
@@ -76,18 +76,18 @@ void HexEditor::clear()
_originalMemory = 0;
}
-QWidget *HexEditor::createView(const Device::Data *data, QWidget *parent)
+TQWidget *HexEditor::createView(const Device::Data *data, TQWidget *tqparent)
{
clear();
if (data) {
_originalMemory = data->group().createMemory(*data);
_memory = data->group().createMemory(*data);
}
- if ( data==0 ) return new QWidget(parent);
- Device::HexView *hv = Device::groupui(*data).createHexView(*this, parent);
- connect(hv, SIGNAL(modified()), SLOT(slotModified()));
+ if ( data==0 ) return new TQWidget(tqparent);
+ Device::HexView *hv = Device::groupui(*data).createHexView(*this, tqparent);
+ connect(hv, TQT_SIGNAL(modified()), TQT_SLOT(slotModified()));
_dirty = true;
- QTimer::singleShot(0, this, SLOT(simpleLoad()));
+ TQTimer::singleShot(0, this, TQT_SLOT(simpleLoad()));
return hv;
}
@@ -96,10 +96,10 @@ bool HexEditor::simpleLoad()
if ( !_dirty ) return true;
_dirty = false;
if (_memory) {
- QStringList warnings;
+ TQStringList warnings;
if ( _memory->fromHexBuffer(_hexBuffer, warnings)!=Device::Memory::NoWarning ) {
_labelWarning->setText(i18n("<b>Warning:</b> hex file seems to be incompatible with the selected device %1:<br>%2")
- .arg(_memory->device().name()).arg(warnings.join("<br>")));
+ .tqarg(_memory->device().name()).tqarg(warnings.join("<br>")));
_labelWarning->show();
} else _labelWarning->hide();
display();
@@ -128,7 +128,7 @@ bool HexEditor::open(const PURL::Url &url)
_url = url;
PURL::File file(url, Main::compileLog());
if ( !file.openForRead() ) return false;
- QStringList errors;
+ TQStringList errors;
if ( !_hexBuffer.load(file.stream(), errors) ) {
MessageBox::detailedSorry(i18n("Error(s) reading hex file."), errors.join("\n"), Log::Show);
return false;
@@ -139,15 +139,15 @@ bool HexEditor::open(const PURL::Url &url)
bool HexEditor::save(const PURL::Url &url)
{
- return save(url, i18n("File URL: \"%1\".").arg(url.pretty()));
+ return save(url, i18n("File URL: \"%1\".").tqarg(url.pretty()));
}
-bool HexEditor::save(const PURL::Url &url, const QString &fileErrorString)
+bool HexEditor::save(const PURL::Url &url, const TQString &fileErrorString)
{
PURL::File file(url, Main::compileLog());
if ( !file.openForWrite() ) return false;
if ( !_memory->save(file.stream(), HexBuffer::IHX32) ) {
- MessageBox::detailedSorry(i18n("Error while writing file \"%1\".").arg(url.pretty()), fileErrorString, Log::Show);
+ MessageBox::detailedSorry(i18n("Error while writing file \"%1\".").tqarg(url.pretty()), fileErrorString, Log::Show);
return false;
}
_originalMemory->copyFrom(*_memory);
@@ -183,10 +183,10 @@ void HexEditor::slotModified()
void HexEditor::statusChanged()
{
- QString s;
+ TQString s;
if (_memory) {
BitValue cs = static_cast<Device::HexView *>(_view)->checksum();
- s = i18n("Checksum: %1").arg(toHexLabel(cs, 4));
+ s = i18n("Checksum: %1").tqarg(toHexLabel(cs, 4));
}
emit statusTextChanged(s);
}
diff --git a/src/libgui/hex_editor.h b/src/libgui/hex_editor.h
index 86b7f2c..9418a59 100644
--- a/src/libgui/hex_editor.h
+++ b/src/libgui/hex_editor.h
@@ -22,6 +22,7 @@ class HexEditor;
class HexEditorPart : public KParts::ReadWritePart
{
Q_OBJECT
+ TQ_OBJECT
public:
HexEditorPart(HexEditor *editor);
virtual void setReadWrite(bool readWrite);
@@ -35,9 +36,10 @@ private:
class HexEditor : public DeviceEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- HexEditor(const QString &name, QWidget *parent);
- HexEditor(QWidget *parent);
+ HexEditor(const TQString &name, TQWidget *tqparent);
+ HexEditor(TQWidget *tqparent);
virtual bool isModified() const { return _modified; }
virtual bool isReadOnly() const { return !_part->isReadWrite(); }
virtual ~HexEditor() { clear(); }
@@ -52,8 +54,8 @@ public:
virtual void addGui();
virtual void removeGui();
virtual void setFocus() {}
- virtual QValueList<uint> bookmarkLines() const { return QValueList<uint>(); }
- virtual void setBookmarkLines(const QValueList<uint> &) {}
+ virtual TQValueList<uint> bookmarkLines() const { return TQValueList<uint>(); }
+ virtual void setBookmarkLines(const TQValueList<uint> &) {}
public slots:
virtual void statusChanged();
@@ -69,10 +71,10 @@ private:
HexEditorPart *_part;
PURL::Url _url;
- virtual void dropEvent(QDropEvent *e) { emit dropEventPass(e); }
- bool save(const PURL::Url &url, const QString &fileErrorString);
+ virtual void dropEvent(TQDropEvent *e) { emit dropEventPass(e); }
+ bool save(const PURL::Url &url, const TQString &fileErrorString);
bool verifyDeviceType();
- virtual QWidget *createView(const Device::Data *data, QWidget *parent);
+ virtual TQWidget *createView(const Device::Data *data, TQWidget *tqparent);
virtual void setModifiedInternal(bool modified) { _modified = modified; }
virtual void setReadOnlyInternal(bool readOnly);
void display();
diff --git a/src/libgui/likeback.cpp b/src/libgui/likeback.cpp
index eac86ff..c174bbc 100644
--- a/src/libgui/likeback.cpp
+++ b/src/libgui/likeback.cpp
@@ -26,18 +26,18 @@
#include <klocale.h>
#include <kdebug.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
-#include <qpushbutton.h>
-#include <qpopupmenu.h>
-#include <qtextedit.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
+#include <tqpushbutton.h>
+#include <tqpopupmenu.h>
+#include <tqtextedit.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kdialogbase.h>
-#include <qhttp.h>
+#include <tqhttp.h>
#include <kurl.h>
#include <kinputdialog.h>
-#include <qvalidator.h>
+#include <tqvalidator.h>
#include <kdebug.h>
#include <kprocess.h>
#include "netwm.h"
@@ -52,53 +52,53 @@
#include "common/global/about.h"
LikeBack::LikeBack(Button buttons)
- : QWidget( 0, "LikeBack", Qt::WX11BypassWM | Qt::WStyle_NoBorder | Qt::WNoAutoErase | Qt::WStyle_StaysOnTop | Qt::WStyle_NoBorder | Qt::Qt::WGroupLeader)
+ : TQWidget( 0, "LikeBack", TQt::WX11BypassWM | TQt::WStyle_NoBorder | TQt::WNoAutoErase | TQt::WStyle_StaysOnTop | TQt::WStyle_NoBorder | TQt::TQt::WGroupLeader)
, m_buttons(buttons)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
+ TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
- QIconSet likeIconSet = kapp->iconLoader()->loadIconSet("likeback_like", KIcon::Small);
- QIconSet dislikeIconSet = kapp->iconLoader()->loadIconSet("likeback_dislike", KIcon::Small);
- QIconSet bugIconSet = kapp->iconLoader()->loadIconSet("likeback_bug", KIcon::Small);
-// QIconSet configureIconSet = kapp->iconLoader()->loadIconSet("configure", KIcon::Small);
+ TQIconSet likeIconSet = kapp->iconLoader()->loadIconSet("likeback_like", KIcon::Small);
+ TQIconSet dislikeIconSet = kapp->iconLoader()->loadIconSet("likeback_dislike", KIcon::Small);
+ TQIconSet bugIconSet = kapp->iconLoader()->loadIconSet("likeback_bug", KIcon::Small);
+// TQIconSet configureIconSet = kapp->iconLoader()->loadIconSet("configure", KIcon::Small);
- QToolButton *m_likeButton = new QToolButton(this, "ilike");
+ TQToolButton *m_likeButton = new TQToolButton(this, "ilike");
m_likeButton->setIconSet(likeIconSet);
m_likeButton->setTextLabel(i18n("I Like..."));
m_likeButton->setAutoRaise(true);
- connect( m_likeButton, SIGNAL(clicked()), this, SLOT(iLike()) );
- layout->add(m_likeButton);
+ connect( m_likeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(iLike()) );
+ tqlayout->add(m_likeButton);
- QToolButton *m_dislikeButton = new QToolButton(this, "idonotlike");
+ TQToolButton *m_dislikeButton = new TQToolButton(this, "idonotlike");
m_dislikeButton->setIconSet(dislikeIconSet);
m_dislikeButton->setTextLabel(i18n("I Do not Like..."));
m_dislikeButton->setAutoRaise(true);
- connect( m_dislikeButton, SIGNAL(clicked()), this, SLOT(iDoNotLike()) );
- layout->add(m_dislikeButton);
+ connect( m_dislikeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(iDoNotLike()) );
+ tqlayout->add(m_dislikeButton);
- QToolButton *m_bugButton = new QToolButton(this, "ifoundabug");
+ TQToolButton *m_bugButton = new TQToolButton(this, "ifoundabug");
m_bugButton->setIconSet(bugIconSet);
m_bugButton->setTextLabel(i18n("I Found a Bug..."));
m_bugButton->setAutoRaise(true);
- connect( m_bugButton, SIGNAL(clicked()), this, SLOT(iFoundABug()) );
- layout->add(m_bugButton);
+ connect( m_bugButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(iFoundABug()) );
+ tqlayout->add(m_bugButton);
- m_configureButton = new QToolButton(this, "configure");
- QIconSet helpIconSet = kapp->iconLoader()->loadIconSet("help", KIcon::Small);
+ m_configureButton = new TQToolButton(this, "configure");
+ TQIconSet helpIconSet = kapp->iconLoader()->loadIconSet("help", KIcon::Small);
m_configureButton->setIconSet(helpIconSet);
m_configureButton->setTextLabel(i18n("Configure..."));
m_configureButton->setAutoRaise(true);
- connect( m_likeButton, SIGNAL(clicked()), this, SLOT(configure()) );
- layout->add(m_configureButton);
-
- QPopupMenu *configureMenu = new QPopupMenu(this);
- configureMenu->insertItem(helpIconSet, i18n("What's &This?"), this , SLOT(showWhatsThisMessage()) );
- QIconSet changeEmailIconSet = kapp->iconLoader()->loadIconSet("mail_generic", KIcon::Small);
- configureMenu->insertItem(changeEmailIconSet, i18n("&Configure Email Address..."), this , SLOT(askEMail()) );
-// QIconSet dontHelpIconSet = kapp->iconLoader()->loadIconSet("stop", KIcon::Small);
-// configureMenu->insertItem( dontHelpIconSet, i18n("&Do not Help Anymore"), this , SLOT(doNotHelpAnymore()) );
+ connect( m_likeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(configure()) );
+ tqlayout->add(m_configureButton);
+
+ TQPopupMenu *configureMenu = new TQPopupMenu(this);
+ configureMenu->insertItem(helpIconSet, i18n("What's &This?"), this , TQT_SLOT(showWhatsThisMessage()) );
+ TQIconSet changeEmailIconSet = kapp->iconLoader()->loadIconSet("mail_generic", KIcon::Small);
+ configureMenu->insertItem(changeEmailIconSet, i18n("&Configure Email Address..."), this , TQT_SLOT(askEMail()) );
+// TQIconSet dontHelpIconSet = kapp->iconLoader()->loadIconSet("stop", KIcon::Small);
+// configureMenu->insertItem( dontHelpIconSet, i18n("&Do not Help Anymore"), this , TQT_SLOT(doNotHelpAnymore()) );
m_configureButton->setPopup(configureMenu);
- connect( m_configureButton, SIGNAL(pressed()), this, SLOT(openConfigurePopup()) );
+ connect( m_configureButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(openConfigurePopup()) );
if (!emailAddressAlreadyProvided())
//beginFetchingEmail(); // Begin before showing the message, so we have time!
@@ -110,9 +110,9 @@ LikeBack::LikeBack(Button buttons)
// KMessageBox::saveDontShowAgainContinue(messageShown);
// }
- resize(sizeHint());
+ resize(tqsizeHint());
- connect( &m_timer, SIGNAL(timeout()), this, SLOT(autoMove()) );
+ connect( &m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(autoMove()) );
m_timer.start(10);
s_instance = this;
@@ -131,7 +131,7 @@ void LikeBack::doNotHelpAnymore()
{
disable();
int result = KMessageBox::questionYesNo(
- kapp->activeWindow(),
+ TQT_TQWIDGET(kapp->activeWindow()),
i18n("Are you sure you do not want to participate anymore in the application enhancing program?"),
i18n("Do not Help Anymore"));
if (result == KMessageBox::No) {
@@ -164,14 +164,14 @@ bool LikeBack::userWantToParticipate()
void LikeBack::showInformationMessage()
{
- QPixmap likeIcon = kapp->iconLoader()->loadIcon("likeback_like", KIcon::Small);
- QPixmap dislikeIcon = kapp->iconLoader()->loadIcon("likeback_dislike", KIcon::Small);
- QPixmap bugIcon = kapp->iconLoader()->loadIcon("likeback_bug", KIcon::Small);
- QMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_like", likeIcon);
- QMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_dislike", dislikeIcon);
- QMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_bug", bugIcon);
+ TQPixmap likeIcon = kapp->iconLoader()->loadIcon("likeback_like", KIcon::Small);
+ TQPixmap dislikeIcon = kapp->iconLoader()->loadIcon("likeback_dislike", KIcon::Small);
+ TQPixmap bugIcon = kapp->iconLoader()->loadIcon("likeback_bug", KIcon::Small);
+ TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_like", likeIcon);
+ TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_dislike", dislikeIcon);
+ TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_bug", bugIcon);
KMessageBox::information(0,
- "<p><b>" + i18n("This is a quick feedback system for %1.").arg(s_about->programName()) + "</b></p>"
+ "<p><b>" + i18n("This is a quick feedback system for %1.").tqarg(s_about->programName()) + "</b></p>"
"<p>" + i18n("To help us improve it, your comments are important.") + "</p>"
"<p>" + i18n("Each time you have a great or frustrating experience, "
"please click the appropriate hand below the window title-bar, "
@@ -182,17 +182,17 @@ void LikeBack::showInformationMessage()
"<tr><td><nobr><img source=\"likeback_icon_bug\">: " + i18n("Report a bug.") + "</nobr></td></tr>"
"</table></p>",
i18n("Help Improve the Application"));
- QMimeSourceFactory::defaultFactory()->setData("likeback_icon_like", 0L);
- QMimeSourceFactory::defaultFactory()->setData("likeback_icon_dislike", 0L);
- QMimeSourceFactory::defaultFactory()->setData("likeback_icon_bug", 0L);
+ TQMimeSourceFactory::defaultFactory()->setData("likeback_icon_like", 0L);
+ TQMimeSourceFactory::defaultFactory()->setData("likeback_icon_dislike", 0L);
+ TQMimeSourceFactory::defaultFactory()->setData("likeback_icon_bug", 0L);
}
-QString LikeBack::s_customLanguageMessage = QString();
+TQString LikeBack::s_customLanguageMessage = TQString();
bool LikeBack::s_allowFeatureWishes = false;
LikeBack::WindowListing LikeBack::s_windowListing = LikeBack::NoListing;
-QString LikeBack::s_hostName = QString();
-QString LikeBack::s_remotePath = QString();
-Q_UINT16 LikeBack::s_hostPort = 16;
+TQString LikeBack::s_hostName = TQString();
+TQString LikeBack::s_remotePath = TQString();
+TQ_UINT16 LikeBack::s_hostPort = 16;
int LikeBack::s_disabledCount = 0;
LikeBack* LikeBack::s_instance = 0;
KConfig* LikeBack::s_config = 0;
@@ -203,22 +203,22 @@ LikeBack* LikeBack::instance()
return s_instance;
}
-QString LikeBack::customLanguageMessage()
+TQString LikeBack::customLanguageMessage()
{
return s_customLanguageMessage;
}
-QString LikeBack::hostName()
+TQString LikeBack::hostName()
{
return s_hostName;
}
-QString LikeBack::remotePath()
+TQString LikeBack::remotePath()
{
return s_remotePath;
}
-Q_UINT16 LikeBack::hostPort()
+TQ_UINT16 LikeBack::hostPort()
{
return s_hostPort;
}
@@ -245,7 +245,7 @@ bool LikeBack::enabled()
return s_disabledCount == 0;
}
-void LikeBack::setServer(QString hostName, QString remotePath, Q_UINT16 hostPort)
+void LikeBack::setServer(TQString hostName, TQString remotePath, TQ_UINT16 hostPort)
{
s_hostName = hostName;
s_remotePath = remotePath;
@@ -257,7 +257,7 @@ void LikeBack::setWindowNamesListing(WindowListing windowListing)
s_windowListing = windowListing;
}
-void LikeBack::setCustomLanguageMessage(const QString &message)
+void LikeBack::setCustomLanguageMessage(const TQString &message)
{
s_customLanguageMessage = message;
}
@@ -274,17 +274,17 @@ bool LikeBack::allowFeatureWishes()
void LikeBack::autoMove()
{
- static QWidget *lastWindow = 0;
+ static TQWidget *lastWindow = 0;
- QWidget *window = kapp->activeWindow();
- // When a Kicker applet has the focus, like the Commandline QLineEdit,
+ TQWidget *window = TQT_TQWIDGET(kapp->activeWindow());
+ // When a Kicker applet has the focus, like the Commandline TQLineEdit,
// the systemtray icon indicates to be the current window and the LikeBack is shown next to the system tray icon.
// It's obviously bad ;-) :
bool shouldShow = false;//(enabled() && window && window->inherits("KMainWindow") );
if (shouldShow) {
//move(window->x() + window->width() - 100 - width(), window->y());
- //move(window->x() + window->width() - 100 - width(), window->mapToGlobal(QPoint(0, 0)).y() - height());
- move(window->mapToGlobal(QPoint(0, 0)).x() + window->width() - width(), window->mapToGlobal(QPoint(0, 0)).y() + 1);
+ //move(window->x() + window->width() - 100 - width(), window->mapToGlobal(TQPoint(0, 0)).y() - height());
+ move(window->mapToGlobal(TQPoint(0, 0)).x() + window->width() - width(), window->mapToGlobal(TQPoint(0, 0)).y() + 1);
if (window != lastWindow && s_windowListing != NoListing)
// if (qstricmp(window->name(), "") == 0 || qstricmp(window->name(), "unnamed") == 0) ;
@@ -319,24 +319,24 @@ void LikeBack::configure()
{
}
-QString LikeBack::activeWindowPath()
+TQString LikeBack::activeWindowPath()
{
- QStringList windowNames;
- QWidget *window = kapp->activeWindow();
+ TQStringList windowNames;
+ TQWidget *window = TQT_TQWIDGET(kapp->activeWindow());
while (window) {
- QString name = window->name();
+ TQString name = window->name();
if (name == "unnamed")
- name += QString(":") + window->className();
+ name += TQString(":") + window->className();
windowNames.append(name);
- window = dynamic_cast<QWidget*>(window->parent());
+ window = dynamic_cast<TQWidget*>(window->tqparent());
}
- QString windowName;
+ TQString windowName;
for (int i = ((int)windowNames.count()) - 1; i >= 0; i--) {
if (windowName.isEmpty())
windowName = windowNames[i];
else
- windowName += QString("~~") + windowNames[i];
+ windowName += TQString("~~") + windowNames[i];
}
return windowName;
@@ -357,7 +357,7 @@ bool LikeBack::emailAddressAlreadyProvided()
return s_config->readBoolEntry("emailAlreadyAsked", false);
}
-QString LikeBack::emailAddress()
+TQString LikeBack::emailAddress()
{
if (!emailAddressAlreadyProvided())
instance()->askEMail();
@@ -365,7 +365,7 @@ QString LikeBack::emailAddress()
return s_config->readEntry("emailAddress", "");
}
-void LikeBack::setEmailAddress(const QString &address)
+void LikeBack::setEmailAddress(const TQString &address)
{
s_config->setGroup("LikeBack");
s_config->writeEntry("emailAddress", address);
@@ -376,27 +376,27 @@ void LikeBack::askEMail()
{
s_config->setGroup("LikeBack");
- QString currentEMailAddress = s_config->readEntry("emailAddress", "");
+ TQString currentEMailAddress = s_config->readEntry("emailAddress", "");
if (!emailAddressAlreadyProvided() && !instance()->m_fetchedEmail.isEmpty())
currentEMailAddress = instance()->m_fetchedEmail;
bool ok;
- QString mailExpString = "[\\w-\\.]+@[\\w-\\.]+\\.[\\w]+";
- //QString namedMailExpString = "[.]*[ \\t]+<" + mailExpString + ">";
- //QRegExp mailExp("^(|" + mailExpString + "|" + namedMailExpString + ")$");
- QRegExp mailExp("^(|" + mailExpString + ")$");
- QRegExpValidator emailValidator(mailExp, this);
+ TQString mailExpString = "[\\w-\\.]+@[\\w-\\.]+\\.[\\w]+";
+ //TQString namedMailExpString = "[.]*[ \\t]+<" + mailExpString + ">";
+ //TQRegExp mailExp("^(|" + mailExpString + "|" + namedMailExpString + ")$");
+ TQRegExp mailExp("^(|" + mailExpString + ")$");
+ TQRegExpValidator emailValidator(mailExp, TQT_TQOBJECT(this));
disable();
- QString email = KInputDialog::getText(
+ TQString email = KInputDialog::getText(
i18n("Set Email Address"),
"<p><b>" + i18n("Please provide your email address.") + "</b></p>" +
"<p>" + i18n("It will only be used to contact you back if more information is needed about your comments, how to reproduce the bugs you report, send bug corrections for you to test...") + "</p>" +
"<p>" + i18n("The email address is optional. If you do not provide any, your comments will be sent anonymously. Just click OK in that case.") + "</p>" +
"<p>" + i18n("You can change or remove your email address whenever you want. For that, use the little arrow icon at the top-right corner of a window.") + "</p>" +
"<p>" + i18n("Your email address (keep empty to post comments anonymously):"),
- currentEMailAddress, &ok, kapp->activeWindow(), /*name=*/(const char*)0, &emailValidator);
+ currentEMailAddress, &ok, TQT_TQWIDGET(kapp->activeWindow()), /*name=*/(const char*)0, &emailValidator);
enable();
if (ok)
@@ -404,15 +404,15 @@ void LikeBack::askEMail()
}
// FIXME: Should be moved to KAboutData? Cigogne will also need it.
-bool LikeBack::isDevelopmentVersion(const QString &version)
+bool LikeBack::isDevelopmentVersion(const TQString &version)
{
- QString theVersion = (version.isEmpty() ? s_about->version() : version);
+ TQString theVersion = (version.isEmpty() ? s_about->version() : version);
- return theVersion.find("alpha", /*index=*/0, /*caseSensitive=*/false) != -1 ||
- theVersion.find("beta", /*index=*/0, /*caseSensitive=*/false) != -1 ||
- theVersion.find("rc", /*index=*/0, /*caseSensitive=*/false) != -1 ||
- theVersion.find("svn", /*index=*/0, /*caseSensitive=*/false) != -1 ||
- theVersion.find("cvs", /*index=*/0, /*caseSensitive=*/false) != -1;
+ return theVersion.tqfind("alpha", /*index=*/0, /*caseSensitive=*/false) != -1 ||
+ theVersion.tqfind("beta", /*index=*/0, /*caseSensitive=*/false) != -1 ||
+ theVersion.tqfind("rc", /*index=*/0, /*caseSensitive=*/false) != -1 ||
+ theVersion.tqfind("svn", /*index=*/0, /*caseSensitive=*/false) != -1 ||
+ theVersion.tqfind("cvs", /*index=*/0, /*caseSensitive=*/false) != -1;
}
void LikeBack::init(KConfig* config, KAboutData* about, Button buttons)
@@ -452,8 +452,8 @@ void LikeBack::init(bool isDevelopmentVersion, Button buttons)
if (m_process)
return;
m_process = new KProcess();
- *m_process << QString::fromLatin1("kcmshell") << QString::fromLatin1("kcm_useraccount");
- connect( m_process, SIGNAL(processExited(KProcess*)), SLOT(endFetchingEmailFrom()) );
+ *m_process << TQString::tqfromLatin1("kcmshell") << TQString::tqfromLatin1("kcm_useraccount");
+ connect( m_process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(endFetchingEmailFrom()) );
if (!m_process->start()) {
kdDebug() << "Couldn't start kcmshell.." << endl;
delete m_process;
@@ -473,23 +473,23 @@ void LikeBack::endFetchingEmailFrom()
// m_configureEmail->setEnabled(true);
// ### KDE4: why oh why is KEmailSettings in kio?
- KConfig emailConf( QString::fromLatin1("emaildefaults") );
+ KConfig emailConf( TQString::tqfromLatin1("emaildefaults") );
// find out the default profile
- emailConf.setGroup(QString::fromLatin1("Defaults"));
- QString profile = QString::fromLatin1("PROFILE_");
- profile += emailConf.readEntry(QString::fromLatin1("Profile"), QString::fromLatin1("Default"));
+ emailConf.setGroup(TQString::tqfromLatin1("Defaults"));
+ TQString profile = TQString::tqfromLatin1("PROFILE_");
+ profile += emailConf.readEntry(TQString::tqfromLatin1("Profile"), TQString::tqfromLatin1("Default"));
emailConf.setGroup(profile);
- QString fromaddr = emailConf.readEntry(QString::fromLatin1("EmailAddress"));
+ TQString fromaddr = emailConf.readEntry(TQString::tqfromLatin1("EmailAddress"));
if (fromaddr.isEmpty()) {
struct passwd *p;
p = getpwuid(getuid());
- m_fetchedEmail = QString::fromLatin1(p->pw_name);
+ m_fetchedEmail = TQString::tqfromLatin1(p->pw_name);
} else {
- QString name = emailConf.readEntry(QString::fromLatin1("FullName"));
+ TQString name = emailConf.readEntry(TQString::tqfromLatin1("FullName"));
if (!name.isEmpty())
- m_fetchedEmail = /*name + QString::fromLatin1(" <") +*/ fromaddr /*+ QString::fromLatin1(">")*/;
+ m_fetchedEmail = /*name + TQString::tqfromLatin1(" <") +*/ fromaddr /*+ TQString::tqfromLatin1(">")*/;
}
// m_from->setText( fromaddr );
}
@@ -502,44 +502,44 @@ void LikeBack::endFetchingEmailFrom()
/** class LikeBackDialog: */
-LikeBackDialog::LikeBackDialog(LikeBack::Button reason, QString windowName, QString context)
- : KDialog(kapp->activeWindow(), "_likeback_feedback_window_")
+LikeBackDialog::LikeBackDialog(LikeBack::Button reason, TQString windowName, TQString context)
+ : KDialog(TQT_TQWIDGET(kapp->activeWindow()), "_likeback_feedback_window_")
, m_reason(reason)
, m_windowName(windowName)
, m_context(context)
{
setModal(true);
- QVBoxLayout *mainLayout = new QVBoxLayout(this);
+ TQVBoxLayout *mainLayout = new TQVBoxLayout(this);
- QWidget *coloredWidget = new QWidget(this);
- QLabel *explainings = new QLabel(this);
- QHBoxLayout *explainingLayout = new QHBoxLayout((QWidget*)0, KDialogBase::marginHint());
+ TQWidget *coloredWidget = new TQWidget(this);
+ TQLabel *explainings = new TQLabel(this);
+ TQHBoxLayout *explainingLayout = new TQHBoxLayout((TQWidget*)0, KDialogBase::marginHint());
explainingLayout->addWidget(explainings);
mainLayout->addWidget(coloredWidget);
- QColor color;
- QColor lineColor;
- QPixmap icon;
- QString title;
- QString please;
+ TQColor color;
+ TQColor lineColor;
+ TQPixmap icon;
+ TQString title;
+ TQString please;
switch (reason) {
case LikeBack::ILike:
- color = QColor("#DFFFDF");
- lineColor = Qt::green;
+ color = TQColor("#DFFFDF");
+ lineColor = TQt::green;
icon = kapp->iconLoader()->loadIcon("likeback_like", KIcon::Small);
title = i18n("I like...");
please = i18n("Please briefly describe what you like.");
break;
case LikeBack::IDoNotLike:
- color = QColor("#FFDFDF");
- lineColor = Qt::red;
+ color = TQColor("#FFDFDF");
+ lineColor = TQt::red;
icon = kapp->iconLoader()->loadIcon("likeback_dislike", KIcon::Small);
title = i18n("I do not like...");
please = i18n("Please briefly describe what you do not like.");
break;
case LikeBack::IFoundABug:
- color = QColor("#C0C0C0");
- lineColor = Qt::black;
+ color = TQColor("#C0C0C0");
+ lineColor = TQt::black;
icon = kapp->iconLoader()->loadIcon("bug", KIcon::Small);
title = i18n("I found a bug...");
please = i18n("Please briefly describe the bug you encountered.");
@@ -549,41 +549,41 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, QString windowName, QStr
return;
}
- QWidget *line = new QWidget(this);
+ TQWidget *line = new TQWidget(this);
line->setPaletteBackgroundColor(lineColor);
line->setFixedHeight(1);
mainLayout->addWidget(line);
mainLayout->addLayout(explainingLayout);
- QHBoxLayout *titleLayout = new QHBoxLayout(0);
+ TQHBoxLayout *titleLayout = new TQHBoxLayout(0);
coloredWidget->setPaletteBackgroundColor(color);
- QLabel *iconLabel = new QLabel(coloredWidget);
+ TQLabel *iconLabel = new TQLabel(coloredWidget);
iconLabel->setPixmap(icon);
- QLabel *titleLabel = new QLabel(title, coloredWidget);
- QFont font = titleLabel->font();
+ TQLabel *titleLabel = new TQLabel(title, coloredWidget);
+ TQFont font = titleLabel->font();
font.setBold(true);
titleLabel->setFont(font);
- titleLabel->setPaletteForegroundColor(Qt::black);
+ titleLabel->setPaletteForegroundColor(TQt::black);
titleLayout->addWidget(iconLabel);
titleLayout->addSpacing(4);
titleLayout->addWidget(titleLabel);
titleLayout->addStretch();
- QVBoxLayout *coloredWidgetLayout = new QVBoxLayout(coloredWidget);
+ TQVBoxLayout *coloredWidgetLayout = new TQVBoxLayout(coloredWidget);
coloredWidgetLayout->setMargin(KDialogBase::marginHint());
coloredWidgetLayout->setSpacing(KDialogBase::spacingHint());
coloredWidgetLayout->addLayout(titleLayout);
- QHBoxLayout *commentLayout = new QHBoxLayout((QWidget*)0);
+ TQHBoxLayout *commentLayout = new TQHBoxLayout((TQWidget*)0);
commentLayout->setMargin(0);
commentLayout->setSpacing(KDialogBase::spacingHint());
- m_comment = new QTextEdit(coloredWidget);
- QIconSet sendIconSet = kapp->iconLoader()->loadIconSet("mail_send", KIcon::Toolbar);
- m_sendButton = new QPushButton(sendIconSet, i18n("Send"), coloredWidget);
- m_sendButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
+ m_comment = new TQTextEdit(coloredWidget);
+ TQIconSet sendIconSet = kapp->iconLoader()->loadIconSet("mail_send", KIcon::Toolbar);
+ m_sendButton = new TQPushButton(sendIconSet, i18n("Send"), coloredWidget);
+ m_sendButton->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding);
m_sendButton->setEnabled(false);
- connect( m_sendButton, SIGNAL(clicked()), this, SLOT(send()) );
- connect( m_comment, SIGNAL(textChanged()), this, SLOT(commentChanged()) );
+ connect( m_sendButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(send()) );
+ connect( m_comment, TQT_SIGNAL(textChanged()), this, TQT_SLOT(commentChanged()) );
commentLayout->addWidget(m_comment);
commentLayout->addWidget(m_sendButton);
coloredWidgetLayout->addLayout(commentLayout);
@@ -607,21 +607,21 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, QString windowName, QStr
resize(kapp->desktop()->width() / 2, kapp->desktop()->height() / 3);
setCaption(kapp->makeStdCaption(i18n("Send a Comment")));
- // setMinimumSize(mainLayout->sizeHint()); // FIXME: Doesn't work!
+ // setMinimumSize(mainLayout->tqsizeHint()); // FIXME: Doesn't work!
}
LikeBackDialog::~LikeBackDialog()
{
}
-QHttp *http ;
+TQHttp *http ;
void LikeBackDialog::send()
{
- QString emailAddress = LikeBack::instance()->emailAddress();
+ TQString emailAddress = LikeBack::instance()->emailAddress();
- QString type = (m_reason == LikeBack::ILike ? "Like" : (m_reason == LikeBack::IDoNotLike ? "Dislike" : "Bug"));
- QString data =
+ TQString type = (m_reason == LikeBack::ILike ? "Like" : (m_reason == LikeBack::IDoNotLike ? "Dislike" : "Bug"));
+ TQString data =
"protocol=" + KURL::encode_string("1.0") + "&" +
"type=" + KURL::encode_string(type) + "&" +
"version=" + KURL::encode_string(LikeBack::about()->version()) + "&" +
@@ -630,15 +630,15 @@ void LikeBackDialog::send()
"context=" + KURL::encode_string(m_context) + "&" +
"comment=" + KURL::encode_string(m_comment->text()) + "&" +
"email=" + KURL::encode_string(emailAddress);
- //QByteArray *data = new QByteArray();
- /*QHttp **/http = new QHttp(LikeBack::hostName(), LikeBack::hostPort());
+ //TQByteArray *data = new TQByteArray();
+ /*TQHttp **/http = new TQHttp(LikeBack::hostName(), LikeBack::hostPort());
// std::cout << "http://" << LikeBack::hostName() << ":" << LikeBack::hostPort() << LikeBack::remotePath() << std::endl;
// std::cout << data << std::endl;
- connect( http, SIGNAL(requestFinished(int, bool)), this, SLOT(requestFinished(int, bool)) );
+ connect( http, TQT_SIGNAL(requestFinished(int, bool)), this, TQT_SLOT(requestFinished(int, bool)) );
// http->post(LikeBack::remotePath(), data.utf8());
- QHttpRequestHeader header("POST", LikeBack::remotePath());
+ TQHttpRequestHeader header("POST", LikeBack::remotePath());
header.setValue("Host", LikeBack::hostName());
header.setValue("Content-Type", "application/x-www-form-urlencoded");
http->setHost(LikeBack::hostName());
@@ -656,7 +656,7 @@ void LikeBackDialog::requestFinished(int /*id*/, bool error)
if (error) {
KMessageBox::error(this, i18n("<p>Error while trying to send the report.</p><p>Please retry later.</p>"), i18n("Transfer Error"));
} else {
- KMessageBox::information(this, i18n("<p>Your comment has been sent successfully. It will help improve the application.</p><p>Thanks for your time.</p>") /*+ QString(http->readAll())*/, i18n("Comment Sent"));
+ KMessageBox::information(this, i18n("<p>Your comment has been sent successfully. It will help improve the application.</p><p>Thanks for your time.</p>") /*+ TQString(http->readAll())*/, i18n("Comment Sent"));
close();
}
LikeBack::enable();
diff --git a/src/libgui/likeback.h b/src/libgui/likeback.h
index 70a68dd..1fdb165 100644
--- a/src/libgui/likeback.h
+++ b/src/libgui/likeback.h
@@ -21,11 +21,11 @@
#define LIKEBACK_H
#include <kdialog.h>
-#include <qtimer.h>
+#include <tqtimer.h>
-class QTextEdit;
-class QToolButton;
-class QPushButton;
+class TQTextEdit;
+class TQToolButton;
+class TQPushButton;
class KProcess;
class KConfig;
class KAboutData;
@@ -33,9 +33,10 @@ class KAboutData;
/**
* @author S�astien Laot <slaout@linux62.org>
*/
-class LikeBack : public QWidget
+class LikeBack : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Button { ILike = 0x01, IDoNotLike = 0x02, IFoundABug = 0x04, Configure = 0x10,
AllButtons = ILike | IDoNotLike | IFoundABug | Configure };
@@ -44,27 +45,27 @@ class LikeBack : public QWidget
~LikeBack();
static void showInformationMessage();
static LikeBack* instance();
- static QString customLanguageMessage();
+ static TQString customLanguageMessage();
static bool allowFeatureWishes();
- static QString hostName();
- static QString remotePath();
- static Q_UINT16 hostPort();
- static void setServer(QString hostName, QString remotePath, Q_UINT16 hostPort = 80);
+ static TQString hostName();
+ static TQString remotePath();
+ static TQ_UINT16 hostPort();
+ static void setServer(TQString hostName, TQString remotePath, TQ_UINT16 hostPort = 80);
static void setWindowNamesListing(WindowListing windowListing);
- static void setCustomLanguageMessage(const QString &message);
+ static void setCustomLanguageMessage(const TQString &message);
static void setAllowFeatureWishes(bool allow);
static bool enabled();
static void disable();
static void enable();
static bool userWantToParticipate(); /// << @Returns true if the user have not disabled LikeBack for this version
static bool emailAddressAlreadyProvided();
- static QString emailAddress(); /// << @Returns the email user address, or ask it to the user if he haven't provided or ignored it
- static void setEmailAddress(const QString &address); /// << Calling emailAddress() will ask it to the user the first time
- static bool isDevelopmentVersion(const QString &version = QString::null); /// << @Returns true if version is an alpha/beta/rc/svn/cvs version. Use kapp->aboutData()->version is @p version is empty
+ static TQString emailAddress(); /// << @Returns the email user address, or ask it to the user if he haven't provided or ignored it
+ static void setEmailAddress(const TQString &address); /// << Calling emailAddress() will ask it to the user the first time
+ static bool isDevelopmentVersion(const TQString &version = TQString()); /// << @Returns true if version is an alpha/beta/rc/svn/cvs version. Use kapp->aboutData()->version is @p version is empty
static void init(Button buttons = AllButtons); /// << Initialize the LikeBack system: enable it if the application version is a development one.
static void init(bool isDevelopmentVersion, Button buttons = AllButtons); /// << Initialize the LikeBack system: enable it if @p isDevelopmentVersion is true.
static void init(KConfig* config, KAboutData* about, Button buttons = AllButtons);
- static QString activeWindowPath();
+ static TQString activeWindowPath();
static KAboutData* about();
public slots:
void iLike();
@@ -80,17 +81,17 @@ class LikeBack : public QWidget
void showWhatsThisMessage();
void askEMail();
// void beginFetchingEmail();
- void endFetchingEmailFrom(); // static QString fetchingEmail();
+ void endFetchingEmailFrom(); // static TQString fetchingEmail();
private:
- QTimer m_timer;
+ TQTimer m_timer;
Button m_buttons;
- QToolButton *m_configureButton;
- QString m_fetchedEmail;
+ TQToolButton *m_configureButton;
+ TQString m_fetchedEmail;
KProcess *m_process;
- static QString s_hostName;
- static QString s_remotePath;
- static Q_UINT16 s_hostPort;
- static QString s_customLanguageMessage;
+ static TQString s_hostName;
+ static TQString s_remotePath;
+ static TQ_UINT16 s_hostPort;
+ static TQString s_customLanguageMessage;
static bool s_allowFeatureWishes;
static WindowListing s_windowListing;
static LikeBack *s_instance;
@@ -102,15 +103,16 @@ class LikeBack : public QWidget
class LikeBackDialog : public KDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- LikeBackDialog(LikeBack::Button reason, QString windowName, QString context);
+ LikeBackDialog(LikeBack::Button reason, TQString windowName, TQString context);
~LikeBackDialog();
private:
LikeBack::Button m_reason;
- QTextEdit *m_comment;
- QPushButton *m_sendButton;
- QString m_windowName;
- QString m_context;
+ TQTextEdit *m_comment;
+ TQPushButton *m_sendButton;
+ TQString m_windowName;
+ TQString m_context;
private slots:
void send();
void requestFinished(int id, bool error);
diff --git a/src/libgui/log_view.cpp b/src/libgui/log_view.cpp
index 158c281..f0a1830 100644
--- a/src/libgui/log_view.cpp
+++ b/src/libgui/log_view.cpp
@@ -8,17 +8,17 @@
***************************************************************************/
#include "log_view.h"
-#include <qpopupmenu.h>
-#include <qeventloop.h>
-#include <qapplication.h>
+#include <tqpopupmenu.h>
+#include <tqeventloop.h>
+#include <tqapplication.h>
#include <kiconloader.h>
#include "global_config.h"
#include "common/gui/purl_gui.h"
#include "common/gui/misc_gui.h"
-Log::Widget::Widget(QWidget *parent, const char *name)
- : QTextEdit(parent, name)
+Log::Widget::Widget(TQWidget *tqparent, const char *name)
+ : TQTextEdit(tqparent, name)
{
setTextFormat(LogText);
setMinimumWidth(300);
@@ -29,66 +29,66 @@ void Log::Widget::updateDebugLevel()
setDebugLevel(GlobalConfig::debugLevel());
}
-void Log::Widget::logExtra(const QString &text)
+void Log::Widget::logExtra(const TQString &text)
{
_text += text;
if ( GlobalConfig::logOutputType()==GuiConsole ) fprintf(stdout, "%s", text.latin1());
}
-void Log::Widget::doLog(LineType type, const QString &text, Action action)
+void Log::Widget::doLog(LineType type, const TQString &text, Action action)
{
doLog(text, type.data().color, type.data().bold, action);
}
-void Log::Widget::doLog(DebugLevel level, const QString &text, Action action)
+void Log::Widget::doLog(DebugLevel level, const TQString &text, Action action)
{
doLog(text, level.data().color, false, action);
}
-void Log::Widget::doLog(const QString &text, const QString &color, bool bold, Action action)
+void Log::Widget::doLog(const TQString &text, const TQString &color, bool bold, Action action)
{
logExtra(text + "\n");
- QString s = QString("<font color=%1>").arg(color);
+ TQString s = TQString("<font color=%1>").tqarg(color);
if (bold) s += "<b>";
s += escapeXml(text);
if (bold) s += "</b>";
s += "</font>";
- QTextEdit::append(s);
- updateContents(); // #### fix bug in Qt (display is messed up)
+ TQTextEdit::append(s);
+ updateContents(); // #### fix bug in TQt (display is messed up)
ensureVisible(0, contentsHeight());
if ( action==Immediate)
- QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
+ TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput);
}
-void Log::Widget::appendToLastLine(const QString &text)
+void Log::Widget::appendToLastLine(const TQString &text)
{
logExtra(text);
uint p = paragraphs() - 1;
insertAt(escapeXml(text), p, paragraphLength(p));
- updateContents(); // #### fix bug in Qt (display is messed up)
+ updateContents(); // #### fix bug in TQt (display is messed up)
ensureVisible(0, contentsHeight());
// immediately visible...
- QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
+ TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput);
}
-QPopupMenu *Log::Widget::createPopupMenu(const QPoint &pos)
+TQPopupMenu *Log::Widget::createPopupMenu(const TQPoint &pos)
{
updateDebugLevel();
- _popup = QTextEdit::createPopupMenu(pos);
+ _popup = TQTextEdit::createPopupMenu(pos);
KIconLoader loader;
- QIconSet iset = loader.loadIconSet("filesave", KIcon::Small, 0);
- _popup->insertItem(iset, "Save As...", this, SLOT(saveAs()));
+ TQIconSet iset = loader.loadIconSet("filesave", KIcon::Small, 0);
+ _popup->insertItem(iset, "Save As...", this, TQT_SLOT(saveAs()));
iset = loader.loadIconSet("fileclose", KIcon::Small, 0);
- _popup->insertItem(iset, "Clear", this, SLOT(clear()));
+ _popup->insertItem(iset, "Clear", this, TQT_SLOT(clear()));
_popup->insertSeparator();
FOR_EACH(DebugLevel, level) {
_id[level.type()] = _popup->insertItem(level.label());
_popup->setItemChecked(_id[level.type()], _debugLevel==level);
}
_popup->insertSeparator();
- int id = _popup->insertItem(i18n("Output in console"), this, SLOT(toggleConsoleOutput()));
+ int id = _popup->insertItem(i18n("Output in console"), this, TQT_SLOT(toggleConsoleOutput()));
_popup->setItemChecked(id, GlobalConfig::logOutputType()==GuiConsole);
- connect(_popup, SIGNAL(activated(int)), SLOT(toggleVisible(int)));
+ connect(_popup, TQT_SIGNAL(activated(int)), TQT_SLOT(toggleVisible(int)));
return _popup;
}
@@ -108,13 +108,13 @@ void Log::Widget::toggleConsoleOutput()
GlobalConfig::writeLogOutputType(GlobalConfig::logOutputType()==GuiOnly ? GuiConsole : GuiOnly);
}
-void Log::Widget::sorry(const QString &message, const QString &details)
+void Log::Widget::sorry(const TQString &message, const TQString &details)
{
logExtra(message + " [" + details + "]\n");
MessageBox::detailedSorry(message, details, Log::Show);
}
-bool Log::Widget::askContinue(const QString &message)
+bool Log::Widget::askContinue(const TQString &message)
{
bool ok = MessageBox::askContinue(message);
logExtra(message + " [" + (ok ? "continue" : "cancel") + "]\n");
@@ -123,8 +123,8 @@ bool Log::Widget::askContinue(const QString &message)
void Log::Widget::clear()
{
- QTextEdit::clear();
- _text = QString::null;
+ TQTextEdit::clear();
+ _text = TQString();
}
void Log::Widget::saveAs()
diff --git a/src/libgui/log_view.h b/src/libgui/log_view.h
index c84849e..75e2481 100644
--- a/src/libgui/log_view.h
+++ b/src/libgui/log_view.h
@@ -9,25 +9,26 @@
#ifndef LOG_VIEW_H
#define LOG_VIEW_H
-#include <qtextedit.h>
+#include <tqtextedit.h>
#include "common/global/log.h"
namespace Log
{
enum OutputType { GuiOnly = 0, GuiConsole, Nb_OutputTypes };
-class Widget : public QTextEdit, public View
+class Widget : public TQTextEdit, public View
{
Q_OBJECT
+ TQ_OBJECT
public:
- Widget(QWidget *parent = 0, const char *name = 0);
- virtual void appendToLastLine(const QString &text);
+ Widget(TQWidget *tqparent = 0, const char *name = 0);
+ virtual void appendToLastLine(const TQString &text);
virtual void clear();
- virtual void sorry(const QString &message, const QString &details);
- virtual bool askContinue(const QString &message);
+ virtual void sorry(const TQString &message, const TQString &details);
+ virtual bool askContinue(const TQString &message);
protected:
- QPopupMenu *createPopupMenu(const QPoint &pos);
+ TQPopupMenu *createPopupMenu(const TQPoint &pos);
private slots:
void toggleVisible(int i);
@@ -36,14 +37,14 @@ private slots:
private:
int _id[DebugLevel::Nb_Types];
- QPopupMenu *_popup;
- QString _text;
+ TQPopupMenu *_popup;
+ TQString _text;
virtual void updateDebugLevel();
- virtual void doLog(LineType type, const QString &text, Action action = Immediate);
- virtual void doLog(DebugLevel level, const QString &text, Action action = Immediate);
- void doLog(const QString &text, const QString &color, bool bold, Action action = Immediate);
- void logExtra(const QString &text);
+ virtual void doLog(LineType type, const TQString &text, Action action = Immediate);
+ virtual void doLog(DebugLevel level, const TQString &text, Action action = Immediate);
+ void doLog(const TQString &text, const TQString &color, bool bold, Action action = Immediate);
+ void logExtra(const TQString &text);
};
} // namespace
diff --git a/src/libgui/main_global.cpp b/src/libgui/main_global.cpp
index 8741a44..283149d 100644
--- a/src/libgui/main_global.cpp
+++ b/src/libgui/main_global.cpp
@@ -8,7 +8,7 @@
***************************************************************************/
#include "main_global.h"
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include "toplevel.h"
#include "common/global/about.h"
@@ -60,16 +60,16 @@ KAction *Main::action(KStdAction::StdAction action)
return _toplevel->KMainWindow::action(KStdAction::name(action));
}
-QPopupMenu &Main::popup(const char *name)
+TQPopupMenu &Main::popup(const char *name)
{
- QPopupMenu *popup = static_cast<QPopupMenu *>(_toplevel->factory()->container(name, _toplevel));
+ TQPopupMenu *popup = static_cast<TQPopupMenu *>(_toplevel->factory()->container(name, _toplevel));
Q_ASSERT(popup);
return *popup;
}
const Device::Data *Main::deviceData()
{
- QString name = device();
+ TQString name = device();
if ( name==Device::AUTO_DATA.name )
name = DeviceEditor::guessDeviceFromFile(_projectManager->projectUrl());
return Device::lister().data(name);
@@ -77,5 +77,5 @@ const Device::Data *Main::deviceData()
Editor *Main::currentEditor() { return _editorManager->currentEditor(); }
Project *Main::project() { return _projectManager->project(); }
-QString Main::device() { return Compile::Config::device(project()); }
+TQString Main::device() { return Compile::Config::device(project()); }
const Tool::Group &Main::toolGroup() { return Compile::Config::toolGroup(project()); }
diff --git a/src/libgui/main_global.h b/src/libgui/main_global.h
index 020253e..a3dc901 100644
--- a/src/libgui/main_global.h
+++ b/src/libgui/main_global.h
@@ -9,8 +9,8 @@
#ifndef MAIN_GLOBAL_H
#define MAIN_GLOBAL_H
-#include <qstring.h>
-#include <qpopupmenu.h>
+#include <tqstring.h>
+#include <tqpopupmenu.h>
#include <kstdaction.h>
#include "progs/base/generic_prog.h"
@@ -41,10 +41,10 @@ public:
static Programmer::State programmerState();
static KAction *action(const char *name);
static KAction *action(KStdAction::StdAction action);
- static QPopupMenu &popup(const char *name);
+ static TQPopupMenu &popup(const char *name);
static EditorManager &editorManager() { return *_editorManager; }
static Editor *currentEditor();
- static QString device();
+ static TQString device();
static const Device::Data *deviceData();
static Breakpoint::View &breakpointsView() { return *_breakpointsView; }
static ProjectManager::View &projectManager() { return *_projectManager; }
diff --git a/src/libgui/new_dialogs.cpp b/src/libgui/new_dialogs.cpp
index d26c15c..f5fbc4a 100644
--- a/src/libgui/new_dialogs.cpp
+++ b/src/libgui/new_dialogs.cpp
@@ -17,27 +17,27 @@
#include "project.h"
//----------------------------------------------------------------------------
-NewDialog::NewDialog(const QString &caption, QWidget *parent)
- : Dialog(parent, "new_dialog", true, caption, Ok|Cancel, Ok, false)
+NewDialog::NewDialog(const TQString &caption, TQWidget *tqparent)
+ : Dialog(tqparent, "new_dialog", true, caption, Ok|Cancel, Ok, false)
{
- _top = new QGridLayout(mainWidget(), 0, 0, 10, 10);
+ _top = new TQGridLayout(mainWidget(), 0, 0, 10, 10);
_top->setColStretch(2, 1);
- _fLabel = new QLabel(mainWidget());
+ _fLabel = new TQLabel(mainWidget());
_top->addWidget(_fLabel, 0, 0);
- _filename = new QLineEdit(mainWidget());
- connect(_filename, SIGNAL(textChanged(const QString &)), SLOT(changed()));
+ _filename = new TQLineEdit(mainWidget());
+ connect(_filename, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(changed()));
_top->addMultiCellWidget(_filename, 0,0, 1,3);
- QLabel *label= new QLabel(i18n("Location:"), mainWidget());
+ TQLabel *label= new TQLabel(i18n("Location:"), mainWidget());
_top->addWidget(label, 1, 0);
- _dir = new QLineEdit(mainWidget());
- connect(_dir, SIGNAL(textChanged(const QString &)), SLOT(changed()));
+ _dir = new TQLineEdit(mainWidget());
+ connect(_dir, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(changed()));
_top->addMultiCellWidget(_dir, 1,1, 1,2);
KIconLoader loader;
- QIconSet iconset = loader.loadIcon("fileopen", KIcon::Toolbar);
- KPushButton *button = new KPushButton(iconset, QString::null, mainWidget());
- connect(button, SIGNAL(clicked()), SLOT(browse()));
+ TQIconSet iconset = loader.loadIcon("fileopen", KIcon::Toolbar);
+ KPushButton *button = new KPushButton(iconset, TQString(), mainWidget());
+ connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(browse()));
_top->addWidget(button, 1, 3);
_filename->setFocus();
@@ -51,19 +51,19 @@ void NewDialog::changed()
void NewDialog::browse()
{
- PURL::Directory dir = PURL::getExistingDirectory(startDir(), this, QString::null);
+ PURL::Directory dir = PURL::getExistingDirectory(startDir(), this, TQString());
if ( dir.isEmpty() ) return;
_dir->setText(dir.path());
}
//----------------------------------------------------------------------------
-NewFileDialog::NewFileDialog(Project *project, QWidget *parent)
- : NewDialog(i18n("Create New File"), parent), _project(project)
+NewFileDialog::NewFileDialog(Project *project, TQWidget *tqparent)
+ : NewDialog(i18n("Create New File"), tqparent), _project(project)
{
_fLabel->setText(i18n("File Name:"));
if (project) {
- _add = new QCheckBox(i18n("Add to project"), mainWidget());
+ _add = new TQCheckBox(i18n("Add to project"), mainWidget());
_add->setChecked(project);
_top->addMultiCellWidget(_add, 2,2, 1,2);
_top->setRowStretch(3, 1);
@@ -71,7 +71,7 @@ NewFileDialog::NewFileDialog(Project *project, QWidget *parent)
}
}
-QString NewFileDialog::startDir() const
+TQString NewFileDialog::startDir() const
{
if (_project) return _project->directory().path();
return ":new_file";
diff --git a/src/libgui/new_dialogs.h b/src/libgui/new_dialogs.h
index 26e3cf7..b3d2846 100644
--- a/src/libgui/new_dialogs.h
+++ b/src/libgui/new_dialogs.h
@@ -10,11 +10,11 @@
#ifndef NEW_DIALOGS_H
#define NEW_DIALOGS_H
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kcombobox.h>
#include "common/global/purl.h"
@@ -25,15 +25,16 @@ class Project;
class NewDialog : public Dialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- NewDialog(const QString &caption, QWidget *parent);
+ NewDialog(const TQString &caption, TQWidget *tqparent);
protected:
- QGridLayout *_top;
- QLabel *_fLabel;
- QLineEdit *_filename, *_dir;
+ TQGridLayout *_top;
+ TQLabel *_fLabel;
+ TQLineEdit *_filename, *_dir;
- virtual QString startDir() const = 0;
+ virtual TQString startDir() const = 0;
private slots:
void changed();
@@ -44,16 +45,17 @@ private slots:
class NewFileDialog : public NewDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- NewFileDialog(Project *project, QWidget *parent);
+ NewFileDialog(Project *project, TQWidget *tqparent);
PURL::Url url() const;
bool addToProject() const { return (_project ? _add->isChecked() : false); }
private:
Project *_project;
- QCheckBox *_add;
+ TQCheckBox *_add;
- virtual QString startDir() const;
+ virtual TQString startDir() const;
};
#endif
diff --git a/src/libgui/object_view.cpp b/src/libgui/object_view.cpp
index 91625fb..dd606fc 100644
--- a/src/libgui/object_view.cpp
+++ b/src/libgui/object_view.cpp
@@ -22,8 +22,8 @@
#include "common/gui/misc_gui.h"
//-----------------------------------------------------------------------------
-Coff::BaseEditor::BaseEditor(const PURL::Url &source, const Device::Data *data, QWidget *parent)
- : SimpleTextEditor(true, parent), _source(source), _ok(false), _created(0), _device(data)
+Coff::BaseEditor::BaseEditor(const PURL::Url &source, const Device::Data *data, TQWidget *tqparent)
+ : SimpleTextEditor(true, tqparent), _source(source), _ok(false), _created(0), _device(data)
{
setReadOnly(true);
_view->setDynWordWrap(false);
@@ -36,12 +36,12 @@ Coff::BaseEditor::~BaseEditor()
}
//-----------------------------------------------------------------------------
-Coff::CoffEditor::CoffEditor(const PURL::Url &source, const Device::Data &data, QWidget *parent)
- : BaseEditor(source, &data, parent), _provided(0)
+Coff::CoffEditor::CoffEditor(const PURL::Url &source, const Device::Data &data, TQWidget *tqparent)
+ : BaseEditor(source, &data, tqparent), _provided(0)
{}
-Coff::CoffEditor::CoffEditor(const TextObject &object, QWidget *parent)
- : BaseEditor(PURL::Url(), object.device(), parent), _provided(&object)
+Coff::CoffEditor::CoffEditor(const TextObject &object, TQWidget *tqparent)
+ : BaseEditor(PURL::Url(), object.device(), tqparent), _provided(&object)
{}
bool Coff::CoffEditor::open(const PURL::Url &url)
@@ -56,8 +56,8 @@ bool Coff::CoffEditor::open(const PURL::Url &url)
}
//-----------------------------------------------------------------------------
-Coff::ObjectEditor::ObjectEditor(const PURL::Url &source, QWidget *parent)
- : BaseEditor(source, 0, parent)
+Coff::ObjectEditor::ObjectEditor(const PURL::Url &source, TQWidget *tqparent)
+ : BaseEditor(source, 0, tqparent)
{}
bool Coff::ObjectEditor::open(const PURL::Url &url)
@@ -68,13 +68,13 @@ bool Coff::ObjectEditor::open(const PURL::Url &url)
_ok = _created->parse(*this);
}
if ( !_ok ) return setText(i18n("Error parsing object:\n") + error());
- QString s = coff()->information().text() + "\n";
+ TQString s = coff()->information().text() + "\n";
return setText(s);
}
//-----------------------------------------------------------------------------
-Coff::LibraryEditor::LibraryEditor(const PURL::Url &source, QWidget *parent)
- : BaseEditor(source, 0, parent)
+Coff::LibraryEditor::LibraryEditor(const PURL::Url &source, TQWidget *tqparent)
+ : BaseEditor(source, 0, tqparent)
{}
bool Coff::LibraryEditor::open(const PURL::Url &url)
@@ -85,23 +85,23 @@ bool Coff::LibraryEditor::open(const PURL::Url &url)
_ok = _created->parse(*this);
}
if ( !_ok ) return setText(i18n("Error parsing library:\n") + error());
- QString s = coff()->information().text() + "\n";
+ TQString s = coff()->information().text() + "\n";
if ( coff()->members().count()!=0 ) s += coff()->membersInformation().text() + "\n";
if ( coff()->symbols().count()!=0 ) s += coff()->symbolsInformation().text() + "\n";
return setText(s);
}
//-----------------------------------------------------------------------------
-DisassemblyEditor::DisassemblyEditor(const PURL::Url &source, const Device::Data &data, QWidget *parent)
- : SimpleTextEditor(true, parent), _source(source), _device(data), _editor(0)
+DisassemblyEditor::DisassemblyEditor(const PURL::Url &source, const Device::Data &data, TQWidget *tqparent)
+ : SimpleTextEditor(true, tqparent), _source(source), _device(data), _editor(0)
{
setReadOnly(true);
_view->setDynWordWrap(false);
setView(&Main::compileLog());
}
-DisassemblyEditor::DisassemblyEditor(const HexEditor &e, const Device::Data &data, QWidget *parent)
- : SimpleTextEditor(true, parent), _device(data), _editor(&e)
+DisassemblyEditor::DisassemblyEditor(const HexEditor &e, const Device::Data &data, TQWidget *tqparent)
+ : SimpleTextEditor(true, tqparent), _device(data), _editor(&e)
{
setReadOnly(true);
_view->setDynWordWrap(false);
@@ -123,11 +123,11 @@ bool DisassemblyEditor::open(const PURL::Url &url)
Device::Memory *memory = 0;
if ( _editor==0 ) {
- log(Log::LineType::Information, i18n("Disassembling hex file: %1").arg(_source.pretty()));
+ log(Log::LineType::Information, i18n("Disassembling hex file: %1").tqarg(_source.pretty()));
PURL::File file(_source, Main::compileLog());
if ( !file.openForRead() ) return false;
memory = _device.group().createMemory(_device);
- QStringList errors, warnings;
+ TQStringList errors, warnings;
Device::Memory::WarningTypes warningTypes;
if ( !memory->load(file.stream(), errors, warningTypes, warnings) ) {
delete memory;
diff --git a/src/libgui/object_view.h b/src/libgui/object_view.h
index 358101b..9b7ea65 100644
--- a/src/libgui/object_view.h
+++ b/src/libgui/object_view.h
@@ -24,8 +24,9 @@ class TextObject;
class BaseEditor : public SimpleTextEditor, public Log::Base
{
Q_OBJECT
+ TQ_OBJECT
public:
- BaseEditor(const PURL::Url &source, const Device::Data *data, QWidget *parent);
+ BaseEditor(const PURL::Url &source, const Device::Data *data, TQWidget *tqparent);
virtual ~BaseEditor();
virtual PURL::Url url() const { return _url; }
@@ -40,9 +41,10 @@ protected:
class CoffEditor : public BaseEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- CoffEditor(const PURL::Url &source, const Device::Data &data, QWidget *parent);
- CoffEditor(const TextObject &object, QWidget *parent);
+ CoffEditor(const PURL::Url &source, const Device::Data &data, TQWidget *tqparent);
+ CoffEditor(const TextObject &object, TQWidget *tqparent);
virtual PURL::FileType fileType() const { return PURL::Coff; }
virtual bool open(const PURL::Url &url);
@@ -54,8 +56,9 @@ private:
class ObjectEditor : public BaseEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- ObjectEditor(const PURL::Url &source, QWidget *parent);
+ ObjectEditor(const PURL::Url &source, TQWidget *tqparent);
virtual PURL::FileType fileType() const { return PURL::Unknown; }
virtual bool open(const PURL::Url &url);
@@ -67,8 +70,9 @@ private:
class LibraryEditor : public BaseEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- LibraryEditor(const PURL::Url &source, QWidget *parent);
+ LibraryEditor(const PURL::Url &source, TQWidget *tqparent);
virtual PURL::FileType fileType() const { return PURL::Unknown; }
virtual bool open(const PURL::Url &url);
@@ -82,9 +86,10 @@ private:
class DisassemblyEditor : public SimpleTextEditor, public Log::Base
{
Q_OBJECT
+ TQ_OBJECT
public:
- DisassemblyEditor(const PURL::Url &hexUrl, const Device::Data &data, QWidget *parent);
- DisassemblyEditor(const HexEditor &e, const Device::Data &data, QWidget *parent);
+ DisassemblyEditor(const PURL::Url &hexUrl, const Device::Data &data, TQWidget *tqparent);
+ DisassemblyEditor(const HexEditor &e, const Device::Data &data, TQWidget *tqparent);
virtual PURL::FileType fileType() const { return PURL::AsmGPAsm; }
virtual bool open(const PURL::Url &url);
virtual PURL::Url url() const { return _url; }
diff --git a/src/libgui/project.cpp b/src/libgui/project.cpp
index dcf34c3..8ece518 100644
--- a/src/libgui/project.cpp
+++ b/src/libgui/project.cpp
@@ -16,12 +16,12 @@
#include "global_config.h"
#include "tools/gputils/gputils_config.h"
-bool Project::load(QString &error)
+bool Project::load(TQString &error)
{
if ( _url.fileType()==PURL::Project ) return XmlDataFile::load(error);
if ( !_url.exists() ) {
- error = i18n("Project file %1 does not exist.").arg(_url.pretty());
+ error = i18n("Project file %1 does not exist.").tqarg(_url.pretty());
return false;
}
PURL::Url tmp = _url;
@@ -30,29 +30,29 @@ bool Project::load(QString &error)
KConfig *config = new KSimpleConfig(tmp.filepath(), false);
config->setGroup("Files");
- QStringList list = config->readListEntry("inputFiles");
- QStringList::const_iterator it = list.begin();
+ TQStringList list = config->readListEntry("inputFiles");
+ TQStringList::const_iterator it = list.begin();
for (; it!=list.end(); ++it) addFile(PURL::Url(directory(), *it));
config->setGroup("General");
setVersion(config->readEntry("version", "0.1"));
- setDescription(config->readEntry("description", QString::null));
+ setDescription(config->readEntry("description", TQString()));
config->setGroup("Assembler");
- QString device = config->readEntry("target-device");
+ TQString device = config->readEntry("target-device");
if ( device=="*" ) device = GlobalConfig::programmerGroup().supportedDevices()[0]; // compatibility
Compile::Config::setDevice(this, Device::lister().checkName(device));
GPUtils::Config *gconfig = new GPUtils::Config(this);
- gconfig->setGPAsmWarningLevel(QMIN(config->readUnsignedNumEntry("warn-level", 0), uint(GPUtils::Config::Nb_WarningLevels)));
- gconfig->setRawIncludeDirs(Tool::Category::Assembler, config->readEntry("include-dir", QString::null));
- gconfig->setRawCustomOptions(Tool::Category::Assembler, config->readEntry("other-options", QString::null));
+ gconfig->setGPAsmWarningLevel(TQMIN(config->readUnsignedNumEntry("warn-level", 0), uint(GPUtils::Config::Nb_WarningLevels)));
+ gconfig->setRawIncludeDirs(Tool::Category::Assembler, config->readEntry("include-dir", TQString()));
+ gconfig->setRawCustomOptions(Tool::Category::Assembler, config->readEntry("other-options", TQString()));
config->setGroup("Linker") ;
- QString hexFormatString = config->readEntry("hex-format", HexBuffer::FORMATS[HexBuffer::IHX32]);
+ TQString hexFormatString = config->readEntry("hex-format", HexBuffer::FORMATS[HexBuffer::IHX32]);
for (uint i=0; i<HexBuffer::Nb_Formats; i++)
if ( hexFormatString==HexBuffer::FORMATS[i] ) gconfig->setHexFormat(HexBuffer::Format(i));
- gconfig->setRawIncludeDirs(Tool::Category::Linker, config->readEntry("objs-libs-dir", QString::null));
- gconfig->setRawCustomOptions(Tool::Category::Linker, config->readEntry("other-options", QString::null));
+ gconfig->setRawIncludeDirs(Tool::Category::Linker, config->readEntry("objs-libs-dir", TQString()));
+ gconfig->setRawCustomOptions(Tool::Category::Linker, config->readEntry("other-options", TQString()));
delete gconfig;
delete config;
@@ -62,8 +62,8 @@ bool Project::load(QString &error)
PURL::UrlList Project::openedFiles() const
{
PURL::UrlList files;
- QStringList list = listValues("general", "opened_files", QStringList());
- QStringList::const_iterator it = list.begin();
+ TQStringList list = listValues("general", "opened_files", TQStringList());
+ TQStringList::const_iterator it = list.begin();
for (; it!=list.end(); ++it) {
if ( PURL::Url::fromPathOrUrl(*it).isRelative() ) files += PURL::Url(directory(), *it);
else files += PURL::Url::fromPathOrUrl(*it);
@@ -81,8 +81,8 @@ void Project::setOpenedFiles(const PURL::UrlList &list)
PURL::UrlList Project::absoluteFiles() const
{
PURL::UrlList abs;
- QStringList files = listValues("general", "files", QStringList());
- QStringList::const_iterator it = files.begin();
+ TQStringList files = listValues("general", "files", TQStringList());
+ TQStringList::const_iterator it = files.begin();
for (; it!=files.end(); ++it) abs += PURL::Url::fromPathOrUrl(*it).toAbsolute(directory());
return abs;
}
@@ -99,7 +99,7 @@ void Project::clearFiles()
clearList("general", "files");
}
-QString Project::toSourceObject(const PURL::Url &url, const QString &extension, bool forWindows) const
+TQString Project::toSourceObject(const PURL::Url &url, const TQString &extension, bool forWindows) const
{
PURL::Url tmp;
if ( extension.isEmpty() ) tmp = url.toFileType(PURL::Object);
@@ -107,9 +107,9 @@ QString Project::toSourceObject(const PURL::Url &url, const QString &extension,
return tmp.relativeTo(directory(), forWindows ? PURL::WindowsSeparator : PURL::UnixSeparator);
}
-QStringList Project::objectsForLinker(const QString &extension, bool forWindows) const
+TQStringList Project::objectsForLinker(const TQString &extension, bool forWindows) const
{
- QStringList objs;
+ TQStringList objs;
// objects files corresponding to src files
PURL::UrlList files = absoluteFiles();
PURL::UrlList::const_iterator it;
@@ -121,9 +121,9 @@ QStringList Project::objectsForLinker(const QString &extension, bool forWindows)
return objs;
}
-QStringList Project::librariesForLinker(const QString &prefix, bool forWindows) const
+TQStringList Project::librariesForLinker(const TQString &prefix, bool forWindows) const
{
- QStringList libs;
+ TQStringList libs;
PURL::UrlList files = absoluteFiles();
PURL::UrlList::const_iterator it;
for (it=files.begin(); it!=files.end(); ++it)
@@ -131,11 +131,11 @@ QStringList Project::librariesForLinker(const QString &prefix, bool forWindows)
return libs;
}
-QString Project::version() const
+TQString Project::version() const
{
return Compile::Config::globalValue(this, "version", "0.1");
}
-void Project::setVersion(const QString &version)
+void Project::setVersion(const TQString &version)
{
Compile::Config::setGlobalValue(this, "version", version);
}
@@ -149,18 +149,18 @@ void Project::setOutputType(Tool::OutputType type)
Compile::Config::setGlobalValue(this, "output_type", type.key());
}
-QString Project::description() const
+TQString Project::description() const
{
- return Compile::Config::globalValue(this, "description", QString::null);
+ return Compile::Config::globalValue(this, "description", TQString());
}
-void Project::setDescription(const QString &description)
+void Project::setDescription(const TQString &description)
{
Compile::Config::setGlobalValue(this, "description", description);
}
PURL::Url Project::customLinkerScript() const
{
- QString s = Compile::Config::globalValue(this, "custom_linker_script", QString::null);
+ TQString s = Compile::Config::globalValue(this, "custom_linker_script", TQString());
return PURL::Url::fromPathOrUrl(s);
}
void Project::setCustomLinkerScript(const PURL::Url &url)
@@ -168,33 +168,33 @@ void Project::setCustomLinkerScript(const PURL::Url &url)
Compile::Config::setGlobalValue(this, "custom_linker_script", url.filepath());
}
-QValueList<Register::TypeData> Project::watchedRegisters() const
+TQValueList<Register::TypeData> Project::watchedRegisters() const
{
- QValueList<Register::TypeData> watched;
- QStringList list = listValues("general", "watched_registers", QStringList());
- QStringList::const_iterator it;
+ TQValueList<Register::TypeData> watched;
+ TQStringList list = listValues("general", "watched_registers", TQStringList());
+ TQStringList::const_iterator it;
for (it=list.begin(); it!=list.end(); ++it) {
Register::TypeData rtd = Register::TypeData::fromString(*it);
if ( rtd.type()!=Register::Invalid ) watched.append(rtd);
}
return watched;
}
-void Project::setWatchedRegisters(const QValueList<Register::TypeData> &watched)
+void Project::setWatchedRegisters(const TQValueList<Register::TypeData> &watched)
{
clearList("general", "watched_registers");
- QValueList<Register::TypeData>::const_iterator it;
+ TQValueList<Register::TypeData>::const_iterator it;
for (it=watched.begin(); it!=watched.end(); ++it)
appendListValue("general", "watched_registers", (*it).toString());
}
-QValueList<uint> Project::bookmarkLines(const PURL::Url &url) const
+TQValueList<uint> Project::bookmarkLines(const PURL::Url &url) const
{
- QValueList<uint> lines;
- QStringList list = listValues("editors", "bookmarks", QStringList());
- QStringList::const_iterator it;
+ TQValueList<uint> lines;
+ TQStringList list = listValues("editors", "bookmarks", TQStringList());
+ TQStringList::const_iterator it;
for (it=list.begin(); it!=list.end(); ++it) {
- QStringList slist = QStringList::split(",", *it);
- QStringList::const_iterator sit = slist.begin();
+ TQStringList slist = TQStringList::split(",", *it);
+ TQStringList::const_iterator sit = slist.begin();
if ( sit==slist.end() || (*sit)!=url.kurl().url() ) continue;
for (; sit!=slist.end(); ++sit) {
bool ok;
@@ -206,20 +206,20 @@ QValueList<uint> Project::bookmarkLines(const PURL::Url &url) const
}
return lines;
}
-void Project::setBookmarkLines(const PURL::Url &url, const QValueList<uint> &lines)
+void Project::setBookmarkLines(const PURL::Url &url, const TQValueList<uint> &lines)
{
- QStringList list = listValues("editors", "bookmarks", QStringList());
- QStringList nlist;
- QStringList::const_iterator it;
+ TQStringList list = listValues("editors", "bookmarks", TQStringList());
+ TQStringList nlist;
+ TQStringList::const_iterator it;
for (it=list.begin(); it!=list.end(); ++it) {
- QStringList slist = QStringList::split(",", *it);
- QStringList::const_iterator sit = slist.begin();
+ TQStringList slist = TQStringList::split(",", *it);
+ TQStringList::const_iterator sit = slist.begin();
if ( sit!=slist.end() && slist.count()>1 && (*sit)!=url.kurl().url() ) nlist += *it;
}
if ( lines.count()!=0 ) {
- QStringList slist = url.kurl().url();
- QValueList<uint>::const_iterator lit;
- for (lit=lines.begin(); lit!=lines.end(); ++lit) slist += QString::number(*lit);
+ TQStringList slist = url.kurl().url();
+ TQValueList<uint>::const_iterator lit;
+ for (lit=lines.begin(); lit!=lines.end(); ++lit) slist += TQString::number(*lit);
nlist += slist.join(",");
}
setListValues("editors", "bookmarks", nlist);
diff --git a/src/libgui/project.h b/src/libgui/project.h
index 0dfdeab..b8bf491 100644
--- a/src/libgui/project.h
+++ b/src/libgui/project.h
@@ -18,32 +18,32 @@ class Project : public XmlDataFile
{
public:
Project(const PURL::Url &url) : XmlDataFile(url, "piklab") {}
- virtual bool load(QString &error);
+ virtual bool load(TQString &error);
PURL::Directory directory() const { return url().directory(); }
- QString name() const { return url().basename(); }
+ TQString name() const { return url().basename(); }
PURL::UrlList absoluteFiles() const;
- QString version() const;
- QString description() const;
+ TQString version() const;
+ TQString description() const;
Tool::OutputType outputType() const;
PURL::UrlList openedFiles() const;
PURL::Url customLinkerScript() const;
- QValueList<Register::TypeData> watchedRegisters() const;
- QString toSourceObject(const PURL::Url &url, const QString &extension, bool forWindows) const;
- QStringList objectsForLinker(const QString &extension, bool forWindows) const;
- QStringList librariesForLinker(const QString &prefix, bool forWindows) const;
- QValueList<uint> bookmarkLines(const PURL::Url &url) const; // absolute filepath
+ TQValueList<Register::TypeData> watchedRegisters() const;
+ TQString toSourceObject(const PURL::Url &url, const TQString &extension, bool forWindows) const;
+ TQStringList objectsForLinker(const TQString &extension, bool forWindows) const;
+ TQStringList librariesForLinker(const TQString &prefix, bool forWindows) const;
+ TQValueList<uint> bookmarkLines(const PURL::Url &url) const; // absolute filepath
void removeFile(const PURL::Url &url); // take absolute filepath (but inside project dir)
void addFile(const PURL::Url &url); // take absolute filePath (but inside project dir)
void clearFiles();
- void setVersion(const QString &version);
- void setDescription(const QString &description);
+ void setVersion(const TQString &version);
+ void setDescription(const TQString &description);
void setOutputType(Tool::OutputType type);
void setOpenedFiles(const PURL::UrlList &list);
void setCustomLinkerScript(const PURL::Url &url);
- void setWatchedRegisters(const QValueList<Register::TypeData> &watched);
- void setBookmarkLines(const PURL::Url &url, const QValueList<uint> &lines); // absolute filepath
+ void setWatchedRegisters(const TQValueList<Register::TypeData> &watched);
+ void setBookmarkLines(const PURL::Url &url, const TQValueList<uint> &lines); // absolute filepath
};
#endif
diff --git a/src/libgui/project_editor.cpp b/src/libgui/project_editor.cpp
index 4b86429..bfb2d8c 100644
--- a/src/libgui/project_editor.cpp
+++ b/src/libgui/project_editor.cpp
@@ -9,41 +9,41 @@
***************************************************************************/
#include "project_editor.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include "project.h"
#include "tools/list/compile_config.h"
#include "device_gui.h"
-ProjectEditor::ProjectEditor(Project &project, QWidget *parent)
- : Dialog(parent, "project_options", true, i18n("Project Options"), Ok|Cancel, Ok, false),
+ProjectEditor::ProjectEditor(Project &project, TQWidget *tqparent)
+ : Dialog(tqparent, "project_options", true, i18n("Project Options"), Ok|Cancel, Ok, false),
_project(project)
{
- QVBoxLayout *top = new QVBoxLayout(mainWidget(), 0, 10);
+ TQVBoxLayout *top = new TQVBoxLayout(mainWidget(), 0, 10);
TabWidget *tabWidget = new TabWidget(mainWidget());
top->addWidget(tabWidget);
// global
- QWidget *tab = new QWidget(tabWidget);
+ TQWidget *tab = new TQWidget(tabWidget);
tabWidget->addTab(tab, i18n("General"));
- QGridLayout *grid = new QGridLayout(tab, 0, 0, 10, 10);
- QLabel *label = new QLabel(i18n("Name:"), tab);
+ TQGridLayout *grid = new TQGridLayout(tab, 0, 0, 10, 10);
+ TQLabel *label = new TQLabel(i18n("Name:"), tab);
grid->addWidget(label, 0, 0);
- label = new QLabel(project.name(), tab);
+ label = new TQLabel(project.name(), tab);
grid->addWidget(label, 0, 1);
- label = new QLabel(i18n("Description:"), tab);
+ label = new TQLabel(i18n("Description:"), tab);
grid->addWidget(label, 1, 0);
- _description = new QTextEdit(tab);
+ _description = new TQTextEdit(tab);
_description->setText(_project.description());
grid->addMultiCellWidget(_description, 1,1, 1,2);
- label = new QLabel(i18n("Version:"), tab);
+ label = new TQLabel(i18n("Version:"), tab);
grid->addWidget(label, 2, 0);
- _version = new QLineEdit(tab);
+ _version = new TQLineEdit(tab);
_version->setText(_project.version());
grid->addWidget(_version, 2, 1);
- label = new QLabel(i18n("Device:"), tab);
+ label = new TQLabel(i18n("Device:"), tab);
grid->addWidget(label, 3, 0);
_device = new DeviceChooser::Button(false, tab);
_device->setDevice(Compile::Config::device(&_project));
@@ -52,9 +52,9 @@ ProjectEditor::ProjectEditor(Project &project, QWidget *parent)
grid->setColStretch(2, 1);
// toochain
- tab = new QWidget(tabWidget);
+ tab = new TQWidget(tabWidget);
tabWidget->addTab(tab, i18n("Toochain"));
- grid = new QGridLayout(tab, 0, 0, 10, 10);
+ grid = new TQGridLayout(tab, 0, 0, 10, 10);
_tools = new ToolsConfigWidget(&project, tab);
_tools->loadConfig();
grid->addMultiCellWidget(_tools, 0,0, 0,2);
diff --git a/src/libgui/project_editor.h b/src/libgui/project_editor.h
index 5e83fe2..8ae4df6 100644
--- a/src/libgui/project_editor.h
+++ b/src/libgui/project_editor.h
@@ -17,10 +17,10 @@
#ifndef PROJECT_EDITOR_H
#define PROJECT_EDITOR_H
-#include <qtextedit.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qwidgetstack.h>
+#include <tqtextedit.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqwidgetstack.h>
#include "tools/list/tools_config_widget.h"
#include "common/gui/misc_gui.h"
@@ -30,16 +30,17 @@ namespace DeviceChooser { class Button; }
class ProjectEditor : public Dialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- ProjectEditor(Project &project, QWidget *parent);
+ ProjectEditor(Project &project, TQWidget *tqparent);
private slots:
virtual void slotOk();
private:
Project &_project;
- QTextEdit *_description;
- QLineEdit *_version;
+ TQTextEdit *_description;
+ TQLineEdit *_version;
DeviceChooser::Button *_device;
ToolsConfigWidget *_tools;
};
diff --git a/src/libgui/project_manager.cpp b/src/libgui/project_manager.cpp
index dcc4941..e606370 100644
--- a/src/libgui/project_manager.cpp
+++ b/src/libgui/project_manager.cpp
@@ -9,11 +9,11 @@
***************************************************************************/
#include "project_manager.h"
-#include <qdragobject.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qtimer.h>
-#include <qheader.h>
+#include <tqdragobject.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
+#include <tqheader.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -35,26 +35,26 @@
#include "device_gui.h"
//----------------------------------------------------------------------------
-ProjectManager::View::View(QWidget *parent)
- : ListView(parent, "project_manager"), _project(0), _modified(false)
+ProjectManager::View::View(TQWidget *tqparent)
+ : ListView(tqparent, "project_manager"), _project(0), _modified(false)
{
- connect(this, SIGNAL(mouseButtonClicked(int, QListViewItem *, const QPoint &, int)),
- SLOT(clicked(int, QListViewItem *, const QPoint &, int)));
- connect(this, SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)),
- SLOT(contextMenu(QListViewItem *, const QPoint &, int)));
- connect(this, SIGNAL(itemRenamed(QListViewItem *, int, const QString &)),
- SLOT(renamed(QListViewItem *, int, const QString &)));
- connect(this, SIGNAL(moved()), SLOT(filesReordered()));
+ connect(TQT_TQOBJECT(this), TQT_SIGNAL(mouseButtonClicked(int, TQListViewItem *, const TQPoint &, int)),
+ TQT_SLOT(clicked(int, TQListViewItem *, const TQPoint &, int)));
+ connect(TQT_TQOBJECT(this), TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)),
+ TQT_SLOT(contextMenu(TQListViewItem *, const TQPoint &, int)));
+ connect(TQT_TQOBJECT(this), TQT_SIGNAL(itemRenamed(TQListViewItem *, int, const TQString &)),
+ TQT_SLOT(renamed(TQListViewItem *, int, const TQString &)));
+ connect(TQT_TQOBJECT(this), TQT_SIGNAL(moved()), TQT_SLOT(filesReordered()));
header()->hide();
setSorting(-1);
- addColumn(QString::null, 170);
+ addColumn(TQString(), 170);
setFullWidth(true);
setRootIsDecorated(false);
setAcceptDrops(true);
setDragEnabled(true);
setDropVisualizer(true);
- QTimer::singleShot(0, this, SLOT(init()));;
+ TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(init()));;
}
ProjectManager::View::~View()
@@ -77,7 +77,7 @@ void ProjectManager::View::init()
ProjectManager::HeaderItem *ProjectManager::View::findHeaderItem(Group group) const
{
- QListViewItemIterator it(const_cast<View *>(this));
+ TQListViewItemIterator it(const_cast<View *>(this));
for(; it.current(); ++it) {
if ( it.current()->rtti()!=HeaderRtti ) continue;
HeaderItem *hi = static_cast<HeaderItem *>(it.current());
@@ -106,7 +106,7 @@ ProjectManager::HeaderItem *ProjectManager::View::headerItem(Group group)
ProjectManager::FileItem *ProjectManager::View::findFileItem(const PURL::Url &url) const
{
- QListViewItemIterator it(const_cast<View *>(this));
+ TQListViewItemIterator it(const_cast<View *>(this));
for(; it.current(); ++it) {
if ( it.current()->rtti()!=FileRtti ) continue;
FileItem *fi = static_cast<FileItem *>(it.current());
@@ -117,7 +117,7 @@ ProjectManager::FileItem *ProjectManager::View::findFileItem(const PURL::Url &ur
ProjectManager::FileItem *ProjectManager::View::findFileItem(PURL::FileType type) const
{
- QListViewItemIterator it(const_cast<View *>(this));
+ TQListViewItemIterator it(const_cast<View *>(this));
for(; it.current(); ++it) {
if ( it.current()->rtti()!=FileRtti ) continue;
FileItem *fi = static_cast<FileItem *>(it.current());
@@ -126,9 +126,9 @@ ProjectManager::FileItem *ProjectManager::View::findFileItem(PURL::FileType type
return 0;
}
-QListViewItem *ProjectManager::View::findItem(const QString &tag) const
+TQListViewItem *ProjectManager::View::findItem(const TQString &tag) const
{
- QListViewItemIterator it(const_cast<View *>(this));
+ TQListViewItemIterator it(const_cast<View *>(this));
for(; it.current(); ++it) {
switch (Rtti(it.current()->rtti())) {
case RootRtti:
@@ -145,14 +145,14 @@ QListViewItem *ProjectManager::View::findItem(const QString &tag) const
void ProjectManager::View::select(const Editor *e)
{
- QListViewItem *item = 0;
+ TQListViewItem *item = 0;
if ( e->url().isEmpty() ) item = findItem(e->tag());
else item = findFileItem(e->url());
if (item) setSelected(item, true);
else clearSelection();
}
-void ProjectManager::View::contextMenu(QListViewItem *item, const QPoint &p, int)
+void ProjectManager::View::contextMenu(TQListViewItem *item, const TQPoint &p, int)
{
if ( item==0 ) return;
@@ -178,8 +178,8 @@ void ProjectManager::View::contextMenu(QListViewItem *item, const QPoint &p, int
RootItem *ri = static_cast<RootItem *>(item);
if ( _project==0 ) {
if ( ri->url().isEmpty() ) {
- pop.insertItem("piklab_createproject", i18n("New Project..."), &Main::toplevel(), SLOT(newProject()));
- pop.insertItem("piklab_openproject", i18n("Open Project..."), &Main::toplevel(), SLOT(openProject()));
+ pop.insertItem("piklab_createproject", i18n("New Project..."), TQT_TQOBJECT(&Main::toplevel()), TQT_SLOT(newProject()));
+ pop.insertItem("piklab_openproject", i18n("Open Project..."), TQT_TQOBJECT(&Main::toplevel()), TQT_SLOT(openProject()));
pop.exec(p);
} else {
pop.insertTitle(i18n("Standalone File"));
@@ -188,16 +188,16 @@ void ProjectManager::View::contextMenu(QListViewItem *item, const QPoint &p, int
}
} else {
pop.insertTitle(i18n("Project"));
- pop.insertItem("configure", i18n("Options..."), &Main::toplevel(), SLOT(configureProject()));
- pop.insertItem("find", i18n("Find Files..."), &Main::toplevel(), SLOT(runKfind()));
+ pop.insertItem("configure", i18n("Options..."), TQT_TQOBJECT(&Main::toplevel()), TQT_SLOT(configureProject()));
+ pop.insertItem("tqfind", i18n("Find Files..."), TQT_TQOBJECT(&Main::toplevel()), TQT_SLOT(runKtqfind()));
pop.insertSeparator();
- pop.insertItem("piklab_compile", i18n("Build Project"), &Main::toplevel(), SLOT(buildProject()));
- pop.insertItem("trashcan_empty", i18n("Clean Project"), &Main::toplevel(), SLOT(cleanBuild()));
+ pop.insertItem("piklab_compile", i18n("Build Project"), TQT_TQOBJECT(&Main::toplevel()), TQT_SLOT(buildProject()));
+ pop.insertItem("trashcan_empty", i18n("Clean Project"), TQT_TQOBJECT(&Main::toplevel()), TQT_SLOT(cleanBuild()));
pop.insertSeparator();
- pop.insertItem("filenew", i18n("New Source File..."), &Main::toplevel(), SLOT(newSourceFile()));
- pop.insertItem("piklab_addfile", i18n("Add Source Files..."), this, SLOT(insertSourceFiles()));
- pop.insertItem("piklab_addfile", i18n("Add Object Files..."), this, SLOT(insertObjectFiles()));
- if ( Main::currentEditor() ) pop.insertItem("piklab_addcurrentfile", i18n("Add Current File"), this, SLOT(insertCurrentFile()));
+ pop.insertItem("filenew", i18n("New Source File..."), TQT_TQOBJECT(&Main::toplevel()), TQT_SLOT(newSourceFile()));
+ pop.insertItem("piklab_addfile", i18n("Add Source Files..."), TQT_TQOBJECT(this), TQT_SLOT(insertSourceFiles()));
+ pop.insertItem("piklab_addfile", i18n("Add Object Files..."), TQT_TQOBJECT(this), TQT_SLOT(insertObjectFiles()));
+ if ( Main::currentEditor() ) pop.insertItem("piklab_addcurrentfile", i18n("Add Current File"), TQT_TQOBJECT(this), TQT_SLOT(insertCurrentFile()));
pop.exec(p);
}
} else if ( item->rtti()==FileRtti ) {
@@ -211,15 +211,15 @@ void ProjectManager::View::contextMenu(QListViewItem *item, const QPoint &p, int
if ( _project==0 ) return;
if ( group==LinkerObjectGroup ) {
pop.insertTitle(i18n("Objects"));
- pop.insertItem("piklab_addfile", i18n("Add Object Files..."), this, SLOT(insertObjectFiles()));
+ pop.insertItem("piklab_addfile", i18n("Add Object Files..."), TQT_TQOBJECT(this), TQT_SLOT(insertObjectFiles()));
pop.exec(p);
} else if ( group==SourceGroup || group==HeaderGroup ) {
pop.insertTitle(i18n("Sources"));
- pop.insertItem("filenew", i18n("New File..."), &Main::toplevel(), SLOT(newSourceFile()));
- pop.insertItem("piklab_addfile", i18n("Add Source Files..."), this, SLOT(insertSourceFiles()));
+ pop.insertItem("filenew", i18n("New File..."), TQT_TQOBJECT(&Main::toplevel()), TQT_SLOT(newSourceFile()));
+ pop.insertItem("piklab_addfile", i18n("Add Source Files..."), TQT_TQOBJECT(this), TQT_SLOT(insertSourceFiles()));
pop.exec(p);
} else if ( group==DeviceGroup ) {
- pop.insertItem("filenew", i18n("Select Device..."), &Main::toplevel(), SLOT(showDeviceInfo()));
+ pop.insertItem("filenew", i18n("Select Device..."), TQT_TQOBJECT(&Main::toplevel()), TQT_SLOT(showDeviceInfo()));
pop.exec(p);
}
}
@@ -240,9 +240,9 @@ void ProjectManager::View::closeProject()
_project->setOpenedFiles(opened);
// save watched registers
_project->setWatchedRegisters(Register::list().watched());
- QString error;
+ TQString error;
if ( !_project->save(error) )
- MessageBox::detailedSorry(i18n("Could not save project file \"%1\".").arg(_project->url().pretty()), error, Log::Show);
+ MessageBox::detailedSorry(i18n("Could not save project file \"%1\".").tqarg(_project->url().pretty()), error, Log::Show);
delete _project;
_project = 0;
}
@@ -252,8 +252,8 @@ void ProjectManager::View::closeProject()
void ProjectManager::View::addExternalFiles()
{
- const QMap<PURL::Url, FileOrigin> &ext = projectData().externals;
- QMap<PURL::Url, FileOrigin>::const_iterator it;
+ const TQMap<PURL::Url, FileOrigin> &ext = projectData().externals;
+ TQMap<PURL::Url, FileOrigin>::const_iterator it;
for (it=ext.begin(); it!=ext.end(); ++it) {
if ( !it.key().exists() ) continue;
addFile(it.key(), it.key().fileType(), it.data());
@@ -272,9 +272,9 @@ void ProjectManager::View::setStandalone(const PURL::Url &url, PURL::FileType ty
PURL::Url ProjectManager::View::standaloneGenerator(const PURL::Url &url, PURL::FileType &type) const
{
- QMap<PURL::Url, ProjectData>::const_iterator it;
+ TQMap<PURL::Url, ProjectData>::const_iterator it;
for (it=_standaloneData.begin(); it!=_standaloneData.end(); ++it) {
- if ( !it.data().externals.contains(url) ) continue;
+ if ( !it.data().externals.tqcontains(url) ) continue;
if ( !it.key().exists() ) continue;
type = it.data().type;
return it.key();
@@ -304,25 +304,25 @@ void ProjectManager::View::insertObjectFiles()
void ProjectManager::View::insertFile(const PURL::Url &url)
{
if ( !url.exists() ) {
- MessageBox::detailedSorry(i18n("Could not find file."), i18n("File: %1").arg(url.pretty()), Log::Show);
+ MessageBox::detailedSorry(i18n("Could not find file."), i18n("File: %1").tqarg(url.pretty()), Log::Show);
return;
}
PURL::Url purl = url;
MessageBox::Result copy = MessageBox::No;
if ( !url.isInto(_project->directory()) ) {
- copy = MessageBox::questionYesNoCancel(i18n("File \"%1\" is not inside the project directory. Do you want to copy the file to your project directory?").arg(url.pretty()),
+ copy = MessageBox::questionYesNoCancel(i18n("File \"%1\" is not inside the project directory. Do you want to copy the file to your project directory?").tqarg(url.pretty()),
i18n("Copy and Add"), i18n("Add only"));
if ( copy==MessageBox::Cancel ) return;
if ( copy==MessageBox::Yes ) purl = PURL::Url(_project->directory(), url.filename());
}
- if ( _project->absoluteFiles().contains(purl) ) {
- MessageBox::detailedSorry(i18n("File is already in the project."), i18n("File: %1").arg(purl.pretty()), Log::Show);
+ if ( _project->absoluteFiles().tqcontains(purl) ) {
+ MessageBox::detailedSorry(i18n("File is already in the project."), i18n("File: %1").tqarg(purl.pretty()), Log::Show);
return;
}
if ( copy==MessageBox::Yes ) {
Log::StringView sview;
if ( !url.copyTo(purl, sview) ) {
- MessageBox::detailedSorry(i18n("Copying file to project directory failed."), i18n("File: %1\n").arg(url.pretty()) + sview.string(), Log::Show);
+ MessageBox::detailedSorry(i18n("Copying file to project directory failed."), i18n("File: %1\n").tqarg(url.pretty()) + sview.string(), Log::Show);
return;
}
}
@@ -356,8 +356,8 @@ ProjectManager::View::ProjectData &ProjectManager::View::projectData()
void ProjectManager::View::addFile(const PURL::Url &url, PURL::FileType type, FileOrigin origin)
{
- if ( contains(url) ) return;
- QMap<PURL::Url, FileOrigin> &ext = projectData().externals;
+ if ( tqcontains(url) ) return;
+ TQMap<PURL::Url, FileOrigin> &ext = projectData().externals;
if ( type.data().group==PURL::LinkerScript && _linkerScriptItem ) {
_linkerScriptItem->set(url);
ext[url] = Included;
@@ -371,12 +371,12 @@ void ProjectManager::View::addFile(const PURL::Url &url, PURL::FileType type, Fi
case Included: grp = IncludedGroup; break;
}
HeaderItem *hitem = headerItem(grp);
- QListViewItem *item = new FileItem(hitem, type, url, origin!=Intrinsic);
+ TQListViewItem *item = new FileItem(hitem, type, url, origin!=Intrinsic);
item->moveItem(hitem->lastChild());
ensureItemVisible(item);
if ( origin!=Intrinsic ) ext[url] = origin;
if ( type==PURL::Hex && _project==0 ) {
- QString extension = PURL::extension(PURL::AsmGPAsm);
+ TQString extension = PURL::extension(PURL::AsmGPAsm);
PURL::Url durl = PURL::Url::fromPathOrUrl("<" + (url.isEmpty() ? i18n("Disassembly") : url.appendExtension(extension).filename()) + ">");
if ( findFileItem(durl)==0 ) {
(void)new FileItem(headerItem(ViewGroup), PURL::Coff, durl, true);
@@ -388,8 +388,8 @@ void ProjectManager::View::addFile(const PURL::Url &url, PURL::FileType type, Fi
void ProjectManager::View::removeExternalFiles()
{
- QMap<PURL::Url, FileOrigin> &ext = projectData().externals;
- QMap<PURL::Url, FileOrigin>::const_iterator it;
+ TQMap<PURL::Url, FileOrigin> &ext = projectData().externals;
+ TQMap<PURL::Url, FileOrigin>::const_iterator it;
for (it=ext.begin(); it!=ext.end(); ++it) {
Main::editorManager().closeEditor(it.key());
removeFile(it.key());
@@ -403,17 +403,17 @@ void ProjectManager::View::removeFile(const PURL::Url &url)
if ( _project && !isExternalFile(url) ) _project->removeFile(url);
FileItem *item = findFileItem(url);
if ( item==0 ) return;
- HeaderItem *group = static_cast<HeaderItem *>(item->parent());
+ HeaderItem *group = static_cast<HeaderItem *>(item->tqparent());
delete item;
if ( group->childCount()==0 ) delete group;
_modified = true;
emit guiChanged();
}
-void ProjectManager::View::clicked(int button, QListViewItem *item, const QPoint &, int)
+void ProjectManager::View::clicked(int button, TQListViewItem *item, const TQPoint &, int)
{
if ( item==0 ) return;
- if ( button!=LeftButton ) return;
+ if ( button!=Qt::LeftButton ) return;
const Device::Data *data = Main::deviceData();
Rtti rtti = Rtti(item->rtti());
if ( data==0 && rtti!=DeviceRtti && rtti!=RootRtti ) {
@@ -421,7 +421,7 @@ void ProjectManager::View::clicked(int button, QListViewItem *item, const QPoint
return;
}
Editor *e = 0;
- ::BusyCursor bc;
+ ::PBusyCursor bc;
switch (rtti) {
case RootRtti:
Main::toplevel().configureProject();
@@ -458,7 +458,7 @@ void ProjectManager::View::clicked(int button, QListViewItem *item, const QPoint
if ( fi->ftype()==PURL::Coff && _project==0 && !fi->url().exists() ) {
PURL::Url url = findFileItem(PURL::Hex)->url();
if ( url.isEmpty() ) {
- HexEditor *he = ::qt_cast<HexEditor *>(Main::currentEditor());
+ HexEditor *he = ::tqqt_cast<HexEditor *>(Main::currentEditor());
if ( he==0 ) break;
e = new DisassemblyEditor(*he, *data, this);
} else e = new DisassemblyEditor(url, *data, this);
@@ -487,7 +487,7 @@ void ProjectManager::View::insertCurrentFile()
bool ProjectManager::View::editProject()
{
ProjectEditor dialog(*_project, this);
- if ( dialog.exec()!=QDialog::Accepted ) return false;
+ if ( dialog.exec()!=TQDialog::Accepted ) return false;
_modified = true;
if (_linkerScriptItem) _linkerScriptItem->init();
return true;
@@ -496,9 +496,9 @@ bool ProjectManager::View::editProject()
bool ProjectManager::View::newProject()
{
ProjectWizard wizard(this);
- if ( wizard.exec()==QDialog::Rejected ) return false;
+ if ( wizard.exec()==TQDialog::Rejected ) return false;
closeProject();
- QString error;
+ TQString error;
if ( !wizard.project()->save(error) ) {
MessageBox::detailedSorry(i18n("Failed to create new project file"), error, Log::Show);
return false;
@@ -526,7 +526,7 @@ bool ProjectManager::View::openProject(const PURL::Url &url)
if ( reload && !MessageBox::askContinue(i18n("Project already loaded. Reload?"), i18n("Reload")) ) return false;
static_cast< KRecentFilesAction *>(Main::action("project_open_recent"))->removeURL(url.kurl());
Project *p = new Project(url);
- QString error;
+ TQString error;
if ( !p->load(error) ) {
MessageBox::detailedSorry(i18n("Could not open project file."), error, Log::Show);
delete p;
@@ -542,8 +542,8 @@ bool ProjectManager::View::openProject(const PURL::Url &url)
files = _project->openedFiles();
for(it = files.begin(); it!=files.end(); ++it) Main::editorManager().openFile(*it);
Register::list().init();
- QValueList<Register::TypeData> watched = _project->watchedRegisters();
- QValueList<Register::TypeData>::const_iterator wit;
+ TQValueList<Register::TypeData> watched = _project->watchedRegisters();
+ TQValueList<Register::TypeData>::const_iterator wit;
for (wit=watched.begin(); wit!=watched.end(); ++wit) Register::list().setWatched(*wit, true);
return true;
}
@@ -551,7 +551,7 @@ bool ProjectManager::View::openProject(const PURL::Url &url)
bool ProjectManager::View::isExternalFile(const PURL::Url &url) const
{
if ( projectUrl().isEmpty() ) return false;
- return projectData().externals.contains(url);
+ return projectData().externals.tqcontains(url);
}
void ProjectManager::View::modified(const PURL::Url &url)
@@ -560,7 +560,7 @@ void ProjectManager::View::modified(const PURL::Url &url)
if ( item && !isExternalFile(url) ) _modified = true;
}
-void ProjectManager::View::renamed(QListViewItem *item, int, const QString &text)
+void ProjectManager::View::renamed(TQListViewItem *item, int, const TQString &text)
{
Q_ASSERT ( item->rtti()==DeviceRtti );
Main::toplevel().setDevice(text);
@@ -571,23 +571,23 @@ void ProjectManager::View::updateGUI()
_deviceItem->updateText();
}
-QDragObject *ProjectManager::View::dragObject()
+TQDragObject *ProjectManager::View::dragObject()
{
if ( currentItem()==0 || currentItem()->rtti()!=FileRtti ) return 0;
const FileItem *item = static_cast<const FileItem *>(currentItem());
- const HeaderItem *hitem = static_cast<const HeaderItem *>(item->parent());
+ const HeaderItem *hitem = static_cast<const HeaderItem *>(item->tqparent());
if ( hitem->group()!=SourceGroup ) return 0;
- QStrList uris;
- uris.append(QUriDrag::localFileToUri(item->url().filepath()));
- return new QUriDrag(uris, viewport());
+ TQStrList uris;
+ uris.append(TQUriDrag::localFileToUri(item->url().filepath()));
+ return new TQUriDrag(uris, viewport());
}
-bool ProjectManager::View::acceptDrag(QDropEvent* e) const
+bool ProjectManager::View::acceptDrag(TQDropEvent* e) const
{
if ( e->source()!=viewport() ) return false;
- const QListViewItem *item = itemAt(e->pos());
+ const TQListViewItem *item = itemAt(e->pos());
if ( item==0 || item->rtti()!=FileRtti ) return false;
- const HeaderItem *hitem = static_cast<const HeaderItem *>(item->parent());
+ const HeaderItem *hitem = static_cast<const HeaderItem *>(item->tqparent());
return ( hitem->group()==SourceGroup );
}
@@ -595,12 +595,12 @@ void ProjectManager::View::filesReordered()
{
if ( _project==0 ) return;
_project->clearFiles();
- QListViewItem *item = headerItem(SourceGroup)->firstChild();
+ TQListViewItem *item = headerItem(SourceGroup)->firstChild();
for (;item; item=item->nextSibling())
_project->addFile(static_cast<FileItem *>(item)->url());
}
-QString ProjectManager::View::tooltip(QListViewItem *item, int) const
+TQString ProjectManager::View::tooltip(TQListViewItem *item, int) const
{
switch (Rtti(item->rtti())) {
case RootRtti:
@@ -610,12 +610,12 @@ QString ProjectManager::View::tooltip(QListViewItem *item, int) const
case RegisterRtti:
case HeaderRtti: break;
}
- return QString::null;
+ return TQString();
}
PURL::Url ProjectManager::View::linkerScriptUrl() const
{
- QListViewItemIterator it(const_cast<View *>(this));
+ TQListViewItemIterator it(const_cast<View *>(this));
for(; it.current(); ++it) {
if ( it.current()->rtti()!=LinkerScriptRtti ) continue;
return static_cast<LinkerScriptItem *>(it.current())->url();
@@ -627,14 +627,14 @@ bool ProjectManager::View::needsRecompile() const
{
// ### this could be perfected...
PURL::Url output = projectUrl().toFileType(PURL::Hex);
- QDateTime outputLastModified;
+ TQDateTime outputLastModified;
if ( !output.exists(&outputLastModified) ) return true;
PURL::UrlList files;
if ( Main::project() ) files = Main::project()->absoluteFiles();
else files.append(projectUrl());
PURL::UrlList::const_iterator it;
for (it=files.begin(); it!=files.end(); ++it) {
- QDateTime lastModified;
+ TQDateTime lastModified;
if ( !(*it).exists(&lastModified) ) continue;
if ( lastModified>outputLastModified ) return true;
}
@@ -643,7 +643,7 @@ bool ProjectManager::View::needsRecompile() const
PURL::Url ProjectManager::View::selectedUrl() const
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if ( item==0 ) return PURL::Url();
Rtti rtti = Rtti(item->rtti());
if ( rtti!=FileRtti ) return PURL::Url();
diff --git a/src/libgui/project_manager.h b/src/libgui/project_manager.h
index 2939f33..6151713 100644
--- a/src/libgui/project_manager.h
+++ b/src/libgui/project_manager.h
@@ -24,8 +24,9 @@ namespace ProjectManager
class View : public ListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- View(QWidget *parent);
+ View(TQWidget *tqparent);
virtual ~View();
bool editProject();
@@ -43,7 +44,7 @@ public:
void removeFile(const PURL::Url &url);
void select(const Editor *e);
void insertFile(const PURL::Url &url);
- bool contains(const PURL::Url &url) const { return findFileItem(url); }
+ bool tqcontains(const PURL::Url &url) const { return findFileItem(url); }
void addExternalFile(const PURL::Url &url, FileOrigin fileOrigin);
bool isExternalFile(const PURL::Url &url) const;
void removeExternalFiles();
@@ -60,9 +61,9 @@ public slots:
private slots:
void init();
- void contextMenu(QListViewItem *item, const QPoint &pos, int column);
- void clicked(int button, QListViewItem *item, const QPoint &pos, int column);
- void renamed(QListViewItem *item, int column, const QString &text);
+ void contextMenu(TQListViewItem *item, const TQPoint &pos, int column);
+ void clicked(int button, TQListViewItem *item, const TQPoint &pos, int column);
+ void renamed(TQListViewItem *item, int column, const TQString &text);
void modified(const PURL::Url &url);
void filesReordered();
@@ -77,9 +78,9 @@ private:
class ProjectData {
public:
PURL::FileType type;
- QMap<PURL::Url, FileOrigin> externals;
+ TQMap<PURL::Url, FileOrigin> externals;
};
- QMap<PURL::Url, ProjectData> _standaloneData;
+ TQMap<PURL::Url, ProjectData> _standaloneData;
ProjectData _projectData;
bool _modified;
@@ -87,13 +88,13 @@ private:
HeaderItem *headerItem(Group group);
FileItem *findFileItem(const PURL::Url &url) const;
FileItem *findFileItem(PURL::FileType type) const;
- QListViewItem *findItem(const QString &name) const;
- virtual QDragObject *dragObject();
- virtual bool acceptDrag(QDropEvent* e) const;
- virtual QString tooltip(QListViewItem *item, int col) const;
+ TQListViewItem *findItem(const TQString &name) const;
+ virtual TQDragObject *dragObject();
+ virtual bool acceptDrag(TQDropEvent* e) const;
+ virtual TQString tooltip(TQListViewItem *item, int col) const;
void addExternalFiles();
- void rightClicked(QListViewItem *item, const QPoint &pos);
- void leftClicked(QListViewItem *item);
+ void rightClicked(TQListViewItem *item, const TQPoint &pos);
+ void leftClicked(TQListViewItem *item);
void addFile(const PURL::Url &url, PURL::FileType type, FileOrigin origin);
void setProject(Project *project);
void initListView();
diff --git a/src/libgui/project_manager_ui.cpp b/src/libgui/project_manager_ui.cpp
index 235d360..2d2bd15 100644
--- a/src/libgui/project_manager_ui.cpp
+++ b/src/libgui/project_manager_ui.cpp
@@ -9,7 +9,7 @@
***************************************************************************/
#include "project_manager_ui.h"
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kiconloader.h>
#include "project.h"
@@ -19,10 +19,10 @@
#include "device_gui.h"
//----------------------------------------------------------------------------
-void PopupMenu::insertItem(const QString &icon, const QString &label, QObject *receiver, const char *slot)
+void PopupMenu::insertItem(const TQString &icon, const TQString &label, TQObject *receiver, const char *slot)
{
KIconLoader loader;
- QPixmap pixmap = loader.loadIcon(icon, KIcon::Small);
+ TQPixmap pixmap = loader.loadIcon(icon, KIcon::Small);
if (receiver) KPopupMenu::insertItem(pixmap, label, receiver, slot, 0, _index);
else KPopupMenu::insertItem(pixmap, label, _index);
_index++;
@@ -71,9 +71,9 @@ ProjectManager::HeaderItem::HeaderItem(RootItem *item, Group group)
setText(0, i18n(GROUP_LABELS[group]));
}
-QListViewItem *ProjectManager::HeaderItem::lastChild() const
+TQListViewItem *ProjectManager::HeaderItem::lastChild() const
{
- QListViewItem *item = firstChild();
+ TQListViewItem *item = firstChild();
if ( item==0 ) return 0;
for (;;) {
if ( item->nextSibling()==0 ) break;
@@ -101,7 +101,7 @@ void ProjectManager::FileItem::set(const PURL::Url &url)
case PURL::Project:
case PURL::Nb_FileTypes: Q_ASSERT(false); break;
default: {
- QString s = url.filename();
+ TQString s = url.filename();
if ( _external && group(_ftype)==LinkerScriptGroup )
s += i18n(" (default)");
setText(0, s); break;
@@ -109,10 +109,10 @@ void ProjectManager::FileItem::set(const PURL::Url &url)
}
}
-void ProjectManager::FileItem::paintCell(QPainter *p, const QColorGroup &cg,
+void ProjectManager::FileItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
- QFont f = p->font();
+ TQFont f = p->font();
f.setItalic(group(_ftype)!=ViewGroup && _external);
p->setFont(f);
KListViewItem::paintCell(p, cg, column, width, align);
@@ -122,7 +122,7 @@ ProjectManager::RegisterItem::RegisterItem(HeaderItem *item)
: KListViewItem(item)
{
KIconLoader loader;
- QPixmap chip = loader.loadIcon("piklab_chip", KIcon::Small);
+ TQPixmap chip = loader.loadIcon("piklab_chip", KIcon::Small);
setPixmap(0, chip);
setText(0, i18n("Registers"));
}
@@ -131,18 +131,18 @@ ProjectManager::DeviceItem::DeviceItem(HeaderItem *item)
: EditListViewItem(item)
{}
-QWidget *ProjectManager::DeviceItem::editWidgetFactory(int) const
+TQWidget *ProjectManager::DeviceItem::editWidgetFactory(int) const
{
- QComboBox *combo = new DeviceChooser::ComboBox(Main::project()==0, 0);
- QString device = Main::device();
+ TQComboBox *combo = new DeviceChooser::ComboBox(Main::project()==0, 0);
+ TQString device = Main::device();
if ( device!=Device::AUTO_DATA.name ) combo->setCurrentText(device);
- QObject::connect(combo, SIGNAL(activated(int)), listView(), SLOT(finishRenaming()));
+ TQObject::connect(combo, TQT_SIGNAL(activated(int)), listView(), TQT_SLOT(finishRenaming()));
return combo;
}
void ProjectManager::DeviceItem::updateText()
{
- QString device = Main::device();
+ TQString device = Main::device();
if ( device==Device::AUTO_DATA.name ) {
const Device::Data *data = Main::deviceData();
if (data) device = data->name() + " " + i18n(Device::AUTO_DATA.label);
@@ -163,13 +163,13 @@ void ProjectManager::LinkerScriptItem::init()
PURL::Url lkr;
if ( Main::project() ) lkr = Main::project()->customLinkerScript();
setText(0, lkr.isEmpty() ? i18n("<default>") : lkr.filename());
- setPixmap(0, lkr.isEmpty() ? QPixmap() : PURL::icon(PURL::Lkr));
+ setPixmap(0, lkr.isEmpty() ? TQPixmap() : PURL::icon(PURL::Lkr));
}
void ProjectManager::LinkerScriptItem::set(const PURL::Url &url)
{
_url = url;
- QString s = url.filename();
+ TQString s = url.filename();
PURL::Url lkr;
if ( Main::project() ) lkr = Main::project()->customLinkerScript();
if ( lkr.isEmpty() ) s += i18n(" (default)");
diff --git a/src/libgui/project_manager_ui.h b/src/libgui/project_manager_ui.h
index 012eb64..ea8676e 100644
--- a/src/libgui/project_manager_ui.h
+++ b/src/libgui/project_manager_ui.h
@@ -20,9 +20,10 @@
class PopupMenu : public KPopupMenu
{
Q_OBJECT
+ TQ_OBJECT
public:
PopupMenu() : _index(1) {}
- void insertItem(const QString &icon, const QString &label, QObject *receiver = 0, const char *slot = 0);
+ void insertItem(const TQString &icon, const TQString &label, TQObject *receiver = 0, const char *slot = 0);
private:
uint _index;
@@ -65,7 +66,7 @@ public:
HeaderItem(RootItem *item, Group group);
virtual int rtti() const { return HeaderRtti; }
Group group() const { return _group; }
- QListViewItem *lastChild() const;
+ TQListViewItem *lastChild() const;
private:
static const char *GROUP_LABELS[Nb_Groups];
@@ -84,7 +85,7 @@ private:
bool _external;
void set(const PURL::Url &url);
- virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
+ virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align);
};
class RegisterItem : public KListViewItem
@@ -102,7 +103,7 @@ public:
virtual int rtti() const { return DeviceRtti; }
private:
- virtual QWidget *editWidgetFactory(int) const;
+ virtual TQWidget *editWidgetFactory(int) const;
virtual bool alwaysAcceptEdit(int) const { return true; }
};
diff --git a/src/libgui/project_wizard.cpp b/src/libgui/project_wizard.cpp
index b4d26df..72ecefc 100644
--- a/src/libgui/project_wizard.cpp
+++ b/src/libgui/project_wizard.cpp
@@ -8,10 +8,10 @@
***************************************************************************/
#include "project_wizard.h"
-#include <qheader.h>
-#include <qvbuttongroup.h>
-#include <qradiobutton.h>
-#include <qstyle.h>
+#include <tqheader.h>
+#include <tqvbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqstyle.h>
#include <kfiledialog.h>
#include <kiconloader.h>
@@ -36,7 +36,7 @@ FileListItem::FileListItem(KListView *view)
void FileListItem::toggle()
{
_copy = !_copy;
- repaint();
+ tqrepaint();
}
PURL::FileGroup FileListItem::fileGroup() const
@@ -60,7 +60,7 @@ PURL::FileGroup FileListItem::fileGroup() const
return PURL::Nb_FileGroups;
}
-const QPixmap *FileListItem::pixmap(int column) const
+const TQPixmap *FileListItem::pixmap(int column) const
{
if ( column==0 && _copy ) return &_pixmap;
@@ -68,35 +68,35 @@ const QPixmap *FileListItem::pixmap(int column) const
}
//-----------------------------------------------------------------------------
-FileListBox::FileListBox(QWidget *parent)
- : EditListBox(2, 0, 0, parent, "file_list_box")
+FileListBox::FileListBox(TQWidget *tqparent)
+ : EditListBox(2, 0, 0, tqparent, "file_list_box")
{
_listView->header()->show();
_listView->header()->setClickEnabled(false);
_listView->header()->setResizeEnabled(false);
_listView->header()->setMovingEnabled(false);
_listView->setColumnText(0, i18n("Copy"));
- int spacing = style().pixelMetric(QStyle::PM_HeaderMargin);
- QFontMetrics fm(font());
+ int spacing = tqstyle().tqpixelMetric(TQStyle::PM_HeaderMargin);
+ TQFontMetrics fm(font());
_listView->header()->resizeSection(0, fm.width(i18n("Copy")) + 2*spacing); // hack
_listView->setColumnText(1, i18n("Filename"));
_listView->setAllColumnsShowFocus(true);
- connect(_listView, SIGNAL(clicked(QListViewItem *, const QPoint &, int)), SLOT(clicked(QListViewItem *, const QPoint &, int)));
+ connect(_listView, TQT_SIGNAL(clicked(TQListViewItem *, const TQPoint &, int)), TQT_SLOT(clicked(TQListViewItem *, const TQPoint &, int)));
}
void FileListBox::addItem()
{
- PURL::UrlList urls = PURL::getOpenUrls(_directory.path(), QString::null, this, i18n("Select Files"));
+ PURL::UrlList urls = PURL::getOpenUrls(_directory.path(), TQString(), this, i18n("Select Files"));
PURL::UrlList::const_iterator it;
for (it=urls.begin(); it!=urls.end(); ++it) EditListBox::addItem((*it).pretty());
}
-QListViewItem *FileListBox::createItem()
+TQListViewItem *FileListBox::createItem()
{
return new FileListItem(_listView);
}
-void FileListBox::clicked(QListViewItem *item, const QPoint &, int column)
+void FileListBox::clicked(TQListViewItem *item, const TQPoint &, int column)
{
if ( item==0 || column!=0 ) return;
static_cast<FileListItem *>(item)->toggle();
@@ -104,36 +104,36 @@ void FileListBox::clicked(QListViewItem *item, const QPoint &, int column)
void FileListBox::setToolGroup(const Tool::Group &group)
{
- QListViewItem *item = _listView->firstChild();
+ TQListViewItem *item = _listView->firstChild();
for (; item; item = item->nextSibling()) static_cast<FileListItem *>(item)->setToolGroup(group);
}
//-----------------------------------------------------------------------------
-ProjectWizard::ProjectWizard(QWidget *parent)
- : KWizard(parent, "project_wizard"), _project(0)
+ProjectWizard::ProjectWizard(TQWidget *tqparent)
+ : KWizard(tqparent, "project_wizard"), _project(0)
{
// first page
- _first = new QWidget(this);
+ _first = new TQWidget(this);
addPage(_first, i18n("New Project: Basic Settings"));
setHelpEnabled(_first, false);
- QGridLayout *grid = new QGridLayout(_first, 1, 1, 10, 10);
- QLabel *label = new QLabel(i18n("Name:"), _first);
+ TQGridLayout *grid = new TQGridLayout(_first, 1, 1, 10, 10);
+ TQLabel *label = new TQLabel(i18n("Name:"), _first);
grid->addWidget(label, 0, 0);
_name = new KLineEdit(_first);
_name->setFocus();
grid->addMultiCellWidget(_name, 0,0, 1,2);
- label = new QLabel(i18n("Directory:"), _first);
+ label = new TQLabel(i18n("Directory:"), _first);
grid->addWidget(label, 1, 0);
_directory = new PURL::DirectoryWidget(":new_project", _first);
grid->addMultiCellWidget(_directory, 1,1, 1,2);
- label = new QLabel(i18n("Device:"), _first);
+ label = new TQLabel(i18n("Device:"), _first);
grid->addWidget(label, 2, 0);
_device = new DeviceChooser::Button(false, _first);
_device->setDevice(Main::device());
grid->addWidget(_device, 2, 1);
- label = new QLabel(i18n("Toolchain:"), _first);
+ label = new TQLabel(i18n("Toolchain:"), _first);
grid->addWidget(label, 3, 0);
- _toolchain = new KeyComboBox<QString>(_first);
+ _toolchain = new KeyComboBox<TQString>(_first);
Tool::Lister::ConstIterator it;
for (it=Tool::lister().begin(); it!=Tool::lister().end(); ++it)
_toolchain->appendItem(it.key(), it.data()->label());
@@ -143,22 +143,22 @@ ProjectWizard::ProjectWizard(QWidget *parent)
grid->setRowStretch(4, 1);
// second page
- _second = new QWidget(this);
+ _second = new TQWidget(this);
addPage(_second, i18n("New Project: Source Files"));
- grid = new QGridLayout(_second, 1, 1, 10, 10);
- _bgroup = new QVButtonGroup(i18n("Add Source Files"), _second);
- _templateButton = new QRadioButton(i18n("Create template source file."), _bgroup);
- _addButton = new QRadioButton(i18n("Add existing files."), _bgroup);
- (void)new QRadioButton(i18n("Do not add files now."), _bgroup);
- connect(_bgroup, SIGNAL(clicked(int)), SLOT(buttonClicked(int)));
+ grid = new TQGridLayout(_second, 1, 1, 10, 10);
+ _bgroup = new TQVButtonGroup(i18n("Add Source Files"), _second);
+ _templateButton = new TQRadioButton(i18n("Create template source file."), _bgroup);
+ _addButton = new TQRadioButton(i18n("Add existing files."), _bgroup);
+ (void)new TQRadioButton(i18n("Do not add files now."), _bgroup);
+ connect(_bgroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(buttonClicked(int)));
grid->addWidget(_bgroup, 0, 0);
// third page
- _third = new QWidget(this);
+ _third = new TQWidget(this);
addPage(_third, i18n("New Project: Add Files"));
setHelpEnabled(_third, false);
setFinishEnabled(_third, true);
- grid = new QGridLayout(_third, 1, 1, 10, 10);
+ grid = new TQGridLayout(_third, 1, 1, 10, 10);
_files = new FileListBox(_third);
grid->addWidget(_files, 0, 0);
}
@@ -166,7 +166,7 @@ ProjectWizard::ProjectWizard(QWidget *parent)
void ProjectWizard::next()
{
if ( currentPage()==_first ) {
- QString name = _name->text().stripWhiteSpace();
+ TQString name = _name->text().stripWhiteSpace();
if ( name.isEmpty() ) {
MessageBox::sorry(i18n("Project name is empty."), Log::Show);
return;
@@ -184,7 +184,7 @@ void ProjectWizard::next()
return;
}
} else if ( url().exists() ) {
- if ( !MessageBox::askContinue(i18n("Project \"%1\"already exists. Overwrite it?").arg(url().filename())) ) return;
+ if ( !MessageBox::askContinue(i18n("Project \"%1\"already exists. Overwrite it?").tqarg(url().filename())) ) return;
}
if ( !toolchain().check(device(), &Main::compileLog()) ) return;
_files->setDirectory(_directory->directory());
@@ -203,7 +203,7 @@ void ProjectWizard::next()
for (uint i=0; i<_files->count(); i++)
if ( static_cast<const FileListItem *>(_files->item(i))->fileGroup()==PURL::Source ) nb++;
if ( toolchain().compileType()==Tool::SingleFile && nb>1 ) {
- if ( !MessageBox::askContinue(i18n("The selected toolchain can only compile a single source file and you have selected %1 source files. Continue anyway? ").arg(nb)) ) return;
+ if ( !MessageBox::askContinue(i18n("The selected toolchain can only compile a single source file and you have selected %1 source files. Continue anyway? ").tqarg(nb)) ) return;
}
}
KWizard::next();
@@ -229,7 +229,7 @@ void ProjectWizard::done(int r)
}
Q_ASSERT( ftype!=PURL::Nb_FileTypes );
PURL::Url turl = url().toFileType(ftype);
- QString text;
+ TQString text;
const Tool::SourceGenerator *generator = toolchain().sourceGenerator();
if ( generator==0 ) text = i18n("Template source file generation not implemented yet for this toolchain...");
else {
@@ -243,7 +243,7 @@ void ProjectWizard::done(int r)
}
Log::StringView sview;
if ( turl.write(text, sview) ) files += turl;
- else MessageBox::detailedSorry(i18n("Error creating template file."), i18n("File: %1\n").arg(turl.pretty()) + sview.string(), Log::Show);
+ else MessageBox::detailedSorry(i18n("Error creating template file."), i18n("File: %1\n").tqarg(turl.pretty()) + sview.string(), Log::Show);
_project->setOpenedFiles(files);
} else {
Log::StringView sview;
@@ -271,7 +271,7 @@ const Tool::Group &ProjectWizard::toolchain() const
return *Tool::lister().group(_toolchain->currentItem());
}
-QString ProjectWizard::device() const
+TQString ProjectWizard::device() const
{
return _device->device();
}
diff --git a/src/libgui/project_wizard.h b/src/libgui/project_wizard.h
index 312ef01..4a47e3c 100644
--- a/src/libgui/project_wizard.h
+++ b/src/libgui/project_wizard.h
@@ -9,8 +9,8 @@
#ifndef PROJECT_WIZARD_H
#define PROJECT_WIZARD_H
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
#include <kwizard.h>
#include <klineedit.h>
#include <kcombobox.h>
@@ -32,39 +32,41 @@ public:
bool copy() const { return _copy; }
void toggle();
PURL::FileGroup fileGroup() const;
- virtual const QPixmap *pixmap(int column) const;
+ virtual const TQPixmap *pixmap(int column) const;
private:
const Tool::Group *_group;
- QPixmap _pixmap;
+ TQPixmap _pixmap;
bool _copy;
};
class FileListBox : public EditListBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- FileListBox(QWidget *parent);
+ FileListBox(TQWidget *tqparent);
void setDirectory(const PURL::Directory &directory) { _directory = directory; }
void setToolGroup(const Tool::Group &group);
protected slots:
virtual void addItem();
- virtual void clicked(QListViewItem *item, const QPoint &point, int column);
+ virtual void clicked(TQListViewItem *item, const TQPoint &point, int column);
private:
PURL::Directory _directory;
virtual uint textColumn() const { return 1; }
- virtual QListViewItem *createItem();
+ virtual TQListViewItem *createItem();
};
//-----------------------------------------------------------------------------
class ProjectWizard : public KWizard
{
Q_OBJECT
+ TQ_OBJECT
public:
- ProjectWizard(QWidget *parent);
+ ProjectWizard(TQWidget *tqparent);
PURL::Url url() const;
Project *project() const { return _project; }
@@ -74,17 +76,17 @@ protected slots:
virtual void done(int r);
private:
- QWidget *_first, *_second, *_third;
+ TQWidget *_first, *_second, *_third;
KLineEdit *_name;
PURL::DirectoryWidget *_directory;
DeviceChooser::Button *_device;
- KeyComboBox<QString> *_toolchain;
- QButtonGroup *_bgroup;
- QRadioButton *_templateButton, *_addButton;
+ KeyComboBox<TQString> *_toolchain;
+ TQButtonGroup *_bgroup;
+ TQRadioButton *_templateButton, *_addButton;
FileListBox *_files;
Project *_project;
- QString device() const;
+ TQString device() const;
const Tool::Group &toolchain() const;
};
diff --git a/src/libgui/register_view.cpp b/src/libgui/register_view.cpp
index 3c244e8..fe4b4d6 100644
--- a/src/libgui/register_view.cpp
+++ b/src/libgui/register_view.cpp
@@ -8,10 +8,10 @@
***************************************************************************/
#include "register_view.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include "devices/base/device_group.h"
@@ -23,8 +23,8 @@
#include "gui_debug_manager.h"
//-----------------------------------------------------------------------------
-Register::MainView::MainView(const QString &title, const QString &tag, QWidget *parent)
- : DeviceEditor(title, tag, parent, "register_view"), _debugging(false)
+Register::MainView::MainView(const TQString &title, const TQString &tag, TQWidget *tqparent)
+ : DeviceEditor(title, tag, tqparent, "register_view"), _debugging(false)
{}
void Register::MainView::setDevice(bool force)
@@ -34,15 +34,15 @@ void Register::MainView::setDevice(bool force)
DeviceEditor::setDevice(force || oldDebugging!=_debugging);
}
-QWidget *Register::MainView::createView(const Device::Data *data, QWidget *parent)
+TQWidget *Register::MainView::createView(const Device::Data *data, TQWidget *tqparent)
{
- if ( data==0 ) return new QWidget(parent);
- Register::View *view = Device::groupui(*data).createRegisterView(parent);
+ if ( data==0 ) return new TQWidget(tqparent);
+ Register::View *view = Device::groupui(*data).createRegisterView(tqparent);
if (view) view->updateView();
else {
- QWidget *w = new QWidget(parent);
- QVBoxLayout *vbox = new QVBoxLayout(w, 10, 10);
- QLabel *label = new QLabel(i18n("The selected device has no register."), w);
+ TQWidget *w = new TQWidget(tqparent);
+ TQVBoxLayout *vbox = new TQVBoxLayout(w, 10, 10);
+ TQLabel *label = new TQLabel(i18n("The selected device has no register."), w);
vbox->addWidget(label);
vbox->addStretch(1);
return w;
diff --git a/src/libgui/register_view.h b/src/libgui/register_view.h
index 7d12f0d..98868e4 100644
--- a/src/libgui/register_view.h
+++ b/src/libgui/register_view.h
@@ -20,8 +20,9 @@ class View;
class MainView : public DeviceEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- MainView(const QString &title, const QString &tag, QWidget *parent = 0);
+ MainView(const TQString &title, const TQString &tag, TQWidget *tqparent = 0);
virtual bool isModified() const { return false; }
virtual bool isReadOnly() const { return true; }
virtual void addGui() {}
@@ -32,7 +33,7 @@ public:
private:
bool _debugging;
- virtual QWidget *createView(const Device::Data *, QWidget *parent);
+ virtual TQWidget *createView(const Device::Data *, TQWidget *tqparent);
virtual void setModifiedInternal(bool) {}
virtual void setReadOnlyInternal(bool) {}
};
diff --git a/src/libgui/text_editor.cpp b/src/libgui/text_editor.cpp
index aecbc99..eb9d16f 100644
--- a/src/libgui/text_editor.cpp
+++ b/src/libgui/text_editor.cpp
@@ -9,9 +9,9 @@
***************************************************************************/
#include "text_editor.h"
-#include <qfile.h>
-#include <qtextedit.h>
-#include <qlayout.h>
+#include <tqfile.h>
+#include <tqtextedit.h>
+#include <tqlayout.h>
#include <klibloader.h>
#include <kpopupmenu.h>
@@ -37,33 +37,33 @@ const TextEditor::MarkTypeData TextEditor::MARK_TYPE_DATA[Breakpoint::Nb_MarkTyp
{ KTextEditor::MarkInterface::Error, "piklab_breakpoint_invalid" }
};
-QPixmap TextEditor::pixmap(Breakpoint::MarkType type)
+TQPixmap TextEditor::pixmap(Breakpoint::MarkType type)
{
return SmallIcon(MARK_TYPE_DATA[type].pixmap);
}
-TextEditor::TextEditor(bool withDebugger, QWidget *parent, const char *name)
- : Editor(parent, name), _view(0)
+TextEditor::TextEditor(bool withDebugger, TQWidget *tqparent, const char *name)
+ : Editor(tqparent, name), _view(0)
{
KLibFactory *factory = KLibLoader::self()->factory("libkatepart");
if ( factory==0 ) qFatal("Could not find katepart");
- _document = static_cast<Kate::Document *>(factory->create(this, "kate", "KTextEditor::Document"));
+ _document = static_cast<Kate::Document *>(factory->create(TQT_TQOBJECT(this), "kate", "KTextEditor::Document"));
_oldModified = _document->isModified();
_oldReadOnly = !_document->isReadWrite();
- QVBoxLayout *top = new QVBoxLayout(this, 0, 10);
- _split = new QSplitter(this);
- _split->setFrameStyle(QFrame::TabWidgetPanel | QFrame::Sunken);
+ TQVBoxLayout *top = new TQVBoxLayout(this, 0, 10);
+ _split = new TQSplitter(this);
+ _split->setFrameStyle(TQFrame::TabWidgetPanel | TQFrame::Sunken);
top->addWidget(_split);
- connect(_document, SIGNAL(hlChanged()), SLOT(highlightChanged()));
+ connect(_document, TQT_SIGNAL(hlChanged()), TQT_SLOT(highlightChanged()));
setAcceptDrops(true);
addView();
for (uint i=0; i<Breakpoint::Nb_MarkTypes; i++)
_document->setPixmap(KTextEditor::MarkInterface::MarkTypes(MARK_TYPE_DATA[i].type), pixmap(Breakpoint::MarkType(i)));
- if (withDebugger) QTimer::singleShot(0, this, SLOT(addToDebugManager()));
+ if (withDebugger) TQTimer::singleShot(0, this, TQT_SLOT(addToDebugManager()));
}
bool TextEditor::open(const PURL::Url &url)
@@ -80,10 +80,10 @@ void TextEditor::addToDebugManager()
static_cast<Debugger::GuiManager *>(Debugger::manager)->addTextEditor(*this);
}
-bool TextEditor::eventFilter(QObject *, QEvent *e)
+bool TextEditor::eventFilter(TQObject *, TQEvent *e)
{
- if ( e->type()==QEvent::KeyPress ) {
- if ( static_cast<QKeyEvent *>(e)->key()==Key_Escape ) return true;
+ if ( e->type()==TQEvent::KeyPress ) {
+ if ( TQT_TQKEYEVENT(e)->key()==Key_Escape ) return true;
}
return false;
}
@@ -93,10 +93,10 @@ void TextEditor::addView()
KTextEditor::View *v = _document->createView(_split);
if ( _view==0 ) _view = static_cast<Kate::View *>(v);
Q_ASSERT(v);
- connect(v, SIGNAL(gotFocus(Kate::View *)), SLOT(gotFocus(Kate::View *)));
- connect(v, SIGNAL(cursorPositionChanged()), SLOT(statusChanged()));
- connect(v, SIGNAL(dropEventPass(QDropEvent *)), SIGNAL(dropEventPass(QDropEvent *)));
- connect(v, SIGNAL(newStatus()), SLOT(statusChanged()));
+ connect(v, TQT_SIGNAL(gotFocus(Kate::View *)), TQT_SLOT(gotFocus(Kate::View *)));
+ connect(v, TQT_SIGNAL(cursorPositionChanged()), TQT_SLOT(statusChanged()));
+ connect(v, TQT_SIGNAL(dropEventPass(TQDropEvent *)), TQT_SIGNAL(dropEventPass(TQDropEvent *)));
+ connect(v, TQT_SIGNAL(newtqStatus()), TQT_SLOT(statusChanged()));
v->show();
v->setFocus();
v->child(0, "KateViewInternal")->installEventFilter(this);
@@ -104,8 +104,8 @@ void TextEditor::addView()
pmi->installPopup(&Main::popup("ktexteditor_popup"));
// dispatch available space between views
- QValueList<int> list = _split->sizes();
- QValueList<int>::Iterator it;
+ TQValueList<int> list = _split->sizes();
+ TQValueList<int>::Iterator it;
int sum = 0;
for (it = list.begin(); it!= list.end(); ++it) sum += *it;
sum /= list.size();
@@ -167,7 +167,7 @@ void TextEditor::statusChanged()
{
uint line, col;
_view->cursorPosition(&line, &col) ;
- QString text = i18n("Line: %1 Col: %2").arg(line+1).arg(col+1);
+ TQString text = i18n("Line: %1 Col: %2").tqarg(line+1).tqarg(col+1);
if( isReadOnly() ) text += " " + i18n("R/O");
emit statusTextChanged(" " + text + " ");
if ( isReadOnly()!=_oldReadOnly || isModified()!=_oldModified ) emit guiChanged();
@@ -178,7 +178,7 @@ void TextEditor::statusChanged()
Breakpoint::updateActions(&data);
}
-uint TextEditor::highlightMode(const QString &name) const
+uint TextEditor::highlightMode(const TQString &name) const
{
uint mode = 0;
for (; mode<_document->hlModeCount(); mode++)
@@ -213,8 +213,8 @@ void TextEditor::setMark(uint line, Breakpoint::MarkType type)
void TextEditor::clearMarks(uint type)
{
- QPtrList<KTextEditor::Mark> marks = _document->marks();
- QPtrListIterator<KTextEditor::Mark> it(marks);
+ TQPtrList<KTextEditor::Mark> marks = _document->marks();
+ TQPtrListIterator<KTextEditor::Mark> it(marks);
for (; it.current(); ++it)
if ( it.current()->type==type ) _document->removeMark(it.current()->line, it.current()->type);
}
@@ -224,20 +224,20 @@ void TextEditor::clearBreakpointMarks()
for (uint i=0; i<Breakpoint::Nb_MarkTypes; i++) clearMarks(MARK_TYPE_DATA[i].type);
}
-QValueList<uint> TextEditor::bookmarkLines() const
+TQValueList<uint> TextEditor::bookmarkLines() const
{
- QValueList<uint> lines;
- QPtrList<KTextEditor::Mark> marks = _document->marks();
- QPtrListIterator<KTextEditor::Mark> it(marks);
+ TQValueList<uint> lines;
+ TQPtrList<KTextEditor::Mark> marks = _document->marks();
+ TQPtrListIterator<KTextEditor::Mark> it(marks);
for (; it.current(); ++it)
if ( it.current()->type==KTextEditor::MarkInterface::Bookmark ) lines.append(it.current()->line);
return lines;
}
-void TextEditor::setBookmarkLines(const QValueList<uint> &lines)
+void TextEditor::setBookmarkLines(const TQValueList<uint> &lines)
{
clearMarks(KTextEditor::MarkInterface::Bookmark);
- QValueList<uint>::const_iterator it;
+ TQValueList<uint>::const_iterator it;
for (it=lines.begin(); it!=lines.end(); ++it)
_document->setMark(*it, KTextEditor::MarkInterface::Bookmark);
}
@@ -251,8 +251,8 @@ void TextEditor::slotChangedText()
//Found in the descript Qstringlist.
- QString currentword;
- QString testval;
+ TQString currentword;
+ TQString testval;
Kate::View *v = currentView();
currentword = v->currentTextLine();
@@ -260,7 +260,7 @@ void TextEditor::slotChangedText()
currentword = currentword.simplifyWhiteSpace();
currentword = currentword.upper();
- for ( QStringList::Iterator it = descript.begin(); it != descript.end(); ++it )
+ for ( TQStringList::Iterator it = descript.begin(); it != descript.end(); ++it )
{
testval = *it;
if(testval.startsWith(currentword.left(5)))
@@ -321,12 +321,12 @@ void TextEditor::populateList()
#endif
//-----------------------------------------------------------------------------
-SimpleTextEditor::SimpleTextEditor(bool withDebugger, PURL::FileType type, QWidget *parent, const char *name)
- : TextEditor(withDebugger, parent, name), _type(type), _file(_sview)
+SimpleTextEditor::SimpleTextEditor(bool withDebugger, PURL::FileType type, TQWidget *tqparent, const char *name)
+ : TextEditor(withDebugger, tqparent, name), _type(type), _file(_sview)
{}
-SimpleTextEditor::SimpleTextEditor(bool withDebugger, QWidget *parent, const char *name)
- : TextEditor(withDebugger, parent, name), _type(PURL::Nb_FileTypes), _file(_sview)
+SimpleTextEditor::SimpleTextEditor(bool withDebugger, TQWidget *tqparent, const char *name)
+ : TextEditor(withDebugger, tqparent, name), _type(PURL::Nb_FileTypes), _file(_sview)
{}
bool SimpleTextEditor::open(const PURL::Url &url)
@@ -335,7 +335,7 @@ bool SimpleTextEditor::open(const PURL::Url &url)
return TextEditor::open(url);
}
-bool SimpleTextEditor::setText(const QString &text)
+bool SimpleTextEditor::setText(const TQString &text)
{
_file.openForWrite();
_file.appendText(text);
diff --git a/src/libgui/text_editor.h b/src/libgui/text_editor.h
index 9c5a994..5b76734 100644
--- a/src/libgui/text_editor.h
+++ b/src/libgui/text_editor.h
@@ -10,9 +10,9 @@
#ifndef TEXT_EDITOR_H
#define TEXT_EDITOR_H
-#include <qsplitter.h>
-#include <qstringlist.h>
-class QSplitter;
+#include <tqsplitter.h>
+#include <tqstringlist.h>
+class TQSplitter;
#include <kate/view.h>
#include <kate/document.h>
@@ -25,8 +25,9 @@ class QSplitter;
class TextEditor : public Editor
{
Q_OBJECT
+ TQ_OBJECT
public:
- TextEditor(bool withDebugger, QWidget *parent, const char *name = 0);
+ TextEditor(bool withDebugger, TQWidget *tqparent, const char *name = 0);
virtual PURL::FileType fileType() const { return url().fileType(); }
virtual PURL::Url url() const { return _document->url(); }
virtual bool isModified() const;
@@ -34,16 +35,16 @@ public:
virtual void addGui();
virtual void removeGui();
virtual void setFocus() { _view->setFocus(); }
- static QPixmap pixmap(Breakpoint::MarkType type);
+ static TQPixmap pixmap(Breakpoint::MarkType type);
void setMark(uint line, Breakpoint::MarkType type);
void clearBreakpointMarks();
void setCursor(uint line, uint column) { _view->setCursorPosition(line, column); }
uint cursorLine() const;
virtual bool open(const PURL::Url &url);
virtual bool save(const PURL::Url &url) { return _document->saveAs(url.kurl()); }
- virtual bool eventFilter(QObject *o, QEvent *e);
- virtual QValueList<uint> bookmarkLines() const;
- virtual void setBookmarkLines(const QValueList<uint> &lines);
+ virtual bool eventFilter(TQObject *o, TQEvent *e);
+ virtual TQValueList<uint> bookmarkLines() const;
+ virtual void setBookmarkLines(const TQValueList<uint> &lines);
public slots:
void addView();
@@ -64,7 +65,7 @@ private slots:
void addToDebugManager();
private:
- QSplitter *_split;
+ TQSplitter *_split;
bool _oldModified, _oldReadOnly;
struct MarkTypeData {
uint type;
@@ -75,7 +76,7 @@ private:
private:
virtual void setModifiedInternal(bool modified);
virtual void setReadOnlyInternal(bool readOnly);
- uint highlightMode(const QString &name) const;
+ uint highlightMode(const TQString &name) const;
void clearMarks(uint type);
};
@@ -83,12 +84,13 @@ private:
class SimpleTextEditor : public TextEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- SimpleTextEditor(bool withDebugger, PURL::FileType type, QWidget *parent, const char *name = 0);
- SimpleTextEditor(bool withDebugger, QWidget *parent, const char *name = 0);
+ SimpleTextEditor(bool withDebugger, PURL::FileType type, TQWidget *tqparent, const char *name = 0);
+ SimpleTextEditor(bool withDebugger, TQWidget *tqparent, const char *name = 0);
void setFileType(PURL::FileType type) { _type = type; }
virtual PURL::FileType fileType() const { return _type; }
- bool setText(const QString &text);
+ bool setText(const TQString &text);
virtual bool open(const PURL::Url &url);
protected:
diff --git a/src/libgui/toplevel.cpp b/src/libgui/toplevel.cpp
index c757ace..1acb52e 100644
--- a/src/libgui/toplevel.cpp
+++ b/src/libgui/toplevel.cpp
@@ -9,16 +9,16 @@
***************************************************************************/
#include "toplevel.h"
-#include <qpixmap.h>
-#include <qiconset.h>
-#include <qlayout.h>
-#include <qsplitter.h>
-#include <qstringlist.h>
-#include <qtimer.h>
-#include <qprogressbar.h>
-#include <qeventloop.h>
-#include <qapplication.h>
-#include <qtooltip.h>
+#include <tqpixmap.h>
+#include <tqiconset.h>
+#include <tqlayout.h>
+#include <tqsplitter.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
+#include <tqprogressbar.h>
+#include <tqeventloop.h>
+#include <tqapplication.h>
+#include <tqtooltip.h>
#include <kstatusbar.h>
#include <klocale.h>
@@ -68,8 +68,8 @@
#include "global_config.h"
//----------------------------------------------------------------------------
-KDockWidget *MainWindow::createDock(const QString &name, const QPixmap &icon,
- const QString &title, const DockPosition &position)
+KDockWidget *MainWindow::createDock(const TQString &name, const TQPixmap &icon,
+ const TQString &title, const DockPosition &position)
{
KDockWidget *dock = createDockWidget(name, icon, 0, title);
dock->setDockSite(KDockWidget::DockCenter);
@@ -78,7 +78,7 @@ KDockWidget *MainWindow::createDock(const QString &name, const QPixmap &icon,
ddata.position = position;
ddata.dock = dock;
ddata.action = new ViewMenuAction(dock);
- connect(ddata.action, SIGNAL(activated(QWidget *)), SLOT(toggleToolView(QWidget *)));
+ connect(ddata.action, TQT_SIGNAL(activated(TQWidget *)), TQT_SLOT(toggleToolView(TQWidget *)));
_docks += ddata;
initDockPosition(ddata);
return dock;
@@ -91,26 +91,26 @@ MainWindow::MainWindow()
Main::_toplevel = this;
// status bar
- _actionStatus = new QLabel(statusBar());
- statusBar()->addWidget(_actionStatus);
- _actionProgress = new QProgressBar(statusBar());
+ _actiontqStatus = new TQLabel(statusBar());
+ statusBar()->addWidget(_actiontqStatus);
+ _actionProgress = new TQProgressBar(statusBar());
statusBar()->addWidget(_actionProgress);
- _debugStatus = new QLabel(statusBar());
- statusBar()->addWidget(_debugStatus, 0, true);
- _editorStatus = new QLabel(statusBar());
- statusBar()->addWidget(_editorStatus, 0, true);
- _programmerStatus = new ProgrammerStatusWidget(statusBar());
- connect(_programmerStatus, SIGNAL(configure()), SLOT(configureProgrammer()));
- connect(_programmerStatus, SIGNAL(selected(const Programmer::Group &)), SLOT(selectProgrammer(const Programmer::Group &)));
- statusBar()->addWidget(_programmerStatus->widget(), 0, true);
- _toolStatus = new ToolStatusWidget(statusBar());
- connect(_toolStatus, SIGNAL(configureToolchain()), SLOT(configureToolchains()));
- connect(_toolStatus, SIGNAL(configure()), SLOT(configureProject()));
- connect(_toolStatus, SIGNAL(selected(const Tool::Group &)), SLOT(selectTool(const Tool::Group &)));
- statusBar()->addWidget(_toolStatus->widget(), 0, true);
+ _debugtqStatus = new TQLabel(statusBar());
+ statusBar()->addWidget(_debugtqStatus, 0, true);
+ _editortqStatus = new TQLabel(statusBar());
+ statusBar()->addWidget(_editortqStatus, 0, true);
+ _programmertqStatus = new ProgrammerStatusWidget(statusBar());
+ connect(_programmertqStatus, TQT_SIGNAL(configure()), TQT_SLOT(configureProgrammer()));
+ connect(_programmertqStatus, TQT_SIGNAL(selected(const Programmer::Group &)), TQT_SLOT(selectProgrammer(const Programmer::Group &)));
+ statusBar()->addWidget(_programmertqStatus->widget(), 0, true);
+ _tooltqStatus = new ToolStatusWidget(statusBar());
+ connect(_tooltqStatus, TQT_SIGNAL(configureToolchain()), TQT_SLOT(configureToolchains()));
+ connect(_tooltqStatus, TQT_SIGNAL(configure()), TQT_SLOT(configureProject()));
+ connect(_tooltqStatus, TQT_SIGNAL(selected(const Tool::Group &)), TQT_SLOT(selectTool(const Tool::Group &)));
+ statusBar()->addWidget(_tooltqStatus->widget(), 0, true);
// interface
- _mainDock = createDockWidget("main_dock_widget", QPixmap());
+ _mainDock = createDockWidget("main_dock_widget", TQPixmap());
_mainDock->setDockSite(KDockWidget::DockCorner);
_mainDock->setEnableDocking(KDockWidget::DockNone);
setView(_mainDock);
@@ -120,7 +120,7 @@ MainWindow::MainWindow()
KDockWidget *dock = createDock("project_manager_dock_widget", PURL::icon(PURL::Project),
i18n("Project Manager"), DockPosition(KDockWidget::DockLeft, 20));
Main::_projectManager = new ProjectManager::View(dock);
- connect(Main::_projectManager, SIGNAL(guiChanged()), SLOT(updateGUI()));
+ connect(TQT_TQOBJECT(Main::_projectManager), TQT_SIGNAL(guiChanged()), TQT_SLOT(updateGUI()));
dock->setWidget(Main::_projectManager);
dock = createDock("watch_view_dock_widget", loader.loadIcon("viewmag", KIcon::Small),
@@ -130,26 +130,26 @@ MainWindow::MainWindow()
Main::_editorManager = new EditorManager(_mainDock);
_mainDock->setWidget(Main::_editorManager);
- connect(Main::_editorManager, SIGNAL(guiChanged()), SLOT(updateGUI()));
- connect(Main::_editorManager, SIGNAL(modified(const PURL::Url &)), Main::_projectManager, SLOT(modified(const PURL::Url &)));
- connect(Main::_editorManager, SIGNAL(statusChanged(const QString &)), _editorStatus, SLOT(setText(const QString &)));
+ connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(guiChanged()), TQT_SLOT(updateGUI()));
+ connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(modified(const PURL::Url &)), TQT_TQOBJECT(Main::_projectManager), TQT_SLOT(modified(const PURL::Url &)));
+ connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(statusChanged(const TQString &)), _editortqStatus, TQT_SLOT(setText(const TQString &)));
dock = createDock("compile_log_dock_widget", loader.loadIcon("piklab_compile", KIcon::Small),
i18n("Compile Log"), DockPosition(KDockWidget::DockBottom, 80));
Main::_compileLog = new Compile::LogWidget(dock);
- Main::_compileLog->setFocusPolicy(NoFocus);
+ Main::_compileLog->setFocusPolicy(TQ_NoFocus);
dock->setWidget(Main::_compileLog);
dock = createDock("program_log_dock_widget", loader.loadIcon("piklab_burnchip", KIcon::Small),
i18n("Program Log"), DockPosition("compile_log_dock_widget"));
_programLog = new Log::Widget(dock, "program_log");
- _programLog->setFocusPolicy(NoFocus);
+ _programLog->setFocusPolicy(TQ_NoFocus);
dock->setWidget(_programLog);
dock = createDock("breakpoints_dock_widget", loader.loadIcon("piklab_breakpoint_active", KIcon::Small),
i18n("Breakpoints"), DockPosition("compile_log_dock_widget"));
Main::_breakpointsView = new Breakpoint::View(dock);
- Main::_breakpointsView->setFocusPolicy(NoFocus);
+ Main::_breakpointsView->setFocusPolicy(TQ_NoFocus);
dock->setWidget(Main::_breakpointsView);
dock = createDock("console_dock_widget", loader.loadIcon("konsole", KIcon::Small),
@@ -158,199 +158,199 @@ MainWindow::MainWindow()
dock->setWidget(Main::_consoleView);
// managers
- Programmer::manager = new Programmer::GuiManager(this);
+ Programmer::manager = new Programmer::GuiManager(TQT_TQOBJECT(this));
Programmer::manager->setView(_programLog);
- connect(Programmer::manager, SIGNAL(actionMessage(const QString &)), _actionStatus, SLOT(setText(const QString &)));
- connect(Programmer::manager, SIGNAL(showProgress(bool)), SLOT(showProgress(bool)));
- connect(Programmer::manager, SIGNAL(setTotalProgress(uint)), SLOT(setTotalProgress(uint)));
- connect(Programmer::manager, SIGNAL(setProgress(uint)), SLOT(setProgress(uint)));
+ connect(Programmer::manager, TQT_SIGNAL(actionMessage(const TQString &)), _actiontqStatus, TQT_SLOT(setText(const TQString &)));
+ connect(Programmer::manager, TQT_SIGNAL(showProgress(bool)), TQT_SLOT(showProgress(bool)));
+ connect(Programmer::manager, TQT_SIGNAL(setTotalProgress(uint)), TQT_SLOT(setTotalProgress(uint)));
+ connect(Programmer::manager, TQT_SIGNAL(setProgress(uint)), TQT_SLOT(setProgress(uint)));
Debugger::manager = new Debugger::GuiManager;
- connect(Debugger::manager, SIGNAL(targetStateChanged()), SLOT(updateGUI()));
- connect(Debugger::manager, SIGNAL(statusChanged(const QString &)), _debugStatus, SLOT(setText(const QString &)));
- connect(Debugger::manager, SIGNAL(actionMessage(const QString &)), _actionStatus, SLOT(setText(const QString &)));
+ connect(Debugger::manager, TQT_SIGNAL(targetStateChanged()), TQT_SLOT(updateGUI()));
+ connect(Debugger::manager, TQT_SIGNAL(statusChanged(const TQString &)), _debugtqStatus, TQT_SLOT(setText(const TQString &)));
+ connect(Debugger::manager, TQT_SIGNAL(actionMessage(const TQString &)), _actiontqStatus, TQT_SLOT(setText(const TQString &)));
- Main::_compileManager = new Compile::Manager(this);
+ Main::_compileManager = new Compile::Manager(TQT_TQOBJECT(this));
Main::_compileManager->setView(Main::_compileLog);
- connect(Main::_compileManager, SIGNAL(success()), SLOT(compileSuccess()));
- connect(Main::_compileManager, SIGNAL(failure()), SLOT(compileFailure()));
- connect(Main::_compileManager, SIGNAL(updateFile(const Compile::FileData &)),
- SLOT(updateFile(const Compile::FileData &)));
+ connect(Main::_compileManager, TQT_SIGNAL(success()), TQT_SLOT(compileSuccess()));
+ connect(Main::_compileManager, TQT_SIGNAL(failure()), TQT_SLOT(compileFailure()));
+ connect(Main::_compileManager, TQT_SIGNAL(updateFile(const Compile::FileData &)),
+ TQT_SLOT(updateFile(const Compile::FileData &)));
// actions
// file actions
- KAction *a = KStdAction::openNew(this, SLOT(newSourceFile()), actionCollection());
+ KAction *a = KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(newSourceFile()), actionCollection());
a->setText(i18n("&New Source File..."));
- (void)new KAction(i18n("New hex File..."), "filenew", 0, this, SLOT(newHexFile()),
+ (void)new KAction(i18n("New hex File..."), "filenew", 0, TQT_TQOBJECT(this), TQT_SLOT(newHexFile()),
actionCollection(), "file_new_hex");
- KStdAction::open(this, SLOT(openFile()), actionCollection());
- KRecentFilesAction *recent = KStdAction::openRecent(this, SLOT(openRecentFile(const KURL &)), actionCollection());
+ KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(openFile()), actionCollection());
+ KRecentFilesAction *recent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(openRecentFile(const KURL &)), actionCollection());
recent->setMaxItems(20);
recent->loadEntries(kapp->config(), "recent-files");
- (void)new KAction(i18n("Save All"), 0, 0, Main::_editorManager, SLOT(saveAllFiles()),
+ (void)new KAction(i18n("Save All"), 0, 0, TQT_TQOBJECT(Main::_editorManager), TQT_SLOT(saveAllFiles()),
actionCollection(), "file_save_all");
- KStdAction::close(Main::_editorManager, SLOT(closeCurrentEditor()), actionCollection());
- (void)new KAction(i18n("C&lose All"), 0, 0, Main::_editorManager, SLOT(closeAllEditors()),
+ KStdAction::close(TQT_TQOBJECT(Main::_editorManager), TQT_SLOT(closeCurrentEditor()), actionCollection());
+ (void)new KAction(i18n("C&lose All"), 0, 0, TQT_TQOBJECT(Main::_editorManager), TQT_SLOT(closeAllEditors()),
actionCollection(), "file_close_all");
- (void)new KAction(i18n("Close All Others"), 0, 0, Main::_editorManager, SLOT(closeAllOtherEditors()),
+ (void)new KAction(i18n("Close All Others"), 0, 0, TQT_TQOBJECT(Main::_editorManager), TQT_SLOT(closeAllOtherEditors()),
actionCollection(), "file_closeother");
- KStdAction::quit(this, SLOT(close()), actionCollection());
+ KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
// edit actions
// view actions
- (void)new KAction(i18n("Back"), "back", Qt::ALT + Qt::Key_Left,
- Main::_editorManager, SLOT(goBack()), actionCollection(), "history_back");
- (void)new KAction(i18n("Forward"), "forward", Qt::ALT + Qt::Key_Right,
- Main::_editorManager, SLOT(goForward()), actionCollection(), "history_forward");
- (void)new KAction(i18n("Switch to..."), 0, Qt::CTRL + Qt::Key_Slash,
- Main::_editorManager, SLOT(switchToEditor()), actionCollection(), "file_switchto");
- (void)new KAction(i18n("Switch Header/Implementation"), 0, Qt::SHIFT + Qt::Key_F12,
- Main::_editorManager, SLOT(switchHeaderImplementation()), actionCollection(), "view_switch_source");
- (void)new KAction(QString::null, 0, 0,
- Debugger::manager, SLOT(toggleBreakpoint()), actionCollection(), "toggle_breakpoint");
- (void)new KAction(QString::null, 0, 0,
- Debugger::manager, SLOT(toggleEnableBreakpoint()), actionCollection(), "enable_breakpoint");
+ (void)new KAction(i18n("Back"), "back", TQt::ALT + TQt::Key_Left,
+ TQT_TQOBJECT(Main::_editorManager), TQT_SLOT(goBack()), actionCollection(), "history_back");
+ (void)new KAction(i18n("Forward"), "forward", TQt::ALT + TQt::Key_Right,
+ TQT_TQOBJECT(Main::_editorManager), TQT_SLOT(goForward()), actionCollection(), "history_forward");
+ (void)new KAction(i18n("Switch to..."), 0, TQt::CTRL + TQt::Key_Slash,
+ TQT_TQOBJECT(Main::_editorManager), TQT_SLOT(switchToEditor()), actionCollection(), "file_switchto");
+ (void)new KAction(i18n("Switch Header/Implementation"), 0, TQt::SHIFT + TQt::Key_F12,
+ TQT_TQOBJECT(Main::_editorManager), TQT_SLOT(switchHeaderImplementation()), actionCollection(), "view_switch_source");
+ (void)new KAction(TQString(), 0, 0,
+ Debugger::manager, TQT_SLOT(toggleBreakpoint()), actionCollection(), "toggle_breakpoint");
+ (void)new KAction(TQString(), 0, 0,
+ Debugger::manager, TQT_SLOT(toggleEnableBreakpoint()), actionCollection(), "enable_breakpoint");
(void)new KAction(i18n("Show disassembly location"), 0, 0,
- Debugger::manager, SLOT(showDisassemblyLocation()), actionCollection(), "show_disassembly_location");
+ Debugger::manager, TQT_SLOT(showDisassemblyLocation()), actionCollection(), "show_disassembly_location");
KActionMenu *toolViewsMenu = new KActionMenu( i18n("Tool Views"), 0, "view_tool_views");
- connect(toolViewsMenu->popupMenu(), SIGNAL(aboutToShow()), SLOT(updateToolViewsActions()));
+ connect(toolViewsMenu->popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_SLOT(updateToolViewsActions()));
actionCollection()->insert(toolViewsMenu);
- a = new KAction(i18n("&Reset Layout"), 0, 0, this, SLOT(resetDockLayout()), actionCollection(), "view_reset_layout");
+ a = new KAction(i18n("&Reset Layout"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(resetDockLayout()), actionCollection(), "view_reset_layout");
toolViewsMenu->insert(a);
toolViewsMenu->popupMenu()->insertSeparator();
- QValueList<DockData>::iterator it;
+ TQValueList<DockData>::iterator it;
for(it=_docks.begin(); it!=_docks.end(); ++it) toolViewsMenu->insert((*it).action);
// project actions
(void)new KAction(i18n("New Project..."), "piklab_createproject", 0,
- this, SLOT(newProject()), actionCollection(), "project_new");
+ TQT_TQOBJECT(this), TQT_SLOT(newProject()), actionCollection(), "project_new");
(void)new KAction(i18n("Open Project..."), "piklab_openproject", 0,
- this , SLOT(openProject()), actionCollection(), "project_open");
+ TQT_TQOBJECT(this), TQT_SLOT(openProject()), actionCollection(), "project_open");
recent = new KRecentFilesAction(i18n("Open Recent Project"), 0,
- this, SLOT(openRecentProject(const KURL &)), actionCollection(), "project_open_recent");
+ TQT_TQOBJECT(this), TQT_SLOT(openRecentProject(const KURL &)), actionCollection(), "project_open_recent");
recent->setMaxItems(20);
recent->loadEntries(kapp->config(), "recent-projects");
(void)new KAction(i18n("Project Options..."), "configure", 0,
- this, SLOT(configureProject()), actionCollection(), "project_options");
+ TQT_TQOBJECT(this), TQT_SLOT(configureProject()), actionCollection(), "project_options");
(void)new KAction(i18n("Close Project"), "fileclose", 0,
- this, SLOT(closeProject()), actionCollection(), "project_close");
+ TQT_TQOBJECT(this), TQT_SLOT(closeProject()), actionCollection(), "project_close");
(void)new KAction(i18n("Add Source File..."), "piklab_addfile", 0,
- Main::_projectManager, SLOT(insertSourceFiles()), actionCollection(), "project_add_source_file");
+ TQT_TQOBJECT(Main::_projectManager), TQT_SLOT(insertSourceFiles()), actionCollection(), "project_add_source_file");
(void)new KAction(i18n("Add Object File..."), "piklab_addfile", 0,
- Main::_projectManager, SLOT(insertObjectFiles()), actionCollection(), "project_add_object_file");
+ TQT_TQOBJECT(Main::_projectManager), TQT_SLOT(insertObjectFiles()), actionCollection(), "project_add_object_file");
(void)new KAction(i18n("Add Current File"), "piklab_addcurrentfile", 0,
- Main::_projectManager, SLOT(insertCurrentFile()), actionCollection(), "project_add_current_file");
+ TQT_TQOBJECT(Main::_projectManager), TQT_SLOT(insertCurrentFile()), actionCollection(), "project_add_current_file");
// build actions
- (void)new KAction(i18n("&Build Project"), "piklab_compile", Qt::Key_F8,
- this, SLOT(buildProject()), actionCollection(), "build_build_project");
- (void)new KAction(i18n("&Compile File"), 0, Qt::SHIFT + Qt::Key_F8,
- this, SLOT(compileFile()), actionCollection(), "build_compile_file");
+ (void)new KAction(i18n("&Build Project"), "piklab_compile", TQt::Key_F8,
+ TQT_TQOBJECT(this), TQT_SLOT(buildProject()), actionCollection(), "build_build_project");
+ (void)new KAction(i18n("&Compile File"), 0, TQt::SHIFT + TQt::Key_F8,
+ TQT_TQOBJECT(this), TQT_SLOT(compileFile()), actionCollection(), "build_compile_file");
(void)new KAction(i18n("Clean"), "trashcan_empty", 0,
- this, SLOT(cleanBuild()), actionCollection(), "build_clean");
+ TQT_TQOBJECT(this), TQT_SLOT(cleanBuild()), actionCollection(), "build_clean");
(void)new KAction(i18n("Stop"), "stop", 0,
- this, SLOT(stopBuild()), actionCollection(), "build_stop");
+ TQT_TQOBJECT(this), TQT_SLOT(stopBuild()), actionCollection(), "build_stop");
// programmer actions
(void)new KAction(i18n("&Connect"), "connect_creating", 0,
- Programmer::manager, SLOT(connectDevice()), actionCollection(), "prog_connect");
+ Programmer::manager, TQT_SLOT(connectDevice()), actionCollection(), "prog_connect");
(void)new KToggleAction(i18n("Device Power"), "piklab_power", 0,
- Programmer::manager, SLOT(toggleDevicePower()), actionCollection(), "prog_power");
+ Programmer::manager, TQT_SLOT(toggleDevicePower()), actionCollection(), "prog_power");
(void)new KAction(i18n("&Disconnect"), "connect_no", 0,
- Programmer::manager, SLOT(disconnectDevice()), actionCollection(), "prog_disconnect");
- (void)new KAction(i18n("&Program"), "piklab_burnchip", Qt::SHIFT + Qt::Key_F5,
- this , SLOT(program()), actionCollection(), "prog_program");
- (void)new KAction(i18n("&Verify"), "piklab_verifychip", Qt::SHIFT + Qt::Key_F6,
- this , SLOT(verify()), actionCollection(), "prog_verify");
- (void)new KAction(i18n("&Read"), "piklab_readchip", Qt::SHIFT + Qt::Key_F7,
- this , SLOT(read()), actionCollection(), "prog_read");
+ Programmer::manager, TQT_SLOT(disconnectDevice()), actionCollection(), "prog_disconnect");
+ (void)new KAction(i18n("&Program"), "piklab_burnchip", TQt::SHIFT + TQt::Key_F5,
+ TQT_TQOBJECT(this), TQT_SLOT(program()), actionCollection(), "prog_program");
+ (void)new KAction(i18n("&Verify"), "piklab_verifychip", TQt::SHIFT + TQt::Key_F6,
+ TQT_TQOBJECT(this), TQT_SLOT(verify()), actionCollection(), "prog_verify");
+ (void)new KAction(i18n("&Read"), "piklab_readchip", TQt::SHIFT + TQt::Key_F7,
+ TQT_TQOBJECT(this), TQT_SLOT(read()), actionCollection(), "prog_read");
(void)new KAction(i18n("&Erase"), "piklab_erasechip", 0,
- this, SLOT(erase()), actionCollection(), "prog_erase");
+ TQT_TQOBJECT(this), TQT_SLOT(erase()), actionCollection(), "prog_erase");
(void)new KAction(i18n("&Blank Check"), "piklab_blankcheck", 0,
- this, SLOT(blankCheck()), actionCollection(), "prog_blank_check");
- (void)new KAction(i18n("&Run"), "launch", Qt::SHIFT + Qt::Key_F9,
- Programmer::manager, SLOT(run()), actionCollection(), "prog_run");
+ TQT_TQOBJECT(this), TQT_SLOT(blankCheck()), actionCollection(), "prog_blank_check");
+ (void)new KAction(i18n("&Run"), "launch", TQt::SHIFT + TQt::Key_F9,
+ Programmer::manager, TQT_SLOT(run()), actionCollection(), "prog_run");
(void)new KAction(i18n("&Stop"), "piklab_stop", 0,
- Programmer::manager, SLOT(halt()), actionCollection(), "prog_stop");
+ Programmer::manager, TQT_SLOT(halt()), actionCollection(), "prog_stop");
(void)new KAction(i18n("R&estart"), "piklab_restart", 0,
- Programmer::manager, SLOT(restart()), actionCollection(), "prog_restart");
+ Programmer::manager, TQT_SLOT(restart()), actionCollection(), "prog_restart");
(void)new KAction(i18n("&Advanced..."), 0, 0,
- Programmer::manager , SLOT(showAdvancedDialog()), actionCollection(), "prog_advanced");
+ Programmer::manager , TQT_SLOT(showAdvancedDialog()), actionCollection(), "prog_advanced");
(void)new KAction(i18n("Settings..."), "configure", 0,
- this , SLOT(showProgrammerSettings()), actionCollection(), "prog_settings");
+ TQT_TQOBJECT(this), TQT_SLOT(showProgrammerSettings()), actionCollection(), "prog_settings");
// debugger actions
- (void)new KAction(i18n("&Start"), "launch", Qt::SHIFT + Qt::Key_F9,
- Programmer::manager, SLOT(restart()), actionCollection(), "debug_start");
- (void)new KAction(i18n("&Run"), "piklab_run", Qt::SHIFT + Qt::Key_F9,
- Programmer::manager, SLOT(run()), actionCollection(), "debug_run");
+ (void)new KAction(i18n("&Start"), "launch", TQt::SHIFT + TQt::Key_F9,
+ Programmer::manager, TQT_SLOT(restart()), actionCollection(), "debug_start");
+ (void)new KAction(i18n("&Run"), "piklab_run", TQt::SHIFT + TQt::Key_F9,
+ Programmer::manager, TQT_SLOT(run()), actionCollection(), "debug_run");
(void)new KAction(i18n("&Step"), "piklab_debug_step", 0,
- Programmer::manager, SLOT(step()), actionCollection(), "debug_next");
+ Programmer::manager, TQT_SLOT(step()), actionCollection(), "debug_next");
//(void)new KAction(i18n("Step &In"), "piklab_debug_stepin",
- // 0, this, SLOT(debugStepIn()), actionCollection(), "debug_step_in");
+ // 0, TQT_TQOBJECT(this), TQT_SLOT(debugStepIn()), actionCollection(), "debug_step_in");
//(void)new KAction(i18n("Step &Out"), "piklab_debug_stepout",
- // 0, this, SLOT(debugStepOut()), actionCollection(), "debug_step_out");
+ // 0, TQT_TQOBJECT(this), TQT_SLOT(debugStepOut()), actionCollection(), "debug_step_out");
(void)new KAction(i18n("&Break<Translators: it is the verb>", "&Halt"), "piklab_debughalt", 0,
- Programmer::manager, SLOT(halt()), actionCollection(), "debug_halt");
+ Programmer::manager, TQT_SLOT(halt()), actionCollection(), "debug_halt");
(void)new KAction(i18n("&Disconnect/Stop"), "piklab_stop", 0,
- Programmer::manager, SLOT(disconnectDevice()), actionCollection(), "debug_stop");
+ Programmer::manager, TQT_SLOT(disconnectDevice()), actionCollection(), "debug_stop");
(void)new KAction(i18n("R&eset"), "piklab_restart", 0,
- Programmer::manager, SLOT(restart()), actionCollection(), "debug_reset");
+ Programmer::manager, TQT_SLOT(restart()), actionCollection(), "debug_reset");
(void)new KAction(i18n("Show Program Counter"), "piklab_program_counter", 0,
- Debugger::manager, SLOT(showPC()), actionCollection(), "debug_show_pc");
+ Debugger::manager, TQT_SLOT(showPC()), actionCollection(), "debug_show_pc");
(void)new KAction(i18n("Clear All Breakpoints"), "remove", 0,
- Debugger::manager, SLOT(clearBreakpoints()), actionCollection(), "debug_clear_breakpoints");
+ Debugger::manager, TQT_SLOT(clearBreakpoints()), actionCollection(), "debug_clear_breakpoints");
(void)new KAction(i18n("Settings..."), "configure", 0,
- this , SLOT(showDebuggerSettings()), actionCollection(), "debug_settings");
+ TQT_TQOBJECT(this), TQT_SLOT(showDebuggerSettings()), actionCollection(), "debug_settings");
// tools
(void)new KAction(i18n("&Pikloops..."), 0, 0,
- this , SLOT(runPikloops()), actionCollection(), "tools_pikloops");
- (void)new KAction(i18n("&Find Files..."), "find", 0,
- this , SLOT(runKfind()), actionCollection(), "tools_kfind");
+ TQT_TQOBJECT(this), TQT_SLOT(runPikloops()), actionCollection(), "tools_pikloops");
+ (void)new KAction(i18n("&Find Files..."), "tqfind", 0,
+ TQT_TQOBJECT(this), TQT_SLOT(runKtqfind()), actionCollection(), "tools_ktqfind");
(void)new KAction(i18n("&Device Information..."), "info", 0,
- this , SLOT(showDeviceInfo()), actionCollection(), "tools_device_information");
+ TQT_TQOBJECT(this), TQT_SLOT(showDeviceInfo()), actionCollection(), "tools_device_information");
(void)new KAction(i18n("&Config Generator..."), 0, 0,
- this , SLOT(configGenerator()), actionCollection(), "tools_config_generator");
+ TQT_TQOBJECT(this), TQT_SLOT(configGenerator()), actionCollection(), "tools_config_generator");
(void)new KAction(i18n("&Template Generator..."), 0, 0,
- this , SLOT(templateGenerator()), actionCollection(), "tools_template_generator");
+ TQT_TQOBJECT(this), TQT_SLOT(templateGenerator()), actionCollection(), "tools_template_generator");
// settings actions
(void)new KAction(i18n("Configure Toolchains..."), 0, 0,
- this, SLOT(configureToolchains()), actionCollection(), "options_configure_toolchains");
- (void)KStdAction::preferences(this, SLOT(configure()), actionCollection());
+ TQT_TQOBJECT(this), TQT_SLOT(configureToolchains()), actionCollection(), "options_configure_toolchains");
+ (void)KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(configure()), actionCollection());
// help
(void)new KAction(i18n("Report Bug..."), "likeback_bug", 0,
- LikeBack::instance(), SLOT(iFoundABug()), actionCollection(), "help_report_bug_piklab");
+ TQT_TQOBJECT(LikeBack::instance()), TQT_SLOT(iFoundABug()), actionCollection(), "help_report_bug_piklab");
setupGUI();
readDockConfig();
// LikeBack buttons
- menuBar()->insertItem(new QLabel(menuBar())); // #### first widget is put left-most...
+ menuBar()->insertItem(new TQLabel(menuBar())); // #### first widget is put left-most...
MenuBarButton *button = new MenuBarButton("likeback_like", menuBar());
- QToolTip::add(button, i18n("I like..."));
- connect(button, SIGNAL(clicked()), LikeBack::instance(), SLOT(iLike()));
+ TQToolTip::add(button, i18n("I like..."));
+ connect(button, TQT_SIGNAL(clicked()), TQT_TQOBJECT(LikeBack::instance()), TQT_SLOT(iLike()));
menuBar()->insertItem(button);
button = new MenuBarButton("likeback_dislike", menuBar());
- QToolTip::add(button, i18n("I do not like..."));
- connect(button, SIGNAL(clicked()), LikeBack::instance(), SLOT(iDoNotLike()));
+ TQToolTip::add(button, i18n("I do not like..."));
+ connect(button, TQT_SIGNAL(clicked()), TQT_TQOBJECT(LikeBack::instance()), TQT_SLOT(iDoNotLike()));
menuBar()->insertItem(button);
button = new MenuBarButton("likeback_bug", menuBar());
- QToolTip::add(button, i18n("I found a bug..."));
- connect(button, SIGNAL(clicked()), LikeBack::instance(), SLOT(iFoundABug()));
+ TQToolTip::add(button, i18n("I found a bug..."));
+ connect(button, TQT_SIGNAL(clicked()), TQT_TQOBJECT(LikeBack::instance()), TQT_SLOT(iFoundABug()));
menuBar()->insertItem(button);
button = new MenuBarButton("configure", menuBar());
- QToolTip::add(button, i18n("Configure email..."));
- connect(button, SIGNAL(clicked()), LikeBack::instance(), SLOT(askEMail()));
+ TQToolTip::add(button, i18n("Configure email..."));
+ connect(button, TQT_SIGNAL(clicked()), TQT_TQOBJECT(LikeBack::instance()), TQT_SLOT(askEMail()));
menuBar()->insertItem(button);
button = new MenuBarButton("help", menuBar());
- connect(button, SIGNAL(clicked()), LikeBack::instance(), SLOT(showWhatsThisMessage()));
+ connect(button, TQT_SIGNAL(clicked()), TQT_TQOBJECT(LikeBack::instance()), TQT_SLOT(showWhatsThisMessage()));
menuBar()->insertItem(button);
- QTimer::singleShot(0, this, SLOT(initialLoading()));
+ TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(initialLoading()));
}
MainWindow::~MainWindow()
@@ -361,10 +361,10 @@ void MainWindow::readDockConfig()
KDockMainWindow::readDockConfig(kapp->config(), "dock_config");
// if there is a new dock: it is not displayed by default...
- QMap<QString, QString> entries = kapp->config()->entryMap("dock_config");
- QValueList<DockData>::iterator it;
+ TQMap<TQString, TQString> entries = kapp->config()->entryMap("dock_config");
+ TQValueList<DockData>::iterator it;
for(it=_docks.begin(); it!=_docks.end(); ++it) {
- QMap<QString, QString>::const_iterator eit;
+ TQMap<TQString, TQString>::const_iterator eit;
for(eit=entries.begin(); eit!=entries.end(); ++eit)
if ( eit.key().startsWith((*it).dock->name()) ) break;
if ( eit==entries.end() ) initDockPosition(*it);
@@ -372,12 +372,12 @@ void MainWindow::readDockConfig()
// readDockConfig also restore the names/tooltips: what if a new version of the application changes these names...
for(it=_docks.begin(); it!=_docks.end(); ++it) (*it).dock->setTabPageLabel((*it).title);
- QApplication::postEvent(this, new QEvent(QEvent::CaptionChange));
+ TQApplication::postEvent(this, new TQEvent(TQEvent::CaptionChange));
}
void MainWindow::initialLoading()
{
- ::BusyCursor bc;
+ ::PBusyCursor bc;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
if ( args->count()!=0 ) { // opened urls provided on the command line
for (int i = 0; i<args->count(); i++) {
@@ -404,7 +404,7 @@ void MainWindow::configureToolbar()
{
saveMainWindowSettings(KGlobal::config(), "MainWindow");
KEditToolbar dlg(actionCollection());
- connect(&dlg, SIGNAL(newToolbarConfig()), SLOT(applyToolbarSettings()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(applyToolbarSettings()));
dlg.exec();
}
@@ -457,7 +457,7 @@ void MainWindow::selectTool(const Tool::Group &group)
else Debugger::manager->update(true);
}
-void MainWindow::setDevice(const QString &device)
+void MainWindow::setDevice(const TQString &device)
{
if ( device==i18n(Device::AUTO_DATA.label) ) Compile::Config::setDevice(Main::project(), Device::AUTO_DATA.name);
else Compile::Config::setDevice(Main::project(), device);
@@ -510,7 +510,7 @@ bool MainWindow::queryClose()
return false;
}
// save other settings
- ::BusyCursor bc;
+ ::PBusyCursor bc;
writeDockConfig(kapp->config(), "dock_config");
static_cast<KRecentFilesAction *>(Main::action("project_open_recent"))->saveEntries(kapp->config(), "recent-projects");
static_cast<KRecentFilesAction *>(Main::action("file_open_recent"))->saveEntries(kapp->config(), "recent-files");
@@ -522,7 +522,7 @@ bool MainWindow::queryClose()
void MainWindow::newSourceFile()
{
NewFileDialog dialog(Main::project(), this);
- if ( dialog.exec()!=QDialog::Accepted ) return;
+ if ( dialog.exec()!=TQDialog::Accepted ) return;
if ( !dialog.url().exists() && !dialog.url().create(*Main::_compileLog) ) return;
Main::_editorManager->openEditor(dialog.url());
if ( dialog.addToProject() ) Main::_projectManager->insertFile(dialog.url());
@@ -534,9 +534,9 @@ void MainWindow::newHexFile()
MessageBox::sorry(i18n("You need to specify a device to create a new hex file."), Log::Show);
return;
}
- QString s;
+ TQString s;
for (uint i=0; true; i++) {
- s = i18n("Hex") + (i==0 ? QString::null : QString::number(i));
+ s = i18n("Hex") + (i==0 ? TQString() : TQString::number(i));
if ( Main::_editorManager->findEditor(s)==0 ) break;
}
HexEditor *editor = new HexEditor(s, Main::_editorManager);
@@ -546,7 +546,7 @@ void MainWindow::newHexFile()
bool MainWindow::openFile()
{
- QString filter;
+ TQString filter;
filter += PURL::sourceFilter(PURL::SimpleFilter);
filter += "\n" + PURL::filter(PURL::Hex);
filter += "\n" + PURL::projectFilter(PURL::SimpleFilter);
@@ -570,7 +570,7 @@ void MainWindow::updateGUI()
showProgress(false);
break;
case Main::Compiling:
- _actionStatus->setText(Main::_compileManager->label());
+ _actiontqStatus->setText(Main::_compileManager->label());
showProgress(true);
makeWidgetDockVisible(Main::_compileLog);
break;
@@ -595,7 +595,7 @@ void MainWindow::updateGUI()
Main::action("show_disassembly_location")->setEnabled(Debugger::manager->coff()!=0 && (isSource || isHeader));
// update project
- bool inProject = ( Main::currentEditor() && (currentType==PURL::Nb_FileTypes || Main::currentEditor()->url().isEmpty() || Main::_projectManager->contains(Main::currentEditor()->url())) );
+ bool inProject = ( Main::currentEditor() && (currentType==PURL::Nb_FileTypes || Main::currentEditor()->url().isEmpty() || Main::_projectManager->tqcontains(Main::currentEditor()->url())) );
if ( Main::project()==0 && !inProject ) {
if ( Main::currentEditor()==0 ) Main::_projectManager->closeProject();
else if ( isSource ) Main::_projectManager->setStandalone(Main::currentEditor()->url(), currentType);
@@ -618,7 +618,7 @@ void MainWindow::updateGUI()
Main::action("project_add_current_file")->setEnabled(Main::project() && !inProject && idle && isSource);
// update build actions
- static_cast<PopupButton *>(_toolStatus->widget())->setText(" " + Main::toolGroup().label() + " ");
+ static_cast<PopupButton *>(_tooltqStatus->widget())->setText(" " + Main::toolGroup().label() + " ");
bool hexProject = ( Main::_projectManager->projectUrl().fileType()==PURL::Hex );
bool customTool = Main::toolGroup().isCustom();
Main::action("build_build_project")->setEnabled((Main::project() || (inProject && !hexProject) ) && idle);
@@ -630,14 +630,14 @@ void MainWindow::updateGUI()
// update programmer status
PortType ptype = Programmer::GroupConfig::portType(Main::programmerGroup());
- static_cast<PopupButton *>(_programmerStatus->widget())->setText(" " + Main::programmerGroup().statusLabel(ptype) + " ");
- QFont f = font();
+ static_cast<PopupButton *>(_programmertqStatus->widget())->setText(" " + Main::programmerGroup().statusLabel(ptype) + " ");
+ TQFont f = font();
bool supported = (Main::deviceData() ? Main::programmerGroup().isSupported(Main::deviceData()->name()) : false);
f.setItalic(!supported);
- _programmerStatus->widget()->setFont(f);
+ _programmertqStatus->widget()->setFont(f);
bool isProgrammer = ( Main::programmerGroup().properties() & ::Programmer::Programmer );
PURL::Url purl = Main::_projectManager->projectUrl();
- bool hasHex = ( currentType==PURL::Hex || Main::_projectManager->contains(purl.toFileType(PURL::Hex)) );
+ bool hasHex = ( currentType==PURL::Hex || Main::_projectManager->tqcontains(purl.toFileType(PURL::Hex)) );
Main::action("prog_connect")->setEnabled(isProgrammer && idle);
Main::action("prog_read")->setEnabled(isProgrammer && idle);
Main::action("prog_program")->setEnabled(isProgrammer && hasHex && idle);
@@ -668,7 +668,7 @@ void MainWindow::updateGUI()
Main::_projectManager->updateGUI();
// caption
- QString caption;
+ TQString caption;
if ( Main::project() ) caption += Main::project()->name();
if ( Main::currentEditor() ) {
if ( Main::project() ) caption += " - ";
@@ -681,38 +681,38 @@ void MainWindow::updateGUI()
void MainWindow::updateToolViewsActions()
{
- QValueList<DockData>::iterator it;
+ TQValueList<DockData>::iterator it;
for(it=_docks.begin(); it!=_docks.end(); ++it) (*it).action->setChecked((*it).dock->mayBeHide());
}
void MainWindow::initDockPosition(const DockData &ddata)
{
const DockPosition &pos = ddata.position;
- ddata.dock->manualDock(manager()->getDockWidgetFromName(pos.parent), pos.pos, pos.space);
+ ddata.dock->manualDock(manager()->getDockWidgetFromName(pos.tqparent), pos.pos, pos.space);
}
void MainWindow::resetDockLayout()
{
- QValueList<DockData>::iterator it;
+ TQValueList<DockData>::iterator it;
for (it=_docks.begin(); it!=_docks.end(); ++it) initDockPosition(*it);
}
-void MainWindow::toggleToolView(QWidget *widget)
+void MainWindow::toggleToolView(TQWidget *widget)
{
static_cast<KDockWidget *>(widget)->changeHideShowState();
}
-void MainWindow::runKfind()
+void MainWindow::runKtqfind()
{
if (_kfindProcess) return;
_kfindProcess = new ::Process::StringOutput;
- QString path;
+ TQString path;
PURL::Url url = Main::projectManager().projectUrl();
if ( !url.isEmpty() ) path = url.path();
- _kfindProcess->setup("kfind", path, false);
- connect(_kfindProcess, SIGNAL(done(int)), SLOT(kfindDone()));
+ _kfindProcess->setup("ktqfind", path, false);
+ connect(_kfindProcess, TQT_SIGNAL(done(int)), TQT_SLOT(kfindDone()));
if ( !_kfindProcess->start(0) )
- MessageBox::sorry(i18n("Could not run \"kfind\""), Log::Show);
+ MessageBox::sorry(i18n("Could not run \"ktqfind\""), Log::Show);
}
void MainWindow::kfindDone()
@@ -725,10 +725,10 @@ void MainWindow::runPikloops()
{
if (_pikloopsProcess) return;
_pikloopsProcess = new ::Process::StringOutput;
- _pikloopsProcess->setup("pikloops", QStringList(), false);
- connect(_pikloopsProcess, SIGNAL(done(int)), SLOT(pikloopsDone()));
+ _pikloopsProcess->setup("pikloops", TQStringList(), false);
+ connect(_pikloopsProcess, TQT_SIGNAL(done(int)), TQT_SLOT(pikloopsDone()));
if ( !_pikloopsProcess->start(0) )
- MessageBox::detailedSorry(i18n("Could not run \"pikloops\""), i18n("The Pikloops utility (%1) is not installed in your system.").arg("http://pikloops.sourceforge.net"), Log::Show);
+ MessageBox::detailedSorry(i18n("Could not run \"pikloops\""), i18n("The Pikloops utility (%1) is not installed in your system.").tqarg("http://pikloops.sourceforge.net"), Log::Show);
}
void MainWindow::pikloopsDone()
@@ -788,8 +788,8 @@ void MainWindow::compileSuccess()
Main::_projectManager->setModified(false);
if ( Main::project()->outputType()==Tool::OutputType::Executable ) {
if ( Debugger::manager->init() ) {
- const QStringList &included = Debugger::manager->coff()->filenames();
- QStringList::const_iterator it;
+ const TQStringList &included = Debugger::manager->coff()->filenames();
+ TQStringList::const_iterator it;
for (it=included.begin(); it!=included.end(); ++it) {
PURL::Directory dir = (Main::project() ? Main::project()->directory() : Main::projectManager().projectUrl().directory());
PURL::Url url = PURL::Url::fromPathOrUrl(*it).toAbsolute(dir);
@@ -838,7 +838,7 @@ void MainWindow::stopBuild()
}
//-----------------------------------------------------------------------------
-void MainWindow::keyPressEvent(QKeyEvent *e)
+void MainWindow::keyPressEvent(TQKeyEvent *e)
{
if ( e->key()==Key_Escape ) stopOperations();
}
@@ -934,7 +934,7 @@ void MainWindow::program()
{
HexEditor *editor = getHexEditor();
if ( editor==0 ) return;
- if ( Main::programmerGroup().isDebugger() && !Main::_projectManager->contains(editor->url()) ) {
+ if ( Main::programmerGroup().isDebugger() && !Main::_projectManager->tqcontains(editor->url()) ) {
MessageBox::sorry(i18n("It is not possible to start a debugging session with an hex file not generated with the current project."), Log::Show);
return;
}
@@ -950,7 +950,7 @@ void MainWindow::verify()
void MainWindow::read()
{
- QString s = i18n("Read");
+ TQString s = i18n("Read");
Editor *e = Main::_editorManager->findEditor(s);
if (e) Main::_editorManager->closeEditor(e, true);
HexEditor *editor = new HexEditor(s, Main::_editorManager);
@@ -964,12 +964,12 @@ void MainWindow::read()
void MainWindow::showProgress(bool show)
{
if (show) {
- BusyCursor::start();
- _actionStatus->show();
+ PBusyCursor::start();
+ _actiontqStatus->show();
_actionProgress->show();
} else {
- BusyCursor::stop();
- _actionStatus->hide();
+ PBusyCursor::stop();
+ _actiontqStatus->hide();
_actionProgress->hide();
}
}
@@ -983,11 +983,11 @@ void MainWindow::setTotalProgress(uint nb)
//qDebug("set total steps: %i", total);
_actionProgress->setTotalSteps(nb);
_actionProgress->setProgress(0);
- QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); // #### DANGER !!!!
+ TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); // #### DANGER !!!!
}
void MainWindow::setProgress(uint nb)
{
_actionProgress->setProgress(nb);
- QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); // #### DANGER !!!!
+ TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); // #### DANGER !!!!
}
diff --git a/src/libgui/toplevel.h b/src/libgui/toplevel.h
index 11a4316..d3e78be 100644
--- a/src/libgui/toplevel.h
+++ b/src/libgui/toplevel.h
@@ -10,8 +10,8 @@
#ifndef TOPLEVEL_H
#define TOPLEVEL_H
-#include <qlabel.h>
-#include <qprogressbar.h>
+#include <tqlabel.h>
+#include <tqprogressbar.h>
#include <kdockwidget.h>
#include "config_center.h"
@@ -26,10 +26,11 @@ namespace Process { class Base; }
class MainWindow : public KDockMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
MainWindow();
virtual ~MainWindow();
- void setDevice(const QString &device);
+ void setDevice(const TQString &device);
public slots:
void newSourceFile();
@@ -41,7 +42,7 @@ public slots:
void configureProject();
void showDeviceInfo();
void runPikloops();
- void runKfind();
+ void runKtqfind();
void configGenerator();
void templateGenerator();
void updateGUI();
@@ -77,7 +78,7 @@ private slots:
void updateToolViewsActions();
void resetDockLayout();
- void toggleToolView(QWidget *widget);
+ void toggleToolView(TQWidget *widget);
void pikloopsDone();
void kfindDone();
@@ -92,10 +93,10 @@ signals:
private:
Log::Widget *_programLog;
- QLabel *_actionStatus, *_debugStatus, *_editorStatus;
- ProgrammerStatusWidget *_programmerStatus;
- ToolStatusWidget *_toolStatus;
- QProgressBar *_actionProgress;
+ TQLabel *_actiontqStatus, *_debugtqStatus, *_editortqStatus;
+ ProgrammerStatusWidget *_programmertqStatus;
+ ToolStatusWidget *_tooltqStatus;
+ TQProgressBar *_actionProgress;
ConfigGenerator *_configGenerator;
::Process::Base *_pikloopsProcess, *_kfindProcess;
bool _forceProgramAfterBuild;
@@ -103,9 +104,9 @@ private:
class DockPosition {
public:
DockPosition() {}
- DockPosition(const QString &pparent) : parent(pparent), pos(KDockWidget::DockCenter), space(0) {}
- DockPosition(KDockWidget::DockPosition ppos, uint pspace) : parent("main_dock_widget"), pos(ppos), space(pspace) {}
- QString parent;
+ DockPosition(const TQString &ptqparent) : tqparent(ptqparent), pos(KDockWidget::DockCenter), space(0) {}
+ DockPosition(KDockWidget::DockPosition ppos, uint pspace) : tqparent("main_dock_widget"), pos(ppos), space(pspace) {}
+ TQString tqparent;
KDockWidget::DockPosition pos;
uint space;
};
@@ -113,19 +114,19 @@ private:
public:
ViewMenuAction *action;
KDockWidget *dock;
- QString title;
+ TQString title;
DockPosition position;
};
- QValueList<DockData> _docks;
+ TQValueList<DockData> _docks;
KDockWidget *_mainDock;
HexEditor *getHexEditor();
virtual bool queryClose();
bool stopOperations();
void cleanBuild(bool singleFile);
- virtual void keyPressEvent(QKeyEvent *e);
+ virtual void keyPressEvent(TQKeyEvent *e);
void readDockConfig();
- KDockWidget *createDock(const QString &name, const QPixmap &icon, const QString &title, const DockPosition &position);
+ KDockWidget *createDock(const TQString &name, const TQPixmap &icon, const TQString &title, const DockPosition &position);
void initDockPosition(const DockData &ddata);
};
diff --git a/src/libgui/toplevel_ui.cpp b/src/libgui/toplevel_ui.cpp
index 5e8db32..2bb50ee 100644
--- a/src/libgui/toplevel_ui.cpp
+++ b/src/libgui/toplevel_ui.cpp
@@ -8,18 +8,18 @@
***************************************************************************/
#include "toplevel_ui.h"
-#include <qstyle.h>
+#include <tqstyle.h>
#include <kiconloader.h>
#include "progs/list/prog_list.h"
#include "tools/list/tool_list.h"
//----------------------------------------------------------------------------
-ProgrammerStatusWidget::ProgrammerStatusWidget(QWidget *parent)
- : QObject(parent), KeyPopupButton<QString>(parent)
+ProgrammerStatusWidget::ProgrammerStatusWidget(TQWidget *tqparent)
+ : TQObject(tqparent), KeyPopupButton<TQString>(tqparent)
{
- connect(widget(), SIGNAL(activated(int)), SLOT(activatedSlot(int)));
- widget()->appendAction(i18n("Configure..."), "configure", this, SIGNAL(configure()));
+ connect(widget(), TQT_SIGNAL(activated(int)), TQT_SLOT(activatedSlot(int)));
+ widget()->appendAction(i18n("Configure..."), "configure", this, TQT_SIGNAL(configure()));
widget()->appendSeparator();
Programmer::Lister::ConstIterator it;
for (it=Programmer::lister().begin(); it!=Programmer::lister().end(); ++it)
@@ -32,12 +32,12 @@ void ProgrammerStatusWidget::activatedSlot(int id)
}
//----------------------------------------------------------------------------
-ToolStatusWidget::ToolStatusWidget(QWidget *parent)
- : QObject(parent), KeyPopupButton<QString>(parent)
+ToolStatusWidget::ToolStatusWidget(TQWidget *tqparent)
+ : TQObject(tqparent), KeyPopupButton<TQString>(tqparent)
{
- connect(widget(), SIGNAL(activated(int)), SLOT(activatedSlot(int)));
- widget()->appendAction(i18n("Configure Toolchain..."), "configure", this, SIGNAL(configureToolchain()));
- widget()->appendAction(i18n("Configure Compilation..."), "configure", this, SIGNAL(configure()));
+ connect(widget(), TQT_SIGNAL(activated(int)), TQT_SLOT(activatedSlot(int)));
+ widget()->appendAction(i18n("Configure Toolchain..."), "configure", this, TQT_SIGNAL(configureToolchain()));
+ widget()->appendAction(i18n("Configure Compilation..."), "configure", this, TQT_SIGNAL(configure()));
widget()->appendSeparator();
Tool::Lister::ConstIterator it;
for (it=Tool::lister().begin(); it!=Tool::lister().end(); ++it)
@@ -61,11 +61,11 @@ void ViewMenuAction::slotActivated()
}
//----------------------------------------------------------------------------
-MenuBarButton::MenuBarButton(const QString &icon, QWidget *parent)
- : QToolButton(parent, "menu_bar_button")
+MenuBarButton::MenuBarButton(const TQString &icon, TQWidget *tqparent)
+ : TQToolButton(tqparent, "menu_bar_button")
{
- QFontMetrics fm(font());
- int h = fm.height() + 2*style().pixelMetric(QStyle::PM_DefaultFrameWidth, this);
+ TQFontMetrics fm(font());
+ int h = fm.height() + 2*tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth, this);
setFixedHeight(h);
KIconLoader loader;
setIconSet(loader.loadIconSet(icon, KIcon::Small, fm.height()-2));
@@ -73,7 +73,7 @@ MenuBarButton::MenuBarButton(const QString &icon, QWidget *parent)
setAutoRaise(true);
}
-QSize MenuBarButton::sizeHint() const
+TQSize MenuBarButton::tqsizeHint() const
{
- return QSize(QToolButton::sizeHint().width(), height());
+ return TQSize(TQToolButton::tqsizeHint().width(), height());
}
diff --git a/src/libgui/toplevel_ui.h b/src/libgui/toplevel_ui.h
index 8a5f631..b4e99b8 100644
--- a/src/libgui/toplevel_ui.h
+++ b/src/libgui/toplevel_ui.h
@@ -9,7 +9,7 @@
#ifndef TOPLEVEL_UI_H
#define TOPLEVEL_UI_H
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include <kdockwidget.h>
#include <kaction.h>
@@ -18,11 +18,12 @@ namespace Programmer { class Group; }
namespace Tool { class Group; }
//----------------------------------------------------------------------------
-class ProgrammerStatusWidget : public QObject, public KeyPopupButton<QString>
+class ProgrammerStatusWidget : public TQObject, public KeyPopupButton<TQString>
{
Q_OBJECT
+ TQ_OBJECT
public:
- ProgrammerStatusWidget(QWidget *parent);
+ ProgrammerStatusWidget(TQWidget *tqparent);
signals:
void configure();
@@ -33,11 +34,12 @@ private slots:
};
//----------------------------------------------------------------------------
-class ToolStatusWidget : public QObject, public KeyPopupButton<QString>
+class ToolStatusWidget : public TQObject, public KeyPopupButton<TQString>
{
Q_OBJECT
+ TQ_OBJECT
public:
- ToolStatusWidget(QWidget *parent);
+ ToolStatusWidget(TQWidget *tqparent);
signals:
void configureToolchain();
@@ -52,11 +54,12 @@ private slots:
class ViewMenuAction : public KToggleAction
{
Q_OBJECT
+ TQ_OBJECT
public:
ViewMenuAction(KDockWidget *widget);
signals:
- void activated(QWidget *);
+ void activated(TQWidget *);
private slots:
virtual void slotActivated();
@@ -66,12 +69,13 @@ private:
};
//----------------------------------------------------------------------------
-class MenuBarButton : public QToolButton
+class MenuBarButton : public TQToolButton
{
Q_OBJECT
+ TQ_OBJECT
public:
- MenuBarButton(const QString &icon, QWidget *parent);
- virtual QSize sizeHint() const;
+ MenuBarButton(const TQString &icon, TQWidget *tqparent);
+ virtual TQSize tqsizeHint() const;
};
#endif
diff --git a/src/libgui/watch_view.cpp b/src/libgui/watch_view.cpp
index 984dc7c..4f5ef89 100644
--- a/src/libgui/watch_view.cpp
+++ b/src/libgui/watch_view.cpp
@@ -8,8 +8,8 @@
***************************************************************************/
#include "watch_view.h"
-#include <qheader.h>
-#include <qcombobox.h>
+#include <tqheader.h>
+#include <tqcombobox.h>
#include <kiconloader.h>
#include "main_global.h"
@@ -21,25 +21,25 @@
#include "common/gui/list_container.h"
//-----------------------------------------------------------------------------
-Register::BaseListView::BaseListView(QWidget *parent)
- : ListView(parent), _root(0)
+Register::BaseListView::BaseListView(TQWidget *tqparent)
+ : ListView(tqparent), _root(0)
{
header()->hide();
setSorting(-1);
setFullWidth(true);
setRootIsDecorated(false);
setAllColumnsShowFocus(true);
- connect(this, SIGNAL(mouseButtonClicked(int, QListViewItem *, const QPoint &, int)),
- SLOT(itemClicked(int, QListViewItem *, const QPoint &, int)));
- connect(this, SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)),
- SLOT(contextMenu(QListViewItem *, const QPoint &, int)));
+ connect(this, TQT_SIGNAL(mouseButtonClicked(int, TQListViewItem *, const TQPoint &, int)),
+ TQT_SLOT(itemClicked(int, TQListViewItem *, const TQPoint &, int)));
+ connect(this, TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)),
+ TQT_SLOT(contextMenu(TQListViewItem *, const TQPoint &, int)));
}
//-----------------------------------------------------------------------------
-Register::RegisterListView::RegisterListView(QWidget *parent)
- : BaseListView(parent)
+Register::RegisterListView::RegisterListView(TQWidget *tqparent)
+ : BaseListView(tqparent)
{
- addColumn(QString::null);
+ addColumn(TQString());
}
void Register::RegisterListView::init(const Device::Data *data)
@@ -55,34 +55,34 @@ void Register::RegisterListView::init(const Device::Data *data)
void Register::RegisterListView::updateView()
{
- QListViewItemIterator it(_root);
+ TQListViewItemIterator it(_root);
for (; it.current(); ++it) {
int id = _root->id(it.current());
if ( id==-1 || _ids[id].type()==Invalid ) continue;
bool watched = Register::list().isWatched(_ids[id]);
- static_cast<QCheckListItem *>(it.current())->setOn(watched);
+ static_cast<TQCheckListItem *>(it.current())->setOn(watched);
}
}
-void Register::RegisterListView::itemClicked(int button, QListViewItem *item, const QPoint &, int)
+void Register::RegisterListView::itemClicked(int button, TQListViewItem *item, const TQPoint &, int)
{
- if ( item==0 || button!=LeftButton ) return;
+ if ( item==0 || button!=Qt::LeftButton ) return;
if ( item==firstChild() ) Main::editorManager().openEditor(EditorManager::RegisterEditor);
int id = _root->id(item);
if ( id==-1 || _ids[id].type()==Invalid ) return;
bool watched = Register::list().isWatched(_ids[id]);
- static_cast<QCheckListItem *>(item)->setOn(!watched);
+ static_cast<TQCheckListItem *>(item)->setOn(!watched);
Debugger::manager->setRegisterWatched(_ids[id], !watched);
}
//-----------------------------------------------------------------------------
-Register::WatchedListView::WatchedListView(QWidget *parent)
- : BaseListView(parent), _popup(0), _base(NumberBase::Hex)
+Register::WatchedListView::WatchedListView(TQWidget *tqparent)
+ : BaseListView(tqparent), _popup(0), _base(NumberBase::Hex)
{
setSorting(0);
- addColumn(QString::null);
- addColumn(QString::null);
- addColumn(QString::null);
+ addColumn(TQString());
+ addColumn(TQString());
+ addColumn(TQString());
_root = new ListViewItemContainer(i18n("Watched"), this);
KIconLoader loader;
@@ -91,14 +91,14 @@ Register::WatchedListView::WatchedListView(QWidget *parent)
_root->setOpen(true);
}
-KPopupMenu *Register::WatchedListView::appendFormatMenu(KPopupMenu *parent, uint offset)
+KPopupMenu *Register::WatchedListView::appendFormatMenu(KPopupMenu *tqparent, uint offset)
{
KIconLoader loader;
- QPixmap icon = loader.loadIcon("fonts", KIcon::Small);
+ TQPixmap icon = loader.loadIcon("fonts", KIcon::Small);
KPopupMenu *popup = new KPopupMenu;
popup->insertTitle(i18n("Format"));
FOR_EACH(NumberBase, base) popup->insertItem(base.label(), offset + base.type());
- parent->insertItem(icon, i18n("Format"), popup);
+ tqparent->insertItem(icon, i18n("Format"), popup);
return popup;
}
@@ -112,24 +112,24 @@ void Register::WatchedListView::init(const Device::Data *data)
_popup->insertSeparator();
_formatPopup = appendFormatMenu(_popup, _ids.count());
KIconLoader loader;
- QPixmap icon = loader.loadIcon("cancel", KIcon::Small);
- _popup->insertItem(icon, i18n("Clear"), Debugger::manager, SLOT(stopWatchAll()));
+ TQPixmap icon = loader.loadIcon("cancel", KIcon::Small);
+ _popup->insertItem(icon, i18n("Clear"), Debugger::manager, TQT_SLOT(stopWatchAll()));
}
void Register::WatchedListView::updateView()
{
// delete items not watched anymore
- for (QListViewItem *item=_root->firstChild(); item;) {
+ for (TQListViewItem *item=_root->firstChild(); item;) {
ListViewItem *ritem = static_cast<ListViewItem *>(item);
item = item->nextSibling();
if ( !Register::list().isWatched(ritem->data()) ) delete ritem;
}
// add new items
bool added = false;
- QValueList<Register::TypeData> watched = Register::list().watched();
- QValueVector<ListViewItem *> items(watched.count());
+ TQValueList<Register::TypeData> watched = Register::list().watched();
+ TQValueVector<ListViewItem *> items(watched.count());
for (uint k=0; k<watched.count(); k++) {
- QListViewItem *item = _root->firstChild();
+ TQListViewItem *item = _root->firstChild();
for (; item; item=item->nextSibling())
if ( static_cast<ListViewItem *>(item)->data()==watched[k] ) break;
if (item) {
@@ -143,23 +143,23 @@ void Register::WatchedListView::updateView()
}
}
-QString Register::WatchedListView::tooltip(const QListViewItem &item, int col) const
+TQString Register::WatchedListView::tooltip(const TQListViewItem &item, int col) const
{
if ( item.rtti()==Register::PortBitRtti ) return static_cast<const PortBitListViewItem &>(item).tooltip(col);
if ( item.rtti()==Register::RegisterRtti ) return static_cast<const ListViewItem &>(item).tooltip(col);
- return QString::null;
+ return TQString();
}
-void Register::WatchedListView::itemClicked(int button, QListViewItem *item, const QPoint &, int col)
+void Register::WatchedListView::itemClicked(int button, TQListViewItem *item, const TQPoint &, int col)
{
- if ( item==0 || button!=LeftButton ) return;
+ if ( item==0 || button!=Qt::LeftButton ) return;
else if ( item->rtti()==RegisterRtti ) {
if ( col==2 && Main::programmerState()==Programmer::Halted ) static_cast<ListViewItem *>(item)->startRename();
else item->setOpen(!item->isOpen());
}
}
-void Register::WatchedListView::contextMenu(QListViewItem *item, const QPoint &p, int)
+void Register::WatchedListView::contextMenu(TQListViewItem *item, const TQPoint &p, int)
{
if ( item==0 ) return;
if ( item==firstChild() ) {
@@ -170,7 +170,7 @@ void Register::WatchedListView::contextMenu(QListViewItem *item, const QPoint &p
if ( res<int(_ids.count()) ) Debugger::manager->setRegisterWatched(_ids[res], true);
else {
_base = NumberBase::Type(res-_ids.count());
- for (QListViewItem *item=_root->firstChild(); item; item=item->nextSibling())
+ for (TQListViewItem *item=_root->firstChild(); item; item=item->nextSibling())
static_cast<ListViewItem *>(item)->setBase(_base);
}
} else {
@@ -178,11 +178,11 @@ void Register::WatchedListView::contextMenu(QListViewItem *item, const QPoint &p
Register::ListViewItem *ritem = static_cast<ListViewItem *>(item);
KPopupMenu *pop = new KPopupMenu;
pop->insertTitle(ritem->label());
- QPopupMenu *fpop = appendFormatMenu(pop, 0);
+ TQPopupMenu *fpop = appendFormatMenu(pop, 0);
FOR_EACH(NumberBase, base) fpop->setItemChecked(base.type(), ritem->base()==base);
pop->insertSeparator();
KIconLoader loader;
- QPixmap icon = loader.loadIcon("edit", KIcon::Small);
+ TQPixmap icon = loader.loadIcon("edit", KIcon::Small);
int editId = pop->insertItem(icon, i18n("Edit"));
pop->setItemEnabled(editId, Main::programmerState()==Programmer::Halted);
icon = loader.loadIcon("cancel", KIcon::Small);
@@ -196,11 +196,11 @@ void Register::WatchedListView::contextMenu(QListViewItem *item, const QPoint &p
}
//-----------------------------------------------------------------------------
-Register::WatchView::WatchView(QWidget *parent)
- : QWidget(parent, "watch_view"), GenericView(Register::list()), _data(0)
+Register::WatchView::WatchView(TQWidget *tqparent)
+ : TQWidget(tqparent, "watch_view"), GenericView(Register::list()), _data(0)
{
- QVBoxLayout *top = new QVBoxLayout(this);
- QValueList<int> sizes;
+ TQVBoxLayout *top = new TQVBoxLayout(this);
+ TQValueList<int> sizes;
sizes.append(50);
Splitter *splitter = new Splitter(sizes, Qt::Vertical, this, "watch_window_splitter");
top->addWidget(splitter);
diff --git a/src/libgui/watch_view.h b/src/libgui/watch_view.h
index a7ac24c..f5090d1 100644
--- a/src/libgui/watch_view.h
+++ b/src/libgui/watch_view.h
@@ -22,62 +22,66 @@ namespace Register
class BaseListView : public ListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- BaseListView(QWidget *parent);
+ BaseListView(TQWidget *tqparent);
virtual void init(const Device::Data *data) = 0;
virtual void updateView() = 0;
private slots:
- virtual void itemClicked(int button, QListViewItem *item, const QPoint &p, int col) = 0;
- virtual void contextMenu(QListViewItem *item, const QPoint &p, int col) = 0;
+ virtual void itemClicked(int button, TQListViewItem *item, const TQPoint &p, int col) = 0;
+ virtual void contextMenu(TQListViewItem *item, const TQPoint &p, int col) = 0;
protected:
ListViewItemContainer *_root;
- QValueVector<Register::TypeData> _ids;
+ TQValueVector<Register::TypeData> _ids;
};
//-----------------------------------------------------------------------------
class RegisterListView : public BaseListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- RegisterListView(QWidget *parent);
+ RegisterListView(TQWidget *tqparent);
virtual void init(const Device::Data *data);
virtual void updateView();
private slots:
- virtual void itemClicked(int button, QListViewItem *item, const QPoint &p, int col);
- virtual void contextMenu(QListViewItem *, const QPoint &, int) {}
+ virtual void itemClicked(int button, TQListViewItem *item, const TQPoint &p, int col);
+ virtual void contextMenu(TQListViewItem *, const TQPoint &, int) {}
};
//-----------------------------------------------------------------------------
class WatchedListView : public BaseListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- WatchedListView(QWidget *parent);
- virtual QString tooltip(const QListViewItem &item, int col) const;
+ WatchedListView(TQWidget *tqparent);
+ virtual TQString tooltip(const TQListViewItem &item, int col) const;
virtual void init(const Device::Data *data);
virtual void updateView();
private slots:
- virtual void itemClicked(int button, QListViewItem *item, const QPoint &p, int col);
- virtual void contextMenu(QListViewItem *item, const QPoint &p, int col);
+ virtual void itemClicked(int button, TQListViewItem *item, const TQPoint &p, int col);
+ virtual void contextMenu(TQListViewItem *item, const TQPoint &p, int col);
private:
PopupContainer *_popup;
KPopupMenu *_formatPopup;
NumberBase _base;
- static KPopupMenu *appendFormatMenu(KPopupMenu *parent, uint offset);
+ static KPopupMenu *appendFormatMenu(KPopupMenu *tqparent, uint offset);
};
//-----------------------------------------------------------------------------
-class WatchView : public QWidget, public GenericView
+class WatchView : public TQWidget, public GenericView
{
Q_OBJECT
+ TQ_OBJECT
public:
- WatchView(QWidget *parent);
+ WatchView(TQWidget *tqparent);
void init(bool force);
public slots: