| 76 | #include "core/memcheck.h" |
| 77 | |
| 78 | UBApplicationController::UBApplicationController(UBBoardView *pControlView, |
| 79 | UBBoardView *pDisplayView, |
| 80 | UBMainWindow* pMainWindow, |
| 81 | QObject* parent, |
| 82 | UBRightPalette* rightPalette) |
| 83 | : QObject(parent) |
| 84 | , mMainWindow(pMainWindow) |
| 85 | , mControlView(pControlView) |
| 86 | , mDisplayView(pDisplayView) |
| 87 | , mMirror(0) |
| 88 | , mMainMode(Board) |
| 89 | , mAutomaticCheckForUpdates(false) |
| 90 | , mCheckingForUpdates(false) |
| 91 | , mIsShowingDesktop(false) |
| 92 | { |
| 93 | mUninoteController = new UBDesktopAnnotationController(this, rightPalette); |
| 94 | |
| 95 | UBDisplayManager* displayManager = UBApplication::displayManager; |
| 96 | |
| 97 | connect(displayManager, SIGNAL(screenLayoutChanged()), this, SLOT(screenLayoutChanged())); |
| 98 | connect(displayManager, SIGNAL(screenLayoutChanged()), mUninoteController, SLOT(screenLayoutChanged())); |
| 99 | connect(displayManager, SIGNAL(screenLayoutChanged()), UBApplication::webController, SLOT(screenLayoutChanged())); |
| 100 | connect(displayManager, &UBDisplayManager::availableScreenCountChanged,this, [this](){ |
| 101 | initPreviousViews(); |
| 102 | UBApplication::displayManager->setPreviousDisplaysWidgets(mPreviousViews); |
| 103 | }); |
| 104 | connect(mUninoteController, SIGNAL(imageCaptured(const QPixmap &, bool)), this, SLOT(addCapturedPixmap(const QPixmap &, bool))); |
| 105 | connect(mUninoteController, SIGNAL(restoreUniboard()), this, SLOT(hideDesktop())); |
| 106 | |
| 107 | mBlackScene = std::make_shared<UBGraphicsScene>(nullptr); |
| 108 | mBlackScene->setBackground(true, UBPageBackground::plain); |
| 109 | |
| 110 | if (displayManager->numScreens() >= 2 && displayManager->useMultiScreen()) |
| 111 | { |
| 112 | mMirror = new UBScreenMirror(); |
| 113 | } |
| 114 | |
| 115 | connect(UBApplication::webController, SIGNAL(imageCaptured(const QPixmap &, bool, const QUrl&)) |
| 116 | , this, SLOT(addCapturedPixmap(const QPixmap &, bool, const QUrl&))); |
| 117 | |
| 118 | mNetworkAccessManager = new QNetworkAccessManager (this); |
| 119 | QTimer::singleShot (1000, this, SLOT (checkAtLaunch())); |
| 120 | } |
| 121 | |
| 122 | |
| 123 | UBApplicationController::~UBApplicationController() |
nothing calls this directly
no test coverage detected