3030#define INTERFACE_APPLICATION_NETWORKEDITOR_H
3131
3232#include < QGraphicsView>
33+ #include < QGraphicsTextItem>
3334#ifndef Q_MOC_RUN
3435#include < boost/shared_ptr.hpp>
3536#include < map>
@@ -74,7 +75,16 @@ namespace Gui {
7475 {
7576 public:
7677 virtual ~ModuleErrorDisplayer () {}
77- virtual void displayError (const QString& msg) const = 0;
78+ virtual void displayError (const QString& msg) = 0;
79+ };
80+
81+ class ErrorItem : public QGraphicsTextItem
82+ {
83+ Q_OBJECT
84+ public:
85+ explicit ErrorItem (const QString& text, QGraphicsItem* parent = 0 );
86+ protected:
87+ virtual void mousePressEvent (QGraphicsSceneMouseEvent *event) override ;
7888 };
7989
8090 class ModuleEventProxy : public QObject
@@ -122,7 +132,7 @@ namespace Gui {
122132
123133 public:
124134 explicit NetworkEditor (boost::shared_ptr<CurrentModuleSelection> moduleSelectionGetter, boost::shared_ptr<DefaultNotePositionGetter> dnpg,
125- boost::shared_ptr<DialogErrorControl> dialogErrorControl,
135+ boost::shared_ptr<DialogErrorControl> dialogErrorControl,
126136 TagColorFunc tagColor = defaultTagColor,
127137 QWidget* parent = 0 );
128138 ~NetworkEditor ();
@@ -156,7 +166,7 @@ namespace Gui {
156166 void enableInputWidgets ();
157167
158168 // TODO: this class is getting too big and messy, schedule refactoring
159-
169+
160170 void setBackground (const QBrush& brush);
161171 QBrush background () const ;
162172
@@ -174,7 +184,7 @@ namespace Gui {
174184 void tagLayer (bool active, int tag);
175185 bool tagLayerActive () const { return tagLayerActive_; }
176186
177- virtual void displayError (const QString& msg) const override ;
187+ virtual void displayError (const QString& msg) override ;
178188
179189 protected:
180190 virtual void dropEvent (QDropEvent* event) override ;
0 commit comments