void SettingsForm::saveSettings() { m_SoundOnGameStart = ui.optionSoundGameStart->isChecked(); settings->setValue("GameStartedSound", m_SoundOnGameStart); m_FriendFollow = ui.optionFriendFollow->isChecked(); settings->setValue("FriendFollow", m_FriendFollow); m_Refresh = ui.optionRefresh->isChecked(); settings->setValue("InactiveRefresh", m_Refresh); m_Skin = ui.cmbSkin->currentText(); settings->setValue("Skin", m_Skin); QFile styleSheet(QString("./skins/%1/style.css").arg(m_Skin)); QString style; if(styleSheet.open(QFile::ReadOnly)) { QTextStream styleIn(&styleSheet); style = styleIn.readAll(); styleSheet.close(); QMainWindow* parent = (QMainWindow*)this->parent(); parent->setStyleSheet(style); emit reloadSkin(); } this->close(); }
void LaunchyWidget::launchItem(CatItem& item) { int ops = MSG_CONTROL_LAUNCHITEM; if (item.id != HASH_LAUNCHY && item.id != HASH_LAUNCHYFILE) { ops = plugins.execute(&inputData, &item); if (ops > 1) { switch (ops) { case MSG_CONTROL_EXIT: close(); break; case MSG_CONTROL_OPTIONS: showOptionsDialog(); break; case MSG_CONTROL_REBUILD: buildCatalog(); break; case MSG_CONTROL_RELOADSKIN: reloadSkin(); break; default: break; } } } if (ops == MSG_CONTROL_LAUNCHITEM) { QString args = ""; if (inputData.count() > 1) for(int i = 1; i < inputData.count(); ++i) args += inputData[i].getText() + " "; /* UPDATE #ifdef Q_WS_X11 if (!platform->Execute(item.fullPath, args)) runProgram(item.fullPath, args); #else */ runProgram(item.fullPath, args); //#endif } catalog->incrementUsage(item); history.addItem(inputData); }
void WMainMenuBar::initialize() { // FILE MENU QMenu* pFileMenu = new QMenu(tr("&File")); QString loadTrackText = tr("Load Track to Deck &%1"); QString loadTrackStatusText = tr("Loads a track in deck %1"); QString openText = tr("Open"); for (unsigned int deck = 0; deck < kMaxLoadToDeckActions; ++deck) { QString playerLoadStatusText = loadTrackStatusText.arg(QString::number(deck + 1)); QAction* pFileLoadSongToPlayer = new QAction( loadTrackText.arg(QString::number(deck + 1)), this); QString binding = m_pKbdConfig->getValueString( ConfigKey("[KeyboardShortcuts]", QString("FileMenu_LoadDeck%1").arg(deck + 1)), loadToDeckDefaultKeyBinding(deck)); if (!binding.isEmpty()) { pFileLoadSongToPlayer->setShortcut(QKeySequence(binding)); pFileLoadSongToPlayer->setShortcutContext(Qt::ApplicationShortcut); } pFileLoadSongToPlayer->setStatusTip(playerLoadStatusText); pFileLoadSongToPlayer->setWhatsThis( buildWhatsThis(openText, playerLoadStatusText)); // Visibility of load to deck actions is set in // WMainMenuBar::onNumberOfDecksChanged. pFileLoadSongToPlayer->setVisible(false); connect(pFileLoadSongToPlayer, SIGNAL(triggered()), &m_loadToDeckMapper, SLOT(map())); m_loadToDeckMapper.setMapping(pFileLoadSongToPlayer, deck + 1); pFileMenu->addAction(pFileLoadSongToPlayer); m_loadToDeckActions.push_back(pFileLoadSongToPlayer); } pFileMenu->addSeparator(); QString quitTitle = tr("&Exit"); QString quitText = tr("Quits Mixxx"); QAction* pFileQuit = new QAction(quitTitle, this); pFileQuit->setShortcut( QKeySequence(m_pKbdConfig->getValueString(ConfigKey("[KeyboardShortcuts]", "FileMenu_Quit"), tr("Ctrl+q")))); pFileQuit->setShortcutContext(Qt::ApplicationShortcut); pFileQuit->setStatusTip(quitText); pFileQuit->setWhatsThis(buildWhatsThis(quitTitle, quitText)); pFileQuit->setMenuRole(QAction::QuitRole); connect(pFileQuit, SIGNAL(triggered()), this, SIGNAL(quit())); pFileMenu->addAction(pFileQuit); addMenu(pFileMenu); // LIBRARY MENU QMenu* pLibraryMenu = new QMenu(tr("&Library")); QString rescanTitle = tr("&Rescan Library"); QString rescanText = tr("Rescans library folders for changes to tracks."); QAction* pLibraryRescan = new QAction(rescanTitle, this); pLibraryRescan->setStatusTip(rescanText); pLibraryRescan->setWhatsThis(buildWhatsThis(rescanTitle, rescanText)); pLibraryRescan->setCheckable(false); connect(pLibraryRescan, SIGNAL(triggered()), this, SIGNAL(rescanLibrary())); // Disable the action when a scan is active. connect(this, SIGNAL(internalLibraryScanActive(bool)), pLibraryRescan, SLOT(setDisabled(bool))); pLibraryMenu->addAction(pLibraryRescan); pLibraryMenu->addSeparator(); QString createPlaylistTitle = tr("Create &New Playlist"); QString createPlaylistText = tr("Create a new playlist"); QAction* pLibraryCreatePlaylist = new QAction(createPlaylistTitle, this); pLibraryCreatePlaylist->setShortcut( QKeySequence(m_pKbdConfig->getValueString(ConfigKey("[KeyboardShortcuts]", "LibraryMenu_NewPlaylist"), tr("Ctrl+n")))); pLibraryCreatePlaylist->setShortcutContext(Qt::ApplicationShortcut); pLibraryCreatePlaylist->setStatusTip(createPlaylistText); pLibraryCreatePlaylist->setWhatsThis(buildWhatsThis(createPlaylistTitle, createPlaylistText)); connect(pLibraryCreatePlaylist, SIGNAL(triggered()), this, SIGNAL(createPlaylist())); pLibraryMenu->addAction(pLibraryCreatePlaylist); QString createCrateTitle = tr("Create New &Crate"); QString createCrateText = tr("Create a new crate"); QAction* pLibraryCreateCrate = new QAction(createCrateTitle, this); pLibraryCreateCrate->setShortcut( QKeySequence(m_pKbdConfig->getValueString(ConfigKey("[KeyboardShortcuts]", "LibraryMenu_NewCrate"), tr("Ctrl+Shift+N")))); pLibraryCreateCrate->setShortcutContext(Qt::ApplicationShortcut); pLibraryCreateCrate->setStatusTip(createCrateText); pLibraryCreateCrate->setWhatsThis(buildWhatsThis(createCrateTitle, createCrateText)); connect(pLibraryCreateCrate, SIGNAL(triggered()), this, SIGNAL(createCrate())); pLibraryMenu->addAction(pLibraryCreateCrate); addMenu(pLibraryMenu); // VIEW MENU QMenu* pViewMenu = new QMenu(tr("&View")); QString mayNotBeSupported = tr("May not be supported on all skins."); QString showSamplersTitle = tr("Show Samplers"); QString showSamplersText = tr("Show the sample deck section of the Mixxx interface.") + " " + mayNotBeSupported; QAction* pViewShowSamplers = new QAction(showSamplersTitle, this); pViewShowSamplers->setCheckable(true); pViewShowSamplers->setShortcut( QKeySequence(m_pKbdConfig->getValueString(ConfigKey("[KeyboardShortcuts]", "ViewMenu_ShowSamplers"), tr("Ctrl+1", "Menubar|View|Show Samplers")))); pViewShowSamplers->setStatusTip(showSamplersText); pViewShowSamplers->setWhatsThis(buildWhatsThis(showSamplersTitle, showSamplersText)); createVisibilityControl(pViewShowSamplers, ConfigKey("[Samplers]", "show_samplers")); pViewMenu->addAction(pViewShowSamplers); QString showMicrophoneTitle = tr("Show Microphone Section"); QString showMicrophoneText = tr("Show the microphone section of the Mixxx interface.") + " " + mayNotBeSupported; QAction* pViewShowMicrophone = new QAction(showMicrophoneTitle, this); pViewShowMicrophone->setCheckable(true); pViewShowMicrophone->setShortcut( QKeySequence(m_pKbdConfig->getValueString( ConfigKey("[KeyboardShortcuts]", "ViewMenu_ShowMicrophone"), tr("Ctrl+2", "Menubar|View|Show Microphone Section")))); pViewShowMicrophone->setStatusTip(showMicrophoneText); pViewShowMicrophone->setWhatsThis(buildWhatsThis(showMicrophoneTitle, showMicrophoneText)); createVisibilityControl(pViewShowMicrophone, ConfigKey("[Microphone]", "show_microphone")); pViewMenu->addAction(pViewShowMicrophone); #ifdef __VINYLCONTROL__ QString showVinylControlTitle = tr("Show Vinyl Control Section"); QString showVinylControlText = tr("Show the vinyl control section of the Mixxx interface.") + " " + mayNotBeSupported; QAction* pViewVinylControl = new QAction(showVinylControlTitle, this); pViewVinylControl->setCheckable(true); pViewVinylControl->setShortcut( QKeySequence(m_pKbdConfig->getValueString( ConfigKey("[KeyboardShortcuts]", "ViewMenu_ShowVinylControl"), tr("Ctrl+3", "Menubar|View|Show Vinyl Control Section")))); pViewVinylControl->setStatusTip(showVinylControlText); pViewVinylControl->setWhatsThis(buildWhatsThis(showVinylControlTitle, showVinylControlText)); createVisibilityControl(pViewVinylControl, ConfigKey(VINYL_PREF_KEY, "show_vinylcontrol")); pViewMenu->addAction(pViewVinylControl); #endif QString showPreviewDeckTitle = tr("Show Preview Deck"); QString showPreviewDeckText = tr("Show the preview deck in the Mixxx interface.") + " " + mayNotBeSupported; QAction* pViewShowPreviewDeck = new QAction(showPreviewDeckTitle, this); pViewShowPreviewDeck->setCheckable(true); pViewShowPreviewDeck->setShortcut( QKeySequence(m_pKbdConfig->getValueString(ConfigKey("[KeyboardShortcuts]", "ViewMenu_ShowPreviewDeck"), tr("Ctrl+4", "Menubar|View|Show Preview Deck")))); pViewShowPreviewDeck->setStatusTip(showPreviewDeckText); pViewShowPreviewDeck->setWhatsThis(buildWhatsThis(showPreviewDeckTitle, showPreviewDeckText)); createVisibilityControl(pViewShowPreviewDeck, ConfigKey("[PreviewDeck]", "show_previewdeck")); pViewMenu->addAction(pViewShowPreviewDeck); QString showEffectsTitle = tr("Show Effect Rack"); QString showEffectsText = tr("Show the effect rack in the Mixxx interface.") + " " + mayNotBeSupported; QAction* pViewShowEffects = new QAction(showEffectsTitle, this); pViewShowEffects->setCheckable(true); pViewShowEffects->setShortcut( QKeySequence(m_pKbdConfig->getValueString(ConfigKey("[KeyboardShortcuts]", "ViewMenu_ShowEffects"), tr("Ctrl+5", "Menubar|View|Show Effect Rack")))); pViewShowEffects->setStatusTip(showEffectsText); pViewShowEffects->setWhatsThis(buildWhatsThis(showEffectsTitle, showEffectsText)); createVisibilityControl(pViewShowEffects, ConfigKey("[EffectRack1]", "show")); pViewMenu->addAction(pViewShowEffects); QString showCoverArtTitle = tr("Show Cover Art"); QString showCoverArtText = tr("Show cover art in the Mixxx interface.") + " " + mayNotBeSupported; QAction* pViewShowCoverArt = new QAction(showCoverArtTitle, this); pViewShowCoverArt->setCheckable(true); pViewShowCoverArt->setShortcut( QKeySequence(m_pKbdConfig->getValueString(ConfigKey("[KeyboardShortcuts]", "ViewMenu_ShowCoverArt"), tr("Ctrl+6", "Menubar|View|Show Cover Art")))); pViewShowCoverArt->setStatusTip(showCoverArtText); pViewShowCoverArt->setWhatsThis(buildWhatsThis(showCoverArtTitle, showCoverArtText)); createVisibilityControl(pViewShowCoverArt, ConfigKey("[Library]", "show_coverart")); pViewMenu->addAction(pViewShowCoverArt); QString maximizeLibraryTitle = tr("Maximize Library"); QString maximizeLibraryText = tr("Maximize the track library to take up all the available screen space.") + " " + mayNotBeSupported; QAction* pViewMaximizeLibrary = new QAction(maximizeLibraryTitle, this); pViewMaximizeLibrary->setCheckable(true); pViewMaximizeLibrary->setShortcut( QKeySequence(m_pKbdConfig->getValueString(ConfigKey("[KeyboardShortcuts]", "ViewMenu_MaximizeLibrary"), tr("Space", "Menubar|View|Maximize Library")))); pViewMaximizeLibrary->setStatusTip(maximizeLibraryText); pViewMaximizeLibrary->setWhatsThis(buildWhatsThis(maximizeLibraryTitle, maximizeLibraryText)); createVisibilityControl(pViewMaximizeLibrary, ConfigKey("[Master]", "maximize_library")); pViewMenu->addAction(pViewMaximizeLibrary); pViewMenu->addSeparator(); QString fullScreenTitle = tr("&Full Screen"); QString fullScreenText = tr("Display Mixxx using the full screen"); QAction* pViewFullScreen = new QAction(fullScreenTitle, this); pViewFullScreen->setShortcut( QKeySequence(m_pKbdConfig->getValueString(ConfigKey("[KeyboardShortcuts]", "ViewMenu_Fullscreen"), fullScreenDefaultKeyBinding()))); pViewFullScreen->setShortcutContext(Qt::ApplicationShortcut); pViewFullScreen->setCheckable(true); pViewFullScreen->setChecked(false); pViewFullScreen->setStatusTip(fullScreenText); pViewFullScreen->setWhatsThis(buildWhatsThis(fullScreenTitle, fullScreenText)); connect(pViewFullScreen, SIGNAL(triggered(bool)), this, SIGNAL(toggleFullScreen(bool))); connect(this, SIGNAL(internalFullScreenStateChange(bool)), pViewFullScreen, SLOT(setChecked(bool))); pViewMenu->addAction(pViewFullScreen); addMenu(pViewMenu); // OPTIONS MENU QMenu* pOptionsMenu = new QMenu(tr("&Options")); #ifdef __VINYLCONTROL__ QMenu* pVinylControlMenu = new QMenu(tr("&Vinyl Control")); QString vinylControlText = tr( "Use timecoded vinyls on external turntables to control Mixxx"); for (int i = 0; i < kMaximumVinylControlInputs; ++i) { QString vinylControlTitle = tr("Enable Vinyl Control &%1").arg(i + 1); QAction* vc_checkbox = new QAction(vinylControlTitle, this); m_vinylControlEnabledActions.push_back(vc_checkbox); QString binding = m_pKbdConfig->getValueString( ConfigKey("[KeyboardShortcuts]", QString("OptionsMenu_EnableVinyl%1").arg(i + 1)), vinylControlDefaultKeyBinding(i)); if (!binding.isEmpty()) { vc_checkbox->setShortcut(QKeySequence(binding)); vc_checkbox->setShortcutContext(Qt::ApplicationShortcut); } // Either check or uncheck the vinyl control menu item depending on what // it was saved as. vc_checkbox->setCheckable(true); vc_checkbox->setChecked(false); // The visibility of these actions is set in // WMainMenuBar::onNumberOfDecksChanged. vc_checkbox->setVisible(false); vc_checkbox->setStatusTip(vinylControlText); vc_checkbox->setWhatsThis(buildWhatsThis(vinylControlTitle, vinylControlText)); m_vinylControlEnabledMapper.setMapping(vc_checkbox, i); connect(vc_checkbox, SIGNAL(triggered(bool)), &m_vinylControlEnabledMapper, SLOT(map())); pVinylControlMenu->addAction(vc_checkbox); } pOptionsMenu->addMenu(pVinylControlMenu); pOptionsMenu->addSeparator(); #endif QString recordTitle = tr("&Record Mix"); QString recordText = tr("Record your mix to a file"); QAction* pOptionsRecord = new QAction(recordTitle, this); pOptionsRecord->setShortcut( QKeySequence(m_pKbdConfig->getValueString(ConfigKey("[KeyboardShortcuts]", "OptionsMenu_RecordMix"), tr("Ctrl+R")))); pOptionsRecord->setShortcutContext(Qt::ApplicationShortcut); pOptionsRecord->setCheckable(true); pOptionsRecord->setStatusTip(recordText); pOptionsRecord->setWhatsThis(buildWhatsThis(recordTitle, recordText)); connect(pOptionsRecord, SIGNAL(triggered(bool)), this, SIGNAL(toggleRecording(bool))); connect(this, SIGNAL(internalRecordingStateChange(bool)), pOptionsRecord, SLOT(setChecked(bool))); pOptionsMenu->addAction(pOptionsRecord); #ifdef __SHOUTCAST__ QString broadcastingTitle = tr("Enable Live &Broadcasting"); QString broadcastingText = tr("Stream your mixes to a shoutcast or icecast server"); QAction* pOptionsBroadcasting = new QAction(broadcastingTitle, this); pOptionsBroadcasting->setShortcut( QKeySequence(m_pKbdConfig->getValueString( ConfigKey("[KeyboardShortcuts]", "OptionsMenu_EnableLiveBroadcasting"), tr("Ctrl+L")))); pOptionsBroadcasting->setShortcutContext(Qt::ApplicationShortcut); pOptionsBroadcasting->setCheckable(true); pOptionsBroadcasting->setStatusTip(broadcastingText); pOptionsBroadcasting->setWhatsThis(buildWhatsThis(broadcastingTitle, broadcastingText)); connect(pOptionsBroadcasting, SIGNAL(triggered(bool)), this, SIGNAL(toggleBroadcasting(bool))); connect(this, SIGNAL(internalBroadcastingStateChange(bool)), pOptionsBroadcasting, SLOT(setChecked(bool))); pOptionsMenu->addAction(pOptionsBroadcasting); #endif pOptionsMenu->addSeparator(); QString keyboardShortcutTitle = tr("Enable &Keyboard Shortcuts"); QString keyboardShortcutText = tr("Toggles keyboard shortcuts on or off"); bool keyboardShortcutsEnabled = m_pConfig->getValueString( ConfigKey("[Keyboard]", "Enabled")) == "1"; QAction* pOptionsKeyboard = new QAction(keyboardShortcutTitle, this); pOptionsKeyboard->setShortcut( QKeySequence(m_pKbdConfig->getValueString(ConfigKey("[KeyboardShortcuts]", "OptionsMenu_EnableShortcuts"), tr("Ctrl+`")))); pOptionsKeyboard->setShortcutContext(Qt::ApplicationShortcut); pOptionsKeyboard->setCheckable(true); pOptionsKeyboard->setChecked(keyboardShortcutsEnabled); pOptionsKeyboard->setStatusTip(keyboardShortcutText); pOptionsKeyboard->setWhatsThis(buildWhatsThis(keyboardShortcutTitle, keyboardShortcutText)); connect(pOptionsKeyboard, SIGNAL(triggered(bool)), this, SIGNAL(toggleKeyboardShortcuts(bool))); pOptionsMenu->addAction(pOptionsKeyboard); pOptionsMenu->addSeparator(); QString preferencesTitle = tr("&Preferences"); QString preferencesText = tr("Change Mixxx settings (e.g. playback, MIDI, controls)"); QAction* pOptionsPreferences = new QAction(preferencesTitle, this); pOptionsPreferences->setShortcut( QKeySequence(m_pKbdConfig->getValueString(ConfigKey("[KeyboardShortcuts]", "OptionsMenu_Preferences"), showPreferencesKeyBinding()))); pOptionsPreferences->setShortcutContext(Qt::ApplicationShortcut); pOptionsPreferences->setStatusTip(preferencesText); pOptionsPreferences->setWhatsThis(buildWhatsThis(preferencesTitle, preferencesText)); pOptionsPreferences->setMenuRole(QAction::PreferencesRole); connect(pOptionsPreferences, SIGNAL(triggered()), this, SIGNAL(showPreferences())); pOptionsMenu->addAction(pOptionsPreferences); addMenu(pOptionsMenu); // DEVELOPER MENU if (CmdlineArgs::Instance().getDeveloper()) { QMenu* pDeveloperMenu = new QMenu(tr("&Developer")); QString reloadSkinTitle = tr("&Reload Skin"); QString reloadSkinText = tr("Reload the skin"); QAction* pDeveloperReloadSkin = new QAction(reloadSkinTitle, this); pDeveloperReloadSkin->setShortcut( QKeySequence(m_pKbdConfig->getValueString(ConfigKey("[KeyboardShortcuts]", "OptionsMenu_ReloadSkin"), tr("Ctrl+Shift+R")))); pDeveloperReloadSkin->setShortcutContext(Qt::ApplicationShortcut); pDeveloperReloadSkin->setStatusTip(reloadSkinText); pDeveloperReloadSkin->setWhatsThis(buildWhatsThis(reloadSkinTitle, reloadSkinText)); connect(pDeveloperReloadSkin, SIGNAL(triggered()), this, SIGNAL(reloadSkin())); pDeveloperMenu->addAction(pDeveloperReloadSkin); QString developerToolsTitle = tr("Developer &Tools"); QString developerToolsText = tr("Opens the developer tools dialog"); QAction* pDeveloperTools = new QAction(developerToolsTitle, this); pDeveloperTools->setShortcut( QKeySequence(m_pKbdConfig->getValueString(ConfigKey("[KeyboardShortcuts]", "OptionsMenu_DeveloperTools"), tr("Ctrl+Shift+T")))); pDeveloperTools->setShortcutContext(Qt::ApplicationShortcut); pDeveloperTools->setCheckable(true); pDeveloperTools->setChecked(false); pDeveloperTools->setStatusTip(developerToolsText); pDeveloperTools->setWhatsThis(buildWhatsThis(developerToolsTitle, developerToolsText)); connect(pDeveloperTools, SIGNAL(triggered(bool)), this, SIGNAL(toggleDeveloperTools(bool))); connect(this, SIGNAL(internalDeveloperToolsStateChange(bool)), pDeveloperTools, SLOT(setChecked(bool))); pDeveloperMenu->addAction(pDeveloperTools); QString enableExperimentTitle = tr("Stats: &Experiment Bucket"); QString enableExperimentToolsText = tr( "Enables experiment mode. Collects stats in the EXPERIMENT tracking bucket."); QAction* pDeveloperStatsExperiment = new QAction(enableExperimentTitle, this); pDeveloperStatsExperiment->setShortcut( QKeySequence(m_pKbdConfig->getValueString(ConfigKey("[KeyboardShortcuts]", "OptionsMenu_DeveloperStatsExperiment"), tr("Ctrl+Shift+E")))); pDeveloperStatsExperiment->setShortcutContext(Qt::ApplicationShortcut); pDeveloperStatsExperiment->setStatusTip(enableExperimentToolsText); pDeveloperStatsExperiment->setWhatsThis(buildWhatsThis( enableExperimentTitle, enableExperimentToolsText)); pDeveloperStatsExperiment->setCheckable(true); pDeveloperStatsExperiment->setChecked(Experiment::isExperiment()); connect(pDeveloperStatsExperiment, SIGNAL(triggered(bool)), this, SLOT(slotDeveloperStatsExperiment(bool))); pDeveloperMenu->addAction(pDeveloperStatsExperiment); QString enableBaseTitle = tr("Stats: &Base Bucket"); QString enableBaseToolsText = tr( "Enables base mode. Collects stats in the BASE tracking bucket."); QAction* pDeveloperStatsBase = new QAction(enableBaseTitle, this); pDeveloperStatsBase->setShortcut( QKeySequence(m_pKbdConfig->getValueString(ConfigKey("[KeyboardShortcuts]", "OptionsMenu_DeveloperStatsBase"), tr("Ctrl+Shift+B")))); pDeveloperStatsBase->setShortcutContext(Qt::ApplicationShortcut); pDeveloperStatsBase->setStatusTip(enableBaseToolsText); pDeveloperStatsBase->setWhatsThis(buildWhatsThis( enableBaseTitle, enableBaseToolsText)); pDeveloperStatsBase->setCheckable(true); pDeveloperStatsBase->setChecked(Experiment::isBase()); connect(pDeveloperStatsBase, SIGNAL(triggered(bool)), this, SLOT(slotDeveloperStatsBase(bool))); pDeveloperMenu->addAction(pDeveloperStatsBase); // "D" cannont be used with Alt here as it is already by the Developer menu QString scriptDebuggerTitle = tr("Deb&ugger Enabled"); QString scriptDebuggerText = tr("Enables the debugger during skin parsing"); bool scriptDebuggerEnabled = m_pConfig->getValueString( ConfigKey("[ScriptDebugger]", "Enabled")) == "1"; QAction* pDeveloperDebugger = new QAction(scriptDebuggerTitle, this); pDeveloperDebugger->setShortcut( QKeySequence(m_pKbdConfig->getValueString(ConfigKey("[KeyboardShortcuts]", "DeveloperMenu_EnableDebugger"), tr("Ctrl+Shift+D")))); pDeveloperDebugger->setShortcutContext(Qt::ApplicationShortcut); pDeveloperDebugger->setWhatsThis(buildWhatsThis(keyboardShortcutTitle, keyboardShortcutText)); pDeveloperDebugger->setCheckable(true); pDeveloperDebugger->setStatusTip(scriptDebuggerText); pDeveloperDebugger->setChecked(scriptDebuggerEnabled); connect(pDeveloperDebugger, SIGNAL(triggered(bool)), this, SLOT(slotDeveloperDebugger(bool))); pDeveloperMenu->addAction(pDeveloperDebugger); addMenu(pDeveloperMenu); }