void FilterExpressionFrame::on_filterExpressionPreferencesToolButton_clicked() { on_cancelButton_clicked(); emit showPreferencesDialog(PreferencesDialog::ppFilterExpressions); }
void MainWindow::on_actionPreferences_triggered() { showPreferencesDialog(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), #endif lastState(MPDStatus::State_Inactive), lastSongId(-1), fetchStatsFactor(0), nowPlayingFactor(0), draggingPositionSlider(false), icon(QIcon(":/images/icon.svg")) { #ifdef ENABLE_KDE_SUPPORT QWidget *widget = new QWidget(this); setupUi(widget); setCentralWidget(widget); KStandardAction::quit(kapp, SLOT(quit()), actionCollection()); KStandardAction::preferences(this, SLOT(showPreferencesDialog()), actionCollection()); KAction *action_Update_database = new KAction(this); action_Update_database->setText(i18n("Update database")); actionCollection()->addAction("updatedatabase", action_Update_database); KAction *action_Show_statistics = new KAction(this); action_Show_statistics->setText(i18n("Show statistics")); actionCollection()->addAction("showstatistics", action_Show_statistics); setupGUI(); #else setupUi(this); #endif QSettings settings;
void QtWindow::createActions() { m_openAct = new QAction(QIcon(":/images/open.png"), tr("&Open..."), this); m_openAct->setShortcut(tr("Ctrl+O")); m_openAct->setStatusTip(tr("Open an existing file")); connect(m_openAct, SIGNAL(triggered()), this, SLOT(open())); m_exitAct = new QAction(tr("E&xit"), this); m_exitAct->setShortcut(tr("Ctrl+Q")); m_exitAct->setStatusTip(tr("Exit the application")); connect(m_exitAct, SIGNAL(triggered()), this, SLOT(close())); m_aboutAct = new QAction(tr("&About"), this); m_aboutAct->setStatusTip(tr("Show the application's About box")); connect(m_aboutAct, SIGNAL(triggered()), this, SLOT(about())); m_shortcutAct = new QAction(tr("&PC Shortcut Keys"), this); m_shortcutAct->setStatusTip(tr("The PC Keyboard shortcut keys")); connect(m_shortcutAct, SIGNAL(triggered()), this, SLOT(keyboardShortcuts())); m_setupMidiAct = new QAction(tr("&Midi Setup ..."), this); m_setupMidiAct->setShortcut(tr("Ctrl+S")); m_setupMidiAct->setStatusTip(tr("Setup the Midi input an output")); connect(m_setupMidiAct, SIGNAL(triggered()), this, SLOT(showMidiSetup())); m_setupKeyboardAct = new QAction(tr("Piano &Keyboard Setting ..."), this); m_setupKeyboardAct->setShortcut(tr("Ctrl+K")); m_setupKeyboardAct->setStatusTip(tr("Change the piano keybaord settings")); connect(m_setupKeyboardAct, SIGNAL(triggered()), this, SLOT(showKeyboardSetup())); m_setTranspositionAct = new QAction(tr("&Instrument Setup ..."), this); m_setTranspositionAct->setStatusTip(tr("Configure transposition of the Midi input")); connect(m_setTranspositionAct, SIGNAL(triggered()), this, SLOT(showTranspositionDialog())); m_toggleSidePanelAct = new QAction(tr("&Show/Hide the Side Panel"), this); m_toggleSidePanelAct->setShortcut(tr("F11")); connect(m_toggleSidePanelAct, SIGNAL(triggered()), this, SLOT(toggleSidePanel())); m_setupPreferencesAct = new QAction(tr("&Preferences ..."), this); m_setupPreferencesAct->setShortcut(tr("Ctrl+P")); connect(m_setupPreferencesAct, SIGNAL(triggered()), this, SLOT(showPreferencesDialog())); m_songDetailsAct = new QAction(tr("&Song Details ..."), this); m_songDetailsAct->setShortcut(tr("Ctrl+S")); connect(m_songDetailsAct, SIGNAL(triggered()), this, SLOT(showSongDetailsDialog())); QAction* act = new QAction(this); act->setShortcut(tr("Shift+F1")); connect(act, SIGNAL(triggered()), this, SLOT(enableFollowTempo())); addAction(act); act = new QAction(this); act->setShortcut(tr("Alt+F1")); connect(act, SIGNAL(triggered()), this, SLOT(disableFollowTempo())); addAction(act); //addShortcutAction("ShortCuts/RightHand", SLOT(on_rightHand())); //addShortcutAction("ShortCuts/BothHands", SLOT(on_bothHands())); //addShortcutAction("ShortCuts/LeftHand", SLOT(on_leftHand())); addShortcutAction("ShortCuts/PlayFromStart", SLOT(on_playFromStart())); addShortcutAction("ShortCuts/PlayPause", SLOT(on_playPause())); addShortcutAction("ShortCuts/Faster", SLOT(on_faster())); addShortcutAction("ShortCuts/Slower", SLOT(on_slower())); addShortcutAction("ShortCuts/NextSong", SLOT(on_nextSong())); addShortcutAction("ShortCuts/PreviousSong", SLOT(on_previousSong())); }