diff options
Diffstat (limited to 'application/MainWindow.cpp')
-rw-r--r-- | application/MainWindow.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp index 1d36ef8c..e690e1b7 100644 --- a/application/MainWindow.cpp +++ b/application/MainWindow.cpp @@ -89,6 +89,7 @@ #include <FolderInstanceProvider.h> #include <InstanceImportTask.h> #include "UpdateController.h" +#include "KonamiCode.h" // WHY: to hold the pre-translation strings together with the T pointer, so it can be retranslated without a lot of ugly code template <typename T> @@ -631,6 +632,12 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow connect(q, SIGNAL(activated()), qApp, SLOT(quit())); } + // Konami Code + { + secretEventFilter = new KonamiCode(this); + connect(secretEventFilter, &KonamiCode::triggered, this, &MainWindow::konamiTriggered); + } + // Add the news label to the news toolbar. { m_newsChecker.reset(new NewsChecker(BuildConfig.NEWS_RSS_URL)); @@ -806,6 +813,11 @@ MainWindow::~MainWindow() { } +void MainWindow::konamiTriggered() +{ + qDebug() << "Super Secret Mode ACTIVATED!"; +} + void MainWindow::skinJobFinished() { activeAccountChanged(); @@ -1064,6 +1076,7 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *ev) { if (ev->type() == QEvent::KeyPress) { + secretEventFilter->input(ev); QKeyEvent *keyEvent = static_cast<QKeyEvent *>(ev); switch (keyEvent->key()) { |