Cleanup: Use enum class for CompositorQuality.
This commit is contained in:
@@ -36,14 +36,14 @@ typedef enum DataType {
|
||||
* \see CompositorContext.quality
|
||||
* \ingroup Execution
|
||||
*/
|
||||
typedef enum CompositorQuality {
|
||||
enum class CompositorQuality {
|
||||
/** \brief High quality setting */
|
||||
COM_QUALITY_HIGH = 0,
|
||||
High = 0,
|
||||
/** \brief Medium quality setting */
|
||||
COM_QUALITY_MEDIUM = 1,
|
||||
Medium = 1,
|
||||
/** \brief Low quality setting */
|
||||
COM_QUALITY_LOW = 2,
|
||||
} CompositorQuality;
|
||||
Low = 2,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Possible priority settings
|
||||
|
||||
@@ -24,7 +24,7 @@ CompositorContext::CompositorContext()
|
||||
{
|
||||
this->m_scene = nullptr;
|
||||
this->m_rd = nullptr;
|
||||
this->m_quality = COM_QUALITY_HIGH;
|
||||
this->m_quality = CompositorQuality::High;
|
||||
this->m_hasActiveOpenCLDevices = false;
|
||||
this->m_fastCalculation = false;
|
||||
this->m_viewSettings = nullptr;
|
||||
|
||||
@@ -110,7 +110,7 @@ void DefocusNode::convertToOperations(NodeConverter &converter,
|
||||
|
||||
VariableSizeBokehBlurOperation *operation = new VariableSizeBokehBlurOperation();
|
||||
if (data->preview) {
|
||||
operation->setQuality(COM_QUALITY_LOW);
|
||||
operation->setQuality(CompositorQuality::Low);
|
||||
}
|
||||
else {
|
||||
operation->setQuality(context.getQuality());
|
||||
|
||||
@@ -30,7 +30,7 @@ void DisplaceNode::convertToOperations(NodeConverter &converter,
|
||||
const CompositorContext &context) const
|
||||
{
|
||||
NodeOperation *operation;
|
||||
if (context.getQuality() == COM_QUALITY_LOW) {
|
||||
if (context.getQuality() == CompositorQuality::Low) {
|
||||
operation = new DisplaceSimpleOperation();
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
QualityStepHelper::QualityStepHelper()
|
||||
{
|
||||
this->m_quality = COM_QUALITY_HIGH;
|
||||
this->m_quality = CompositorQuality::High;
|
||||
this->m_step = 1;
|
||||
this->m_offsetadd = 4;
|
||||
}
|
||||
@@ -30,16 +30,16 @@ void QualityStepHelper::initExecution(QualityHelper helper)
|
||||
switch (helper) {
|
||||
case COM_QH_INCREASE:
|
||||
switch (this->m_quality) {
|
||||
case COM_QUALITY_HIGH:
|
||||
case CompositorQuality::High:
|
||||
default:
|
||||
this->m_step = 1;
|
||||
this->m_offsetadd = 1;
|
||||
break;
|
||||
case COM_QUALITY_MEDIUM:
|
||||
case CompositorQuality::Medium:
|
||||
this->m_step = 2;
|
||||
this->m_offsetadd = 2;
|
||||
break;
|
||||
case COM_QUALITY_LOW:
|
||||
case CompositorQuality::Low:
|
||||
this->m_step = 3;
|
||||
this->m_offsetadd = 3;
|
||||
break;
|
||||
@@ -47,16 +47,16 @@ void QualityStepHelper::initExecution(QualityHelper helper)
|
||||
break;
|
||||
case COM_QH_MULTIPLY:
|
||||
switch (this->m_quality) {
|
||||
case COM_QUALITY_HIGH:
|
||||
case CompositorQuality::High:
|
||||
default:
|
||||
this->m_step = 1;
|
||||
this->m_offsetadd = 4;
|
||||
break;
|
||||
case COM_QUALITY_MEDIUM:
|
||||
case CompositorQuality::Medium:
|
||||
this->m_step = 2;
|
||||
this->m_offsetadd = 8;
|
||||
break;
|
||||
case COM_QUALITY_LOW:
|
||||
case CompositorQuality::Low:
|
||||
this->m_step = 4;
|
||||
this->m_offsetadd = 16;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user