Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced vsgQt::ProxyWindow & vsgQt::ProxySurface with vsg::WindowAdapter and vsg::Surface. #5

Merged
merged 5 commits into from
Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(QT_PACKAGE_NAME Qt5 CACHE STRING "Set Qt package name, i.e. Qt5 or Qt6.")
set(QT_PACKAGE_VERSION 5.10 CACHE STRING "Set minimum Qt package version.")

find_package(vsg 0.1.6 REQUIRED)
find_package(vsg 0.1.7 REQUIRED)
find_package(vsgXchange) # only used by exanples
find_package(${QT_PACKAGE_NAME} ${QT_PACKAGE_VERSION} COMPONENTS Widgets REQUIRED)

Expand Down
2 changes: 1 addition & 1 deletion examples/vsgqtviewer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ int main(int argc, char* argv[])
// provide the calls to set up the vsg::Viewer that will be used to render to the QWindow subclass vsgQt::ViewerWindow
viewerWindow->initializeCallback = [&](vsgQt::ViewerWindow& vw) {

auto& window = vw.proxyWindow;
auto& window = vw.windowAdapter;
if (!window) return false;

auto& viewer = vw.viewer;
Expand Down
30 changes: 0 additions & 30 deletions include/vsgQt/ProxySurface.h

This file was deleted.

54 changes: 0 additions & 54 deletions include/vsgQt/ProxyWindow.h

This file was deleted.

10 changes: 6 additions & 4 deletions include/vsgQt/ViewerWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#include <QVulkanInstance>
#include <QWindow>

#include <vsg/viewer/WindowAdapter.h>
#include <vsg/viewer/WindowAdapter.h>

#include <vsgQt/KeyboardMap.h>
#include <vsgQt/ProxySurface.h>
#include <vsgQt/ProxyWindow.h>

namespace vsgQt
{
Expand All @@ -33,8 +34,7 @@ namespace vsgQt
vsg::ref_ptr<vsg::Instance> instance;
vsg::ref_ptr<vsg::Viewer> viewer;

vsg::ref_ptr<ProxySurface> proxySurface;
vsg::ref_ptr<ProxyWindow> proxyWindow;
vsg::ref_ptr<vsg::WindowAdapter> windowAdapter;
vsg::ref_ptr<KeyboardMap> keyboardMap;

using InitialCallback = std::function<void(ViewerWindow&)>;
Expand All @@ -50,6 +50,8 @@ namespace vsgQt
bool event(QEvent* e) override;

void exposeEvent(QExposeEvent*) override;
void hideEvent(QHideEvent *ev) override;

void keyPressEvent(QKeyEvent*) override;
void keyReleaseEvent(QKeyEvent*) override;
void mouseMoveEvent(QMouseEvent*) override;
Expand Down
4 changes: 0 additions & 4 deletions src/vsgQt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,11 @@ endmacro()

set(SOURCES
KeyboardMap.cpp
ProxySurface.cpp
ProxyWindow.cpp
ViewerWindow.cpp
)

set(HEADERS
../../include/vsgQt/KeyboardMap.h
../../include/vsgQt/ProxySurface.h
../../include/vsgQt/ProxyWindow.h
../../include/vsgQt/ViewerWindow.h
)

Expand Down
31 changes: 0 additions & 31 deletions src/vsgQt/ProxySurface.cpp

This file was deleted.

91 changes: 0 additions & 91 deletions src/vsgQt/ProxyWindow.cpp

This file was deleted.

Loading