Commit 97481096 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas
Browse files

Merge branch 'refactoring' of dtk.inria.fr:dtk/dtk into refactoring

parents d951f074 505873d8
......@@ -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. 28 10:40:15 2012 (+0100)
* By: Nicolas Niclausse
* Update #: 171
* Last-Updated: Tue Mar 20 13:48:42 2012 (+0100)
* By: Julien Wintz
* Update #: 175
*/
/* Commentary:
......@@ -206,3 +206,8 @@ dtkComposerStack *dtkComposer::stack(void)
{
return d->stack;
}
dtkComposerView *dtkComposer::view(void)
{
return d->view;
}
......@@ -4,9 +4,9 @@
* Copyright (C) 2011 - Thibaud Kloczko, Inria.
* Created: Mon Jan 30 10:34:34 2012 (+0100)
* Version: $Id$
* Last-Updated: Thu Feb 9 14:51:48 2012 (+0100)
* Last-Updated: Tue Mar 20 13:39:41 2012 (+0100)
* By: Julien Wintz
* Update #: 39
* Update #: 42
*/
/* Commentary:
......@@ -32,6 +32,7 @@ class dtkComposerMachine;
class dtkComposerPrivate;
class dtkComposerScene;
class dtkComposerStack;
class dtkComposerView;
class DTKCOMPOSER_EXPORT dtkComposer : public QWidget
{
......@@ -56,6 +57,7 @@ public:
dtkComposerMachine *machine(void);
dtkComposerScene *scene(void);
dtkComposerStack *stack(void);
dtkComposerView *view(void);
private:
dtkComposerPrivate *d;
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Tue Jan 31 13:24:50 2012 (+0100)
* Version: $Id$
* Last-Updated: Wed Feb 29 03:17:31 2012 (+0100)
* Last-Updated: Tue Mar 20 14:18:30 2012 (+0100)
* By: Julien Wintz
* Update #: 139
* Update #: 144
*/
/* Commentary:
......@@ -42,6 +42,7 @@ dtkComposerFactoryView::dtkComposerFactoryView(QWidget *parent) : QWidget(parent
d->factory = NULL;
d->scope = new dtkTagScope(this);
d->scope->toggle();
d->cloud = new dtkTagCloud(this);
d->cloud->setSortingType(dtkTagCloud::Alpha);
......@@ -55,6 +56,7 @@ dtkComposerFactoryView::dtkComposerFactoryView(QWidget *parent) : QWidget(parent
d->controller->attach(d->scope);
d->controller->attach(d->view);
d->controller->attach(d->cloud);
d->controller->onUnionMode(false);
dtkSplitter *splitter = new dtkSplitter(this);
splitter->addWidget(d->cloud);
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Sat Feb 25 00:02:50 2012 (+0100)
* Version: $Id$
* Last-Updated: Tue Mar 20 13:37:02 2012 (+0100)
* Last-Updated: Tue Mar 20 13:54:34 2012 (+0100)
* By: tkloczko
* Update #: 47
* Update #: 51
*/
/* Commentary:
......@@ -107,7 +107,12 @@ dtkComposerNodeComposite *dtkComposerNodeControlWhile::block(int id)
void dtkComposerNodeControlWhile::setInputs(void)
{
DTK_DEFAULT_IMPLEMENTATION_NO_MOC;
foreach(dtkComposerTransmitter *t, d->body_block->receivers()) {
if (dtkComposerTransmitterVariant *v = dynamic_cast<dtkComposerTransmitterVariant *>(t)) {
v->setData(v->data());
v->setTwinned(true);
}
}
}
void dtkComposerNodeControlWhile::setConditions(void)
......@@ -119,7 +124,6 @@ void dtkComposerNodeControlWhile::setOutputs(void)
{
foreach(dtkComposerTransmitter *t, d->body_block->emitters()) {
if (dtkComposerTransmitterVariant *v = dynamic_cast<dtkComposerTransmitterVariant *>(t)) {
v->twin()->setTwinned(true);
v->twin()->setData(v->data());
}
}
......@@ -132,7 +136,6 @@ void dtkComposerNodeControlWhile::setVariables(void)
int dtkComposerNodeControlWhile::selectBranch(void)
{
qDebug() << (int)(!d->cond.data());
return (int)(!d->cond.data());
}
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Wed Feb 29 23:54:03 2012 (+0100)
* Version: $Id$
* Last-Updated: Mon Mar 19 23:41:42 2012 (+0100)
* Last-Updated: Tue Mar 20 14:13:00 2012 (+0100)
* By: Julien Wintz
* Update #: 12
* Update #: 55
*/
/* Commentary:
......@@ -64,6 +64,8 @@ dtkSwitch::dtkSwitch(QWidget *parent) : QDeclarativeView(parent), d(new dtkSwitc
d->root_item = qobject_cast<QDeclarativeItem *>(this->rootObject());
QMetaObject::invokeMethod(d->root_item, "init");
connect(d->root_item, SIGNAL(toggled(bool)), this, SIGNAL(toggled(bool)));
}
......@@ -94,6 +96,11 @@ QString dtkSwitch::rightLabel(void)
return d->r_label;
}
void dtkSwitch::toggle(void)
{
QMetaObject::invokeMethod(d->root_item, "toggle");
}
void dtkSwitch::setForeground(const QString& pixmap)
{
d->foreground = pixmap;
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Wed Feb 29 23:53:52 2012 (+0100)
* Version: $Id$
* Last-Updated: Thu Mar 1 00:39:33 2012 (+0100)
* Last-Updated: Tue Mar 20 13:43:12 2012 (+0100)
* By: Julien Wintz
* Update #: 8
* Update #: 10
*/
/* Commentary:
......@@ -44,6 +44,9 @@ public:
Q_INVOKABLE QString leftLabel(void);
Q_INVOKABLE QString rightLabel(void);
public slots:
void toggle(void);
public slots:
void setForeground(const QString& pixmap);
void setBackground(const QString& pixmap);
......
......@@ -2,6 +2,7 @@ import QtQuick 1.0
Item {
id: dtkSwitch;
objectName: "dtkSwitch";
width: background.width;
height: background.height;
......@@ -10,11 +11,16 @@ Item {
signal toggled(bool on);
function init() {
dtkSwitch.state = "on";
}
function toggle() {
if (dtkSwitch.state == "on")
if (dtkSwitch.state == "on") {
dtkSwitch.state = "off";
else
} else {
dtkSwitch.state = "on";
}
toggled(dtkSwitch.state == "on");
}
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008 - Julien Wintz, Inria.
* Created: Sun May 3 10:42:27 2009 (+0200)
* Version: $Id$
* Last-Updated: Mon Mar 19 23:44:16 2012 (+0100)
* Last-Updated: Tue Mar 20 14:16:57 2012 (+0100)
* By: Julien Wintz
* Update #: 1514
* Update #: 1522
*/
/* Commentary:
......@@ -580,6 +580,13 @@ void dtkTagScope::clear(void)
d->edit->clear();
}
void dtkTagScope::toggle(void)
{
d->switsh->toggle();
}
void dtkTagScope::render(void)
{
foreach(dtkTagScopeTag *tag, d->tags) {
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008 - Julien Wintz, Inria.
* Created: Sun May 3 10:42:01 2009 (+0200)
* Version: $Id$
* Last-Updated: Thu Mar 1 00:17:25 2012 (+0100)
* Last-Updated: Tue Mar 20 14:19:01 2012 (+0100)
* By: Julien Wintz
* Update #: 199
* Update #: 208
*/
/* Commentary:
......@@ -176,6 +176,9 @@ signals:
public slots:
void clear(void);
public slots:
void toggle(void);
private slots:
void onTagAdded(void);
void onTagRemoved(void);
......@@ -375,12 +378,14 @@ public:
void update(void);
void render(void);
public slots:
void onUnionMode(bool mode);
private slots:
void addFilter(QString tag);
void setFilter(QString tag);
void remFilter(QString tag);
void clear(void);
void onUnionMode(bool mode);
private:
dtkTagControllerPrivate *d;
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008 - Julien Wintz, Inria.
* Created: Mon Aug 3 17:40:34 2009 (+0200)
* Version: $Id$
* Last-Updated: Tue Mar 20 13:34:11 2012 (+0100)
* Last-Updated: Tue Mar 20 14:01:41 2012 (+0100)
* By: Julien Wintz
* Update #: 1095
* Update #: 1099
*/
/* Commentary:
......@@ -30,6 +30,7 @@
#include <dtkComposer/dtkComposerSceneView.h>
#include <dtkComposer/dtkComposerStack.h>
#include <dtkComposer/dtkComposerStackView.h>
#include <dtkComposer/dtkComposerView.h>
#include <dtkGui/dtkRecentFilesMenu.h>
......
Supports Markdown
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