dtk issueshttps://gitlab.inria.fr/dtk/dtk/-/issues2018-07-18T14:19:32+02:00https://gitlab.inria.fr/dtk/dtk/-/issues/42Supress extracted source tree and switch to new implementation scheme.2018-07-18T14:19:32+02:00Julien WintzSupress extracted source tree and switch to new implementation scheme.2.0.0Julien WintzJulien Wintzhttps://gitlab.inria.fr/dtk/dtk/-/issues/12dtkComposer requires dtkMathSupport2018-05-14T16:26:23+02:00Julien WintzdtkComposer requires dtkMathSupport*Created by: jwintz*
If `dtkComposerMathSupport` is not enabled, `dtkComposer` fails to build with the following message.
``` bash
[ 25%] Building CXX object src/dtkComposer/CMakeFiles/dtkComposer.dir/dtkComposerEvaluator.cpp.o
In file...*Created by: jwintz*
If `dtkComposerMathSupport` is not enabled, `dtkComposer` fails to build with the following message.
``` bash
[ 25%] Building CXX object src/dtkComposer/CMakeFiles/dtkComposer.dir/dtkComposerEvaluator.cpp.o
In file included from /Users/jwintz/Development/dtk/src/dtkComposer/dtkComposerEvaluator.cpp:23:
In file included from /Users/jwintz/Development/dtk/src/dtkComposer/dtkComposerGraphEdge.h:25:
/Users/jwintz/Development/dtk/src/dtkMathSupport/dtkGraphEdge.h:18:10: fatal error: 'dtkMathSupportExport.h' file not
found
#include "dtkMathSupportExport.h"
^
1 error generated.
```
Either the build system should handle this, or `dtkComposer` should not rely on `dtkMathSupport`, which I personally think is the best option.
https://gitlab.inria.fr/dtk/dtk/-/issues/13dtkComposer requires dtkCoreSupport2018-05-14T16:26:23+02:00Julien WintzdtkComposer requires dtkCoreSupport*Created by: jwintz*
When building `dtkComposer` layer, if `dtkCoreSupport` is not enabled, the compilation fails as follows:
``` bash
[ 50%] Building CXX object src/dtkComposer/CMakeFiles/dtkComposer.dir/dtkComposerViewLayoutItem.cpp....*Created by: jwintz*
When building `dtkComposer` layer, if `dtkCoreSupport` is not enabled, the compilation fails as follows:
``` bash
[ 50%] Building CXX object src/dtkComposer/CMakeFiles/dtkComposer.dir/dtkComposerViewLayoutItem.cpp.o
In file included from /Users/jwintz/Development/dtk/src/dtkComposer/dtkComposerViewLayoutItem.cpp:20:
In file included from /Users/jwintz/Development/dtk/src/dtkCoreSupport/dtkAbstractView.h:23:
/Users/jwintz/Development/dtk/src/dtkCoreSupport/dtkAbstractObject.h:23:10: fatal error: 'dtkCoreSupportExport.h' file
not found
#include "dtkCoreSupportExport.h"
^
1 error generated.
```
No more reference to `dtkAbstractView` should remain in non support layers.
https://gitlab.inria.fr/dtk/dtk/-/issues/40Remove ugly widget factory to replace it by a more robust system2018-05-14T16:26:23+02:00KLOCZKO ThibaudRemove ugly widget factory to replace it by a more robust system## Goal
Enable plugins that have specific setters and getters to be handled in the composer through widget editors.
## Summary of the new system
### Modifications in `dtkCore`
In `dtkCorePluginFactory`, add of method to recor...## Goal
Enable plugins that have specific setters and getters to be handled in the composer through widget editors.
## Summary of the new system
### Modifications in `dtkCore`
In `dtkCorePluginFactory`, add of method to record a widget_creator function and to create the widget using such a function.
As one only uses pointers to `QWidget`, no link to neither inclusion of QtWidgets is required, thus avoiding spurious dependency.
### Addition in `dtkCore`
* [x] `dtkCorePluginWidgetManager` is a singleton that stores a map between concept objects encapsulated within a `QVariant` and widgets that have to be provided by the plugins.
### Consequences for `dtkComposer`
As a result, one is now able to factorize into `dtkComposerNodeObject` the management of the editor widget. Code is as follows:
```cpp
template <typename T> inline QWidget *dtkComposerNodeObject<T>::editor(void)
{
if (!m_factory) {
return nullptr;
}
QVariant v = dtkMetaType::variantFromValue(this->object());
QWidget *w = dtkCorePluginWidgetManager::instance().widget(v);
if (!w) {
w = m_factory->createWidget(m_implementation);
if (w) {
dtkCorePluginWidgetManager::instance().add(v, w);
}
}
return w;
}
```
First, one encapsulates the object into a `QVariant` so that one can ask the `dtkCorePluginWidgetManager` for a widget associated with the current object. If the widget exists, it is returned.
Else, one creates the widget using the factory and the name of the implementation of the current object.
When the creation is OK, the couple `(QVariant, QWidget*)` is added to the `dtkCorePluginWidgetManager`.
### Connection with the plugins
When one adds the couple `(QVariant, QWidget*)` in the `dtkCorePluginWidgetManager`, a signal `added(const QVariant&, QWidget*)` is emitted.
This signal can be connected to the widget provided by the plugin in order to get the instance of the object into the widget and makes connections between the specific setters and getters of the object and its dedicated widget.
For instance, let us consider the plugin `dtkVtkMeshingFilterPlugin` that implement the concept `dtkAbstractMeshingFilter` of `dtkImagingFilters` layer. The implementation has the following specific setter method:
```cpp
class dtkVtkMeshingFilter : public dtkAbstractMeshingFilter
{
...
public:
void setDecimate(bool decimate);
...
};
```
A widget has been created to handle this parameter through the composer editor:
```cpp
#pragma once
#include <QtWidgets>
namespace Ui {
class dtkVtkMeshingFilterWidget;
}
class dtkVtkMeshingFilterWidget : public QWidget
{
public:
dtkVtkMeshingFilterWidget(QWidget *parent = 0);
~dtkVtkMeshingFilterWidget();
private:
Ui::dtkVtkMeshingFilterWidget *ui;
QMetaObject::Connection m_connection;
};
inline QWidget *dtkVtkMeshingFilterWidgetCreator(void)
{
return new dtkVtkMeshingFilterWidget();
}
```
In the constructor, one can now connect the signal emitted by the `dtkCorePluginWidgetManager` to a lambda function that establish connection between the `QCheckBox` in the widget and the setter method handling the decimate parameter of the object contained in the `dtkComposerNodeObject`:
```cpp
dtkVtkMeshingFilterWidget::dtkVtkMeshingFilterWidget(QWidget *parent) : QWidget(parent), ui(new Ui::dtkVtkMeshingFilterWidget)
{
ui->setupUi(this);
m_connection = connect(&dtkCorePluginWidgetManager::instance(),
&dtkCorePluginWidgetManager::added,
[=] (const QVariant& v, QWidget *w) {
if (w != this) {
dtkTrace() << Q_FUNC_INFO << "Mismatch widget";
return;
}
dtkAbstractMeshingFilter *f = v.value<dtkAbstractMeshingFilter *>();
if (!f) {
dtkTrace() << Q_FUNC_INFO << "Wrong concept";
return;
}
dtkVtkMeshingFilter *filter = dynamic_cast<dtkVtkMeshingFilter *>(f);
if (!filter) {
dtkTrace() << Q_FUNC_INFO << "Wrong implementation";
return;
}
connect(ui->m_decimate, &QCheckBox::toggled, [=] (bool b) {
filter->setDecimate(b);
});
dtkTrace() << Q_FUNC_INFO << "Connection done";
});
}
dtkVtkMeshingFilterWidget::~dtkVtkMeshingFilterWidget()
{
disconnect(m_connection);
delete ui;
}
```
Destructor disconnects the connection.
### Less dependencies
The new system enables to remove dependencies to `dtkWidgets` and, in the present case, `dtkImagingWidgets`. We can even be able to compile the widget part of the plugin only when the composer is enabled.
## Outline
The new system works as a charm on my ubuntu 16.04. It compiles on windows 7 for at least dtk and dtk-imaging. I have not yet tested it for dtk-plugins-imaging on windows.
If it is convincing enough, we can remove `dtkWidgetFactory` from `dtkWidgets` layer. It will imply to modify layers and plugins that uses it.https://gitlab.inria.fr/dtk/dtk/-/issues/36versionning todo2018-05-14T16:26:23+02:00Julien Wintzversionning todo*Created by: tristancabel*
following July 8th discussion, the current proposition is:
- **1.1** actual version
- **1.2** add Feature _support deprecated_
- **1.3** add Feature _monitoring_
- **2.0** delete layers _support_
*Created by: tristancabel*
following July 8th discussion, the current proposition is:
- **1.1** actual version
- **1.2** add Feature _support deprecated_
- **1.3** add Feature _monitoring_
- **2.0** delete layers _support_
https://gitlab.inria.fr/dtk/dtk/-/issues/6dtkLogger2018-05-14T16:26:23+02:00Julien WintzdtkLogger*Created by: LoicCadour*
I am trying to integrate the dtkLogger inside medInria, and it works very well.
Maybe two features that might be interesting would be to:
- allow to set a maximum size for the log file, so that it doesn't explod...*Created by: LoicCadour*
I am trying to integrate the dtkLogger inside medInria, and it works very well.
Maybe two features that might be interesting would be to:
- allow to set a maximum size for the log file, so that it doesn't explode,
- and, this one might be more difficult, to allow multiple log levels according to the destination. For instance, you might want to see debug messages in the console, but just errors and warnings in the dtkLogView.
https://gitlab.inria.fr/dtk/dtk/-/issues/41Extract fonts and widgets layers from dtk-visualization2018-05-14T16:24:55+02:00Julien WintzExtract fonts and widgets layers from dtk-visualization- See https://gitlab.inria.fr/dtk/dtk-fonts
- See https://gitlab.inria.fr/dtk/dtk-widgets- See https://gitlab.inria.fr/dtk/dtk-fonts
- See https://gitlab.inria.fr/dtk/dtk-widgets2.0.0Julien WintzJulien Wintz