void Nexus::start() { qDebug() << "Starting up"; // Setup the environment qRegisterMetaType<Status>("Status"); qRegisterMetaType<vpx_image>("vpx_image"); qRegisterMetaType<uint8_t>("uint8_t"); qRegisterMetaType<uint16_t>("uint16_t"); qRegisterMetaType<uint32_t>("uint32_t"); qRegisterMetaType<const int16_t*>("const int16_t*"); qRegisterMetaType<int32_t>("int32_t"); qRegisterMetaType<int64_t>("int64_t"); qRegisterMetaType<QPixmap>("QPixmap"); qRegisterMetaType<Profile*>("Profile*"); qRegisterMetaType<ToxFile>("ToxFile"); qRegisterMetaType<ToxFile::FileDirection>("ToxFile::FileDirection"); qRegisterMetaType<std::shared_ptr<VideoFrame>>("std::shared_ptr<VideoFrame>"); loginScreen = new LoginScreen(); if (profile) showMainGUI(); else showLogin(); }
void Nexus::start() { qDebug() << "Starting up"; // Setup the environment qRegisterMetaType<Status>("Status"); qRegisterMetaType<vpx_image>("vpx_image"); qRegisterMetaType<uint8_t>("uint8_t"); qRegisterMetaType<uint16_t>("uint16_t"); qRegisterMetaType<uint32_t>("uint32_t"); qRegisterMetaType<const int16_t*>("const int16_t*"); qRegisterMetaType<int32_t>("int32_t"); qRegisterMetaType<int64_t>("int64_t"); qRegisterMetaType<QPixmap>("QPixmap"); qRegisterMetaType<Profile*>("Profile*"); qRegisterMetaType<ToxAV*>("ToxAV*"); qRegisterMetaType<ToxFile>("ToxFile"); qRegisterMetaType<ToxFile::FileDirection>("ToxFile::FileDirection"); qRegisterMetaType<std::shared_ptr<VideoFrame>>("std::shared_ptr<VideoFrame>"); loginScreen = new LoginScreen(); #ifdef Q_OS_MAC globalMenuBar = new QMenuBar(0); dockMenu = new QMenu(globalMenuBar); viewMenu = globalMenuBar->addMenu(QString()); windowMenu = globalMenuBar->addMenu(QString()); globalMenuBar->addAction(windowMenu->menuAction()); fullscreenAction = viewMenu->addAction(QString()); fullscreenAction->setShortcut(QKeySequence::FullScreen); connect(fullscreenAction, &QAction::triggered, this, &Nexus::toggleFullscreen); minimizeAction = windowMenu->addAction(QString()); minimizeAction->setShortcut(Qt::CTRL + Qt::Key_M); connect(minimizeAction, &QAction::triggered, [this]() { minimizeAction->setEnabled(false); QApplication::focusWindow()->showMinimized(); }); windowMenu->addSeparator(); frontAction = windowMenu->addAction(QString()); connect(frontAction, &QAction::triggered, this, &Nexus::bringAllToFront); QAction* quitAction = new QAction(globalMenuBar); quitAction->setMenuRole(QAction::QuitRole); connect(quitAction, &QAction::triggered, qApp, &QApplication::quit); windowMapper = new QSignalMapper(this); connect(windowMapper, SIGNAL(mapped(QObject*)), this, SLOT(onOpenWindow(QObject*))); connect(loginScreen, &LoginScreen::windowStateChanged, this, &Nexus::onWindowStateChanged); retranslateUi(); #endif if (profile) showMainGUI(); else showLogin(); }