From da63c0992040a7609f921c0b890bedff0998c1d5 Mon Sep 17 00:00:00 2001 From: Elias Date: Sat, 10 Aug 2019 16:38:44 +0200 Subject: [PATCH] Add base multi monitor wallpaper setup --- ScreenPlay/qml/Common/Slider.qml | 11 ++--- ScreenPlay/qml/Installed/Sidebar.qml | 29 ++++++++++---- ScreenPlay/qml/Monitors/MonitorSelection.qml | 40 ++++++++----------- .../qml/Monitors/MonitorSelectionItem.qml | 8 +++- ScreenPlay/qml/Monitors/Monitors.qml | 4 ++ ScreenPlay/src/monitorlistmodel.cpp | 3 +- ScreenPlay/src/screenplaymanager.cpp | 32 +++++++++++++-- ScreenPlay/src/screenplaymanager.h | 7 ++++ ScreenPlay/src/screenplaywallpaper.cpp | 22 ++++++++-- ScreenPlay/src/screenplaywallpaper.h | 12 +++--- ScreenPlayWallpaper/main.cpp | 8 +++- ScreenPlayWallpaper/mainWindow.qml | 7 +--- ScreenPlayWallpaper/src/basewindow.cpp | 9 +++++ ScreenPlayWallpaper/src/basewindow.h | 23 ++++++++++- ScreenPlayWallpaper/src/winwindow.cpp | 13 +++++- ScreenPlayWallpaper/src/winwindow.h | 5 ++- 16 files changed, 170 insertions(+), 63 deletions(-) diff --git a/ScreenPlay/qml/Common/Slider.qml b/ScreenPlay/qml/Common/Slider.qml index 85704598..45c1f51f 100644 --- a/ScreenPlay/qml/Common/Slider.qml +++ b/ScreenPlay/qml/Common/Slider.qml @@ -1,4 +1,5 @@ import QtQuick 2.12 +import QtQuick.Layouts 1.12 import QtQuick.Controls 2.2 Item { @@ -29,7 +30,7 @@ Item { } } - Row { + RowLayout { spacing: 30 anchors { top: txtHeadline.bottom @@ -42,9 +43,9 @@ Item { id: imgIcon width: 20 height: 20 - anchors.verticalCenter: parent.verticalCenter source: iconSource sourceSize: Qt.size(20, 20) + Layout.alignment: Qt.AlignVCenter } Slider { @@ -52,16 +53,16 @@ Item { stepSize: 0.01 from: 0 value: 1 + Layout.fillWidth: true + Layout.alignment: Qt.AlignVCenter to: 1 - anchors.verticalCenter: parent.verticalCenter } Text { id: txtValue color: "#818181" text: Math.round(slider.value * 100) / 100 - anchors.verticalCenter: parent.verticalCenter - //font.family: "Libre Baskerville" + Layout.alignment: Qt.AlignVCenter font.pointSize: 12 font.italic: true verticalAlignment: Text.AlignVCenter diff --git a/ScreenPlay/qml/Installed/Sidebar.qml b/ScreenPlay/qml/Installed/Sidebar.qml index 62e357d6..cdfefe0c 100644 --- a/ScreenPlay/qml/Installed/Sidebar.qml +++ b/ScreenPlay/qml/Installed/Sidebar.qml @@ -400,14 +400,29 @@ Item { } onClicked: { - if (type.endsWith("Wallpaper")) { - screenPlay.createWallpaper( - monitorSelection.activeMonitorIndex, installedListModel.absoluteStoragePath + "/" + activeScreen, - installedListModel.get(activeScreen).screenPreview, - (Math.round(sliderVolume.value * 100) / 100), - settingsComboBox.model.get(settingsComboBox.currentIndex).text.toString( - ), type) + let activeMonitors = monitorSelection.getActiveMonitors(); + + if(activeMonitors.length === 0) + return + + if(activeMonitors.length > 1) { + screenPlay.createWallpaper( + activeMonitors, installedListModel.absoluteStoragePath + "/" + activeScreen, + installedListModel.get(activeScreen).screenPreview, + (Math.round(sliderVolume.value * 100) / 100), + settingsComboBox.model.get(settingsComboBox.currentIndex).text.toString( + ), type) + } else { + screenPlay.createWallpaper( + activeMonitors[0], installedListModel.absoluteStoragePath + "/" + activeScreen, + installedListModel.get(activeScreen).screenPreview, + (Math.round(sliderVolume.value * 100) / 100), + settingsComboBox.model.get(settingsComboBox.currentIndex).text.toString( + ), type) + } + + } else { screenPlay.createWidget( installedListModel.absoluteStoragePath + "/" + activeScreen, diff --git a/ScreenPlay/qml/Monitors/MonitorSelection.qml b/ScreenPlay/qml/Monitors/MonitorSelection.qml index 71720a08..9d14ac50 100644 --- a/ScreenPlay/qml/Monitors/MonitorSelection.qml +++ b/ScreenPlay/qml/Monitors/MonitorSelection.qml @@ -14,25 +14,22 @@ Rectangle { // Width of the Sidebar or Space that should be used property real availableWidth: 0 property real availableHeight: 0 - property int activeMonitorIndex: 0 property int fontSize: 12 property string activeMonitorID: "empty" signal requestProjectSettings(var at) - - function setActiveMonitorIndex(newIndex) { - activeMonitorIndex = newIndex - activeMonitorID = rp.itemAt(newIndex).monitorID + function getActiveMonitors(){ + let activeMonitors = []; for (var i = 0; i < rp.count; i++) { - if (i === newIndex) { - rp.itemAt(i).isSelected = true - } else { - rp.itemAt(i).isSelected = false - } + if(rp.itemAt(i).isSelected){ + activeMonitors.push(rp.itemAt(i).index) + } } + return activeMonitors; } + Component.onCompleted: { resize() } @@ -42,17 +39,17 @@ Rectangle { onMonitorReloadCompleted: { resize() } - onSetNewActiveMonitor:{ + onSetNewActiveMonitor: { rp.itemAt(index).previewImage = "file:///" + path.trim() rp.itemAt(index).isSelected = true } } Connections { target: screenPlay - onAllWallpaperRemoved:{ - for(var i = 0; i < rp.count; i++){ + onAllWallpaperRemoved: { + for (var i = 0; i < rp.count; i++) { rp.itemAt(i).isSelected = false - rp.itemAt(i).previewImage ="" + rp.itemAt(i).previewImage = "" } } } @@ -93,7 +90,6 @@ Rectangle { rp.itemAt(i).x = rp.itemAt(i).x * monitorWidthRationDelta rp.itemAt(i).y = rp.itemAt(i).y * monitorHeightRationDelta } - } Repeater { @@ -102,7 +98,7 @@ Rectangle { anchors.centerIn: parent model: monitorListModel - Component.onCompleted: rp.itemAt(0).isSelected = true + Component.onCompleted: rp.itemAt(0).isSelected = true delegate: MonitorSelectionItem { id: delegate @@ -118,16 +114,12 @@ Rectangle { fontSize: rect.fontSize index: monitorNumber //isWallpaperActive: monitorIsWallpaperActive - //previewImage: monitorPreviewImage + previewImage: monitorPreviewImage + + onMonitorSelected: { + requestProjectSettings(index) - Connections { - target: delegate - onMonitorSelected: { - setActiveMonitorIndex(index) - requestProjectSettings(index) - } } } - } } diff --git a/ScreenPlay/qml/Monitors/MonitorSelectionItem.qml b/ScreenPlay/qml/Monitors/MonitorSelectionItem.qml index ec731ad7..ff63405a 100644 --- a/ScreenPlay/qml/Monitors/MonitorSelectionItem.qml +++ b/ScreenPlay/qml/Monitors/MonitorSelectionItem.qml @@ -19,6 +19,13 @@ Item { property bool isSelected: false property bool isWallpaperActive: false signal monitorSelected(var index) + onMonitorSelected: { + if(isSelected){ + isSelected = false + } else { + isSelected = true + } + } onIsSelectedChanged: { if (isSelected) { @@ -26,7 +33,6 @@ Item { } else { wrapper.border.color = "#373737" - } } diff --git a/ScreenPlay/qml/Monitors/Monitors.qml b/ScreenPlay/qml/Monitors/Monitors.qml index bdbc1d12..b84e33bd 100644 --- a/ScreenPlay/qml/Monitors/Monitors.qml +++ b/ScreenPlay/qml/Monitors/Monitors.qml @@ -150,6 +150,10 @@ Item { headline: qsTr("Playback rate") onValueChanged: screenPlay.setWallpaperValue(activeMonitorIndex,"playbackRate", value) } + SP.Slider { + headline: qsTr("Current Video Time") + onValueChanged: screenPlay.setWallpaperValue(activeMonitorIndex,"currentTime", value) + } } GridView { diff --git a/ScreenPlay/src/monitorlistmodel.cpp b/ScreenPlay/src/monitorlistmodel.cpp index c3378cd9..4f9a81ae 100644 --- a/ScreenPlay/src/monitorlistmodel.cpp +++ b/ScreenPlay/src/monitorlistmodel.cpp @@ -176,7 +176,8 @@ Monitor::Monitor(QString manufacturer, QString model, QString name, QSize size, m_number = number; // FIXME: Use a better way to create an id // because name and manufacturer are allways empty - m_id = name + "_" + QString::number(size.width()) + "x" + QString::number(size.height()) + "_" + QString::number(availableGeometry.x()) + "x" + QString::number(availableGeometry.y()); + m_id = QString::number(size.width()) + "x" + QString::number(size.height()) + "_" + QString::number(availableGeometry.x()) + "x" + QString::number(availableGeometry.y()); + } } diff --git a/ScreenPlay/src/screenplaymanager.cpp b/ScreenPlay/src/screenplaymanager.cpp index 94b38201..691aad60 100644 --- a/ScreenPlay/src/screenplaymanager.cpp +++ b/ScreenPlay/src/screenplaymanager.cpp @@ -34,7 +34,7 @@ void ScreenPlayManager::createWallpaper( m_screenPlayWallpapers.emplace_back( make_unique( - vector { monitorIndex }, + QVector { monitorIndex }, m_settings, generateID(), path, @@ -50,6 +50,31 @@ void ScreenPlayManager::createWallpaper( m_settings->saveWallpaperToConfig(monitorIndex, path, type); } +void ScreenPlayManager::createWallpaper( QVector monitorIndex, const QString &absoluteStoragePath, const QString &previewImage, const float volume, const QString &fillMode, const QString &type) +{ + m_settings->increaseActiveWallpaperCounter(); + + QString path = absoluteStoragePath; + if(absoluteStoragePath.contains("file:///")) + path = path.remove("file:///"); + + std::sort(monitorIndex.begin(), monitorIndex.end()); + + m_screenPlayWallpapers.emplace_back( + make_unique( + monitorIndex, + m_settings, + generateID(), + path, + previewImage, + volume, + fillMode, + type, + this)); + + +} + void ScreenPlayManager::createWidget(QUrl absoluteStoragePath, const QString& previewImage) { ProjectFile project {}; @@ -118,7 +143,7 @@ void ScreenPlayManager::removeWallpaperAt(const int at) const auto wallsToRemove = remove_if( m_screenPlayWallpapers.begin(), m_screenPlayWallpapers.end(), [&](const unique_ptr& uPtrWallpaper) -> bool { - const vector& screenNumber = uPtrWallpaper->screenNumber(); + const QVector& screenNumber = uPtrWallpaper->screenNumber(); const bool isFound = !screenNumber.empty() && screenNumber[0] == at; if (isFound) { m_sdkconnector->closeWallpapersAt(at); @@ -200,9 +225,8 @@ void ScreenPlayManager::loadActiveProfiles() // A wallpaper can span across multiple monitors for (const QJsonValueRef monitor : monitorsArray) { QJsonObject obj = monitor.toObject(); - int parseMonitorIndexDefaultValue { -1 }; - int monitorIndex = obj.value("index").toInt(parseMonitorIndexDefaultValue); + int monitorIndex = obj.value("index").toInt(-1); if (monitorIndex == -1) continue; diff --git a/ScreenPlay/src/screenplaymanager.h b/ScreenPlay/src/screenplaymanager.h index 893cd6e4..bcbad39b 100644 --- a/ScreenPlay/src/screenplaymanager.h +++ b/ScreenPlay/src/screenplaymanager.h @@ -33,6 +33,7 @@ using std::shared_ptr, std::size_t, std::remove_if; + class ScreenPlayManager final : public QObject { Q_OBJECT @@ -56,7 +57,13 @@ public slots: void createWallpaper(const int monitorIndex, const QString& absoluteStoragePath, const QString& previewImage, const float volume, const QString& fillMode, const QString& type); + + void createWallpaper( QVector monitorIndex, const QString& absoluteStoragePath, + const QString& previewImage, const float volume, + const QString& fillMode, const QString& type); + void createWidget(QUrl absoluteStoragePath, const QString& previewImage); + void closeAllConnections(); void requestProjectSettingsListModelAt(const int index); void setWallpaperValue(const int at, const QString& key, const QString& value); diff --git a/ScreenPlay/src/screenplaywallpaper.cpp b/ScreenPlay/src/screenplaywallpaper.cpp index 482bb8a0..f73d862b 100644 --- a/ScreenPlay/src/screenplaywallpaper.cpp +++ b/ScreenPlay/src/screenplaywallpaper.cpp @@ -6,7 +6,7 @@ */ namespace ScreenPlay { -ScreenPlayWallpaper::ScreenPlayWallpaper(const vector& screenNumber, +ScreenPlayWallpaper::ScreenPlayWallpaper(const QVector& screenNumber, const shared_ptr& settings, const QString& appID, const QString& projectPath, @@ -17,7 +17,7 @@ ScreenPlayWallpaper::ScreenPlayWallpaper(const vector& screenNumber, QObject* parent) : QObject(parent) , m_projectSettingsListModel { make_shared(projectPath + "/project.json") } - , m_screenNumber { move(screenNumber) } + , m_screenNumber { screenNumber } , m_projectPath { projectPath } , m_previewImage { previewImage } , m_appID { appID } @@ -36,8 +36,22 @@ ScreenPlayWallpaper::ScreenPlayWallpaper(const vector& screenNumber, qDebug() << "EX: " << error; }); + QString tmpScreenNumber; + if (m_screenNumber.length() > 1) { + for (const int number : m_screenNumber) { + // IMPORTANT: NO TRAILING COMMA! + if (number == m_screenNumber.back()) { + tmpScreenNumber += QString::number(number); + } else { + tmpScreenNumber += QString::number(number) + ","; + } + } + } else { + tmpScreenNumber = QString::number(m_screenNumber.first()); + } + const QStringList proArgs { - QString::number(m_screenNumber.empty() ? 0 : m_screenNumber[0]), + tmpScreenNumber, m_projectPath, QString { "appID=" + m_appID }, "", @@ -45,7 +59,7 @@ ScreenPlayWallpaper::ScreenPlayWallpaper(const vector& screenNumber, fillMode }; - //qDebug() << "Creating ScreenPlayWallpaper " << proArgs; + qDebug() << "Creating ScreenPlayWallpaper " << proArgs; m_process.setArguments(proArgs); m_process.setProgram(m_settings->screenPlayWallpaperPath().toString()); diff --git a/ScreenPlay/src/screenplaywallpaper.h b/ScreenPlay/src/screenplaywallpaper.h index 73c821be..20dca73e 100644 --- a/ScreenPlay/src/screenplaywallpaper.h +++ b/ScreenPlay/src/screenplaywallpaper.h @@ -17,14 +17,14 @@ using std::shared_ptr, class ScreenPlayWallpaper final : public QObject { Q_OBJECT - Q_PROPERTY(vector screenNumber READ screenNumber WRITE setScreenNumber NOTIFY screenNumberChanged) + Q_PROPERTY(QVector screenNumber READ screenNumber WRITE setScreenNumber NOTIFY screenNumberChanged) Q_PROPERTY(QString projectPath READ projectPath WRITE setProjectPath NOTIFY projectPathChanged) Q_PROPERTY(QString previewImage READ previewImage WRITE setPreviewImage NOTIFY previewImageChanged) Q_PROPERTY(QString appID READ appID WRITE setAppID NOTIFY appIDChanged) Q_PROPERTY(QString type READ type WRITE setType NOTIFY typeChanged) public: - explicit ScreenPlayWallpaper(const vector& screenNumber, + explicit ScreenPlayWallpaper(const QVector& screenNumber, const shared_ptr& settings, const QString& appID, const QString& projectPath, @@ -41,7 +41,7 @@ public: return m_projectSettingsListModel; } - vector screenNumber() const + QVector screenNumber() const { return m_screenNumber; } @@ -67,14 +67,14 @@ public: } signals: - void screenNumberChanged(vector screenNumber); + void screenNumberChanged(QVector screenNumber); void projectPathChanged(QString projectPath); void previewImageChanged(QString previewImage); void appIDChanged(QString appID); void typeChanged(QString type); public slots: - void setScreenNumber(vector screenNumber) + void setScreenNumber(QVector screenNumber) { if (m_screenNumber == screenNumber) return; @@ -122,7 +122,7 @@ public slots: private: QProcess m_process; shared_ptr m_projectSettingsListModel; - vector m_screenNumber; + QVector m_screenNumber; QString m_projectPath; QString m_previewImage; QString m_appID; diff --git a/ScreenPlayWallpaper/main.cpp b/ScreenPlayWallpaper/main.cpp index fd612545..be915549 100644 --- a/ScreenPlayWallpaper/main.cpp +++ b/ScreenPlayWallpaper/main.cpp @@ -60,7 +60,11 @@ int main(int argc, char* argv[]) sdk.setAppID(argumentList.at(3)); QString monitorNumbers = argumentList.at(1); + QStringList activeScreensList = monitorNumbers.split(","); + qDebug() << activeScreensList; + activeScreensList.removeAll(","); QVector list; + qDebug() << activeScreensList; if (monitorNumbers.length() == 1) { bool canParseMonitorNumber = false; @@ -70,8 +74,8 @@ int main(int argc, char* argv[]) } list.append(monitor); } else { - QStringList activeScreensList = monitorNumbers.split(","); - for (QString s : activeScreensList) { + + for (const QString& s : activeScreensList) { bool ok = false; int val = s.toInt(&ok); if (!ok) { diff --git a/ScreenPlayWallpaper/mainWindow.qml b/ScreenPlayWallpaper/mainWindow.qml index 7135265e..9eae50cc 100644 --- a/ScreenPlayWallpaper/mainWindow.qml +++ b/ScreenPlayWallpaper/mainWindow.qml @@ -118,10 +118,7 @@ Rectangle { if(desktopProperties.windowsVersion >= 1903){ var ratio = root.width / root.height - - print(ratio) ratio = Math.round(ratio * 100) / 100 - print(ratio, root.width, root.height) // 4:3 if (ratio === 1,3) { @@ -227,10 +224,10 @@ Rectangle { } } - onPlaybackRateChanged: { + onCurrentTimeChanged: { if (webView.loadProgress === 100) { webView.runJavaScript( - "var videoPlayer = document.getElementById('videoPlayer'); videoPlayer.playbackRate = " + playbackRate + ";") + "var videoPlayer = document.getElementById('videoPlayer'); videoPlayer.currentTime = " + currentTime + " * videoPlayer.duration;") } } diff --git a/ScreenPlayWallpaper/src/basewindow.cpp b/ScreenPlayWallpaper/src/basewindow.cpp index 6d6e883c..0c34dd0b 100644 --- a/ScreenPlayWallpaper/src/basewindow.cpp +++ b/ScreenPlayWallpaper/src/basewindow.cpp @@ -121,5 +121,14 @@ void BaseWindow::messageReceived(QString key, QString value) return; } + if (key == "currentTime") { + bool ok; + float tmp = value.toFloat(&ok); + if (ok) { + setCurrentTime(tmp); + } + return; + } + emit qmlSceneValueReceived(key, value); } diff --git a/ScreenPlayWallpaper/src/basewindow.h b/ScreenPlayWallpaper/src/basewindow.h index 8e8825c2..fdd902bc 100644 --- a/ScreenPlayWallpaper/src/basewindow.h +++ b/ScreenPlayWallpaper/src/basewindow.h @@ -25,10 +25,12 @@ public: Q_PROPERTY(float volume READ volume WRITE setVolume NOTIFY volumeChanged) Q_PROPERTY(bool muted READ muted WRITE setMuted NOTIFY mutedChanged) Q_PROPERTY(float playbackRate READ playbackRate WRITE setPlaybackRate NOTIFY playbackRateChanged) + Q_PROPERTY(float currentTime READ currentTime WRITE setCurrentTime NOTIFY currentTimeChanged) Q_PROPERTY(WallpaperType type READ type WRITE setType NOTIFY typeChanged) Q_PROPERTY(QString OSVersion READ OSVersion WRITE setOSVersion NOTIFY OSVersionChanged) QSysInfo m_sysinfo; + enum class WallpaperType { Video, Html, @@ -37,6 +39,8 @@ public: }; Q_ENUM(WallpaperType) + + bool loops() const { return m_loops; @@ -82,6 +86,11 @@ public: return m_muted; } + float currentTime() const + { + return m_currentTime; + } + signals: void loopsChanged(bool loops); void volumeChanged(float volume); @@ -92,10 +101,9 @@ signals: void appIDChanged(QString appID); void qmlExit(); void qmlSceneValueReceived(QString key, QString value); - void OSVersionChanged(QString OSVersion); - void mutedChanged(bool muted); + void currentTimeChanged(float currentTime); public slots: virtual void destroyThis() {} @@ -187,6 +195,16 @@ public slots: emit mutedChanged(m_muted); } + void setCurrentTime(float currentTime) + { + qWarning("Floating point comparison needs context sanity check"); + if (qFuzzyCompare(m_currentTime, currentTime)) + return; + + m_currentTime = currentTime; + emit currentTimeChanged(m_currentTime); + } + private: bool m_loops { true }; bool m_isPlaying { true }; @@ -200,4 +218,5 @@ private: WallpaperType m_type = BaseWindow::WallpaperType::Qml; QString m_OSVersion; + float m_currentTime; }; diff --git a/ScreenPlayWallpaper/src/winwindow.cpp b/ScreenPlayWallpaper/src/winwindow.cpp index d55ed5c7..c02e3169 100644 --- a/ScreenPlayWallpaper/src/winwindow.cpp +++ b/ScreenPlayWallpaper/src/winwindow.cpp @@ -60,7 +60,7 @@ LRESULT __stdcall MouseHookCallback(int nCode, WPARAM wParam, LPARAM lParam) return CallNextHookEx(mouseHook, nCode, wParam, lParam); } -WinWindow::WinWindow(QVector& activeScreensList, QString projectPath, QString id, QString volume) +WinWindow::WinWindow(const QVector &activeScreensList, QString projectPath, QString id, QString volume) : BaseWindow(projectPath) { m_windowHandle = reinterpret_cast(m_window.winId()); @@ -94,8 +94,13 @@ WinWindow::WinWindow(QVector& activeScreensList, QString projectPath, QStri // Ether for one Screen or for all if ((QApplication::screens().length() == activeScreensList.length()) && (activeScreensList.length() != 1)) { setupWallpaperForAllScreens(); + qDebug() << "setupWallpaperForAllScreens()"; } else if (activeScreensList.length() == 1) { setupWallpaperForOneScreen(activeScreensList.at(0)); + qDebug() << "setupWallpaperForOneScreen()"; + } else if (activeScreensList.length() == 1) { + setupWallpaperForMultipleScreens(activeScreensList); + qDebug() << "setupWallpaperForMultipleScreens()"; } m_window.setResizeMode(QQuickView::ResizeMode::SizeRootObjectToView); @@ -188,6 +193,12 @@ void WinWindow::setupWallpaperForAllScreens() } } +void WinWindow::setupWallpaperForMultipleScreens(const QVector &activeScreensList) +{ + qDebug() << "######## setupWallpaperForMultipleScreens ########"; + +} + bool WinWindow::searchWorkerWindowToParentTo() { HWND progman_hwnd = FindWindowW(L"Progman", L"Program Manager"); diff --git a/ScreenPlayWallpaper/src/winwindow.h b/ScreenPlayWallpaper/src/winwindow.h index 02777e40..46e54572 100644 --- a/ScreenPlayWallpaper/src/winwindow.h +++ b/ScreenPlayWallpaper/src/winwindow.h @@ -20,8 +20,9 @@ class WinWindow : public BaseWindow { Q_OBJECT + public: - explicit WinWindow(QVector& activeScreensList, QString projectPath, QString id, QString volume); + explicit WinWindow(const QVector& activeScreensList, QString projectPath, QString id, QString volume); public slots: void setVisible(bool show) override; @@ -32,8 +33,10 @@ private: void calcOffsets(); void setupWallpaperForOneScreen(int activeScreen); void setupWallpaperForAllScreens(); + void setupWallpaperForMultipleScreens(const QVector& activeScreensList); bool searchWorkerWindowToParentTo(); + private: int m_windowOffsetX = 0; int m_windowOffsetY = 0;