Commit 04fc630a authored by roangel's avatar roangel
Browse files

Added support for grabbers. Next step: actually resize rectangles when pressing grabbers

parent af27decc
......@@ -50,11 +50,15 @@ OBJECTS_DIR = ./
SOURCES = main.cpp \
mainguiwindow.cpp \
myGraphicsScene.cpp moc_mainguiwindow.cpp \
myGraphicsScene.cpp \
myGraphicsRectItem.cpp \
cornergrabber.cpp moc_mainguiwindow.cpp \
moc_myGraphicsScene.cpp
OBJECTS = main.o \
mainguiwindow.o \
myGraphicsScene.o \
myGraphicsRectItem.o \
cornergrabber.o \
moc_mainguiwindow.o \
moc_myGraphicsScene.o
DIST = /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/mkspecs/features/spec_pre.prf \
......@@ -207,9 +211,13 @@ DIST = /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/mkspecs/features/spec_pre.prf
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/mkspecs/features/yacc.prf \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/mkspecs/features/lex.prf \
untitled.pro mainguiwindow.h \
myGraphicsScene.h main.cpp \
myGraphicsScene.h \
myGraphicsRectItem.h \
cornergrabber.h main.cpp \
mainguiwindow.cpp \
myGraphicsScene.cpp
myGraphicsScene.cpp \
myGraphicsRectItem.cpp \
cornergrabber.cpp
QMAKE_TARGET = untitled
DESTDIR =
TARGET = untitled
......@@ -542,8 +550,8 @@ dist: distdir FORCE
distdir: FORCE
@test -d $(DISTDIR) || mkdir -p $(DISTDIR)
$(COPY_FILE) --parents $(DIST) $(DISTDIR)/
$(COPY_FILE) --parents mainguiwindow.h myGraphicsScene.h $(DISTDIR)/
$(COPY_FILE) --parents main.cpp mainguiwindow.cpp myGraphicsScene.cpp $(DISTDIR)/
$(COPY_FILE) --parents mainguiwindow.h myGraphicsScene.h myGraphicsRectItem.h cornergrabber.h $(DISTDIR)/
$(COPY_FILE) --parents main.cpp mainguiwindow.cpp myGraphicsScene.cpp myGraphicsRectItem.cpp cornergrabber.cpp $(DISTDIR)/
$(COPY_FILE) --parents mainguiwindow.ui $(DISTDIR)/
......@@ -681,6 +689,8 @@ moc_mainguiwindow.cpp: /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QMai
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qlayout.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qlayoutitem.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qboxlayout.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsRectItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qgraphicsitem.h \
ui_mainguiwindow.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QVariant \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QAction \
......@@ -733,6 +743,18 @@ moc_mainguiwindow.cpp: /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QMai
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QWidget \
myGraphicsScene.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsScene \
myGraphicsRectItem.h \
cornergrabber.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QObject \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsTextItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSceneHoverEvent \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qgraphicssceneevent.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSceneMouseEvent \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QColor \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QPainter \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QPen \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QPointF \
mainguiwindow.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/bin/moc
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/bin/moc $(DEFINES) -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/mkspecs/linux-g++ -I/home/gazebo-cf/work/D-FaLL-System/crazyflie_ws/sandbox/crazypkg/gui/untitled -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include mainguiwindow.h -o moc_mainguiwindow.cpp
......@@ -815,6 +837,31 @@ moc_myGraphicsScene.cpp: /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QG
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qsharedpointer_impl.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qfont.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpen.h \
myGraphicsRectItem.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsRectItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qgraphicsitem.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qvariant.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qmap.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qdebug.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qtextstream.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qlocale.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qset.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qcontiguouscache.h \
cornergrabber.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QObject \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsTextItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSceneHoverEvent \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qgraphicssceneevent.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSceneMouseEvent \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QColor \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QPainter \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpainter.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qtextoption.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qfontinfo.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qfontmetrics.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QPen \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QPointF \
myGraphicsScene.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/bin/moc
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/bin/moc $(DEFINES) -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/mkspecs/linux-g++ -I/home/gazebo-cf/work/D-FaLL-System/crazyflie_ws/sandbox/crazypkg/gui/untitled -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include myGraphicsScene.h -o moc_myGraphicsScene.cpp
......@@ -947,6 +994,8 @@ main.o: main.cpp mainguiwindow.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qlayout.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qlayoutitem.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qboxlayout.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsRectItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qgraphicsitem.h \
ui_mainguiwindow.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QVariant \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QAction \
......@@ -998,7 +1047,19 @@ main.o: main.cpp mainguiwindow.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qtoolbar.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QWidget \
myGraphicsScene.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsScene
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsScene \
myGraphicsRectItem.h \
cornergrabber.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QObject \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsTextItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSceneHoverEvent \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qgraphicssceneevent.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSceneMouseEvent \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QColor \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QPainter \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QPen \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QPointF
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
mainguiwindow.o: mainguiwindow.cpp mainguiwindow.h \
......@@ -1110,6 +1171,8 @@ mainguiwindow.o: mainguiwindow.cpp mainguiwindow.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qlayout.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qlayoutitem.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qboxlayout.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsRectItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qgraphicsitem.h \
ui_mainguiwindow.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QVariant \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QAction \
......@@ -1162,6 +1225,18 @@ mainguiwindow.o: mainguiwindow.cpp mainguiwindow.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QWidget \
myGraphicsScene.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsScene \
myGraphicsRectItem.h \
cornergrabber.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QObject \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsTextItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSceneHoverEvent \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qgraphicssceneevent.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSceneMouseEvent \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QColor \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QPainter \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QPen \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QPointF \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QDoubleSpinBox \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QTextEdit \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qtextedit.h \
......@@ -1250,11 +1325,279 @@ myGraphicsScene.o: myGraphicsScene.cpp myGraphicsScene.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qsharedpointer_impl.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qfont.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpen.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSceneMouseEvent \
myGraphicsRectItem.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsRectItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qgraphicsitem.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qvariant.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qmap.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qdebug.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qtextstream.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qlocale.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qset.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qcontiguouscache.h \
cornergrabber.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QObject \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsTextItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSceneHoverEvent \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qgraphicssceneevent.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qset.h
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSceneMouseEvent \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QColor \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QPainter \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpainter.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qtextoption.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qfontinfo.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qfontmetrics.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QPen \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QPointF \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QRect \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QApplication \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qapplication.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qcoreapplication.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qeventloop.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qcursor.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qdesktopwidget.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qwidget.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpalette.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qsizepolicy.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qkeysequence.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qevent.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qurl.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qurlquery.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qfile.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qfiledevice.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qvector2d.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qtouchdevice.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qguiapplication.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qinputmethod.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o myGraphicsScene.o myGraphicsScene.cpp
myGraphicsRectItem.o: myGraphicsRectItem.cpp myGraphicsRectItem.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsRectItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qgraphicsitem.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qglobal.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qconfig.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qfeatures.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qsystemdetection.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qprocessordetection.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qcompilerdetection.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qtypeinfo.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qtypetraits.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qisenum.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qsysinfo.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qlogging.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qflags.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qatomic.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qbasicatomic.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qatomic_bootstrap.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qgenericatomic.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qatomic_cxx11.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qatomic_msvc.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qglobalstatic.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qmutex.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qnumeric.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qversiontagging.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobject.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobjectdefs.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qnamespace.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobjectdefs_impl.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qstring.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qchar.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qbytearray.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qrefcount.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qarraydata.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qstringbuilder.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qlist.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qalgorithms.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qiterator.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qhashfunctions.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qpair.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qbytearraylist.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qstringlist.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qregexp.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qstringmatcher.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qcoreevent.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qscopedpointer.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qmetatype.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qvarlengtharray.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qcontainerfwd.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobject_impl.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qvariant.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qmap.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qdebug.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qhash.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qtextstream.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qiodevice.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qlocale.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qshareddata.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qvector.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qpoint.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qset.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qcontiguouscache.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qsharedpointer.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qsharedpointer_impl.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qrect.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qmargins.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qsize.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpainterpath.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qmatrix.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpolygon.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qregion.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qwindowdefs.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qwindowdefs_win.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qdatastream.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qline.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpixmap.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpaintdevice.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qcolor.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qrgb.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qrgba64.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qimage.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpixelformat.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qtransform.h \
cornergrabber.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QObject \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsTextItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSceneHoverEvent \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qgraphicssceneevent.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSceneMouseEvent \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QColor \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QPainter \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpainter.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qtextoption.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpen.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qbrush.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qfontinfo.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qfont.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qfontmetrics.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QPen \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QPointF \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QBrush \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QApplication \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qapplication.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qcoreapplication.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qeventloop.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qcursor.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qdesktopwidget.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qwidget.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpalette.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qsizepolicy.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qkeysequence.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qevent.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qurl.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qurlquery.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qfile.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qfiledevice.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qvector2d.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qtouchdevice.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qguiapplication.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qinputmethod.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QVariant
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o myGraphicsRectItem.o myGraphicsRectItem.cpp
cornergrabber.o: cornergrabber.cpp cornergrabber.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QObject \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobject.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobjectdefs.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qnamespace.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qglobal.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qconfig.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qfeatures.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qsystemdetection.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qprocessordetection.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qcompilerdetection.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qtypeinfo.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qtypetraits.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qisenum.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qsysinfo.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qlogging.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qflags.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qatomic.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qbasicatomic.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qatomic_bootstrap.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qgenericatomic.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qatomic_cxx11.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qatomic_msvc.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qglobalstatic.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qmutex.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qnumeric.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qversiontagging.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobjectdefs_impl.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qstring.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qchar.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qbytearray.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qrefcount.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qarraydata.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qstringbuilder.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qlist.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qalgorithms.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qiterator.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qhashfunctions.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qpair.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qbytearraylist.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qstringlist.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qregexp.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qstringmatcher.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qcoreevent.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qscopedpointer.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qmetatype.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qvarlengtharray.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qcontainerfwd.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobject_impl.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qgraphicsitem.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qvariant.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qmap.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qdebug.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qhash.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qtextstream.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qiodevice.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qlocale.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qshareddata.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qvector.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qpoint.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qset.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qcontiguouscache.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qsharedpointer.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qsharedpointer_impl.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qrect.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qmargins.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qsize.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpainterpath.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qmatrix.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpolygon.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qregion.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qwindowdefs.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qwindowdefs_win.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qdatastream.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qline.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpixmap.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpaintdevice.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qcolor.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qrgb.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qrgba64.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qimage.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpixelformat.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qtransform.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsRectItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsTextItem \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSceneHoverEvent \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qgraphicssceneevent.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSceneMouseEvent \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QColor \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QPainter \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpainter.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qtextoption.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpen.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qbrush.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qfontinfo.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qfont.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qfontmetrics.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/QPen \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QPointF
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o cornergrabber.o cornergrabber.cpp
moc_mainguiwindow.o: moc_mainguiwindow.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainguiwindow.o moc_mainguiwindow.cpp
......
#include "cornergrabber.h"
CornerGrabber::CornerGrabber(QGraphicsItem *parent, int corner) :
QGraphicsItem(parent),
mouseDownX(0),
mouseDownY(0),
_outterborderColor(Qt::black),
_outterborderPen(),
_width(6),
_height(6),
_corner(corner),
_mouseButtonState(kMouseReleased),
_is_active(false)
{
setParentItem(parent);
_outterborderPen.setWidth(2);
_outterborderPen.setColor(_outterborderColor);
this->setAcceptHoverEvents(true);
}
qreal CornerGrabber::getHeight()
{
return _height;
}
qreal CornerGrabber::getWidth()
{
return _width;
}
void CornerGrabber::setMouseState(int s)
{
_mouseButtonState = s;
}
int CornerGrabber::getMouseState()
{
return _mouseButtonState;
}
int CornerGrabber::getCorner()
{
return _corner;
}
bool CornerGrabber::isActive()
{
return _is_active;
}
// we have to implement the mouse events to keep the linker happy,
// but just set accepted to false since are not actually handling them
void CornerGrabber::mouseMoveEvent(QGraphicsSceneDragDropEvent *event)
{
event->setAccepted(false);
}
void CornerGrabber::mousePressEvent(QGraphicsSceneDragDropEvent *event)
{
event->setAccepted(false);
}
void CornerGrabber::mouseReleaseEvent ( QGraphicsSceneMouseEvent * event )
{
event->setAccepted(false);
}
void CornerGrabber::mousePressEvent ( QGraphicsSceneMouseEvent * event )
{
event->setAccepted(false);
}
void CornerGrabber::mouseMoveEvent ( QGraphicsSceneMouseEvent * event )
{
event->setAccepted(false);
}
// change the color on hover events to indicate to the use the object has
// been captured by the mouse
void CornerGrabber::hoverLeaveEvent ( QGraphicsSceneHoverEvent * )
{
_outterborderColor = Qt::black;
_is_active = false;
this->update(0,0,_width,_height);
}
void CornerGrabber::hoverEnterEvent ( QGraphicsSceneHoverEvent * )
{
_outterborderColor = Qt::red;
_is_active = true;
this->update(0,0,_width,_height);
}
QRectF CornerGrabber::boundingRect() const
{
return QRectF(0,0,_width,_height);
}
void CornerGrabber::paint (QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
{
// fill the box with solid color, use sharp corners
_outterborderPen.setCapStyle(Qt::SquareCap);
_outterborderPen.setStyle(Qt::SolidLine);
painter->setPen(_outterborderPen);
QPointF topLeft (0, 0);
QPointF bottomRight ( _width, _height);
QRectF rect (topLeft, bottomRight);
QBrush brush (Qt::SolidPattern);
brush.setColor (_outterborderColor);
painter->fillRect(rect,brush);
}
#ifndef CORNERGRABBER_H
#define CORNERGRABBER_H
#include <QObject>
#include <QGraphicsItem>
#include <QGraphicsRectItem>
#include <QGraphicsTextItem>
#include <QGraphicsSceneHoverEvent>
#include <QGraphicsSceneMouseEvent>
#include <QColor>
#include <QPainter>
#include <QPen>
#include <QPointF>
class CornerGrabber : public QGraphicsItem
{
public:
explicit CornerGrabber(QGraphicsItem *parent = 0, int corner = 0);
int getCorner(); ///< allows the owner to find out which coner this is
void setMouseState(int); ///< allows the owner to record the current mouse state
int getMouseState(); ///< allows the owner to get the current mouse state
qreal getHeight();
qreal getWidth();
bool isActive();
qreal mouseDownX;
qreal mouseDownY;
enum {kMouseReleased=0, kMouseDown, kMouseMoving}; ///< define the mouse states
enum {bottomLeft, topLeft, topRight, bottomRight};
private: