Skip to content
Snippets Groups Projects
Commit 7c75d39e authored by Matthias Puchner's avatar Matthias Puchner
Browse files

introduce constant for editor tpye

parent ee6512bb
Branches
Tags
1 merge request!261Replace usage of ExternalProperty
...@@ -51,5 +51,5 @@ ItemWithMaterial::ItemWithMaterial(const QString& model_type) : SessionGraphicsI ...@@ -51,5 +51,5 @@ ItemWithMaterial::ItemWithMaterial(const QString& model_type) : SessionGraphicsI
{ {
addProperty(P_MATERIAL, GUI::Model::MaterialItemUtils::defaultMaterialProperty().variant()) addProperty(P_MATERIAL, GUI::Model::MaterialItemUtils::defaultMaterialProperty().variant())
->setToolTip("Material this item is made of") ->setToolTip("Material this item is made of")
.setEditorType("ExtMaterialEditor"); .setEditorType(ExternalPropertyEditor::EDITOR_TYPE);
} }
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
#include <QToolButton> #include <QToolButton>
#include <cmath> #include <cmath>
const QString ExternalPropertyEditor::EDITOR_TYPE = "MaterialEditor";
namespace { namespace {
//! Single step for QDoubleSpinBox. //! Single step for QDoubleSpinBox.
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#ifndef BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_CUSTOMEDITORS_H #ifndef BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_CUSTOMEDITORS_H
#define BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_CUSTOMEDITORS_H #define BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_CUSTOMEDITORS_H
#include "WinDllMacros.h"
#include <QVariant> #include <QVariant>
#include <QWidget> #include <QWidget>
...@@ -47,11 +48,13 @@ protected: ...@@ -47,11 +48,13 @@ protected:
//! Editor for ExternalProperty variant. //! Editor for ExternalProperty variant.
class ExternalPropertyEditor : public CustomEditor { class BA_CORE_API_ ExternalPropertyEditor : public CustomEditor {
Q_OBJECT Q_OBJECT
public: public:
explicit ExternalPropertyEditor(QWidget* parent = nullptr); explicit ExternalPropertyEditor(QWidget* parent = nullptr);
static const QString EDITOR_TYPE;
private slots: private slots:
void buttonClicked(); void buttonClicked();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment