Skip to content
Snippets Groups Projects
Commit 31033e01 authored by Martin Hanzik's avatar Martin Hanzik Committed by Jan Trávníček
Browse files

GraphicsBox getters and type fixes

parent d602f3d3
No related branches found
No related tags found
No related merge requests found
......@@ -49,3 +49,11 @@ void GraphicsBox::paint(QPainter* painter, const QStyleOptionGraphicsItem* optio
painter->fillRect(this->boundRect, this->color);
painter->drawText(this->boundRect, Qt::AlignCenter, this->text);
}
const std::vector<InputConnectionBox*>& GraphicsBox::getInputConnectionBoxes() const {
return inputConnectionBoxes;
}
OutputConnectionBox* GraphicsBox::getOutputConnectionBox() const {
return outputConnectionBox;
}
\ No newline at end of file
......@@ -6,6 +6,8 @@
#include <Models/ModelBox.hpp>
 
class ConnectionBox;
class InputConnectionBox;
class OutputConnectionBox;
 
class GraphicsBox : public QGraphicsObject {
Q_OBJECT
......@@ -17,6 +19,9 @@ public:
 
ModelBox* getModelBox() const { return this->modelBox.get(); }
 
const std::vector<InputConnectionBox*>& getInputConnectionBoxes() const;
OutputConnectionBox* getOutputConnectionBox() const;
protected:
QColor color;
 
......@@ -27,8 +32,8 @@ private:
 
std::unique_ptr<ModelBox> modelBox;
 
std::vector<ConnectionBox*> inputConnectionBoxes;
ConnectionBox* outputConnectionBox;
std::vector<InputConnectionBox*> inputConnectionBoxes;
OutputConnectionBox* outputConnectionBox;
};
 
 
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment