Commit 3f973779 authored by KLOCZKO Thibaud's avatar KLOCZKO Thibaud

Merge branch 'feature/parameter_rename' into 'develop'

Remove abstract from core parameter name.

See merge request !11
parents 4609d3d1 12246c1d
......@@ -255,12 +255,12 @@ dummy::dummy(void) : QMainWindow(0)
QVariantHash p1_values; p1_values["type"] = "dtk::d_int";
QVariantHash p2_values; p2_values["type"] = "dtk::d_real";
dtkCoreAbstractParameter *p1 = dtkCoreAbstractParameter::create(p1_values);
dtkCoreAbstractParameter *p2 = dtkCoreAbstractParameter::create(p2_values);
dtkCoreParameter *p1 = dtkCoreParameter::create(p1_values);
dtkCoreParameter *p2 = dtkCoreParameter::create(p2_values);
dtkCoreAbstractParameter *p31 = dtkCoreAbstractParameter::create(p1_values);
dtkCoreAbstractParameter *p32 = dtkCoreAbstractParameter::create(p1_values);
dtkCoreAbstractParameter *p33 = dtkCoreAbstractParameter::create(p1_values);
dtkCoreParameter *p31 = dtkCoreParameter::create(p1_values);
dtkCoreParameter *p32 = dtkCoreParameter::create(p1_values);
dtkCoreParameter *p33 = dtkCoreParameter::create(p1_values);
// /////////////////////////////////////////////////////////////////////////////
//
......
......@@ -182,7 +182,7 @@ dtkWidgetsMenuItem *dtkWidgetsMenu::addParameter(dtkWidgetsMenuItem *item)
return this->addItem(item);
}
dtkWidgetsMenuItem *dtkWidgetsMenu::addParameter(const QString& title, dtkCoreAbstractParameter *parameter, const QString& representation)
dtkWidgetsMenuItem *dtkWidgetsMenu::addParameter(const QString& title, dtkCoreParameter *parameter, const QString& representation)
{
dtkWidgetsMenuItem *item = new dtkWidgetsMenuItemParameter(title, parameter, representation);
......
......@@ -18,7 +18,7 @@
#include <QtWidgets>
class dtkCoreAbstractParameter;
class dtkCoreParameter;
class dtkWidgetsMenuItem;
class dtkWidgetsMenuFacade;
......@@ -58,7 +58,7 @@ public:
dtkWidgetsMenuItem *addSeparator(void);
dtkWidgetsMenuItem *addParameter(dtkWidgetsMenuItem *item);
dtkWidgetsMenuItem *addParameter(const QString&, dtkCoreAbstractParameter *, const QString& representation);
dtkWidgetsMenuItem *addParameter(const QString&, dtkCoreParameter *, const QString& representation);
#pragma mark - UI inference
......
......@@ -81,7 +81,7 @@ public:
// dtkWidgetsMenuItem
// ///////////////////////////////////////////////////////////////////
dtkWidgetsMenuItemParameter::dtkWidgetsMenuItemParameter(const QString& title, dtkCoreAbstractParameter *parameter, const QString& representation) : dtkWidgetsMenuItem(0, title, 0)
dtkWidgetsMenuItemParameter::dtkWidgetsMenuItemParameter(const QString& title, dtkCoreParameter *parameter, const QString& representation) : dtkWidgetsMenuItem(0, title, 0)
{
d = new dtkWidgetsMenuItemParameterPrivate;
......
......@@ -24,7 +24,7 @@
//
// /////////////////////////////////////////////////////////////////////////////
class dtkCoreAbstractParameter;
class dtkCoreParameter;
// /////////////////////////////////////////////////////////////////////////////
//
......@@ -68,7 +68,7 @@ class DTKWIDGETS_EXPORT dtkWidgetsMenuItemParameter : public dtkWidgetsMenuItem
Q_OBJECT
public:
explicit dtkWidgetsMenuItemParameter(const QString& title, dtkCoreAbstractParameter *parameter, const QString& representation);
explicit dtkWidgetsMenuItemParameter(const QString& title, dtkCoreParameter *parameter, const QString& representation);
public:
bool isParameter(void) const override { return true; }
......
......@@ -22,7 +22,7 @@
// dtkWidgetsParameter
// ///////////////////////////////////////////////////////////////////
class dtkCoreAbstractParameter;
class dtkCoreParameter;
class DTKWIDGETS_EXPORT dtkWidgetsParameter : public QWidget
{
......@@ -31,10 +31,10 @@ public:
~dtkWidgetsParameter(void) = default;
public:
virtual bool connect(dtkCoreAbstractParameter *) = 0;
virtual bool connect(dtkCoreParameter *) = 0;
public:
virtual dtkCoreAbstractParameter *parameter(void) const = 0;
virtual dtkCoreParameter *parameter(void) const = 0;
};
Q_DECLARE_METATYPE(dtkWidgetsParameter *);
......@@ -50,7 +50,7 @@ public:
dtkWidgetsParameterBase(QWidget *);
~dtkWidgetsParameterBase(void) = default;
dtkCoreAbstractParameter *parameter(void) const final;
dtkCoreParameter *parameter(void) const final;
protected:
T *m_parameter = nullptr;
......@@ -65,7 +65,7 @@ inline dtkWidgetsParameterBase<T>::dtkWidgetsParameterBase(QWidget *p) : dtkWidg
}
template <typename T>
inline dtkCoreAbstractParameter *dtkWidgetsParameterBase<T>::parameter(void) const
inline dtkCoreParameter *dtkWidgetsParameterBase<T>::parameter(void) const
{
return m_parameter;
}
......
......@@ -45,7 +45,7 @@ dtkWidgetsParameterBoolCheckBox::~dtkWidgetsParameterBoolCheckBox(void)
delete d;
}
bool dtkWidgetsParameterBoolCheckBox::connect(dtkCoreAbstractParameter *p)
bool dtkWidgetsParameterBoolCheckBox::connect(dtkCoreParameter *p)
{
if (!p) {
qWarning() << Q_FUNC_INFO << "The input parameter is null. Nothing is done.";
......
......@@ -31,7 +31,7 @@ public:
~dtkWidgetsParameterBoolCheckBox(void);
public:
bool connect(dtkCoreAbstractParameter *) override;
bool connect(dtkCoreParameter *) override;
private:
using dtkWidgetsParameterBase<dtk::d_bool>::m_parameter;
......
......@@ -45,7 +45,7 @@ dtkWidgetsParameterDoubleSpinBox::~dtkWidgetsParameterDoubleSpinBox(void)
delete d;
}
bool dtkWidgetsParameterDoubleSpinBox::connect(dtkCoreAbstractParameter *p)
bool dtkWidgetsParameterDoubleSpinBox::connect(dtkCoreParameter *p)
{
if (!p) {
qWarning() << Q_FUNC_INFO << "The input parameter is null. Nothing is done.";
......
......@@ -31,7 +31,7 @@ public:
~dtkWidgetsParameterDoubleSpinBox(void);
public:
bool connect(dtkCoreAbstractParameter *) override;
bool connect(dtkCoreParameter *) override;
private:
using dtkWidgetsParameterBase<dtk::d_real>::m_parameter;
......
......@@ -30,7 +30,7 @@ dtkWidgetsParameter *dtkWidgetsParameterFactory::create(const QString& key)
return widget;
}
dtkWidgetsParameter *dtkWidgetsParameterFactory::create(dtkCoreAbstractParameter *parameter, const QString& key)
dtkWidgetsParameter *dtkWidgetsParameterFactory::create(dtkCoreParameter *parameter, const QString& key)
{
if (!parameter) {
qWarning() << Q_FUNC_INFO << "The input parameter is null. Nothing is done. Return nullptr.";
......
......@@ -43,7 +43,7 @@ class DTKWIDGETS_EXPORT dtkWidgetsParameterFactory : public dtkCorePluginFactory
{
public:
dtkWidgetsParameter *create(const QString& key);
dtkWidgetsParameter *create(dtkCoreAbstractParameter *parameter, const QString& key);
dtkWidgetsParameter *create(dtkCoreParameter *parameter, const QString& key);
};
// /////////////////////////////////////////////////////////////////
......
......@@ -45,7 +45,7 @@ dtkWidgetsParameterIntSpinBox::~dtkWidgetsParameterIntSpinBox(void)
delete d;
}
bool dtkWidgetsParameterIntSpinBox::connect(dtkCoreAbstractParameter *p)
bool dtkWidgetsParameterIntSpinBox::connect(dtkCoreParameter *p)
{
if (!p) {
qWarning() << Q_FUNC_INFO << "The input parameter is null. Nothing is done.";
......
......@@ -31,7 +31,7 @@ public:
~dtkWidgetsParameterIntSpinBox(void);
public:
bool connect(dtkCoreAbstractParameter *) override;
bool connect(dtkCoreParameter *) override;
private:
using dtkWidgetsParameterBase<dtk::d_int>::m_parameter;
......
......@@ -31,7 +31,7 @@ public:
public:
QStringList uids;
QList<dtkCoreAbstractParameter *> parameters;
QList<dtkCoreParameter *> parameters;
QList<dtkWidgetsParameter *> widgets;
};
......@@ -45,7 +45,7 @@ void dtkWidgetsParameterMenuBarGeneratorPrivate::parseParameter(const QJsonObjec
QVariantHash map;
map.insert("type", type_string);
dtkCoreAbstractParameter *parameter = dtkCoreAbstractParameter::create(map);
dtkCoreParameter *parameter = dtkCoreParameter::create(map);
dtkWidgetsParameter *widget = dtk::widgets::parameters::pluginFactory().create(parameter, widget_string);
QString parameter_uid = parameter_object["uid"].toString();
......@@ -145,7 +145,7 @@ QStringList dtkWidgetsParameterMenuBarGenerator::uids(void) const
return d->uids;
}
QList<dtkCoreAbstractParameter *> dtkWidgetsParameterMenuBarGenerator::parameters(void) const
QList<dtkCoreParameter *> dtkWidgetsParameterMenuBarGenerator::parameters(void) const
{
return d->parameters;
}
......
......@@ -18,7 +18,7 @@
#include <QtCore>
class dtkCoreAbstractParameter;
class dtkCoreParameter;
class dtkWidgetsParameter;
// ///////////////////////////////////////////////////////////////////
......@@ -34,7 +34,7 @@ public:
public:
QStringList uids(void) const;
QList<dtkCoreAbstractParameter *> parameters(void) const;
QList<dtkCoreParameter *> parameters(void) const;
QList<dtkWidgetsParameter *> widgets(void) const;
protected:
......
......@@ -45,7 +45,7 @@ dtkWidgetsParameterStringListComboBox::~dtkWidgetsParameterStringListComboBox(vo
delete d;
}
bool dtkWidgetsParameterStringListComboBox::connect(dtkCoreAbstractParameter *p)
bool dtkWidgetsParameterStringListComboBox::connect(dtkCoreParameter *p)
{
if (!p) {
qWarning() << Q_FUNC_INFO << "The input parameter is null. Nothing is done.";
......
......@@ -31,7 +31,7 @@ public:
~dtkWidgetsParameterStringListComboBox(void);
public:
bool connect(dtkCoreAbstractParameter *) override;
bool connect(dtkCoreParameter *) override;
private:
using dtkWidgetsParameterBase<dtk::d_inliststring>::m_parameter;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment