Skip to content
Open
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
3 changes: 3 additions & 0 deletions cmd/moonray_gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions cmd/moonray_gui/ColorPicker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

}
}
6 changes: 3 additions & 3 deletions cmd/moonray_gui/ColorPicker.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
} // namespace moonray_gui
5 changes: 2 additions & 3 deletions cmd/moonray_gui/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#pragma once

#include "GuiTypes.h"
#include "QtQuirks.h"

#include <QLabel>
#include <QMainWindow>
Expand Down Expand Up @@ -44,9 +43,9 @@ class MainWindow : public QMainWindow
QTimer* mTimer;


public slots:
public Q_SLOTS:
void hideTextOverlay();
signals:
Q_SIGNALS:
void sig_hideRecordingOverlay();
};

Expand Down
16 changes: 8 additions & 8 deletions cmd/moonray_gui/PathVisualizerGui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -483,49 +483,49 @@ PathVisualizerGui::slot_setLineWidth(const int value)
{
mPathVisualizerManager->setLineWidth(static_cast<float>(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();
}

}
4 changes: 2 additions & 2 deletions cmd/moonray_gui/PathVisualizerGui.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class PathVisualizerGui : public QWidget

~PathVisualizerGui();

public slots:
public Q_SLOTS:

void slot_togglePathVisualizer();

Expand Down Expand Up @@ -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:
Expand Down
13 changes: 0 additions & 13 deletions cmd/moonray_gui/QtQuirks.h

This file was deleted.

4 changes: 2 additions & 2 deletions cmd/moonray_gui/RenderGui.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <moonray/rendering/rndr/rndr.h>
#include <scene_rdl2/common/grid_util/ShmFbOutput.h>

#include <tbb/atomic.h>
//#include <tbb/atomic.h>

#define NUM_TILE_FADE_STEPS 4

Expand Down Expand Up @@ -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<uint32_t> mMasterTimestamp;
std::atomic<uint32_t> mMasterTimestamp;

/// The timestamp of the frame the renderer is currently processing.
uint32_t mRenderTimestamp;
Expand Down
2 changes: 1 addition & 1 deletion cmd/moonray_gui/RenderViewport.cc
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ RenderViewport::mousePressEvent(QMouseEvent *event)
const int finalY = y + static_cast<int>(heightDiscrepancy*0.5f);

if (x >= 0 && x < mWidth && finalY >= 0 && finalY < mHeight) {
emit sig_pixelSelected(x, finalY);
Q_EMIT sig_pixelSelected(x, finalY);
}
}
}
Expand Down
5 changes: 2 additions & 3 deletions cmd/moonray_gui/RenderViewport.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#pragma once

#ifndef Q_MOC_RUN
#include "QtQuirks.h"
#include "FrameUpdateEvent.h"
#include "FreeCam.h"
#include "GlslBuffer.h"
Expand Down Expand Up @@ -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:
Expand Down