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 89adeba8 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas
Browse files

dtkComposerSupport almost done

parent ce4bd607
......@@ -9,6 +9,7 @@ add_subdirectory(dtkMath)
add_subdirectory(dtkTest)
add_subdirectory(dtkWidgets)
add_subdirectory(dtkComposerSupport)
add_subdirectory(dtkCoreSupport)
add_subdirectory(dtkContainerSupport)
add_subdirectory(dtkDistributedSupport)
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - David Rey, Inria.
* Created: Tue Feb 14 14:24:23 2012 (+0100)
* Version: $Id$
* Last-Updated: Wed Apr 10 15:07:28 2013 (+0200)
* By: Thibaud Kloczko
* Update #: 93
* Last-Updated: mar. févr. 4 15:45:55 2014 (+0100)
* By: Nicolas Niclausse
* Update #: 95
*/
/* Commentary:
......
......@@ -85,7 +85,7 @@ void dtkComposerNodeLogger::run(void)
else if (level == "info")
dtkInfo() << output;
else if (level == "warn")
dtkWarning() << output;
dtkWarn() << output;
else if (level == "error")
dtkError() << output;
else if (level == "fatal")
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Mon Jan 30 23:41:08 2012 (+0100)
* Version: $Id$
* Last-Updated: mar. févr. 4 14:44:22 2014 (+0100)
* By: Thibaud Kloczko
* Update #: 895
* Last-Updated: mar. févr. 4 15:18:39 2014 (+0100)
* By: Nicolas Niclausse
* Update #: 896
*/
/* Commentary:
......@@ -801,7 +801,7 @@ dtkComposerSceneEdge *dtkComposerReader::readEdge(QDomNode node)
return edge;
handle_failure:
dtkWarning() << "Can't create edge from " << d->node_map.value(source_node)->title() << "to" << d->node_map.value(destin_node)->title();
dtkWarn() << "Can't create edge from " << d->node_map.value(source_node)->title() << "to" << d->node_map.value(destin_node)->title();
delete edge;
return NULL;
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2011 - Thibaud Kloczko, Inria.
* Created: Mon Jan 30 10:34:49 2012 (+0100)
* Version: $Id$
* Last-Updated: mar. févr. 4 10:45:44 2014 (+0100)
* Last-Updated: mar. févr. 4 15:03:19 2014 (+0100)
* By: Nicolas Niclausse
* Update #: 422
* Update #: 449
*/
/* Commentary:
......@@ -50,49 +50,36 @@
void dtkComposerPrivate::download(const QUrl& url)
{
QTemporaryFile file; file.setAutoRemove(false);
if (!file.open()) {
this->file.setAutoRemove(false);
if (!this->file.open()) {
qDebug() << DTK_PRETTY_FUNCTION << "Unable to file for saving";
return;
}
this->dwnl_ok = 0;
QHttp http;
connect(&http, SIGNAL(requestFinished(int, bool)), this, SLOT(onRequestFinished(int, bool)));
http.setHost(url.host(), url.scheme().toLower() == "https" ? QHttp::ConnectionModeHttps : QHttp::ConnectionModeHttp, url.port() == -1 ? 0 : url.port());
if (!url.userName().isEmpty())
http.setUser(url.userName(), url.password());
QByteArray path = QUrl::toPercentEncoding(url.path(), "!$&'()*+,;=:@/");
if (path.isEmpty()) {
qDebug() << DTK_PRETTY_FUNCTION << "Invalid path" << url.path();
return;
}
this->dwnl_id = http.get(path, &file);
QNetworkAccessManager http;
connect(&http, SIGNAL(requestFinished(QNetworkReply *)), this, SLOT(onRequestFinished(QNetworkReply *)));
http.get(QNetworkRequest(url));
while(!this->dwnl_ok)
qApp->processEvents();
file.close();
this->file.close();
QFileInfo info(this->file);
QFileInfo info(file);
this->tempName = info.absoluteFilePath();
}
void dtkComposerPrivate::onRequestFinished(int id, bool error)
void dtkComposerPrivate::onRequestFinished(QNetworkReply *reply)
{
DTK_UNUSED(error);
if(id == this->dwnl_id)
this->dwnl_ok = 1;
this->file.write(reply->readAll());
this->file.flush();
this->dwnl_ok = 1;
}
// /////////////////////////////////////////////////////////////////
......
......@@ -21,7 +21,7 @@
#include "dtkComposerScene.h"
#include "dtkComposerSceneNodeLeaf.h"
#include <dtkGui/dtkToolBox.h>
#include <dtkGuiSupport/dtkToolBox.h>
// /////////////////////////////////////////////////////////////////
// Helper functions
......
......@@ -18,7 +18,7 @@
#include "dtkComposerNodeBoolean.h"
#include "dtkComposerSupportExport.h"
#include <dtkCore/dtkGlobal.h>
#include <dtkCoreSupport/dtkGlobal.h>
class dtkComposerControlsListItemBooleanPrivate
{
......
......@@ -19,7 +19,7 @@
#include <QtWidgets>
#include <dtkGui/dtkToolBox>
#include <dtkGuiSupport/dtkToolBox>
class dtkComposerSceneNode;
class dtkComposerControlsListItem;
......
......@@ -18,7 +18,7 @@
#include "dtkComposerNodeFile.h"
#include "dtkComposerSupportExport.h"
#include <dtkCore/dtkGlobal.h>
#include <dtkCoreSupport/dtkGlobal.h>
class dtkComposerControlsListItemFilePrivate
{
......
......@@ -13,7 +13,7 @@
*
*/
#include <dtkCore/dtkGlobal.h>
#include <dtkCoreSupport/dtkGlobal.h>
#include <dtkComposerSupportExport.h>
#include <dtkComposerControlsListItemInteger.h>
......
......@@ -3,9 +3,9 @@
* Author: Thibaud Kloczko
* Created: jeu. oct. 10 16:19:35 2013 (+0200)
* Version:
* Last-Updated: lun. nov. 4 10:36:49 2013 (+0100)
* By: Thibaud Kloczko
* Update #: 597
* Last-Updated: mar. févr. 4 15:07:27 2014 (+0100)
* By: Nicolas Niclausse
* Update #: 598
*/
/* Change Log:
......@@ -17,11 +17,11 @@
#include "dtkComposerSupportExport.h"
#include <dtkCore/dtkGlobal.h>
#include <dtkCore/dtkAbstractProcess.h>
#include <dtkCoreSupport/dtkGlobal.h>
#include <dtkCoreSupport/dtkAbstractProcess.h>
#include <dtkGui/dtkObjectEditor.h>
#include <dtkGui/dtkToolBox.h>
#include <dtkGuiSupport/dtkObjectEditor.h>
#include <dtkGuiSupport/dtkToolBox.h>
#include <QObject>
#include <QVariant>
......
......@@ -14,7 +14,7 @@
*/
#include <dtkComposerSupportExport.h>
#include <dtkCore/dtkGlobal.h>
#include <dtkCoreSupport/dtkGlobal.h>
#include <dtkComposerControlsListItemReal.h>
#include <dtkComposerNodeReal.h>
......
......@@ -18,7 +18,7 @@
#include "dtkComposerNodeString.h"
#include "dtkComposerSupportExport.h"
#include <dtkCore/dtkGlobal.h>
#include <dtkCoreSupport/dtkGlobal.h>
class dtkComposerControlsListItemStringPrivate
{
......
......@@ -21,11 +21,12 @@
#include "dtkComposerGraphNodeBegin.h"
#include "dtkComposerGraphNodeEnd.h"
#include <dtkLog/dtkLog.h>
#include <dtkMath/dtkGraph.h>
#include <dtkNotification/dtkNotification.h>
#include <dtkLog/dtkLogger.h>
#include <dtkMathSupport/dtkGraph.h>
#include <dtkGuiSupport/dtkNotification.h>
#include <QtCore>
#include <QtConcurrent>
// /////////////////////////////////////////////////////////////////
// Helper definitions
......@@ -50,7 +51,7 @@ dtkComposerEvaluator::dtkComposerEvaluator(QObject *parent) : QObject(parent), d
d->notify = true;
d->profiling = false;
d->start_node = NULL;
d->use_gui= (qApp->type() != QApplication::Tty);
d->use_gui = (qApp && qobject_cast<QGuiApplication *>(qApp));
}
dtkComposerEvaluator::~dtkComposerEvaluator(void)
......
......@@ -25,7 +25,7 @@
#include <dtkDistributed/dtkDistributedCommunicator.h>
#include <dtkLog/dtkLog.h>
#include <dtkLog/dtkLog>
class dtkComposerEvaluatorProcessPrivate
{
......
......@@ -19,11 +19,11 @@
#include <dtkCore/dtkAbstractDataFactory.h>
#include <dtkCore/dtkAbstractData.h>
#include <dtkCore/dtkAbstractProcessFactory.h>
#include <dtkCore/dtkAbstractProcess.h>
#include <dtkCore/dtkGlobal.h>
#include <dtkCoreSupport/dtkAbstractDataFactory.h>
#include <dtkCoreSupport/dtkAbstractData.h>
#include <dtkCoreSupport/dtkAbstractProcessFactory.h>
#include <dtkCoreSupport/dtkAbstractProcess.h>
#include <dtkCoreSupport/dtkGlobal.h>
#include "dtkComposer/dtkComposerEvaluator.h"
#include "dtkComposer/dtkComposerEvaluatorSlave.h"
......@@ -39,7 +39,7 @@
#include <dtkDistributed/dtkDistributedCommunicatorMpi.h>
#include <dtkDistributed/dtkDistributedCommunicatorTcp.h>
#include <dtkLog/dtkLog.h>
#include <dtkLog/dtkLog>
class dtkComposerEvaluatorSlavePrivate
{
......
......@@ -107,9 +107,9 @@
#include <dtkPlot/dtkPlotView.h>
#endif
#include <dtkCore/dtkAbstractView.h>
#include <dtkCore/dtkAbstractViewFactory.h>
#include <dtkCore/dtkGlobal.h>
#include <dtkCoreSupport/dtkAbstractView.h>
#include <dtkCoreSupport/dtkAbstractViewFactory.h>
#include <dtkCoreSupport/dtkGlobal.h>
class dtkComposerFactoryPrivate
{
......@@ -1933,6 +1933,8 @@ dtkComposerNode *dtkComposerFactory::create(const QString& type)
return new dtkComposerNodeCommunicatorInit;
#endif
#if defined(DTK_BUILD_DISTRIBUTED)
if(type == "communicatorSize")
return new dtkComposerNodeCommunicatorSize;
......@@ -1947,6 +1949,7 @@ dtkComposerNode *dtkComposerFactory::create(const QString& type)
if(type == "communicatorReceive")
return new dtkComposerNodeCommunicatorReceive;
#endif
return NULL;
}
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Tue Jan 31 13:24:50 2012 (+0100)
* Version: $Id$
* Last-Updated: Tue Sep 17 13:58:20 2013 (+0200)
* By: Julien Wintz
* Update #: 158
* Last-Updated: mar. févr. 4 15:12:38 2014 (+0100)
* By: Nicolas Niclausse
* Update #: 159
*/
/* Commentary:
......@@ -20,8 +20,8 @@
#include "dtkComposerFactory.h"
#include "dtkComposerFactoryView.h"
#include <dtkGui/dtkSplitter.h>
#include <dtkGui/dtkTagCloud.h>
#include <dtkGuiSupport/dtkSplitter.h>
#include <dtkGuiSupport/dtkTagCloud.h>
class dtkComposerFactoryViewPrivate
{
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Thu Feb 9 14:43:33 2012 (+0100)
* Version: $Id$
* Last-Updated: Thu Jan 16 13:31:50 2014 (+0100)
* By: Selim Kraria
* Update #: 2427
* Last-Updated: mar. févr. 4 15:13:06 2014 (+0100)
* By: Nicolas Niclausse
* Update #: 2429
*/
/* Commentary:
......@@ -46,9 +46,9 @@
#include "dtkComposerSceneNodeLeaf.h"
#include "dtkComposerScenePort.h"
#include <dtkLog/dtkLog.h>
#include <dtkMath/dtkGraph.h>
#include <dtkMath/dtkGraphEdge.h>
#include <dtkLog/dtkLogger.h>
#include <dtkMathSupport/dtkGraph.h>
#include <dtkMathSupport/dtkGraphEdge.h>
// /////////////////////////////////////////////////////////////////
// dtkComposerGraphPrivate
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Thu Feb 9 15:08:41 2012 (+0100)
* Version: $Id$
* Last-Updated: mer. sept. 4 09:08:07 2013 (+0200)
* Last-Updated: mar. févr. 4 15:11:34 2014 (+0100)
* By: Nicolas Niclausse
* Update #: 72
* Update #: 73
*/
/* Commentary:
......@@ -23,7 +23,7 @@
#include <QtCore>
#include <QtWidgets>
#include <dtkMath/dtkGraphEdge.h>
#include <dtkMathSupport/dtkGraphEdge.h>
#include "dtkComposerGraphNode.h"
class dtkComposerGraphEdgePrivate;
......
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