diff --git a/include/vsgQt/Viewer.h b/include/vsgQt/Viewer.h index b657fc7..a8eb092 100644 --- a/include/vsgQt/Viewer.h +++ b/include/vsgQt/Viewer.h @@ -24,15 +24,13 @@ namespace vsgQt // forward declare class Window; - class VSGQT_DECLSPEC Viewer : public vsg::Inherit { public: - /// Create Viewer. /// If msecTimerInterval is > 0 then call setInterval(msecTimerInterval) to set up QTime to call Viewer::render() at this interval, - /// otherwise the redraw is left application to call Viewer::render() when required, call Viewer::setInverval() to set up the timer, - /// or to call the underlying vsg::Viewer methods for rendering a framne within the application when the viewer needs to redraw a frame. + /// otherwise the redraw is left application to call Viewer::render() when required, call Viewer::setInverval() to set up the timer, + /// or to call the underlying vsg::Viewer methods for rendering a framne within the application when the viewer needs to redraw a frame. Viewer(int msecTimerInterval = 0); QTimer timer; @@ -51,7 +49,6 @@ namespace vsgQt /// set the QTimer interval in milliseconds, this controls how often the Viewer::render() is called void setInterval(int msecTimerInterval); - }; } // namespace vsgQt diff --git a/include/vsgQt/Window.h b/include/vsgQt/Window.h index dd8ccb3..08b8b21 100644 --- a/include/vsgQt/Window.h +++ b/include/vsgQt/Window.h @@ -47,7 +47,6 @@ namespace vsgQt virtual void initializeWindow(); protected: - void cleanup(); bool event(QEvent* e) override; diff --git a/src/vsgQt/KeyboardMap.cpp b/src/vsgQt/KeyboardMap.cpp index afbb30b..a3fc3c6 100644 --- a/src/vsgQt/KeyboardMap.cpp +++ b/src/vsgQt/KeyboardMap.cpp @@ -199,13 +199,12 @@ bool KeyboardMap::getKeySymbol(const QKeyEvent* e, vsg::KeySymbol& keySymbol, vs else { keySymbol = vsg::KeySymbol(e->key()); - if (keySymbol>='A' && keySymbol<='Z') keySymbol = vsg::KeySymbol(int(keySymbol) + int('a'-'A')); + if (keySymbol >= 'A' && keySymbol <= 'Z') keySymbol = vsg::KeySymbol(int(keySymbol) + int('a' - 'A')); modifiedKeySymbol = vsg::KeySymbol(*(e->text().toLatin1().data())); // std::cout<<"KeyboardMap::getKeySymbol() NOT found in map, keySymbol = "< 0) setInterval(msecTimerInterval); } - bool Viewer::pollEvents(bool discardPreviousEvents) { if (discardPreviousEvents) _events.clear(); @@ -89,6 +87,6 @@ void Viewer::render(double simulationTime) void Viewer::setInterval(int msecTimerInterval) { timer.setInterval(msecTimerInterval); - timer.connect(&timer, &QTimer::timeout, [&](){ render(); } ); + timer.connect(&timer, &QTimer::timeout, [&]() { render(); }); timer.start(); } diff --git a/src/vsgQt/Window.cpp b/src/vsgQt/Window.cpp index 2c17d35..83bf612 100644 --- a/src/vsgQt/Window.cpp +++ b/src/vsgQt/Window.cpp @@ -67,7 +67,7 @@ Window::Window(vsg::ref_ptr in_traits, QScreen* targetScreen) } else { - traits =vsg::WindowTraits::create(); + traits = vsg::WindowTraits::create(); traits->x = x(); traits->y = y(); traits->width = width(); @@ -86,7 +86,7 @@ Window::Window(vsg::ref_ptr in_traits, QWindow* parent) : } else { - traits =vsg::WindowTraits::create(); + traits = vsg::WindowTraits::create(); traits->x = x(); traits->y = y(); traits->width = width(); @@ -106,7 +106,7 @@ Window::Window(vsg::ref_ptr in_viewer, vsg::ref_ptrx = x(); traits->y = y(); traits->width = width(); @@ -126,7 +126,7 @@ Window::Window(vsg::ref_ptr in_viewer, vsg::ref_ptrx = x(); traits->y = y(); traits->width = width(); @@ -182,7 +182,6 @@ void Window::cleanup() viewer = {}; } - bool Window::event(QEvent* e) { switch (e->type())