diff options
Diffstat (limited to 'src/libgui/toplevel.cpp')
-rw-r--r-- | src/libgui/toplevel.cpp | 364 |
1 files changed, 182 insertions, 182 deletions
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 !!!! } |