Attention une mise à jour du service Gitlab va être effectuée le mardi 18 janvier (et non lundi 17 comme annoncé précédemment) entre 18h00 et 18h30. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit 3b20de67 authored by KLOCZKO Thibaud's avatar KLOCZKO Thibaud
Browse files

Still renewing transmitters.

parent 097a201c
......@@ -3,9 +3,9 @@
## Author: Julien Wintz
## Created: Wed Mar 20 12:26:15 2013 (+0100)
## Version:
## Last-Updated: Wed Mar 20 14:35:56 2013 (+0100)
## By: Julien Wintz
## Update #: 19
## Last-Updated: Mon Mar 25 10:32:54 2013 (+0100)
## By: Thibaud Kloczko
## Update #: 39
######################################################################
##
### Change Log:
......@@ -42,67 +42,67 @@ set(${PROJECT_NAME}_HEADERS
dtkComposerMachine.h
dtkComposerMachineState.h
dtkComposerNode.h
dtkComposerNodeArrayData.h
dtkComposerNodeArrayDataExtractor.h
dtkComposerNodeArrayDataOperatorModifier.h
dtkComposerNodeArrayScalar.h
dtkComposerNodeArrayScalarExtractor.h
dtkComposerNodeArrayScalarOperatorModifier.h
# dtkComposerNodeArrayData.h
# dtkComposerNodeArrayDataExtractor.h
# dtkComposerNodeArrayDataOperatorModifier.h
# dtkComposerNodeArrayScalar.h
# dtkComposerNodeArrayScalarExtractor.h
# dtkComposerNodeArrayScalarOperatorModifier.h
dtkComposerNodeBoolean.h
dtkComposerNodeBooleanOperator.h
dtkComposerNodeComposite.h
dtkComposerNodeConstants.h
dtkComposerNodeControl.h
dtkComposerNodeControlCase.h
dtkComposerNodeControlDoWhile.h
dtkComposerNodeControlIf.h
dtkComposerNodeControlFor.h
dtkComposerNodeControlForEach.h
dtkComposerNodeControlMap.h
dtkComposerNodeControlWhile.h
dtkComposerNodeData.h
dtkComposerNodeFile.h
dtkComposerNodeInteger.h
# dtkComposerNodeComposite.h
# dtkComposerNodeConstants.h
# dtkComposerNodeControl.h
# dtkComposerNodeControlCase.h
# dtkComposerNodeControlDoWhile.h
# dtkComposerNodeControlIf.h
# dtkComposerNodeControlFor.h
# dtkComposerNodeControlForEach.h
# dtkComposerNodeControlMap.h
# dtkComposerNodeControlWhile.h
# dtkComposerNodeData.h
# dtkComposerNodeFile.h
# dtkComposerNodeInteger.h
dtkComposerNodeLeaf.h
dtkComposerNodeLeafData.h
dtkComposerNodeLeafProcess.h
dtkComposerNodeLeafView.h
dtkComposerNodeLogger.h
dtkComposerNodeMatrixSquareReal.h
dtkComposerNodeMatrixSquareRealExtractor.h
dtkComposerNodeMatrixSquareRealOperatorUnary.h
dtkComposerNodeMatrixSquareRealOperatorBinary.h
dtkComposerNodeMetaScalarArray.h
dtkComposerNodeMetaScalarArrayAppend.h
dtkComposerNodeMetaScalarArrayExtractor.h
dtkComposerNodeMetaScalarArrayReplace.h
dtkComposerNodeMetaVector3DArray.h
dtkComposerNodeMetaVector3DArrayAppend.h
dtkComposerNodeMetaVector3DArrayExtractor.h
dtkComposerNodeNumberOperator.h
dtkComposerNodeProcess.h
dtkComposerNodeProxy.h
dtkComposerNodeQuaternion.h
dtkComposerNodeQuaternionOperatorUnary.h
dtkComposerNodeQuaternionOperatorBinary.h
dtkComposerNodeReal.h
dtkComposerNodeString.h
dtkComposerNodeStringOperator.h
dtkComposerNodeVector3D.h
dtkComposerNodeVector3DOperatorUnary.h
dtkComposerNodeVector3DOperatorBinary.h
dtkComposerNodeVector3DOperatorTernary.h
dtkComposerNodeVectorInteger.h
dtkComposerNodeVectorIntegerExtractor.h
dtkComposerNodeVectorIntegerOperatorModifier.h
dtkComposerNodeVectorIntegerOperatorUnary.h
dtkComposerNodeVectorIntegerOperatorBinary.h
dtkComposerNodeVectorReal.h
dtkComposerNodeVectorRealExtractor.h
dtkComposerNodeVectorRealOperatorModifier.h
dtkComposerNodeVectorRealOperatorUnary.h
dtkComposerNodeVectorRealOperatorBinary.h
dtkComposerNodeView.h
# dtkComposerNodeLeafData.h
# dtkComposerNodeLeafProcess.h
# dtkComposerNodeLeafView.h
# dtkComposerNodeLogger.h
# dtkComposerNodeMatrixSquareReal.h
# dtkComposerNodeMatrixSquareRealExtractor.h
# dtkComposerNodeMatrixSquareRealOperatorUnary.h
# dtkComposerNodeMatrixSquareRealOperatorBinary.h
# dtkComposerNodeMetaScalarArray.h
# dtkComposerNodeMetaScalarArrayAppend.h
# dtkComposerNodeMetaScalarArrayExtractor.h
# dtkComposerNodeMetaScalarArrayReplace.h
# dtkComposerNodeMetaVector3DArray.h
# dtkComposerNodeMetaVector3DArrayAppend.h
# dtkComposerNodeMetaVector3DArrayExtractor.h
# dtkComposerNodeNumberOperator.h
# dtkComposerNodeProcess.h
# dtkComposerNodeProxy.h
# dtkComposerNodeQuaternion.h
# dtkComposerNodeQuaternionOperatorUnary.h
# dtkComposerNodeQuaternionOperatorBinary.h
# dtkComposerNodeReal.h
# dtkComposerNodeString.h
# dtkComposerNodeStringOperator.h
# dtkComposerNodeVector3D.h
# dtkComposerNodeVector3DOperatorUnary.h
# dtkComposerNodeVector3DOperatorBinary.h
# dtkComposerNodeVector3DOperatorTernary.h
# dtkComposerNodeVectorInteger.h
# dtkComposerNodeVectorIntegerExtractor.h
# dtkComposerNodeVectorIntegerOperatorModifier.h
# dtkComposerNodeVectorIntegerOperatorUnary.h
# dtkComposerNodeVectorIntegerOperatorBinary.h
# dtkComposerNodeVectorReal.h
# dtkComposerNodeVectorRealExtractor.h
# dtkComposerNodeVectorRealOperatorModifier.h
# dtkComposerNodeVectorRealOperatorUnary.h
# dtkComposerNodeVectorRealOperatorBinary.h
# dtkComposerNodeView.h
dtkComposerPath.h
dtkComposerScene.h
dtkComposerSceneEdge.h
......@@ -134,7 +134,7 @@ set(${PROJECT_NAME}_HEADERS
dtkComposerTransmitterReceiver.tpp
dtkComposerTransmitterVariant.h
dtkComposerType.h
dtkComposerVariant.h
# dtkComposerVariant.h
dtkComposerView.h
dtkComposerReader.h
dtkComposerWriter.h)
......@@ -162,67 +162,67 @@ set(${PROJECT_NAME}_SOURCES
dtkComposerMachine.cpp
dtkComposerMachineState.cpp
dtkComposerNode.cpp
dtkComposerNodeArrayData.cpp
dtkComposerNodeArrayDataExtractor.cpp
dtkComposerNodeArrayDataOperatorModifier.cpp
dtkComposerNodeArrayScalar.cpp
dtkComposerNodeArrayScalarExtractor.cpp
dtkComposerNodeArrayScalarOperatorModifier.cpp
# dtkComposerNodeArrayData.cpp
# dtkComposerNodeArrayDataExtractor.cpp
# dtkComposerNodeArrayDataOperatorModifier.cpp
# dtkComposerNodeArrayScalar.cpp
# dtkComposerNodeArrayScalarExtractor.cpp
# dtkComposerNodeArrayScalarOperatorModifier.cpp
dtkComposerNodeBoolean.cpp
dtkComposerNodeBooleanOperator.cpp
dtkComposerNodeComposite.cpp
dtkComposerNodeConstants.cpp
dtkComposerNodeControl.cpp
dtkComposerNodeControlCase.cpp
dtkComposerNodeControlDoWhile.cpp
dtkComposerNodeControlIf.cpp
dtkComposerNodeControlFor.cpp
dtkComposerNodeControlForEach.cpp
dtkComposerNodeControlMap.cpp
dtkComposerNodeControlWhile.cpp
dtkComposerNodeData.cpp
dtkComposerNodeFile.cpp
dtkComposerNodeInteger.cpp
# dtkComposerNodeComposite.cpp
# dtkComposerNodeConstants.cpp
# dtkComposerNodeControl.cpp
# dtkComposerNodeControlCase.cpp
# dtkComposerNodeControlDoWhile.cpp
# dtkComposerNodeControlIf.cpp
# dtkComposerNodeControlFor.cpp
# dtkComposerNodeControlForEach.cpp
# dtkComposerNodeControlMap.cpp
# dtkComposerNodeControlWhile.cpp
# dtkComposerNodeData.cpp
# dtkComposerNodeFile.cpp
# dtkComposerNodeInteger.cpp
dtkComposerNodeLeaf.cpp
dtkComposerNodeLeafData.cpp
dtkComposerNodeLeafProcess.cpp
dtkComposerNodeLeafView.cpp
dtkComposerNodeLogger.cpp
dtkComposerNodeMatrixSquareReal.cpp
dtkComposerNodeMatrixSquareRealExtractor.cpp
dtkComposerNodeMatrixSquareRealOperatorUnary.cpp
dtkComposerNodeMatrixSquareRealOperatorBinary.cpp
dtkComposerNodeMetaScalarArray.cpp
dtkComposerNodeMetaScalarArrayAppend.cpp
dtkComposerNodeMetaScalarArrayExtractor.cpp
dtkComposerNodeMetaScalarArrayReplace.cpp
dtkComposerNodeMetaVector3DArray.cpp
dtkComposerNodeMetaVector3DArrayAppend.cpp
dtkComposerNodeMetaVector3DArrayExtractor.cpp
dtkComposerNodeNumberOperator.cpp
dtkComposerNodeProcess.cpp
dtkComposerNodeProxy.cpp
dtkComposerNodeQuaternion.cpp
dtkComposerNodeQuaternionOperatorUnary.cpp
dtkComposerNodeQuaternionOperatorBinary.cpp
dtkComposerNodeReal.cpp
dtkComposerNodeString.cpp
dtkComposerNodeStringOperator.cpp
dtkComposerNodeVector3D.cpp
dtkComposerNodeVector3DOperatorUnary.cpp
dtkComposerNodeVector3DOperatorBinary.cpp
dtkComposerNodeVector3DOperatorTernary.cpp
dtkComposerNodeVectorInteger.cpp
dtkComposerNodeVectorIntegerExtractor.cpp
dtkComposerNodeVectorIntegerOperatorModifier.cpp
dtkComposerNodeVectorIntegerOperatorUnary.cpp
dtkComposerNodeVectorIntegerOperatorBinary.cpp
dtkComposerNodeVectorReal.cpp
dtkComposerNodeVectorRealExtractor.cpp
dtkComposerNodeVectorRealOperatorModifier.cpp
dtkComposerNodeVectorRealOperatorUnary.cpp
dtkComposerNodeVectorRealOperatorBinary.cpp
dtkComposerNodeView.cpp
# dtkComposerNodeLeafData.cpp
# dtkComposerNodeLeafProcess.cpp
# dtkComposerNodeLeafView.cpp
# dtkComposerNodeLogger.cpp
# dtkComposerNodeMatrixSquareReal.cpp
# dtkComposerNodeMatrixSquareRealExtractor.cpp
# dtkComposerNodeMatrixSquareRealOperatorUnary.cpp
# dtkComposerNodeMatrixSquareRealOperatorBinary.cpp
# dtkComposerNodeMetaScalarArray.cpp
# dtkComposerNodeMetaScalarArrayAppend.cpp
# dtkComposerNodeMetaScalarArrayExtractor.cpp
# dtkComposerNodeMetaScalarArrayReplace.cpp
# dtkComposerNodeMetaVector3DArray.cpp
# dtkComposerNodeMetaVector3DArrayAppend.cpp
# dtkComposerNodeMetaVector3DArrayExtractor.cpp
# dtkComposerNodeNumberOperator.cpp
# dtkComposerNodeProcess.cpp
# dtkComposerNodeProxy.cpp
# dtkComposerNodeQuaternion.cpp
# dtkComposerNodeQuaternionOperatorUnary.cpp
# dtkComposerNodeQuaternionOperatorBinary.cpp
# dtkComposerNodeReal.cpp
# dtkComposerNodeString.cpp
# dtkComposerNodeStringOperator.cpp
# dtkComposerNodeVector3D.cpp
# dtkComposerNodeVector3DOperatorUnary.cpp
# dtkComposerNodeVector3DOperatorBinary.cpp
# dtkComposerNodeVector3DOperatorTernary.cpp
# dtkComposerNodeVectorInteger.cpp
# dtkComposerNodeVectorIntegerExtractor.cpp
# dtkComposerNodeVectorIntegerOperatorModifier.cpp
# dtkComposerNodeVectorIntegerOperatorUnary.cpp
# dtkComposerNodeVectorIntegerOperatorBinary.cpp
# dtkComposerNodeVectorReal.cpp
# dtkComposerNodeVectorRealExtractor.cpp
# dtkComposerNodeVectorRealOperatorModifier.cpp
# dtkComposerNodeVectorRealOperatorUnary.cpp
# dtkComposerNodeVectorRealOperatorBinary.cpp
# dtkComposerNodeView.cpp
dtkComposerPath.cpp
dtkComposerScene.cpp
dtkComposerSceneEdge.cpp
......@@ -242,10 +242,9 @@ set(${PROJECT_NAME}_SOURCES
dtkComposerStackView.cpp
dtkComposerStackCommand.cpp
dtkComposerTransmitter.cpp
dtkComposerTransmitterAbstractEmitter.cpp
dtkComposerTransmitterAbstractReceiver.cpp
dtkComposerTransmitterHandler.cpp
dtkComposerTransmitterProxy.cpp
dtkComposerTransmitterEmitter.cpp
dtkComposerTransmitterReceiver.cpp
# dtkComposerTransmitterProxy.cpp
dtkComposerTransmitterVariant.cpp
dtkComposerView.cpp
dtkComposerView.cpp
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2011 - Thibaud Kloczko, Inria.
* Created: Mon Jan 30 11:34:40 2012 (+0100)
* Version: $Id$
* Last-Updated: Wed Mar 20 14:42:46 2013 (+0100)
* By: Julien Wintz
* Update #: 837
* Last-Updated: Mon Mar 25 08:44:42 2013 (+0100)
* By: Thibaud Kloczko
* Update #: 839
*/
/* Commentary:
......@@ -28,6 +28,7 @@
#include <dtkLog>
#include <QtCore>
#include <QtConcurrent>
// ///////////////////////////////////////////////////////////////////
// Log categories
......
This diff is collapsed.
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Thu Feb 9 14:43:33 2012 (+0100)
* Version: $Id$
* Last-Updated: Wed Mar 20 14:47:17 2013 (+0100)
* By: Julien Wintz
* Update #: 2100
* Last-Updated: Mon Mar 25 10:30:03 2013 (+0100)
* By: Thibaud Kloczko
* Update #: 2108
*/
/* Commentary:
......@@ -48,6 +48,12 @@
#include <dtkLog>
// /////////////////////////////////////////////////////////////////
// dtkLog categories
// /////////////////////////////////////////////////////////////////
DTK_LOG_CATEGORY(FR_INRIA_DTK_COMPOSER_EVALUATOR, "fr.inria.dtk.composer.evaluator")
// /////////////////////////////////////////////////////////////////
// dtkComposerGraphPrivate
// /////////////////////////////////////////////////////////////////
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2011 - Thibaud Kloczko, Inria.
* Created: Tue Feb 14 16:49:25 2012 (+0100)
* Version: $Id$
* Last-Updated: 2012 Wed Dec 12 16:51:40 (+0100)
* Last-Updated: Mon Mar 25 09:05:06 2013 (+0100)
* By: Thibaud Kloczko
* Update #: 48
* Update #: 56
*/
/* Commentary:
......@@ -28,7 +28,7 @@
class dtkComposerNodeBooleanPrivate
{
public:
dtkComposerTransmitterVariant receiver;
dtkComposerTransmitterReceiverVariant receiver;
public:
dtkComposerTransmitterEmitter<bool> emitter;
......@@ -43,11 +43,11 @@ public:
dtkComposerNodeBoolean::dtkComposerNodeBoolean(void) : dtkComposerNodeLeaf(), d(new dtkComposerNodeBooleanPrivate)
{
QVector<const dtkComposerType*> variant_list;
variant_list << dtkComposerTypeInfo<bool*>::type() << dtkComposerTypeInfo<int*>::type() << dtkComposerTypeInfo<uint*>::type()
<< dtkComposerTypeInfo<qlonglong*>::type() << dtkComposerTypeInfo<double*>::type() << dtkComposerTypeInfo<QString*>::type();
dtkComposerTransmitter::TypeList type_list;
type_list << QMetaType::Bool;// << dtkComposerTypeInfo<int*>::type() << dtkComposerTypeInfo<uint*>::type()
//<< dtkComposerTypeInfo<qlonglong*>::type() << dtkComposerTypeInfo<double*>::type() << dtkComposerTypeInfo<QString*>::type();
d->receiver.setDataTypes(variant_list);
d->receiver.setTypeList(type_list);
this->appendReceiver(&d->receiver);
d->value = false;
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - David Rey, Inria.
* Created: Tue Feb 14 15:40:50 2012 (+0100)
* Version: $Id$
* Last-Updated: Wed Mar 21 11:03:51 2012 (+0100)
* By: tkloczko
* Update #: 27
* Last-Updated: Mon Mar 25 08:45:40 2013 (+0100)
* By: Thibaud Kloczko
* Update #: 30
*/
/* Commentary:
......@@ -19,8 +19,6 @@
#include "dtkComposerNodeLeaf.h"
#include <dtkCore/dtkGlobal.h>
// /////////////////////////////////////////////////////////////////
// dtkComposerNodeLeafPrivate definition
// /////////////////////////////////////////////////////////////////
......@@ -51,12 +49,12 @@ dtkComposerNodeLeaf::~dtkComposerNodeLeaf(void)
void dtkComposerNodeLeaf::setInputs(void)
{
DTK_DEFAULT_IMPLEMENTATION_NO_MOC;
// DTK_DEFAULT_IMPLEMENTATION_NO_MOC;
}
void dtkComposerNodeLeaf::run(void)
{
DTK_DEFAULT_IMPLEMENTATION_NO_MOC;
// DTK_DEFAULT_IMPLEMENTATION_NO_MOC;
}
void dtkComposerNodeLeaf::setAsHeader(bool header)
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Mon Jan 30 23:41:08 2012 (+0100)
* Version: $Id$
* Last-Updated: lun. janv. 14 17:32:30 2013 (+0100)
* By: Nicolas Niclausse
* Update #: 844
* Last-Updated: Mon Mar 25 10:53:20 2013 (+0100)
* By: Thibaud Kloczko
* Update #: 873
*/
/* Commentary:
......@@ -45,14 +45,21 @@
#include "dtkComposerTransmitterProxy.h"
#include "dtkComposerTransmitterVariant.h"
#include <dtkCore/dtkGlobal.h>
#include <dtkCore/dtkAbstractDataFactory.h>
#include <dtkCore/dtkAbstractProcessFactory.h>
#include <dtkCore/dtkAbstractViewFactory.h>
// #include <dtkCore/dtkAbstractDataFactory.h>
// #include <dtkCore/dtkAbstractProcessFactory.h>
// #include <dtkCore/dtkAbstractViewFactory.h>
#include <QtCore>
#include <QtXml>
#include <dtkLog>
// /////////////////////////////////////////////////////////////////
// dtkLog categories
// /////////////////////////////////////////////////////////////////
DTK_LOG_CATEGORY(FR_INRIA_DTK_COMPOSER_IO, "fr.inria.dtk.composer.io")
// /////////////////////////////////////////////////////////////////
// dtkComposerReaderPrivate
// /////////////////////////////////////////////////////////////////
......@@ -84,31 +91,33 @@ public:
bool dtkComposerReaderPrivate::check(const QDomDocument& document)
{
missing_implementation.clear();
default_implementation.clear();
// missing_implementation.clear();
// default_implementation.clear();
QStringList implementations;
implementations << dtkAbstractDataFactory::instance()->implementations();
implementations << dtkAbstractProcessFactory::instance()->implementations();
implementations << dtkAbstractViewFactory::instance()->implementations();
// QStringList implementations;
// implementations << dtkAbstractDataFactory::instance()->implementations();
// implementations << dtkAbstractProcessFactory::instance()->implementations();
// implementations << dtkAbstractViewFactory::instance()->implementations();
QDomNodeList nodes = document.elementsByTagName("implementation");
// QDomNodeList nodes = document.elementsByTagName("implementation");
for(int i = 0; i < nodes.count(); i++)
{
QString composition_implementation = nodes.at(i).toElement().text();
// for(int i = 0; i < nodes.count(); i++)
// {
// QString composition_implementation = nodes.at(i).toElement().text();
if(composition_implementation.isEmpty())
{
default_implementation << QString("- %1\n").arg(nodes.at(i).parentNode().toElement().attribute("type"));
}
else if(!implementations.contains(composition_implementation))
{
missing_implementation << QString("- %1\n").arg(composition_implementation);
}
}
// if(composition_implementation.isEmpty())
// {
// default_implementation << QString("- %1\n").arg(nodes.at(i).parentNode().toElement().attribute("type"));
// }
// else if(!implementations.contains(composition_implementation))
// {
// missing_implementation << QString("- %1\n").arg(composition_implementation);
// }
// }
// return (missing_implementation.count() + default_implementation.count()) == 0;
return (missing_implementation.count() + default_implementation.count()) == 0;
return true;
}
// /////////////////////////////////////////////////////////////////
......@@ -160,15 +169,15 @@ bool dtkComposerReader::read(const QString& fileName, bool append)
return false;
if (!dtkIsBinary(fileName)) {
c_bytes = file.readAll();
content = QString::fromUtf8(c_bytes.data());
// if (!dtkIsBinary(fileName)) {
// c_bytes = file.readAll();
// content = QString::fromUtf8(c_bytes.data());
} else {
// } else {
QDataStream stream(&file); stream >> c_bytes;
QByteArray u_bytes = QByteArray::fromHex(qUncompress(c_bytes));
content = QString::fromUtf8(u_bytes.data(), u_bytes.size());
}
//}
file.close();
return this->readString(content,append);
......@@ -185,7 +194,7 @@ bool dtkComposerReader::readString(const QString& data, bool append, bool paste)
if(!d->check(document)) {
if(d->missing_implementation.count() > 0) {
if (qApp->type() != QApplication::Tty) {
if (dynamic_cast<QApplication *>(qApp)) {
QMessageBox msgBox;
msgBox.setText("Node implementations are missing. Load anyway?");
......@@ -197,7 +206,7 @@ bool dtkComposerReader::readString(const QString& data, bool append, bool paste)
if(msgBox.exec() == QMessageBox::Cancel)
return false;
} else {
dtkError() << "Can't load composition, mission implementation(s):" << d->missing_implementation.join("");
dtkError(FR_INRIA_DTK_COMPOSER_IO) << "Can't load composition, mission implementation(s):" << d->missing_implementation.join("");
return false;
}
}
......@@ -405,7 +414,7 @@ dtkComposerSceneNode *dtkComposerReader::readNode(QDomNode node, bool paste)
d->scene->addItem(n);
} else {
if (qApp->type() != QApplication::Tty) {
if (dynamic_cast<QApplication *>(qApp)) {
QMessageBox msgBox;
msgBox.setText("Can't create node " + type_n);
msgBox.setInformativeText("You are not be able to load the composition.");
......@@ -419,8 +428,8 @@ dtkComposerSceneNode *dtkComposerReader::readNode(QDomNode node, bool paste)
msgBox.exec();
} else {
dtkError() << "Can't read composition, the following node is unknown:" << node.toElement().attribute("type");
}
dtkError(FR_INRIA_DTK_COMPOSER_IO) << "Can't read composition, the following node is unknown:" << node.toElement().attribute("type");
}
return NULL;
}
......@@ -430,7 +439,7 @@ dtkComposerSceneNode *dtkComposerReader::readNode(QDomNode node, bool paste)
dtkComposerNode *new_node = d->factory->create(node.toElement().attribute("type"));
if (!new_node) {
if (qApp->type() != QApplication::Tty) {
if (dynamic_cast<QApplication *>(qApp)) {
QMessageBox msgBox;
msgBox.setText("Can't create core node.");
msgBox.setInformativeText("You are not be able to load the composition.");
......@@ -441,8 +450,8 @@ dtkComposerSceneNode *dtkComposerReader::readNode(QDomNode node, bool paste)
msgBox.exec();
} else {
dtkError() << "Can't read composition, the following node is unknown:" << node.toElement().attribute("type");
}
dtkError(FR_INRIA_DTK_COMPOSER_IO) << "Can't read composition, the following node is unknown:" << node.toElement().attribute("type");
}
delete n;
return NULL;
}
......@@ -790,7 +799,7 @@ dtkComposerSceneEdge *dtkComposerReader::readEdge(QDomNode node)
return edge;
handle_failure:
dtkWarn() << "Can't create edge from " << d->node_map.value(source_node)->title() << "to" << d->node_map.value(destin_node)->title();
dtkWarning(FR_INRIA_DTK_COMPOSER_IO) << "Can't create edge from " << d->node_map.value(source_node)->title() << "to" << d->node_map.value(destin_node)->title();
delete edge;
return NULL;
......
......@@ -31,7 +31,8 @@
#include "dtkComposerStackCommand.h"
#include "dtkComposerStackUtils.h"
#include "dtkComposerWriter.h"
#include "dtkCore/dtkGlobal.h"
#include <QtWidgets>
dtkComposerScene::dtkComposerScene(QObject *parent) : QGraphicsScene(parent), d(new dtkComposerScenePrivate)
{
......@@ -1115,7 +1116,7 @@ void dtkComposerScene::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
dtkComposerSceneNode *dtkComposerScene::nodeAt(const QPointF& point) const
{
QList<QGraphicsItem *> items = this->items(point.x(), point.y(), 1, 1, Qt::IntersectsItemBoundingRect);
QList<QGraphicsItem *> items = this->items(point.x(), point.y(), 1, 1, Qt::IntersectsItemBoundingRect, Qt::AscendingOrder);
foreach(QGraphicsItem *item, items)
if (dtkComposerSceneNode *node = dynamic_cast<dtkComposerSceneNode *>(item))
......@@ -1126,7 +1127,7 @@ dtkComposerSceneNode *dtkComposerScene::nodeAt(const QPointF& point) const
dtkComposerSceneNode *dtkComposerScene::nodeAt(const QPointF& point, dtkComposerSceneNode *exclude) const
{
QList<QGraphicsItem *> items = this->items(point.x(), point.y(), 1, 1, Qt::IntersectsItemBoundingRect);
QList<QGraphicsItem *> items = this->items(point.x(), point.y(), 1, 1, Qt::IntersectsItemBoundingRect, Qt::AscendingOrder);
foreach(QGraphicsItem *item, items) {
if (dtkComposerSceneNode *node = dynamic_cast<dtkComposerSceneNode *>(item)) {
......@@ -1147,7 +1148,7 @@ dtkComposerSceneNode *dtkComposerScene::nodeAt(const QPointF& point, dtkComposer
dtkComposerScenePort *dtkComposerScene::portAt(const QPointF& point) const
{
QList<QGraphicsItem *> items = this->items(point.x(), point.y(), 1, 1, Qt::IntersectsItemBoundingRect);
QList<QGraphicsItem *> items = this->items(point.x(), point.y(), 1, 1, Qt::IntersectsItemBoundingRect, Qt::AscendingOrder);
foreach(QGraphicsItem *item, items)
if (dtkComposerScenePort *port = dynamic_cast<dtkComposerScenePort *>(item))
......