void MainWindow::setupActions() { //file menu KStdAction::openNew(this, SLOT(slotNewFile()), actionCollection()); KStdAction::open(this, SLOT(slotOpenFile()), actionCollection()); m_actionRecent = KStdAction::openRecent(this, SLOT(slotFileRecent(const KURL&)), actionCollection()); m_actionRecent->loadEntries(kapp->config());//,"Recent Files"); KStdAction::save(this, SLOT(slotSaveCurrentFile()), actionCollection()); KStdAction::saveAs(this, SLOT(slotSaveCurrentFileAs()), actionCollection()); KStdAction::close(this, SLOT(slotCloseFile()), actionCollection()); (void)new KAction(i18n("Close All"), 0, this, SLOT(slotCloseAllFiles()), actionCollection(), "file_close_all"); KStdAction::quit(this, SLOT(slotQuit()), actionCollection()); KStdAction::keyBindings(this, SLOT(slotEditKeys()), actionCollection()); KStdAction::configureToolbars(this, SLOT(slotEditToolbars()), actionCollection()); KStdAction::preferences(this, SLOT(slotShowSettings()), actionCollection(), "settings_gpteditor"); (void)new KAction(i18n("Compile"), "make_kdevelop", "F10", m_debugger_manager, SLOT(slotCompileApplication()), actionCollection(), "compile_application"); (void)new KAction(i18n("Run"), "gear", "F9", m_debugger_manager, SLOT(slotRunApplication()), actionCollection(), "run_application"); (void)new KAction(i18n("Start Debug"), "dbgstart", "F5", m_debugger_manager, SLOT(slotDebugStart()), actionCollection(), "debug_start"); (void)new KAction(i18n("Stop Debug"), "stop", "Escape", m_debugger_manager, SLOT(slotDebugStop()), actionCollection(), "debug_stop"); (void)new KAction(i18n("Step Over"), "dbgnext", "F6", m_debugger_manager, SLOT(slotDebugStepOver()), actionCollection(), "debug_step_over"); (void)new KAction(i18n("Step Into"), "dbgstep", "F7", m_debugger_manager, SLOT(slotDebugStepInto()), actionCollection(), "debug_step_into"); (void)new KAction(i18n("Step Out"), "dbgstepout", "F8", m_debugger_manager, SLOT(slotDebugStepOut()), actionCollection(), "debug_step_out"); // (void)new KAction(i18n("Profile (DBG only)"), "math_sum", "Alt+P", m_debugger_manager, // SLOT(slotProfile()), actionCollection(), "script_profile"); (void)new KAction(i18n("Toggle Breakpoint"), "activebreakpoint", "Alt+B", m_debugger_manager, SLOT(slotDebugToggleBp()), actionCollection(), "debug_toggle_bp"); // (void)new KAction("", "math_brace", 0, m_tabEditor, // SLOT(slotAddWatch()), actionCollection(), "editor_add_watch"); // Editor default action setStandardToolBarMenuEnabled(true); }
void DebuggerManager::initActions() { KAction * newaction; KActionCollection *ac = quantaApp->actionCollection(); if(!ac) return; //Debugger, breakpoint newaction = new KAction(i18n("Toggle &Breakpoint"), SmallIcon("debug_breakpoint"), Qt::CTRL+Qt::SHIFT+Qt::Key_B, this, SLOT(toggleBreakpoint()), ac, "debug_breakpoints_toggle"); newaction->setToolTip(i18n("Toggles a breakpoint at the current cursor location")); newaction = new KAction(i18n("&Clear Breakpoints"), 0, this, SLOT(clearBreakpoints()), ac, "debug_breakpoints_clear"); newaction->setToolTip(i18n("Clears all breakpoints")); newaction = new KAction(i18n("Break When..."), SmallIcon("math_int"), 0, this, SLOT(slotConditionalBreakpoint()), ac, "debug_conditional_break"); newaction->setToolTip(i18n("Adds a new conditional breakpoint")); newaction = new KAction(i18n("Break When..."), SmallIcon("math_int"), 0, this, SLOT(slotConditionalBreakpoint()), ac, "debug_conditional_breakdialog"); newaction->setToolTip(i18n("Adds a new conditional breakpoint")); // Execution newaction = new KAction(i18n("Send HTTP R&equest"), SmallIcon("debug_currentline"), 0, this, SLOT(slotDebugRequest()), ac, "debug_request"); newaction->setToolTip(i18n("Initiate HTTP Request to the server with debugging activated")); newaction = new KAction(i18n("&Trace"), SmallIcon("debug_run"), 0, this, SLOT(slotDebugTrace()), ac, "debug_trace"); newaction->setToolTip(i18n("Traces through the script. If a script is currently not being debugged, it will start in trace mode when started")); newaction = new KAction(i18n("&Run"), SmallIcon("debug_leap"), 0, this, SLOT(slotDebugRun()), ac, "debug_run"); newaction->setToolTip(i18n("Runs the script. If a script is currently not being debugged, it will start in run mode when started")); newaction = new KAction(i18n("&Step"), SmallIcon("debug_stepover"), 0, this, SLOT(slotDebugStepOver()), ac, "debug_stepover"); newaction->setToolTip(i18n("Executes the next line of execution, but does not step into functions or includes")); newaction = new KAction(i18n("Step &Into"), SmallIcon("debug_stepinto"), 0, this, SLOT(slotDebugStepInto()), ac, "debug_stepinto"); newaction->setToolTip(i18n("Executes the next line of execution and steps into it if it is a function call or inclusion of a file")); newaction = new KAction(i18n("S&kip"), SmallIcon("debug_skip"), 0, this, SLOT(slotDebugSkip()), ac, "debug_skip"); newaction->setToolTip(i18n("Skips the next command of execution and makes the next command the current one")); newaction = new KAction(i18n("Step &Out"), SmallIcon("debug_stepout"), 0, this, SLOT(slotDebugStepOut()), ac, "debug_stepout"); newaction->setToolTip(i18n("Executes the rest of the commands in the current function/file and pauses when it is done (when it reaches a higher level in the backtrace)")); newaction = new KAction(i18n("&Pause"), SmallIcon("debug_pause"), 0, this, SLOT(slotDebugPause()), ac, "debug_pause"); newaction->setToolTip(i18n("Pauses the scripts if it is running or tracing. If a script is currently not being debugged, it will start in paused mode when started")); newaction = new KAction(i18n("Kill"), SmallIcon("debug_kill"), 0, this, SLOT(slotDebugKill()), ac, "debug_kill"); newaction->setToolTip(i18n("Kills the currently running script")); newaction = new KAction(i18n("Start Session"), SmallIcon("debug_connect"), 0, this, SLOT(slotDebugStartSession()), ac, "debug_connect"); newaction->setToolTip(i18n("Starts the debugger internally (Makes debugging possible)")); newaction = new KAction(i18n("End Session"), SmallIcon("debug_disconnect"), 0, this, SLOT(slotDebugEndSession()), ac, "debug_disconnect"); newaction->setToolTip(i18n("Stops the debugger internally (debugging not longer possible)")); // Variables newaction = new KAction(i18n("Watch Variable"), SmallIcon("math_brace"), 0, this, SLOT(slotAddWatch()), ac, "debug_addwatch"); newaction->setToolTip(i18n("Adds a variable to the watch list")); newaction = new KAction(i18n("Watch Variable"), SmallIcon("math_brace"), 0, this, SLOT(slotAddWatch()), ac, "debug_addwatchdialog"); newaction->setToolTip(i18n("Adds a variable to the watch list")); newaction = new KAction(i18n("Set Value of Variable"), SmallIcon("edit"), 0, this, SLOT(slotVariableSet()), ac, "debug_variable_set"); newaction->setToolTip(i18n("Changes the value of a variable")); newaction = new KAction(i18n("Set Value of Variable"), SmallIcon("edit"), 0, this, SLOT(slotVariableSet()), ac, "debug_variable_setdialog"); newaction->setToolTip(i18n("Changes the value of a variable")); newaction = new KAction(i18n("Open Profiler Output"), SmallIcon("launch"), 0, this, SLOT(slotProfilerOpen()), ac, "debug_profiler_open"); newaction->setToolTip(i18n("Opens the profiler output file")); enableAction("*", false); }
void MainWindow::setupActions() { //file menu KStdAction::open(this, SLOT(slotOpenFile()), actionCollection()); m_actionRecent = KStdAction::openRecent(this, SLOT(slotFileRecent(const KURL&)), actionCollection()); m_actionRecent->loadEntries(kapp->config());//,"Recent Files"); KStdAction::close(this, SLOT(slotCloseFile()), actionCollection()); (void)new KAction(i18n("Close All"), 0, this, SLOT(slotCloseAllFiles()), actionCollection(), "file_close_all"); KStdAction::quit(this, SLOT(slotQuit()), actionCollection()); KStdAction::keyBindings(this, SLOT(slotEditKeys()), actionCollection()); KStdAction::configureToolbars(this, SLOT(slotEditToolbars()), actionCollection()); KStdAction::preferences(this, SLOT(slotShowSettings()), actionCollection(), "settings_protoeditor"); m_siteAction = new KSelectAction("Site", 0, actionCollection(), "site_selection"); connect(m_siteAction, SIGNAL(activated(const QString&)), ProtoeditorSettings::self(), SLOT(slotCurrentSiteChanged(const QString&))); m_defaultScriptAction = new KSelectAction("Default script", 0, actionCollection(), "default_script"); QStringList l; l << "Site Script" << "Active Script"; m_defaultScriptAction->setItems(l); m_defaultScriptAction->setCurrentItem(0); // connect(m_defaultScriptAction, SIGNAL(activated(int)), // this, SLOT(slotDefaultScriptChanged(int))); // (void)new KAction(i18n("&Run"), "gear", "F9", m_debugger_manager, // SLOT(slotDebugStart()), actionCollection(), "script_run_current_script"); (void)new KAction(i18n("Start Debug"), "dbgstart", "F5", m_debugger_manager, SLOT(slotDebugStart()), actionCollection(), "debug_start"); (void)new KAction(i18n("Stop Debug"), "stop", "Escape", m_debugger_manager, SLOT(slotDebugStop()), actionCollection(), "debug_stop"); (void)new KAction(i18n("Step Over"), "dbgnext", "F6", m_debugger_manager, SLOT(slotDebugStepOver()), actionCollection(), "debug_step_over"); (void)new KAction(i18n("Step Into"), "dbgstep", "F7", m_debugger_manager, SLOT(slotDebugStepInto()), actionCollection(), "debug_step_into"); (void)new KAction(i18n("Step Out"), "dbgstepout", "F8", m_debugger_manager, SLOT(slotDebugStepOut()), actionCollection(), "debug_step_out"); (void)new KAction(i18n("Profile"), "math_sum", "Alt+P", m_debugger_manager, SLOT(slotProfile()), actionCollection(), "script_profile"); (void)new KAction(i18n("Toggle Breakpoint"), "activebreakpoint", "Alt+B", m_debugger_manager, SLOT(slotDebugToggleBp()), actionCollection(), "debug_toggle_bp"); (void)new KAction("", "math_brace", 0, m_tabEditor, SLOT(slotAddWatch()), actionCollection(), "editor_add_watch"); setStandardToolBarMenuEnabled(true); }