diff --git a/cmd/moonray_gui/CMakeLists.txt b/cmd/moonray_gui/CMakeLists.txt index ee33633..08c8a0f 100644 --- a/cmd/moonray_gui/CMakeLists.txt +++ b/cmd/moonray_gui/CMakeLists.txt @@ -103,5 +103,8 @@ if (NOT OpenColorIO_FOUND) target_compile_definitions(${target} PRIVATE DISABLE_OCIO) endif() +# Class of "emit" from QT and TBB collide +target_compile_definitions(${target} PRIVATE QT_NO_KEYWORDS) + install(TARGETS ${target} RUNTIME DESTINATION bin) diff --git a/cmd/moonray_gui/ColorPicker.cc b/cmd/moonray_gui/ColorPicker.cc index a803f9d..8b03f8a 100644 --- a/cmd/moonray_gui/ColorPicker.cc +++ b/cmd/moonray_gui/ColorPicker.cc @@ -55,7 +55,7 @@ void ColorPicker::slot_changeColor(const QColor& color) .arg(mColor.blue()); mSelector->setStyleSheet(style); - emit sig_colorChanged(mColor); + Q_EMIT sig_colorChanged(mColor); } -} \ No newline at end of file +} diff --git a/cmd/moonray_gui/ColorPicker.h b/cmd/moonray_gui/ColorPicker.h index 2deda90..4ab6da2 100644 --- a/cmd/moonray_gui/ColorPicker.h +++ b/cmd/moonray_gui/ColorPicker.h @@ -30,12 +30,12 @@ class ColorPicker : public QWidget QColorDialog* mColorDialog; QPushButton* mSelector; -signals: +Q_SIGNALS: void sig_colorChanged(const QColor& color); -public slots: +public Q_SLOTS: void slot_changeColor(const QColor& color); void slot_openColorDialog(); }; -} // namespace moonray_gui \ No newline at end of file +} // namespace moonray_gui diff --git a/cmd/moonray_gui/MainWindow.h b/cmd/moonray_gui/MainWindow.h index 2f52c3d..2b0b8b6 100644 --- a/cmd/moonray_gui/MainWindow.h +++ b/cmd/moonray_gui/MainWindow.h @@ -4,7 +4,6 @@ #pragma once #include "GuiTypes.h" -#include "QtQuirks.h" #include #include @@ -44,9 +43,9 @@ class MainWindow : public QMainWindow QTimer* mTimer; -public slots: +public Q_SLOTS: void hideTextOverlay(); -signals: +Q_SIGNALS: void sig_hideRecordingOverlay(); }; diff --git a/cmd/moonray_gui/PathVisualizerGui.cc b/cmd/moonray_gui/PathVisualizerGui.cc index 55e7988..2f9f71f 100644 --- a/cmd/moonray_gui/PathVisualizerGui.cc +++ b/cmd/moonray_gui/PathVisualizerGui.cc @@ -338,7 +338,7 @@ PathVisualizerGui::slot_togglePathVisualizer() // to "Turn on", and refresh the frame mPathVisualizerManager->turnOff(); mOnBtn->setText("Turn On"); - emit sig_styleParamChanged(); + Q_EMIT sig_styleParamChanged(); } else { // If the visualizer is off, turn it on, start the visualization // process, and set the button text to "Turn off" @@ -483,49 +483,49 @@ PathVisualizerGui::slot_setLineWidth(const int value) { mPathVisualizerManager->setLineWidth(static_cast(value)); mLineWidthValue->setText(QString::number(value)); - emit sig_styleParamChanged(); + Q_EMIT sig_styleParamChanged(); } void PathVisualizerGui::slot_setCameraRayColor(const QColor& color) { mPathVisualizerManager->setCameraRayColor(convertFromQColor(color)); - emit sig_styleParamChanged(); + Q_EMIT sig_styleParamChanged(); } void PathVisualizerGui::slot_setIndirectDiffuseRayColor(const QColor& color) { mPathVisualizerManager->setIndirectDiffuseRayColor(convertFromQColor(color)); - emit sig_styleParamChanged(); + Q_EMIT sig_styleParamChanged(); } void PathVisualizerGui::slot_setIndirectSpecularRayColor(const QColor& color) { mPathVisualizerManager->setIndirectSpecularRayColor(convertFromQColor(color)); - emit sig_styleParamChanged(); + Q_EMIT sig_styleParamChanged(); } void PathVisualizerGui::slot_setDirectDiffuseRayColor(const QColor& color) { mPathVisualizerManager->setDirectDiffuseRayColor(convertFromQColor(color)); - emit sig_styleParamChanged(); + Q_EMIT sig_styleParamChanged(); } void PathVisualizerGui::slot_setDirectSpecularRayColor(const QColor& color) { mPathVisualizerManager->setDirectSpecularRayColor(convertFromQColor(color)); - emit sig_styleParamChanged(); + Q_EMIT sig_styleParamChanged(); } void PathVisualizerGui::slot_setDirectLightRayColor(const QColor& color) { mPathVisualizerManager->setDirectLightRayColor(convertFromQColor(color)); - emit sig_styleParamChanged(); + Q_EMIT sig_styleParamChanged(); } } diff --git a/cmd/moonray_gui/PathVisualizerGui.h b/cmd/moonray_gui/PathVisualizerGui.h index 4616086..6b6553b 100644 --- a/cmd/moonray_gui/PathVisualizerGui.h +++ b/cmd/moonray_gui/PathVisualizerGui.h @@ -26,7 +26,7 @@ class PathVisualizerGui : public QWidget ~PathVisualizerGui(); -public slots: +public Q_SLOTS: void slot_togglePathVisualizer(); @@ -58,7 +58,7 @@ public slots: void slot_setDirectSpecularRayColor(const QColor& color); void slot_setDirectLightRayColor(const QColor& color); -signals: +Q_SIGNALS: void sig_styleParamChanged(); private: diff --git a/cmd/moonray_gui/QtQuirks.h b/cmd/moonray_gui/QtQuirks.h deleted file mode 100644 index 1325197..0000000 --- a/cmd/moonray_gui/QtQuirks.h +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2023-2024 DreamWorks Animation LLC -// SPDX-License-Identifier: Apache-2.0 - - -#pragma once - -// Include this header before any Qt headers to compile with icc14/gcc48. - -// These should totally not be necessary, but BaRT is black magic and I have -// absolutely no idea WTF it's doing. -#define slots Q_SLOTS -#define signals Q_SIGNALS - diff --git a/cmd/moonray_gui/RenderGui.h b/cmd/moonray_gui/RenderGui.h index 0ec9694..ef48c41 100644 --- a/cmd/moonray_gui/RenderGui.h +++ b/cmd/moonray_gui/RenderGui.h @@ -10,7 +10,7 @@ #include #include -#include +//#include #define NUM_TILE_FADE_STEPS 4 @@ -123,7 +123,7 @@ class RenderGui /// The renderering code will strive to render this frame. If it's rendering /// a frame with a lower timestamp then we know the frame it's currently /// rendering is old. - tbb::atomic mMasterTimestamp; + std::atomic mMasterTimestamp; /// The timestamp of the frame the renderer is currently processing. uint32_t mRenderTimestamp; diff --git a/cmd/moonray_gui/RenderViewport.cc b/cmd/moonray_gui/RenderViewport.cc index 75311ae..cd8d089 100644 --- a/cmd/moonray_gui/RenderViewport.cc +++ b/cmd/moonray_gui/RenderViewport.cc @@ -779,7 +779,7 @@ RenderViewport::mousePressEvent(QMouseEvent *event) const int finalY = y + static_cast(heightDiscrepancy*0.5f); if (x >= 0 && x < mWidth && finalY >= 0 && finalY < mHeight) { - emit sig_pixelSelected(x, finalY); + Q_EMIT sig_pixelSelected(x, finalY); } } } diff --git a/cmd/moonray_gui/RenderViewport.h b/cmd/moonray_gui/RenderViewport.h index 92764e7..d43a117 100644 --- a/cmd/moonray_gui/RenderViewport.h +++ b/cmd/moonray_gui/RenderViewport.h @@ -4,7 +4,6 @@ #pragma once #ifndef Q_MOC_RUN -#include "QtQuirks.h" #include "FrameUpdateEvent.h" #include "FreeCam.h" #include "GlslBuffer.h" @@ -83,10 +82,10 @@ class RenderViewport : public QWidget static const char* mHelp; -public slots: +public Q_SLOTS: void slot_forceFrameRedraw(); -signals: +Q_SIGNALS: void sig_pixelSelected(int x, int y); protected: