]> git.siccegge.de Git - frida/frida.git/blobdiff - src/gui/widgets/BasicBlockWidget.hxx
Move qt.hxx up one directory
[frida/frida.git] / src / gui / widgets / BasicBlockWidget.hxx
index e3d3611703937c521a207f0b655166172d9d7111..7c402c0a663bb4f89d8b0216ce6280aee5e752a6 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef INCLUDE__BasicBlockWidget_hxx
 #define INCLUDE__BasicBlockWidget_hxx
 
-#include "gui/qt.hxx"
+#include "qt.hxx"
 #include <vector>
 #include <cassert>
 #include <tuple>
@@ -15,6 +15,7 @@ class Mainwindow;
 class CustomQGraphicsTextItem;
 class BasicBlock;
 class RenameFunctionEvent;
+class ChangeCommentEvent;
 
 class BasicBlockWidget : public QObject, public QGraphicsItem
 {
@@ -45,12 +46,24 @@ public:
 
        QString getName() const
                { return name; }
+
+       QColor setColor(const QColor& newColor) {
+               QColor lastcolor = currentColor;
+               currentColor = newColor;
+               return lastcolor;
+       }
+
+       const QColor defaultColor = QColor(0xcc, 0xcc, 0xff, 0xff);
+       const QColor highlightColor = QColor(0xff, 0x99, 0xff, 0xff);
 private:
        void updateFunctionName(RenameFunctionEvent* event);
        void populateWidget();
+       void changeCommentHandler(ChangeCommentEvent* event);
+       QString formatComments(Instruction* inst);
 
        uint32_t width, height;
        QString name;
+       QColor currentColor;
        std::unique_ptr<QGraphicsTextItem> _widget;
        QTextTable* _table;
        BasicBlock* block;