ui: graphView

Added basic graph view with simple nodes (just text, no edges or anything...)

fortune cookie message = Don't be afraid to take that big step.
This commit is contained in:
Manuel Dobusch
2014-07-02 16:14:56 +02:00
parent 5251e3ecb6
commit a8e32af5dd
16 changed files with 220 additions and 2 deletions
@@ -0,0 +1,20 @@
#include "qt/view/graphElements/QtGraphNode.h"
#include "qgraphicsscene.h"
QtGraphNode::QtGraphNode(const Vec2i& position, const std::string& name)
{
this->setRect(position.x, position.y, 100, 100);
QBrush brush(Qt::lightGray);
this->setBrush(brush);
m_text = new QGraphicsTextItem(this);
m_text->setPos(position.x, position.y);
m_text->setPlainText(QString(name.c_str()));
}
QtGraphNode::~QtGraphNode()
{
}