Commit 46002cb3 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

remove obsolete files

parent 67c22331
/* dtkComposerControlsListItemLeafProcess.cpp ---
*
* Author: Thibaud Kloczko
* Created: jeu. oct. 10 16:19:35 2013 (+0200)
* Version:
* Last-Updated: lun. juin 16 16:32:08 2014 (+0200)
* By: Thibaud Kloczko
* Update #: 613
*/
/* Change Log:
*
*/
#include "dtkComposerControlsListItemLeafProcess.h"
#include "dtkComposerSceneNode.h"
#include "dtkComposerNodeLeafProcess.h"
#include <dtkLog>
class dtkComposerControlsListItemLeafProcessPrivate
{
public:
dtkComposerSceneNode *node;
public:
dtkComposerNodeLeafProcess *p_node;
};
// ///////////////////////////////////////////////////////////////////
//
// ///////////////////////////////////////////////////////////////////
dtkComposerControlsListItemLeafProcess::dtkComposerControlsListItemLeafProcess(QWidget *parent, dtkComposerSceneNode *node) : dtkComposerControlsListItem(parent, node), d(new dtkComposerControlsListItemLeafProcessPrivate)
{
d->node = node;
if (dtkComposerNodeLeafProcess *p_node = dynamic_cast<dtkComposerNodeLeafProcess *>(d->node->wrapee())) {
d->p_node = p_node;
} else {
dtkError() << Q_FUNC_INFO << "Can't create control list item of type Leaf Process.";
}
}
dtkComposerControlsListItemLeafProcess::~dtkComposerControlsListItemLeafProcess(void )
{
delete d;
d = NULL;
}
/* dtkComposerControlsListItemLeafProcess.h ---
*
* Author: Thibaud Kloczko
* Created: jeu. oct. 10 16:18:27 2013 (+0200)
* Version:
*/
/* Change Log:
*
*/
#pragma once
#include "dtkComposerControlsListItem.h"
class dtkComposerSceneNode;
class dtkComposerControlsListItemLeafProcessPrivate;
class dtkComposerControlsListItemLeafProcess: public dtkComposerControlsListItem
{
Q_OBJECT
public:
dtkComposerControlsListItemLeafProcess(QWidget *parent = 0, dtkComposerSceneNode *node = NULL);
virtual ~dtkComposerControlsListItemLeafProcess(void);
private:
dtkComposerControlsListItemLeafProcessPrivate *d;
};
/* dtkComposerNodeLeafActor.cpp ---
*
* Author: Nicolas Niclausse
* Copyright (C) 2013 - Nicolas Niclausse, Inria.
* Created: jeu. oct. 10 09:56:25 2013 (+0200)
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#include "dtkComposerNodeLeafActor.h"
// /////////////////////////////////////////////////////////////////
// dtkComposerNodeLeafActor implementation
// /////////////////////////////////////////////////////////////////
dtkComposerNodeLeafActor::dtkComposerNodeLeafActor(QObject *parent) : QObject(parent), dtkComposerNodeLeaf()
{
}
dtkComposerNodeLeafActor::~dtkComposerNodeLeafActor(void)
{
}
/* dtkComposerNodeLeafActor.h ---
*
* Author: Nicolas Niclausse
* Copyright (C) 2013 - Nicolas Niclausse, Inria.
* Created: jeu. oct. 10 09:56:25 2013 (+0200)
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#ifndef DTKCOMPOSERNODELEAFACTOR_H
#define DTKCOMPOSERNODELEAFACTOR_H
#include <dtkComposerExport.h>
#include "dtkComposerNodeLeaf.h"
#include <QObject>
class dtkAbstractActor;
class dtkAbstractView;
class dtkComposerNodeLeafActorPrivate;
// /////////////////////////////////////////////////////////////////
// dtkComposerNodeLeafActor interface
// /////////////////////////////////////////////////////////////////
class DTKCOMPOSER_EXPORT dtkComposerNodeLeafActor : public QObject, public dtkComposerNodeLeaf
{
Q_OBJECT
public:
dtkComposerNodeLeafActor(QObject *parent = 0);
virtual ~dtkComposerNodeLeafActor(void);
};
#endif
#include "dtkComposerNodeLeafData.h"
\ No newline at end of file
/* dtkComposerNodeLeafData.cpp ---
*
* Author: tkloczko
* Copyright (C) 2011 - Thibaud Kloczko, Inria.
* Created: Thu Jun 28 10:13:10 2012 (+0200)
* Version: $Id$
* Last-Updated: 2012 Fri Nov 16 16:10:04 (+0100)
* By: Thibaud Kloczko, Inria.
* Update #: 69
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#include "dtkComposerNodeLeafData.h"
#include <dtkCore/dtkAbstractData.h>
#include <dtkCore/dtkAbstractDataFactory.h>
// /////////////////////////////////////////////////////////////////
// dtkComposerNodeLeafDataPrivate interface
// /////////////////////////////////////////////////////////////////
class dtkComposerNodeLeafDataPrivate
{
public:
dtkAbstractData *data;
bool implementation_has_changed;
};
// /////////////////////////////////////////////////////////////////
// dtkComposerNodeLeafData implementation
// /////////////////////////////////////////////////////////////////
dtkComposerNodeLeafData::dtkComposerNodeLeafData(void) : dtkComposerNodeLeaf(), d(new dtkComposerNodeLeafDataPrivate)
{
d->data = NULL;
d->implementation_has_changed = false;
}
dtkComposerNodeLeafData::~dtkComposerNodeLeafData(void)
{
if (d->data)
delete d->data;
d->data = NULL;
delete d;
d = NULL;
}
bool dtkComposerNodeLeafData::enableDefaultImplementation(void) const
{
return false;
}
bool dtkComposerNodeLeafData::implementationHasChanged(void) const
{
return d->implementation_has_changed;
}
QString dtkComposerNodeLeafData::currentImplementation(void)
{
if (d->data)
return d->data->identifier();
return QString();
}
QStringList dtkComposerNodeLeafData::implementations(void)
{
QStringList implementations;
if (this->enableDefaultImplementation())
implementations << "default";
QStringList all_implementations = dtkAbstractDataFactory::instance()->implementations(this->abstractDataType());
for (int i = 0; i < all_implementations.count(); ++i)
implementations << all_implementations.at(i);
return implementations;
}
dtkAbstractData *dtkComposerNodeLeafData::createData(const QString& implementation)
{
d->implementation_has_changed = false;
if (implementation.isEmpty() || implementation == "Choose implementation")
return NULL;
if (implementation == "default")
const_cast<QString&>(implementation) = this->abstractDataType();
if (!d->data) {
d->data = dtkAbstractDataFactory::instance()->create(implementation);
d->implementation_has_changed = true;
} else if (d->data->identifier() != implementation) {
delete d->data;
d->data = dtkAbstractDataFactory::instance()->create(implementation);
d->implementation_has_changed = true;
}
return d->data;
}
dtkAbstractData *dtkComposerNodeLeafData::data(void)
{
return d->data;
}
/* dtkComposerNodeLeafData.h ---
*
* Author: tkloczko
* Copyright (C) 2011 - Thibaud Kloczko, Inria.
* Created: Thu Jun 28 09:56:37 2012 (+0200)
* Version: $Id$
* Last-Updated: Thu Apr 11 10:58:25 2013 (+0200)
* By: Thibaud Kloczko
* Update #: 43
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#pragma once
#include "dtkComposerNodeLeaf.h"
#include <QStringList>
class dtkAbstractData;
class dtkComposerNodeLeafDataPrivate;
// /////////////////////////////////////////////////////////////////
// dtkComposerNodeLeafData interface
// /////////////////////////////////////////////////////////////////
class dtkComposerNodeLeafData : public dtkComposerNodeLeaf
{
public:
dtkComposerNodeLeafData(void);
virtual ~dtkComposerNodeLeafData(void);
public:
virtual bool enableDefaultImplementation(void) const;
virtual bool isAbstractData(void) const = 0;
virtual QString abstractDataType(void) const = 0;
public:
bool implementationHasChanged(void) const;
QString currentImplementation(void);
QStringList implementations(void);
public:
dtkAbstractData *createData(const QString& implementation);
dtkAbstractData *data(void);
private:
dtkComposerNodeLeafDataPrivate *d;
};
#include "dtkComposerNodeLeafProcess.h"
\ No newline at end of file
/* dtkComposerNodeLeafProcess.cpp ---
*
* Author: tkloczko
* Copyright (C) 2011 - Thibaud Kloczko, Inria.
* Created: Thu Jun 28 14:08:54 2012 (+0200)
* Version: $Id$
* Last-Updated: ven. nov. 8 16:17:19 2013 (+0100)
* By: Thibaud Kloczko
* Update #: 123
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#include "dtkComposerNodeLeafProcess.h"
#include <dtkCore/dtkAbstractProcess.h>
#include <dtkCore/dtkAbstractProcessFactory.h>
// /////////////////////////////////////////////////////////////////
// dtkComposerNodeLeafProcessPrivate interface
// /////////////////////////////////////////////////////////////////
class dtkComposerNodeLeafProcessPrivate
{
public:
dtkAbstractProcess *old_process;
};
// /////////////////////////////////////////////////////////////////
// dtkComposerNodeLeafProcess implementation
// /////////////////////////////////////////////////////////////////
dtkComposerNodeLeafProcess::dtkComposerNodeLeafProcess(void) : dtkComposerNodeLeaf(), d(new dtkComposerNodeLeafProcessPrivate)
{
d->old_process = NULL;
}
dtkComposerNodeLeafProcess::~dtkComposerNodeLeafProcess(void)
{
if (d->old_process)
delete d->old_process;
d->old_process = NULL;
delete d;
d = NULL;
}
bool dtkComposerNodeLeafProcess::enableDefaultImplementation(void) const
{
return false;
}
bool dtkComposerNodeLeafProcess::implementationHasChanged(const QString& implementation) const
{
return (this->currentImplementation() != implementation);
}
QString dtkComposerNodeLeafProcess::currentImplementation(void) const
{
if (this->process())
return this->process()->identifier();
return QString();
}
QStringList dtkComposerNodeLeafProcess::implementations(void)
{
QStringList implementations;
if (this->enableDefaultImplementation())
implementations << "default";
QStringList all_implementations = dtkAbstractProcessFactory::instance()->implementations(this->abstractProcessType());
for (int i = 0; i < all_implementations.count(); ++i)
implementations << all_implementations.at(i);
return implementations;
}
dtkAbstractProcess *dtkComposerNodeLeafProcess::createProcess(const QString& implementation)
{
if (implementation.isEmpty() || implementation == "Choose implementation")
return NULL;
if (implementation == "default")
const_cast<QString&>(implementation) = this->abstractProcessType();
if (!this->process()) {
this->setProcess(dtkAbstractProcessFactory::instance()->create(implementation));
} else if (this->process()->identifier() != implementation) {
this->setProcess(dtkAbstractProcessFactory::instance()->create(implementation));
}
if (d->old_process != this->process()) {
if (d->old_process) {
delete d->old_process;
}
d->old_process = this->process();
}
return this->process();
}
void dtkComposerNodeLeafProcess::clearProcess(void)
{
dtkAbstractProcess *p = this->process();
if (p)
delete p;
this->setProcess(NULL);
}
/* dtkComposerNodeLeafProcess.h ---
*
* Author: tkloczko
* Copyright (C) 2011 - Thibaud Kloczko, Inria.
* Created: Thu Jun 28 14:08:02 2012 (+0200)
* Version: $Id$
* Last-Updated: ven. nov. 8 16:17:25 2013 (+0100)
* By: Thibaud Kloczko
* Update #: 27
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#ifndef DTKCOMPOSERNODELEAFPROCESS_H
#define DTKCOMPOSERNODELEAFPROCESS_H
#include "dtkComposerNodeLeaf.h"
#include <QStringList>
class dtkAbstractProcess;
class dtkComposerNodeLeafProcessPrivate;
// /////////////////////////////////////////////////////////////////
// dtkComposerNodeLeafProcess interface
// /////////////////////////////////////////////////////////////////
class dtkComposerNodeLeafProcess : public dtkComposerNodeLeaf
{
public:
dtkComposerNodeLeafProcess(void);
virtual ~dtkComposerNodeLeafProcess(void);
public:
virtual bool enableDefaultImplementation(void) const;
virtual bool isAbstractProcess(void) const = 0;
virtual QString abstractProcessType(void) const = 0;
public:
virtual void setProcess(dtkAbstractProcess *process) = 0;
virtual dtkAbstractProcess *process(void) const = 0;
public:
bool implementationHasChanged(const QString& implementation) const;
QString currentImplementation(void) const;
QStringList implementations(void);
public:
dtkAbstractProcess *createProcess(const QString& implementation);
protected:
void clearProcess(void);
private:
dtkComposerNodeLeafProcessPrivate *d;
};
#endif
#include "dtkComposerNodeLeafView.h"
\ No newline at end of file
/* dtkComposerNodeLeafView.cpp ---
*
* Author: tkloczko
* Copyright (C) 2011 - Thibaud Kloczko, Inria.
* Created: Thu Jun 28 14:38:55 2012 (+0200)
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#include "dtkComposerNodeLeafView.h"
#include <dtkCore/dtkAbstractView.h>
#include <dtkCore/dtkAbstractViewFactory.h>
// /////////////////////////////////////////////////////////////////
// dtkComposerNodeLeafViewPrivate interface
// /////////////////////////////////////////////////////////////////
class dtkComposerNodeLeafViewPrivate
{
public:
dtkAbstractView *view;
bool implementation_has_changed;
};
// /////////////////////////////////////////////////////////////////
// dtkComposerNodeLeafView implementation
// /////////////////////////////////////////////////////////////////
dtkComposerNodeLeafView::dtkComposerNodeLeafView(void) : dtkComposerNodeLeaf(), d(new dtkComposerNodeLeafViewPrivate)
{
d->view = NULL;
d->implementation_has_changed = false;
}
dtkComposerNodeLeafView::~dtkComposerNodeLeafView(void)
{
if (d->view)
delete d->view;
d->view = NULL;
delete d;
d = NULL;
}
bool dtkComposerNodeLeafView::enableDefaultImplementation(void) const
{
return fals