Commit eeff3673 authored by KLOCZKO Thibaud's avatar KLOCZKO Thibaud
Browse files

Remove tag cloud from dtkComposerNodeFactoryView.

Customize dtkComposerSceneNodeEditor.
parent 5ecef5d1
/* dtkComposerNodeFactoryView.cpp ---
*
* Author: Thibaud Kloczko
* Created: Thu Apr 11 10:39:25 2013 (+0200)
* Version:
* Last-Updated: ven. janv. 9 10:50:29 2015 (+0100)
* By: Thibaud Kloczko
* Update #: 141
*/
/* Change Log:
*
*/
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#include "dtkComposerNodeFactory.h"
#include "dtkComposerNodeFactoryView.h"
......@@ -41,22 +41,23 @@ dtkComposerNodeFactoryView::dtkComposerNodeFactoryView(QWidget *parent) : QWidge
d->scope = new dtkWidgetsTagCloudScope(this);
d->scope->toggle();
d->cloud = new dtkWidgetsTagCloud(this);
d->cloud->setSortingType(dtkWidgetsTagCloud::Alpha);
d->cloud->setSortingOrder(dtkWidgetsTagCloud::Asc);
d->cloud->setFontSize(17);
d->cloud->setFontRange(15);
d->cloud = NULL;
// d->cloud = new dtkWidgetsTagCloud(this);
// d->cloud->setSortingType(dtkWidgetsTagCloud::Alpha);
// d->cloud->setSortingOrder(dtkWidgetsTagCloud::Asc);
// d->cloud->setFontSize(17);
// d->cloud->setFontRange(15);
d->view = new dtkWidgetsTagCloudView(this);
d->controller = new dtkWidgetsTagCloudController;
d->controller->attach(d->scope);
d->controller->attach(d->view);
d->controller->attach(d->cloud);
//d->controller->attach(d->cloud);
d->controller->onUnionMode(false);
QSplitter *splitter = new QSplitter(this);
splitter->addWidget(d->cloud);
//splitter->addWidget(d->cloud);
splitter->addWidget(d->view);
splitter->setOrientation(Qt::Vertical);
splitter->setHandleWidth(1);
......@@ -134,3 +135,6 @@ void dtkComposerNodeFactoryView::onShowNodeDocumentation(dtkComposerSceneNode *n
if (wrapee->nodeMetaData())
d->view->onItemClicked(wrapee->nodeMetaData()->description());
}
//
// dtkComposerNodeFactoryView.cpp ends here
......@@ -72,7 +72,7 @@ dtkComposerSceneNodeEditorList::~dtkComposerSceneNodeEditorList(void)
QSize dtkComposerSceneNodeEditorList::sizeHint(void) const
{
return QSize(300, 50);
return QSize(300, 150);
}
void dtkComposerSceneNodeEditorList::addInputPort(dtkComposerScenePort *port)
......@@ -223,7 +223,7 @@ dtkComposerSceneNodeEditor::dtkComposerSceneNodeEditor(QWidget *parent) : QWidge
d->rem_loop_port->setVisible(false);
d->blocks = new dtkComposerSceneNodeEditorList(this);
d->blocks->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
d->blocks->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
d->blocks->setVisible(false);
d->add_block = new QPushButton("+", this);
......@@ -235,7 +235,7 @@ dtkComposerSceneNodeEditor::dtkComposerSceneNodeEditor(QWidget *parent) : QWidge
d->rem_block->setVisible(false);
d->input_ports = new dtkComposerSceneNodeEditorList(this);
d->input_ports->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
d->input_ports->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
d->input_ports->setVisible(false);
d->add_input_port = new QPushButton("+", this);
......@@ -417,7 +417,7 @@ dtkComposerSceneNodeEditor::dtkComposerSceneNodeEditor(QWidget *parent) : QWidge
p_layout->addLayout(op_layout);
QHBoxLayout *si_layout = new QHBoxLayout;
si_layout->setContentsMargins(0, 0, 0, 0);
si_layout->setContentsMargins(0, 5, 0, 5);
si_layout->setSpacing(0);
si_layout->addWidget(d->select_implementation);
......@@ -432,7 +432,7 @@ dtkComposerSceneNodeEditor::dtkComposerSceneNodeEditor(QWidget *parent) : QWidge
// d->layout_widg_edit->addWidget(d->bool_widget);
d->layout = new QVBoxLayout(this);
d->layout->setContentsMargins(5, 0, 5, 0);
d->layout->setContentsMargins(0, 0, 0, 0);
d->layout->setSpacing(0);
d->layout->addWidget(top);
d->layout->addLayout(si_layout);
......@@ -442,6 +442,7 @@ dtkComposerSceneNodeEditor::dtkComposerSceneNodeEditor(QWidget *parent) : QWidge
d->layout->addLayout(p_layout);
d->layout->addSpacing(10);
d->layout->addLayout(d->layout_widg_edit);
d->layout->addStretch(1);
connect(d->add_loop_port, SIGNAL(clicked()), this, SLOT(addLoopPort()));
connect(d->rem_loop_port, SIGNAL(clicked()), this, SLOT(removeLoopPort()));
......@@ -558,7 +559,7 @@ void dtkComposerSceneNodeEditor::setNode(dtkComposerSceneNode *node)
d->rem_output_port->setVisible(true);
foreach(dtkComposerSceneNodeComposite *block, c->blocks())
d->selector->addItem(block->title());
d->selector->addItem(block->title());
d->selector->blockSignals(false);
d->selector->setVisible(true);
......
/* dtkWidgetsTag.cpp ---
*
* Author: Julien Wintz
* Created: Mon Apr 15 11:52:23 2013 (+0200)
* Version:
* Last-Updated: Mon Apr 15 11:56:24 2013 (+0200)
* By: Julien Wintz
* Update #: 7
*/
/* Change Log:
*
*/
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#include "dtkWidgetsTag.h"
......@@ -115,3 +115,6 @@ void dtkWidgetsTag::setColor(QString color)
else
d->color = "";
}
//
// dtkWidgetsTag.cpp ends here
/* dtkWidgetsTagCloudController.cpp ---
*
* Author: Julien Wintz
* Created: Mon Apr 15 12:17:51 2013 (+0200)
* Version:
* Last-Updated: Mon Apr 15 14:50:06 2013 (+0200)
* By: Julien Wintz
* Update #: 28
*/
/* Change Log:
*
*/
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#include "dtkWidgetsTagCloud.h"
#include "dtkWidgetsTagCloudController.h"
......@@ -111,7 +111,7 @@ void dtkWidgetsTagCloudController::update(void)
// d->tags.clear();
// QHash<QString, QStringList> tags;
// foreach(dtkWidgetsTagCloudItem item, d->items)
// foreach(QString tag, item.tags())
// tags[tag] << item.name();
......@@ -136,7 +136,7 @@ static bool unite(QStringList l1, QStringList l2) {
void dtkWidgetsTagCloudController::clear(void)
{
d->filters.clear();
this->update();
this->render();
}
......@@ -146,7 +146,7 @@ void dtkWidgetsTagCloudController::render(void)
d->tags.clear();
QHash<QString, QStringList> tags;
foreach(dtkWidgetsTagCloudItem item, d->items)
foreach(QString tag, item.tags())
tags[tag] << item.name();
......@@ -207,3 +207,6 @@ void dtkWidgetsTagCloudController::onUnionMode(bool mode)
this->render();
}
//
// dtkWidgetsTagCloudController.cpp ends here
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