void MainWindow::createActions() { aConnect = new QAction(this); connect(aConnect, SIGNAL(triggered()), this, SLOT(actConnect())); aDisconnect = new QAction(this); aDisconnect->setEnabled(false); connect(aDisconnect, SIGNAL(triggered()), this, SLOT(actDisconnect())); aSinglePlayer = new QAction(this); connect(aSinglePlayer, SIGNAL(triggered()), this, SLOT(actSinglePlayer())); aWatchReplay = new QAction(this); connect(aWatchReplay, SIGNAL(triggered()), this, SLOT(actWatchReplay())); aDeckEditor = new QAction(this); connect(aDeckEditor, SIGNAL(triggered()), this, SLOT(actDeckEditor())); aFullScreen = new QAction(this); aFullScreen->setCheckable(true); connect(aFullScreen, SIGNAL(toggled(bool)), this, SLOT(actFullScreen(bool))); aRegister = new QAction(this); connect(aRegister, SIGNAL(triggered()), this, SLOT(actRegister())); aSettings = new QAction(this); connect(aSettings, SIGNAL(triggered()), this, SLOT(actSettings())); aExit = new QAction(this); connect(aExit, SIGNAL(triggered()), this, SLOT(actExit())); aAbout = new QAction(this); connect(aAbout, SIGNAL(triggered()), this, SLOT(actAbout())); aCheckCardUpdates = new QAction(this); connect(aCheckCardUpdates, SIGNAL(triggered()), this, SLOT(actCheckCardUpdates())); #if defined(__APPLE__) /* For OSX */ aSettings->setMenuRole(QAction::PreferencesRole); aExit->setMenuRole(QAction::QuitRole); aAbout->setMenuRole(QAction::AboutRole); char const * foo; // avoid "warning: expression result unused" under clang foo = QT_TRANSLATE_NOOP("QMenuBar","Services"); foo = QT_TRANSLATE_NOOP("QMenuBar","Hide %1"); foo = QT_TRANSLATE_NOOP("QMenuBar","Hide Others"); foo = QT_TRANSLATE_NOOP("QMenuBar","Show All"); foo = QT_TRANSLATE_NOOP("QMenuBar","Preferences..."); foo = QT_TRANSLATE_NOOP("QMenuBar","Quit %1"); foo = QT_TRANSLATE_NOOP("QMenuBar","About %1"); #endif }
void MainWindow::createActions() { aConnect = new QAction(this); connect(aConnect, SIGNAL(triggered()), this, SLOT(actConnect())); aDisconnect = new QAction(this); aDisconnect->setEnabled(false); connect(aDisconnect, SIGNAL(triggered()), this, SLOT(actDisconnect())); aSinglePlayer = new QAction(this); connect(aSinglePlayer, SIGNAL(triggered()), this, SLOT(actSinglePlayer())); aWatchReplay = new QAction(this); connect(aWatchReplay, SIGNAL(triggered()), this, SLOT(actWatchReplay())); aDeckEditor = new QAction(this); connect(aDeckEditor, SIGNAL(triggered()), this, SLOT(actDeckEditor())); aFullScreen = new QAction(this); aFullScreen->setCheckable(true); connect(aFullScreen, SIGNAL(toggled(bool)), this, SLOT(actFullScreen(bool))); aSettings = new QAction(this); connect(aSettings, SIGNAL(triggered()), this, SLOT(actSettings())); aExit = new QAction(this); connect(aExit, SIGNAL(triggered()), this, SLOT(actExit())); aAbout = new QAction(this); connect(aAbout, SIGNAL(triggered()), this, SLOT(actAbout())); }