Commit 9ee5a299 authored by SZPYRKA Jean-Luc's avatar SZPYRKA Jean-Luc

Merge branch 'feature/adapt_menu_parameter_generator_to_menubar' into 'develop'

Feature/adapt menu parameter generator to menubar

See merge request !10
parents 3f973779 35799986
......@@ -13,6 +13,8 @@
### Code:
*~
\#*
.#*
## ###################################################################
## Build tree
......
......@@ -19,7 +19,6 @@ add_subdirectory(dtkWidgetsMenu)
add_subdirectory(dtkWidgetsMenuParameters)
add_subdirectory(dtkWidgetsOverlayPaneItems)
add_subdirectory(dtkWidgetsParameter)
add_subdirectory(dtkWidgetsParameterMenuBarGenerator)
add_subdirectory(dtkWidgetsScroller)
######################################################################
......
......@@ -228,7 +228,7 @@ bool dummyEventFilter::eventFilter(QObject *object, QEvent *event)
qDebug() << "Ate key mouse event for" << object;
return true;
} else {
return QObject::eventFilter(object, event);
......@@ -303,11 +303,11 @@ dummy::dummy(void) : QMainWindow(0)
QString placeholder = "SubSub";
dtkWidgetsMenu *m = this->menu_22->addMenu(fa::home, QString("%1Level3").arg(placeholder));
for(int i = 0; i < 10; i++) {
placeholder += "Sub";
m->addItem(fa::home, QString("%1Level1").arg(placeholder));
dtkWidgetsMenu *menu = m->addMenu(fa::home, QString("%1Level2").arg(placeholder));
m->addItem(fa::home, QString("%1Level3").arg(placeholder));
......@@ -316,13 +316,13 @@ dummy::dummy(void) : QMainWindow(0)
m = menu;
}
this->menubar->addMenu(this->menu_1);
this->menubar->addMenu(this->menu_2);
this->menubar->addMenu(this->menu_3);
for(int i = 0; i < 15; i++) {
dtkWidgetsMenu *menu = this->menubar->addMenu(fa::circlethin, QString("Dummy %1").arg(i));
for(int j = 0; j < 5; j++)
......@@ -333,7 +333,7 @@ dummy::dummy(void) : QMainWindow(0)
for(int j = 0; j < 5; j++)
menu->addItem(fa::circleo, QString("DummyItem %1").arg(j + 5));
}
this->menubar->build();
this->setStyleSheet(m_style);
......
......@@ -240,44 +240,16 @@ dummy::dummy(void) : QMainWindow(0)
// Initialize widgets parameters factory
// /////////////////////////////////////////////////////////////////////////////
qRegisterMetaTypeStreamOperators<dtk::d_int> ("dtk::d_int");
qRegisterMetaTypeStreamOperators<dtk::d_real>("dtk::d_real");
qRegisterMetaType<dtk::d_int *>();
qRegisterMetaType<dtk::d_real *>();
dtk::widgets::initialize("");
// /////////////////////////////////////////////////////////////////////////////
// Declare a logic parameter
// /////////////////////////////////////////////////////////////////////////////
QVariantHash p1_values; p1_values["type"] = "dtk::d_int";
QVariantHash p2_values; p2_values["type"] = "dtk::d_real";
dtkCoreParameter *p1 = dtkCoreParameter::create(p1_values);
dtkCoreParameter *p2 = dtkCoreParameter::create(p2_values);
dtkCoreParameter *p31 = dtkCoreParameter::create(p1_values);
dtkCoreParameter *p32 = dtkCoreParameter::create(p1_values);
dtkCoreParameter *p33 = dtkCoreParameter::create(p1_values);
dtkWidgetsParameterMenuBarGenerator menubar_generator(":parameters_nature.json", ":parameters_definition.json");
// /////////////////////////////////////////////////////////////////////////////
//
// /////////////////////////////////////////////////////////////////////////////
this->menubar = new dtkWidgetsMenuBar(this);
dtkWidgetsMenu *menu = this->menubar->addMenu(fa::circlethin, "Group");
menu->addParameter("p1 (intg)", p1, "dtkWidgetsParameterIntSpinBox");
menu->addParameter("p2 (real)", p2, "dtkWidgetsParameterDoubleSpinBox");
menu->addSeparator();
dtkWidgetsMenu *submenu = menu->addMenu(fa::circlethin, "SubGroup");
submenu->addParameter("p31 (intg)", p31, "dtkWidgetsParameterIntSpinBox");
submenu->addParameter("p32 (intg)", p32, "dtkWidgetsParameterIntSpinBox");
submenu->addParameter("p33 (intg)", p33, "dtkWidgetsParameterIntSpinBox");
menubar_generator.populate(this->menubar);
this->menubar->build();
......@@ -297,6 +269,8 @@ void dummy::resizeEvent(QResizeEvent *event)
int main(int argc, char **argv)
{
dtk::core::registerParameters();
QApplication application(argc, argv);
application.setAttribute(Qt::AA_EnableHighDpiScaling);
......
<!DOCTYPE RCC>
<RCC version="1.0">
<qresource>
<qresource prefix="">
<file>parameters_nature.json</file>
<file>parameters_definition.json</file>
</qresource>
</RCC>
{
"contents":
{
"prec": {"label": "prec", "doc": "documentation", "value": 5.0, "min": -1.0, "max": 7.0, "decimals": 5},
"hyp": {"label": "hyp", "doc": "documentation", "value": 2, "min": 0, "max": 5},
"dif": {"label": "dif", "doc": "documentation", "value": false},
"res": {"label": "res", "doc": "documentation", "value": false},
"inf": {"label": "inf", "doc": "documentation", "value": false},
"wind": {"label": "wind", "doc": "documentation", "value": false}
}
}
{
"contents": [{
"group":
{
"uid" : "Model parameters 1",
"icon": "cogs",
"advanced": false,
"contents": [
{"parameter": {"uid": "prec", "type": "dtk::d_real", "widget": "dtkWidgetsParameterDoubleSpinBox", "advanced": false}},
{"parameter": {"uid": "hyp", "type": "dtk::d_int", "widget": "dtkWidgetsParameterIntSpinBox", "advanced": false}},
{"parameter": {"uid": "dif", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}},
{"parameter": {"uid": "res", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}},
{"parameter": {"uid": "prec", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}},
{"parameter": {"uid": "inf", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}},
{"parameter": {"uid": "wind", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}},
{"group":
{
"uid" : "Model parameters 1.1",
"icon": "paw",
"advanced": false,
"contents": [
{"parameter": {"uid": "prec", "type": "dtk::d_real", "widget": "dtkWidgetsParameterDoubleSpinBox", "advanced": false}},
{"parameter": {"uid": "hyp", "type": "dtk::d_int", "widget": "dtkWidgetsParameterIntSpinBox", "advanced": false}},
{"parameter": {"uid": "dif", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}},
{"parameter": {"uid": "res", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}},
{"parameter": {"uid": "prec", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}},
{"parameter": {"uid": "inf", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}},
{"parameter": {"uid": "wind", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}}
]
}
}
]
}},{
"group":
{
"uid" : "Model parameters 2",
"icon": "paw",
"advanced": false,
"contents": [
{"parameter": {"uid": "prec", "type": "dtk::d_real", "widget": "dtkWidgetsParameterDoubleSpinBox", "advanced": false}},
{"parameter": {"uid": "hyp", "type": "dtk::d_int", "widget": "dtkWidgetsParameterIntSpinBox", "advanced": false}},
{"parameter": {"uid": "dif", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}},
{"parameter": {"uid": "res", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}},
{"parameter": {"uid": "prec", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}},
{"parameter": {"uid": "inf", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}},
{"parameter": {"uid": "wind", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}}
]
}
}]
}
......@@ -36,10 +36,12 @@ int main(int argc, char **argv)
dtkWidgetsParameter *first_real_parameter_widget = dtk::widgets::parameters::pluginFactory().create(&real_parameter, "dtkWidgetsParameterDoubleSpinBox");
dtkWidgetsParameter *second_real_parameter_widget = dtk::widgets::parameters::pluginFactory().create(&real_parameter, "dtkWidgetsParameterDoubleSpinBox");
real_parameter.connect([=] (QVariant v) {
double value = v.value<dtk::d_real>().value();
qInfo() << value;
});
double value = v.value<dtk::d_real>().value();
qInfo() << "real_parameter =" << value;
});
QList<QString> available_strings;
available_strings.append("FirstString");
......@@ -50,20 +52,22 @@ int main(int argc, char **argv)
inliststring_parameter.setDocumentation("A inliststring parameter.");
inliststring_parameter.setValue(QString("SecondString"));
dtkWidgetsParameter *inliststring_parameter_widget = dtk::widgets::parameters::pluginFactory().create(&inliststring_parameter, "dtkWidgetsParameterStringListComboBox");
inliststring_parameter.connect([=] (QVariant v) {
QString value = v.value<dtk::d_inliststring>().value();
qInfo() << value;
});
QString value = v.value<dtk::d_inliststring>().value();
qInfo() << "inliststring_parameter =" << value;
});
dtk::d_bool bool_parameter = true;
dtk::d_bool bool_parameter = true;
dtkWidgetsParameter *bool_parameter_widget = dtk::widgets::parameters::pluginFactory().create(&bool_parameter, "dtkWidgetsParameterBoolCheckBox");
bool_parameter.connect([=] (QVariant v) {
bool value = v.value<dtk::d_bool>().value();
qInfo() << value;
});
bool value = v.value<dtk::d_bool>().value();
qInfo() << "bool_parameter =" << value;
});
QVBoxLayout *central_layout = new QVBoxLayout;
central_layout->addWidget(first_real_parameter_widget);
......
......@@ -39,7 +39,7 @@ int main(int argc, char **argv)
QMainWindow *window = new QMainWindow;
dtkWidgetsParameterMenuBarGenerator menu_bar_generator(":parameters_nature.json", ":parameters_nature.json");
dtkWidgetsParameterMenuBarGenerator menu_bar_generator(":parameters_nature.json", ":parameters_definition.json");
QVBoxLayout *central_layout = new QVBoxLayout;
......
{
"contents": [
{"uid" : "hyp", "label": "hyp", "doc": "documentation", "default_value": 2, "bound_min": 0, "bound_max": 5},
{"uid" : "dif", "label": "dif", "doc": "documentation", "default_value": false},
{"uid" : "res", "label": "res", "doc": "documentation", "default_value": false},
{"uid" : "prec", "label": "prec", "doc": "documentation", "default_value": false},
{"uid" : "inf", "label": "inf", "doc": "documentation", "default_value": false},
{"uid" : "wind", "label": "wind", "doc": "documentation", "default_value": false},
]
}
{
"contents": [
{ "group": {"uid" : "Model parameters", "icon": "fa::cogs", "advanced": false,
"contents": [
{"parameter": {"uid": "hyp", "type": "dtk::d_int", "widget": "dtkWidgetsParameterIntSpinBox", "advanced": false}},
{"parameter": {"uid": "dif", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}},
{"parameter": {"uid": "res", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}},
{"parameter": {"uid": "prec", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}},
{"parameter": {"uid": "inf", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}},
{"parameter": {"uid": "wind", "type": "dtk::d_bool", "widget": "dtkWidgetsParameterBoolCheckBox", "advanced": false}}
]
} }
]
}
......@@ -69,10 +69,18 @@ set(${PROJECT_NAME}_HEADERS
dtkWidgetsParameter.h
dtkWidgetsParameterBoolCheckBox
dtkWidgetsParameterBoolCheckBox.h
dtkWidgetsParameterBoolPushButton
dtkWidgetsParameterBoolPushButton.h
dtkWidgetsParameterDirBrowse
dtkWidgetsParameterDirBrowse.h
dtkWidgetsParameterDoubleSpinBox
dtkWidgetsParameterDoubleSpinBox.h
dtkWidgetsParameterFactory
dtkWidgetsParameterFactory.h
dtkWidgetsParameterFileBrowse
dtkWidgetsParameterFileBrowse.h
dtkWidgetsParameterIntSlider
dtkWidgetsParameterIntSlider.h
dtkWidgetsParameterIntSpinBox
dtkWidgetsParameterIntSpinBox.h
dtkWidgetsParameterMenuBarGenerator
......@@ -110,9 +118,13 @@ set(${PROJECT_NAME}_SOURCES
dtkWidgetsOverlayRope.cpp
dtkWidgetsParameter.cpp
dtkWidgetsParameterBoolCheckBox.cpp
dtkWidgetsParameterBoolPushButton.cpp
dtkWidgetsParameterDirBrowse.cpp
dtkWidgetsParameterDoubleSpinBox.cpp
dtkWidgetsParameterIntSlider.cpp
dtkWidgetsParameterIntSpinBox.cpp
dtkWidgetsParameterFactory.cpp
dtkWidgetsParameterFileBrowse.cpp
dtkWidgetsParameterMenuBarGenerator.cpp
dtkWidgetsParameterStringListComboBox.cpp
dtkWidgetsSettings.cpp
......
......@@ -21,7 +21,11 @@
#include "dtkWidgetsSettings.h"
#include "dtkWidgetsParameterBoolCheckBox.h"
#include "dtkWidgetsParameterBoolPushButton.h"
#include "dtkWidgetsParameterDoubleSpinBox.h"
#include "dtkWidgetsParameterDirBrowse.h"
#include "dtkWidgetsParameterFileBrowse.h"
#include "dtkWidgetsParameterIntSlider.h"
#include "dtkWidgetsParameterIntSpinBox.h"
#include "dtkWidgetsParameterStringListComboBox.h"
......@@ -63,8 +67,12 @@ namespace dtk {
// Initializes default plugins
// ///////////////////////////////////////////////////////////////////
dtk::widgets::parameters::pluginFactory().record("dtkWidgetsParameterBoolCheckBox", dtkWidgetsParameterBoolCheckBoxCreator);
dtk::widgets::parameters::pluginFactory().record("dtkWidgetsParameterBoolPushButton", dtkWidgetsParameterBoolPushButtonCreator);
dtk::widgets::parameters::pluginFactory().record("dtkWidgetsParameterDirBrowse", dtkWidgetsParameterDirBrowseCreator);
dtk::widgets::parameters::pluginFactory().record("dtkWidgetsParameterDoubleSpinBox", dtkWidgetsParameterDoubleSpinBoxCreator);
dtk::widgets::parameters::pluginFactory().record("dtkWidgetsParameterIntSlider", dtkWidgetsParameterIntSliderCreator);
dtk::widgets::parameters::pluginFactory().record("dtkWidgetsParameterIntSpinBox", dtkWidgetsParameterIntSpinBoxCreator);
dtk::widgets::parameters::pluginFactory().record("dtkWidgetsParameterFileBrowse", dtkWidgetsParameterFileBrowseCreator);
dtk::widgets::parameters::pluginFactory().record("dtkWidgetsParameterStringListComboBox", dtkWidgetsParameterStringListComboBoxCreator);
}
void setVerboseLoading(bool b)
......
......@@ -82,9 +82,7 @@ bool dtkWidgetsParameterBoolCheckBox::connect(dtkCoreParameter *p)
QObject::connect(d->check_box, &QCheckBox::stateChanged, [=] (int state)
{
m_parameter->block(true);
m_parameter->setValue(state == Qt::Checked);
m_parameter->block(false);
});
return true;
......
#include "dtkWidgetsParameterBoolPushButton.h"
\ No newline at end of file
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#include "dtkWidgetsParameterBoolPushButton.h"
#include <dtkLog>
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsParameterBoolPushButtonPrivate declaration
// ///////////////////////////////////////////////////////////////////
class dtkWidgetsParameterBoolPushButtonPrivate
{
public:
QPushButton *push_button = nullptr;
bool running = false;
};
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsParameterBoolPushButton implementation
// ///////////////////////////////////////////////////////////////////
dtkWidgetsParameterBoolPushButton::dtkWidgetsParameterBoolPushButton(QWidget* parent) : dtkWidgetsParameterBase<dtk::d_bool>(parent), d(new dtkWidgetsParameterBoolPushButtonPrivate)
{
d->push_button = new QPushButton;
QHBoxLayout *layout = new QHBoxLayout;
layout->addWidget(d->push_button);
this->setLayout(layout);
}
dtkWidgetsParameterBoolPushButton::~dtkWidgetsParameterBoolPushButton(void)
{
delete d;
}
bool dtkWidgetsParameterBoolPushButton::connect(dtkCoreParameter *p)
{
if (!p) {
qWarning() << Q_FUNC_INFO << "The input parameter is null. Nothing is done.";
return false;
}
m_parameter = dynamic_cast<dtk::d_bool *>(p);
if(!m_parameter) {
qWarning() << Q_FUNC_INFO << "The type of the parameter is not compatible with the widget dtkWidgetsParameterBoolPushButton.";
return false;
}
d->push_button->setToolTip(m_parameter->documentation());
d->running = m_parameter->value();
if(d->running) {
qWarning() << Q_FUNC_INFO << "It is not advised to set d_bool parameter to on before connecting";
}
auto setAppearance = [this] (bool state) {
if (state) {
this->d->push_button->setStyleSheet("background-color: red");
this->d->push_button->setText("Running...");
} else {
this->d->push_button->setStyleSheet("");
this->d->push_button->setText("Run");
}
};
setAppearance(d->running);
m_parameter->connect([=] (QVariant v)
{
bool state = v.value<dtk::d_bool>().value();
d->push_button->blockSignals(true);
setAppearance(state);
d->push_button->blockSignals(false);
});
QObject::connect(d->push_button, &QPushButton::clicked, [=] ()
{
if(d->running) {
d->running = false;
} else {
d->running = true;
}
m_parameter->setValue(d->running);
});
return true;
}
//
// dtkWidgetsParameterBoolPushButtonWidget.cpp ends here
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#pragma once
#include <dtkWidgetsExport>
#include "dtkWidgetsParameter.h"
#include <dtkCore/dtkCoreParameter>
#include <QtWidgets>
class DTKWIDGETS_EXPORT dtkWidgetsParameterBoolPushButton : public dtkWidgetsParameterBase<dtk::d_bool>
{
Q_OBJECT
public:
dtkWidgetsParameterBoolPushButton(QWidget* parent = 0);
~dtkWidgetsParameterBoolPushButton(void);
public:
bool connect(dtkCoreParameter *) override;
private:
using dtkWidgetsParameterBase<dtk::d_bool>::m_parameter;
class dtkWidgetsParameterBoolPushButtonPrivate *d;
};
// ///////////////////////////////////////////////////////////////////
inline dtkWidgetsParameter *dtkWidgetsParameterBoolPushButtonCreator(void)
{
return new dtkWidgetsParameterBoolPushButton();
}
//
// dtkWidgetsParameterBoolPushButton.h ends here
#include "dtkWidgetsParameterFileBrowse.h"
\ No newline at end of file
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#include "dtkWidgetsParameterDirBrowse.h"
#include <dtkLog>
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsParameterDirBrowsePrivate declaration
// ///////////////////////////////////////////////////////////////////
class dtkWidgetsParameterDirBrowsePrivate
{
public:
QPushButton *push_button = nullptr;
};
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsParameterDirBrowse implementation
// ///////////////////////////////////////////////////////////////////
dtkWidgetsParameterDirBrowse::dtkWidgetsParameterDirBrowse(QWidget* parent) : dtkWidgetsParameterBase<dtk::d_path>(parent), d(new dtkWidgetsParameterDirBrowsePrivate)
{
d->push_button = new QPushButton;
QHBoxLayout *layout = new QHBoxLayout;
layout->addWidget(d->push_button);
this->setLayout(layout);
}
dtkWidgetsParameterDirBrowse::~dtkWidgetsParameterDirBrowse(void)
{
delete d;
}
bool dtkWidgetsParameterDirBrowse::connect(dtkCoreParameter *p)
{
if (!p) {
qWarning() << Q_FUNC_INFO << "The input parameter is null. Nothing is done.";
return false;
}
m_parameter = dynamic_cast<dtk::d_path *>(p);
if(!m_parameter) {
qWarning() << Q_FUNC_INFO << "The type of the parameter is not compatible with the widget dtkWidgetsParameterDirBrowse.";
return false;
}
d->push_button->setText("Browse");
m_parameter->connect([=] (QVariant v) {
d->push_button->blockSignals(true);
QString value = v.value<dtk::d_path>().baseName();
if (value.isEmpty()) {
value = "Browse";
}
d->push_button->setText(value);
d->push_button->blockSignals(false);
});
QObject::connect(d->push_button, &QPushButton::clicked, [=] ()
{
m_parameter->setValue(QFileDialog::getExistingDirectory(this, "Open Directory", m_parameter->dirName()));
});
return true;
}
//
// dtkWidgetsParameterDirBrowse.cpp ends here
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#pragma once
#include <dtkWidgetsExport>
#include <QtWidgets>
#include "dtkWidgetsParameter.h"
#include <dtkCore/dtkCoreParameter>
#include <dtkCore/dtkCoreParameterPath>
class DTKWIDGETS_EXPORT dtkWidgetsParameterDirBrowse : public dtkWidgetsParameterBase<dtk::d_path>
{
Q_OBJECT
public:
dtkWidgetsParameterDirBrowse(QWidget* parent = 0);
~dtkWidgetsParameterDirBrowse(void);
public:
bool connect(dtkCoreParameter *) override;
private:
using dtkWidgetsParameterBase<dtk::d_path>::m_parameter;
class dtkWidgetsParameterDirBrowsePrivate *d;
};
// ///////////////////////////////////////////////////////////////////
inline dtkWidgetsParameter *dtkWidgetsParameterDirBrowseCreator(void)
{
return new dtkWidgetsParameterDirBrowse();
}
//
// dtkWidgetsParameterDirBrowse.h ends here
......@@ -75,9 +75,7 @@ bool dtkWidgetsParameterDoubleSpinBox::connect(dtkCoreParameter *p)
QObject::connect(d->spin_box, QOverload<double>::of(&QDoubleSpinBox::valueChanged), [=] (double v)
{
m_parameter->block(true);
m_parameter->setValue(v);
m_parameter->block(false);
});
return true;
......
#include "dtkWidgetsParameterFileBrowse.h"
\ No newline at end of file
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#include "dtkWidgetsParameterFileBrowse.h"
#include <dtkLog>
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsParameterFileBrowsePrivate declaration
// ///////////////////////////////////////////////////////////////////
class dtkWidgetsParameterFileBrowsePrivate
{
public:
QPushButton *push_button = nullptr;
};
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsParameterFileBrowse implementation
// ///////////////////////////////////////////////////////////////////
dtkWidgetsParameterFileBrowse::dtkWidgetsParameterFileBrowse(QWidget* parent) : dtkWidgetsParameterBase<dtk::d_path>(parent), d(new dtkWidgetsParameterFileBrowsePrivate)
{
d->push_button = new QPushButton;