Skip to content
Snippets Groups Projects
Commit 931be650 authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

upd RoughnessModelCatalog

parent ee2c2a4a
No related branches found
No related tags found
1 merge request!2704Serialize RoughnessModel in GUI
......@@ -15,7 +15,7 @@
#include "GUI/Model/Sample/RoughnessCatalog.h"
#include "Base/Util/Assert.h"
#include "GUI/Model/Sample/RoughnessItems.h"
#include "Sample/Interface/RoughnessModels.h"
#include "GUI/Model/Sample/RoughnessModelItems.h"
RoughnessItem* RoughnessCatalog::create(Type type)
{
......@@ -57,13 +57,13 @@ RoughnessCatalog::Type RoughnessCatalog::type(const RoughnessItem* item)
//--------------------------------------------------------------------------
RoughnessModel* RoughnessModelCatalog::create(Type type)
RoughnessModelItem* RoughnessModelCatalog::create(Type type)
{
switch (type) {
case Type::Erf:
return new ErfRoughness();
return new ErfRoughnessItem();
case Type::Tanh:
return new TanhRoughness();
return new TanhRoughnessItem();
}
ASSERT_NEVER;
}
......@@ -84,12 +84,12 @@ UiInfo RoughnessModelCatalog::uiInfo(Type type)
ASSERT_NEVER;
}
RoughnessModelCatalog::Type RoughnessModelCatalog::type(const RoughnessModel* model)
RoughnessModelCatalog::Type RoughnessModelCatalog::type(const RoughnessModelItem* model)
{
if (dynamic_cast<const ErfRoughness*>(model))
if (dynamic_cast<const ErfRoughnessItem*>(model))
return Type::Erf;
if (dynamic_cast<const TanhRoughness*>(model))
if (dynamic_cast<const TanhRoughnessItem*>(model))
return Type::Tanh;
ASSERT_NEVER;
......
......@@ -19,7 +19,7 @@
#include <QVector>
class RoughnessItem;
class RoughnessModel;
class RoughnessModelItem;
class RoughnessCatalog {
public:
......@@ -47,7 +47,7 @@ public:
enum class Type : uint8_t { Erf = 0, Tanh = 1 };
//! Creates the item of the given type.
static RoughnessModel* create(Type type);
static RoughnessModelItem* create(Type type);
//! List of available types, sorted as expected in the UI.
static QVector<Type> types();
......@@ -56,7 +56,7 @@ public:
static UiInfo uiInfo(Type t);
//! Returns the enum type of the given item.
static Type type(const RoughnessModel* model);
static Type type(const RoughnessModelItem* model);
};
#endif // BORNAGAIN_GUI_MODEL_SAMPLE_ROUGHNESSCATALOG_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment