diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/Makefile b/crazyflie_ws/sandbox/crazypkg/gui/untitled/Makefile index 8d3769d2aaedfde5a8ccaeb9a7076d43d715ccdf..458b3b7db32dd175595af3fb603c09b1a0bf0894 100644 --- a/crazyflie_ws/sandbox/crazypkg/gui/untitled/Makefile +++ b/crazyflie_ws/sandbox/crazypkg/gui/untitled/Makefile @@ -54,7 +54,8 @@ SOURCES = main.cpp \ myGraphicsRectItem.cpp \ cornergrabber.cpp \ myGraphicsView.cpp \ - crazyFlyZone.cpp moc_mainguiwindow.cpp \ + crazyFlyZone.cpp \ + tablePiece.cpp moc_mainguiwindow.cpp \ moc_myGraphicsScene.cpp \ moc_myGraphicsView.cpp OBJECTS = main.o \ @@ -64,6 +65,7 @@ OBJECTS = main.o \ cornergrabber.o \ myGraphicsView.o \ crazyFlyZone.o \ + tablePiece.o \ moc_mainguiwindow.o \ moc_myGraphicsScene.o \ moc_myGraphicsView.o @@ -221,13 +223,15 @@ DIST = /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/mkspecs/features/spec_pre.prf myGraphicsRectItem.h \ cornergrabber.h \ myGraphicsView.h \ - crazyFlyZone.h main.cpp \ + crazyFlyZone.h \ + tablePiece.h main.cpp \ mainguiwindow.cpp \ myGraphicsScene.cpp \ myGraphicsRectItem.cpp \ cornergrabber.cpp \ myGraphicsView.cpp \ - crazyFlyZone.cpp + crazyFlyZone.cpp \ + tablePiece.cpp QMAKE_TARGET = untitled DESTDIR = TARGET = untitled @@ -560,8 +564,8 @@ dist: distdir FORCE distdir: FORCE @test -d $(DISTDIR) || mkdir -p $(DISTDIR) $(COPY_FILE) --parents $(DIST) $(DISTDIR)/ - $(COPY_FILE) --parents mainguiwindow.h myGraphicsScene.h myGraphicsRectItem.h cornergrabber.h myGraphicsView.h crazyFlyZone.h $(DISTDIR)/ - $(COPY_FILE) --parents main.cpp mainguiwindow.cpp myGraphicsScene.cpp myGraphicsRectItem.cpp cornergrabber.cpp myGraphicsView.cpp crazyFlyZone.cpp $(DISTDIR)/ + $(COPY_FILE) --parents mainguiwindow.h myGraphicsScene.h myGraphicsRectItem.h cornergrabber.h myGraphicsView.h crazyFlyZone.h tablePiece.h $(DISTDIR)/ + $(COPY_FILE) --parents main.cpp mainguiwindow.cpp myGraphicsScene.cpp myGraphicsRectItem.cpp cornergrabber.cpp myGraphicsView.cpp crazyFlyZone.cpp tablePiece.cpp $(DISTDIR)/ $(COPY_FILE) --parents mainguiwindow.ui $(DISTDIR)/ @@ -754,8 +758,8 @@ moc_mainguiwindow.cpp: /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QMai myGraphicsScene.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsScene \ crazyFlyZone.h \ - myGraphicsRectItem.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSimpleTextItem \ + 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 \ @@ -767,6 +771,7 @@ 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/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 \ + tablePiece.h \ 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 @@ -850,8 +855,7 @@ 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/QtGui/qfont.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpen.h \ crazyFlyZone.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/QGraphicsSimpleTextItem \ /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 \ @@ -860,7 +864,8 @@ 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/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 \ - /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSimpleTextItem \ + myGraphicsRectItem.h \ + /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsRectItem \ 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 \ @@ -876,6 +881,7 @@ 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/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 \ + tablePiece.h \ 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 @@ -1280,8 +1286,8 @@ main.o: main.cpp mainguiwindow.h \ myGraphicsScene.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsScene \ crazyFlyZone.h \ - myGraphicsRectItem.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSimpleTextItem \ + 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 \ @@ -1292,7 +1298,8 @@ main.o: main.cpp mainguiwindow.h \ /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/QtCore/QPointF \ + tablePiece.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp mainguiwindow.o: mainguiwindow.cpp mainguiwindow.h \ @@ -1459,8 +1466,8 @@ mainguiwindow.o: mainguiwindow.cpp mainguiwindow.h \ myGraphicsScene.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsScene \ crazyFlyZone.h \ - myGraphicsRectItem.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSimpleTextItem \ + 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 \ @@ -1472,6 +1479,7 @@ mainguiwindow.o: mainguiwindow.cpp mainguiwindow.h \ /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 \ + tablePiece.h \ /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/qspinbox.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QTextEdit \ @@ -1562,8 +1570,7 @@ myGraphicsScene.o: myGraphicsScene.cpp myGraphicsScene.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 \ crazyFlyZone.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/QGraphicsSimpleTextItem \ /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 \ @@ -1572,7 +1579,8 @@ myGraphicsScene.o: myGraphicsScene.cpp myGraphicsScene.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 \ - /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSimpleTextItem \ + myGraphicsRectItem.h \ + /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsRectItem \ 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 \ @@ -1588,6 +1596,7 @@ myGraphicsScene.o: myGraphicsScene.cpp myGraphicsScene.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 \ + tablePiece.h \ /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 \ @@ -1694,7 +1703,6 @@ myGraphicsRectItem.o: myGraphicsRectItem.cpp myGraphicsRectItem.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/QGraphicsSimpleTextItem \ 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 \ @@ -1956,8 +1964,112 @@ myGraphicsView.o: myGraphicsView.cpp myGraphicsView.h \ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o myGraphicsView.o myGraphicsView.cpp crazyFlyZone.o: crazyFlyZone.cpp crazyFlyZone.h \ + /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSimpleTextItem \ + /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 \ myGraphicsRectItem.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsRectItem \ + 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 + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o crazyFlyZone.o crazyFlyZone.cpp + +tablePiece.o: tablePiece.cpp tablePiece.h \ + /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsSimpleTextItem \ /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 \ @@ -2039,7 +2151,8 @@ crazyFlyZone.o: crazyFlyZone.cpp crazyFlyZone.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/QGraphicsSimpleTextItem \ + myGraphicsRectItem.h \ + /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGraphicsRectItem \ 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 \ @@ -2058,7 +2171,7 @@ crazyFlyZone.o: crazyFlyZone.cpp crazyFlyZone.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 crazyFlyZone.o crazyFlyZone.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tablePiece.o tablePiece.cpp moc_mainguiwindow.o: moc_mainguiwindow.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainguiwindow.o moc_mainguiwindow.cpp diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/crazyFlyZone.cpp b/crazyflie_ws/sandbox/crazypkg/gui/untitled/crazyFlyZone.cpp index 7be96f7fd60becd23a6e5ce1f06854727b594a65..e623b47c818b4aadfcb61555f98898b4e3fc7a5f 100644 --- a/crazyflie_ws/sandbox/crazypkg/gui/untitled/crazyFlyZone.cpp +++ b/crazyflie_ws/sandbox/crazypkg/gui/untitled/crazyFlyZone.cpp @@ -3,6 +3,7 @@ crazyFlyZone::crazyFlyZone(const QRectF & rect, int index, QGraphicsItem * parent) : myGraphicsRectItem(rect, parent) { + this->setPen(QPen(Qt::black, 0)); setIndex(index); } @@ -17,8 +18,6 @@ void crazyFlyZone::setLabel(QString string) label = new QGraphicsSimpleTextItem(string, this); label->setFlag(QGraphicsItem::ItemIgnoresTransformations); label->setFont(QFont("Arial", 18, QFont::Bold, true)); - // TODO: choose position and format of text - // label->setPos(label->mapToItem(this, QPointF(0,0))); setLabelPosition(); } @@ -41,7 +40,7 @@ void crazyFlyZone::setIndex(int index) _index = index; } -void crazyFlyZone::rectSizeChanged() +void crazyFlyZone::rectSizeChanged() // pure virtual coming from parent { setLabelPosition(); } diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/crazyFlyZone.o b/crazyflie_ws/sandbox/crazypkg/gui/untitled/crazyFlyZone.o index 2dc8e5dfacd7228cfb5f4e60e2e684c34773cf36..bf82baa12ccc98eddbce4b6a667528e185b839f4 100644 Binary files a/crazyflie_ws/sandbox/crazypkg/gui/untitled/crazyFlyZone.o and b/crazyflie_ws/sandbox/crazypkg/gui/untitled/crazyFlyZone.o differ diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/main.o b/crazyflie_ws/sandbox/crazypkg/gui/untitled/main.o index 91b599050ac9307094772f5405f6e9b9d8d0cfb4..a1d6e7e88c75acd4b65490479420902600b840cb 100644 Binary files a/crazyflie_ws/sandbox/crazypkg/gui/untitled/main.o and b/crazyflie_ws/sandbox/crazypkg/gui/untitled/main.o differ diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/mainguiwindow.cpp b/crazyflie_ws/sandbox/crazypkg/gui/untitled/mainguiwindow.cpp index 4b511579d5907fb58755f235f001c351dfb4d2bf..790dff2c1f08c108206161a1542ab972345c8038 100644 --- a/crazyflie_ws/sandbox/crazypkg/gui/untitled/mainguiwindow.cpp +++ b/crazyflie_ws/sandbox/crazypkg/gui/untitled/mainguiwindow.cpp @@ -62,10 +62,11 @@ void MainGUIWindow::_init() ui->graphicsView->setScene(scene); - QObject::connect(ui->tabWidget, SIGNAL(tabCloseRequested(int)), scene, SLOT(removeRectangle(int))); - QObject::connect(scene, SIGNAL(numRectanglesChanged(int)), this, SLOT(set_tabs(int))); - QObject::connect(ui->tabWidget, SIGNAL(currentChanged(int)), scene, SLOT(setSelectedRectangle(int))); - QObject::connect(scene, SIGNAL(rectangleSelected(int)), ui->tabWidget, SLOT(setCurrentIndex(int))); + QObject::connect(ui->tabWidget, SIGNAL(tabCloseRequested(int)), scene, SLOT(removeCrazyFlyZone(int))); + QObject::connect(scene, SIGNAL(numCrazyFlyZonesChanged(int)), this, SLOT(set_tabs(int))); + QObject::connect(ui->tabWidget, SIGNAL(currentChanged(int)), scene, SLOT(setSelectedCrazyFlyZone(int))); + QObject::connect(scene, SIGNAL(crazyFlyZoneSelected(int)), ui->tabWidget, SLOT(setCurrentIndex(int))); + QObject::connect(scene, SIGNAL(modeChanged(int)), this, SLOT(transitionToMode(int))); } #ifndef DEBUG_GUI @@ -942,3 +943,48 @@ void CSetpointQueue::print() // } #endif // DEBUG_GUI + + +void MainGUIWindow::on_drawingModeButton_clicked() +{ + switch(scene->getMode()) + { + case myGraphicsScene::mode_table: + { + scene->setMode(myGraphicsScene::mode_crazyfly_zones); + ui->drawingModeButton->setText("CreateCFZonesMode"); + break; + } + case myGraphicsScene::mode_crazyfly_zones: + { + scene->setMode(myGraphicsScene::mode_table); + ui->drawingModeButton->setText("CreateTableMode"); + break; + } + } +} + +void MainGUIWindow::on_removeTable_clicked() +{ + if(scene->getMode() == myGraphicsScene::mode_table) + { + scene->removeTable(); + } +} + +void MainGUIWindow::transitionToMode(int mode) +{ + switch(mode) + { + case myGraphicsScene::mode_table: + { + ui->removeTable->setDisabled(false); + break; + } + case myGraphicsScene::mode_crazyfly_zones: + { + ui->removeTable->setDisabled(true); + break; + } + } +} diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/mainguiwindow.h b/crazyflie_ws/sandbox/crazypkg/gui/untitled/mainguiwindow.h index da862a9f181bf66cf6319f6234869ab24808fb4d..23f1e280e4a3e03c80a6b4964fa86e8fa0cd7fd5 100644 --- a/crazyflie_ws/sandbox/crazypkg/gui/untitled/mainguiwindow.h +++ b/crazyflie_ws/sandbox/crazypkg/gui/untitled/mainguiwindow.h @@ -130,12 +130,14 @@ private slots: #endif void set_tabs(int n); - + void transitionToMode(int mode); + void on_drawingModeButton_clicked(); + void on_removeTable_clicked(); private: Ui::MainGUIWindow *ui; - myGraphicsScene* scene; //TODO: make a subclass from QGraphicScene class, mouse events + myGraphicsScene* scene; QGraphicsRectItem* item1; void _init(); diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/mainguiwindow.o b/crazyflie_ws/sandbox/crazypkg/gui/untitled/mainguiwindow.o index 9ba445ae52e9820fcb5f16d0cbe8f62758ebb8df..b699f66db3d8023774841aa0cd471f09f1edde67 100644 Binary files a/crazyflie_ws/sandbox/crazypkg/gui/untitled/mainguiwindow.o and b/crazyflie_ws/sandbox/crazypkg/gui/untitled/mainguiwindow.o differ diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/mainguiwindow.ui b/crazyflie_ws/sandbox/crazypkg/gui/untitled/mainguiwindow.ui index 3257d21d33d327e5abd274f6825e9607bfaa7cd8..5176a6d3037d26750c7c3914fe7a6db5c63a6f54 100644 --- a/crazyflie_ws/sandbox/crazypkg/gui/untitled/mainguiwindow.ui +++ b/crazyflie_ws/sandbox/crazypkg/gui/untitled/mainguiwindow.ui @@ -69,14 +69,40 @@ <rect> <x>10</x> <y>9</y> - <width>621</width> - <height>451</height> + <width>571</width> + <height>401</height> </rect> </property> <property name="mouseTracking"> <bool>true</bool> </property> </widget> + <widget class="QPushButton" name="drawingModeButton"> + <property name="geometry"> + <rect> + <x>20</x> + <y>430</y> + <width>141</width> + <height>21</height> + </rect> + </property> + <property name="text"> + <string>CreateTableMode</string> + </property> + </widget> + <widget class="QPushButton" name="removeTable"> + <property name="geometry"> + <rect> + <x>200</x> + <y>430</y> + <width>91</width> + <height>21</height> + </rect> + </property> + <property name="text"> + <string>Remove Table</string> + </property> + </widget> </widget> <widget class="QFrame" name="frame_3"> <property name="geometry"> diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/moc_mainguiwindow.cpp b/crazyflie_ws/sandbox/crazypkg/gui/untitled/moc_mainguiwindow.cpp index ecb548374e79b1edec80ed5ff5a7608d464dea36..2f9be88fd728670da0084ddd9864415882add08b 100644 --- a/crazyflie_ws/sandbox/crazypkg/gui/untitled/moc_mainguiwindow.cpp +++ b/crazyflie_ws/sandbox/crazypkg/gui/untitled/moc_mainguiwindow.cpp @@ -19,8 +19,8 @@ QT_BEGIN_MOC_NAMESPACE struct qt_meta_stringdata_MainGUIWindow_t { - QByteArrayData data[4]; - char stringdata0[26]; + QByteArrayData data[8]; + char stringdata0[100]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ @@ -32,10 +32,16 @@ static const qt_meta_stringdata_MainGUIWindow_t qt_meta_stringdata_MainGUIWindow QT_MOC_LITERAL(0, 0, 13), // "MainGUIWindow" QT_MOC_LITERAL(1, 14, 8), // "set_tabs" QT_MOC_LITERAL(2, 23, 0), // "" -QT_MOC_LITERAL(3, 24, 1) // "n" +QT_MOC_LITERAL(3, 24, 1), // "n" +QT_MOC_LITERAL(4, 26, 16), // "transitionToMode" +QT_MOC_LITERAL(5, 43, 4), // "mode" +QT_MOC_LITERAL(6, 48, 28), // "on_drawingModeButton_clicked" +QT_MOC_LITERAL(7, 77, 22) // "on_removeTable_clicked" }, - "MainGUIWindow\0set_tabs\0\0n" + "MainGUIWindow\0set_tabs\0\0n\0transitionToMode\0" + "mode\0on_drawingModeButton_clicked\0" + "on_removeTable_clicked" }; #undef QT_MOC_LITERAL @@ -45,7 +51,7 @@ static const uint qt_meta_data_MainGUIWindow[] = { 7, // revision 0, // classname 0, 0, // classinfo - 1, 14, // methods + 4, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors @@ -53,10 +59,16 @@ static const uint qt_meta_data_MainGUIWindow[] = { 0, // signalCount // slots: name, argc, parameters, tag, flags - 1, 1, 19, 2, 0x08 /* Private */, + 1, 1, 34, 2, 0x08 /* Private */, + 4, 1, 37, 2, 0x08 /* Private */, + 6, 0, 40, 2, 0x08 /* Private */, + 7, 0, 41, 2, 0x08 /* Private */, // slots: parameters QMetaType::Void, QMetaType::Int, 3, + QMetaType::Void, QMetaType::Int, 5, + QMetaType::Void, + QMetaType::Void, 0 // eod }; @@ -68,6 +80,9 @@ void MainGUIWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _i Q_UNUSED(_t) switch (_id) { case 0: _t->set_tabs((*reinterpret_cast< int(*)>(_a[1]))); break; + case 1: _t->transitionToMode((*reinterpret_cast< int(*)>(_a[1]))); break; + case 2: _t->on_drawingModeButton_clicked(); break; + case 3: _t->on_removeTable_clicked(); break; default: ; } } @@ -98,13 +113,13 @@ int MainGUIWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { - if (_id < 1) + if (_id < 4) qt_static_metacall(this, _c, _id, _a); - _id -= 1; + _id -= 4; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { - if (_id < 1) + if (_id < 4) *reinterpret_cast<int*>(_a[0]) = -1; - _id -= 1; + _id -= 4; } return _id; } diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/moc_mainguiwindow.o b/crazyflie_ws/sandbox/crazypkg/gui/untitled/moc_mainguiwindow.o index d3479640afe9702aade52dab55426989089e33c1..a137561ede2dc57f4decbafeceb0e654e1e6f4f5 100644 Binary files a/crazyflie_ws/sandbox/crazypkg/gui/untitled/moc_mainguiwindow.o and b/crazyflie_ws/sandbox/crazypkg/gui/untitled/moc_mainguiwindow.o differ diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/moc_myGraphicsScene.cpp b/crazyflie_ws/sandbox/crazypkg/gui/untitled/moc_myGraphicsScene.cpp index 3503f77da07dd7f48d353296f855025b79561d99..facb70ccf8347e7b6c4f84f721a957e86257890e 100644 --- a/crazyflie_ws/sandbox/crazypkg/gui/untitled/moc_myGraphicsScene.cpp +++ b/crazyflie_ws/sandbox/crazypkg/gui/untitled/moc_myGraphicsScene.cpp @@ -19,8 +19,8 @@ QT_BEGIN_MOC_NAMESPACE struct qt_meta_stringdata_myGraphicsScene_t { - QByteArrayData data[8]; - char stringdata0[106]; + QByteArrayData data[12]; + char stringdata0[158]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ @@ -30,18 +30,24 @@ struct qt_meta_stringdata_myGraphicsScene_t { static const qt_meta_stringdata_myGraphicsScene_t qt_meta_stringdata_myGraphicsScene = { { QT_MOC_LITERAL(0, 0, 15), // "myGraphicsScene" -QT_MOC_LITERAL(1, 16, 20), // "numRectanglesChanged" -QT_MOC_LITERAL(2, 37, 0), // "" -QT_MOC_LITERAL(3, 38, 6), // "newNum" -QT_MOC_LITERAL(4, 45, 17), // "rectangleSelected" -QT_MOC_LITERAL(5, 63, 5), // "index" -QT_MOC_LITERAL(6, 69, 15), // "removeRectangle" -QT_MOC_LITERAL(7, 85, 20) // "setSelectedRectangle" +QT_MOC_LITERAL(1, 16, 23), // "numCrazyFlyZonesChanged" +QT_MOC_LITERAL(2, 40, 0), // "" +QT_MOC_LITERAL(3, 41, 6), // "newNum" +QT_MOC_LITERAL(4, 48, 20), // "crazyFlyZoneSelected" +QT_MOC_LITERAL(5, 69, 5), // "index" +QT_MOC_LITERAL(6, 75, 11), // "modeChanged" +QT_MOC_LITERAL(7, 87, 4), // "mode" +QT_MOC_LITERAL(8, 92, 18), // "removeCrazyFlyZone" +QT_MOC_LITERAL(9, 111, 23), // "setSelectedCrazyFlyZone" +QT_MOC_LITERAL(10, 135, 12), // "changeModeTo" +QT_MOC_LITERAL(11, 148, 9) // "next_mode" }, - "myGraphicsScene\0numRectanglesChanged\0" - "\0newNum\0rectangleSelected\0index\0" - "removeRectangle\0setSelectedRectangle" + "myGraphicsScene\0numCrazyFlyZonesChanged\0" + "\0newNum\0crazyFlyZoneSelected\0index\0" + "modeChanged\0mode\0removeCrazyFlyZone\0" + "setSelectedCrazyFlyZone\0changeModeTo\0" + "next_mode" }; #undef QT_MOC_LITERAL @@ -51,28 +57,32 @@ static const uint qt_meta_data_myGraphicsScene[] = { 7, // revision 0, // classname 0, 0, // classinfo - 4, 14, // methods + 6, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags - 2, // signalCount + 3, // signalCount // signals: name, argc, parameters, tag, flags - 1, 1, 34, 2, 0x06 /* Public */, - 4, 1, 37, 2, 0x06 /* Public */, + 1, 1, 44, 2, 0x06 /* Public */, + 4, 1, 47, 2, 0x06 /* Public */, + 6, 1, 50, 2, 0x06 /* Public */, // slots: name, argc, parameters, tag, flags - 6, 1, 40, 2, 0x0a /* Public */, - 7, 1, 43, 2, 0x0a /* Public */, + 8, 1, 53, 2, 0x0a /* Public */, + 9, 1, 56, 2, 0x0a /* Public */, + 10, 1, 59, 2, 0x0a /* Public */, // signals: parameters QMetaType::Void, QMetaType::Int, 3, QMetaType::Void, QMetaType::Int, 5, + QMetaType::Void, QMetaType::Int, 7, // slots: parameters QMetaType::Void, QMetaType::Int, 5, QMetaType::Void, QMetaType::Int, 5, + QMetaType::Void, QMetaType::Int, 11, 0 // eod }; @@ -83,10 +93,12 @@ void myGraphicsScene::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int myGraphicsScene *_t = static_cast<myGraphicsScene *>(_o); Q_UNUSED(_t) switch (_id) { - case 0: _t->numRectanglesChanged((*reinterpret_cast< int(*)>(_a[1]))); break; - case 1: _t->rectangleSelected((*reinterpret_cast< int(*)>(_a[1]))); break; - case 2: _t->removeRectangle((*reinterpret_cast< int(*)>(_a[1]))); break; - case 3: _t->setSelectedRectangle((*reinterpret_cast< int(*)>(_a[1]))); break; + case 0: _t->numCrazyFlyZonesChanged((*reinterpret_cast< int(*)>(_a[1]))); break; + case 1: _t->crazyFlyZoneSelected((*reinterpret_cast< int(*)>(_a[1]))); break; + case 2: _t->modeChanged((*reinterpret_cast< int(*)>(_a[1]))); break; + case 3: _t->removeCrazyFlyZone((*reinterpret_cast< int(*)>(_a[1]))); break; + case 4: _t->setSelectedCrazyFlyZone((*reinterpret_cast< int(*)>(_a[1]))); break; + case 5: _t->changeModeTo((*reinterpret_cast< int(*)>(_a[1]))); break; default: ; } } else if (_c == QMetaObject::IndexOfMethod) { @@ -94,18 +106,25 @@ void myGraphicsScene::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int void **func = reinterpret_cast<void **>(_a[1]); { typedef void (myGraphicsScene::*_t)(int ); - if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&myGraphicsScene::numRectanglesChanged)) { + if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&myGraphicsScene::numCrazyFlyZonesChanged)) { *result = 0; return; } } { typedef void (myGraphicsScene::*_t)(int ); - if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&myGraphicsScene::rectangleSelected)) { + if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&myGraphicsScene::crazyFlyZoneSelected)) { *result = 1; return; } } + { + typedef void (myGraphicsScene::*_t)(int ); + if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&myGraphicsScene::modeChanged)) { + *result = 2; + return; + } + } } } @@ -134,28 +153,35 @@ int myGraphicsScene::qt_metacall(QMetaObject::Call _c, int _id, void **_a) if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { - if (_id < 4) + if (_id < 6) qt_static_metacall(this, _c, _id, _a); - _id -= 4; + _id -= 6; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { - if (_id < 4) + if (_id < 6) *reinterpret_cast<int*>(_a[0]) = -1; - _id -= 4; + _id -= 6; } return _id; } // SIGNAL 0 -void myGraphicsScene::numRectanglesChanged(int _t1) +void myGraphicsScene::numCrazyFlyZonesChanged(int _t1) { void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 0, _a); } // SIGNAL 1 -void myGraphicsScene::rectangleSelected(int _t1) +void myGraphicsScene::crazyFlyZoneSelected(int _t1) { void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 1, _a); } + +// SIGNAL 2 +void myGraphicsScene::modeChanged(int _t1) +{ + void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; + QMetaObject::activate(this, &staticMetaObject, 2, _a); +} QT_END_MOC_NAMESPACE diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/moc_myGraphicsScene.o b/crazyflie_ws/sandbox/crazypkg/gui/untitled/moc_myGraphicsScene.o index 0e567609cc7dc7fd6332ea6ebd05ce6f92969cef..c1f4c0f7b3bab6aafbba6a4aac982839faa3ab32 100644 Binary files a/crazyflie_ws/sandbox/crazypkg/gui/untitled/moc_myGraphicsScene.o and b/crazyflie_ws/sandbox/crazypkg/gui/untitled/moc_myGraphicsScene.o differ diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsRectItem.cpp b/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsRectItem.cpp index 7b84418c217b992f3b105ef713b1df87b63b1d62..1ac908ac7395bf901ef8213610280acbbb93c96d 100644 --- a/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsRectItem.cpp +++ b/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsRectItem.cpp @@ -11,8 +11,7 @@ myGraphicsRectItem::myGraphicsRectItem(const QRectF & rect, QGraphicsItem * parent) : QGraphicsRectItem(rect, parent) { - this->setFlag(QGraphicsItem::ItemIsSelectable); - this->setFlag(QGraphicsItem::ItemIsMovable); + unlock(); this->setFlag(QGraphicsItem::ItemSendsScenePositionChanges); pen = new QPen(Qt::red); brush = new QBrush(Qt::red); @@ -22,6 +21,19 @@ myGraphicsRectItem::myGraphicsRectItem(const QRectF & rect, QGraphicsItem * par resize_mode = false; } +void myGraphicsRectItem::lock() +{ + this->setFlag(QGraphicsItem::ItemIsSelectable, false); + this->setFlag(QGraphicsItem::ItemIsMovable, false); + locked = true; +} + +void myGraphicsRectItem::unlock() +{ + this->setFlag(QGraphicsItem::ItemIsSelectable, true); + this->setFlag(QGraphicsItem::ItemIsMovable, true); + locked = false; +} void myGraphicsRectItem::deleteGrabbers() { @@ -133,12 +145,15 @@ void myGraphicsRectItem::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) if (mouseEvent->button() != Qt::LeftButton) return; - createGrabbers(); //This is just in case they have not been created by now. We have a creator guardian anyhow - - if(anyGrabber()) + if(!locked) { - resize_mode = true; + createGrabbers(); //This is just in case they have not been created by now. We have a creator guardian anyhow. Change this maybe? + if(anyGrabber()) + { + resize_mode = true; + } } + QGraphicsRectItem::mousePressEvent(mouseEvent); } diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsRectItem.h b/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsRectItem.h index d14fbeac99e9076566b598d1e0737d9b8a2eb3e8..1e991648c4d8b7b172ed47d30f655811b270c7c6 100644 --- a/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsRectItem.h +++ b/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsRectItem.h @@ -13,6 +13,8 @@ class myGraphicsRectItem : public QGraphicsRectItem { public: explicit myGraphicsRectItem(const QRectF & rect, QGraphicsItem * parent = 0); + void lock(); + void unlock(); public slots: @@ -49,6 +51,7 @@ private: bool _grabbers_created; bool resize_mode; + bool locked; }; diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsRectItem.o b/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsRectItem.o index 3f1051b1cd1c34d2a5ba4f050f56d921b153a146..08bfd3c84e43645842149e43086e355c5e35939e 100644 Binary files a/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsRectItem.o and b/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsRectItem.o differ diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsScene.cpp b/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsScene.cpp index 6bc1d5c4b033ceb1f1f3a47b76457eb1229f49fc..03be79c75dcb9e4982afeff16c23448b059b3723 100644 --- a/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsScene.cpp +++ b/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsScene.cpp @@ -10,47 +10,71 @@ myGraphicsScene::myGraphicsScene(QObject *parent) { pen = new QPen(Qt::black); brush = new QBrush(Qt::blue); - + setMode(mode_table); tmp_rect = 0; startedRect = false; - // firstClick = true; } void myGraphicsScene::keyPressEvent(QKeyEvent * keyEvent) { - if(keyEvent->key() == Qt::Key_Delete) + + switch(mode) { - qDebug("del key pressed"); - for(unsigned int i = 0; i < rectangles.size(); i++) + case mode_table: + { + if(keyEvent->key() == Qt::Key_Delete) + { + qDebug("del key pressed"); + for(unsigned int i = 0; i < table_pieces.size(); i++) + { + if(table_pieces[i]->isSelected()) + { + qDebug("selectedRectangle: %d", i); + removeTablePiece(i); + } + } + } + break; + } + case mode_crazyfly_zones: { - if(rectangles[i]->isSelected()) + if(keyEvent->key() == Qt::Key_Delete) { - qDebug("selectedRectangle: %d", i); - removeRectangle(i); + qDebug("del key pressed"); + for(unsigned int i = 0; i < crazyfly_zones.size(); i++) + { + if(crazyfly_zones[i]->isSelected()) + { + qDebug("selectedRectangle: %d", i); + removeCrazyFlyZone(i); + } + } } + break; } } + QGraphicsScene::keyPressEvent(keyEvent); } -void myGraphicsScene::setSelectedRectangle(int index) +void myGraphicsScene::setSelectedCrazyFlyZone(int index) { - for(unsigned int i = 0; i < rectangles.size(); i++) + for(unsigned int i = 0; i < crazyfly_zones.size(); i++) { - rectangles[i]->setSelected(false); + crazyfly_zones[i]->setSelected(false); if(index == i) { - rectangles[index]->setSelected(true); + crazyfly_zones[index]->setSelected(true); } } } -int myGraphicsScene::checkSelectedRectangle() +int myGraphicsScene::checkSelectedCrazyFlyZone() { - for(unsigned int i = 0; i < rectangles.size(); i++) + for(unsigned int i = 0; i < crazyfly_zones.size(); i++) { - if(rectangles[i]->isSelected()) + if(crazyfly_zones[i]->isSelected()) { qDebug("rectangle selected index = %d", i); return i; @@ -65,78 +89,212 @@ void myGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) return; if(Qt::ControlModifier == QApplication::keyboardModifiers()) { + // TODO: implement table creation mode // Drag and drop approach startedRect = true; p1 = new QPointF(mouseEvent->scenePos()); - tmp_rect = new QRectF(*p1, *p1); - int index = rectangles.size(); - tmp_rect_item = new crazyFlyZone(*tmp_rect, index); - addItem(tmp_rect_item); - } - + switch(mode) + { + case mode_table: + { + tmp_rect = new QRectF(*p1, *p1); + tmp_table_piece_item = new tablePiece(*tmp_rect); + addItem(tmp_table_piece_item); + break; + } + case mode_crazyfly_zones: + { + tmp_rect = new QRectF(*p1, *p1); + int index = crazyfly_zones.size(); + tmp_crazyfly_zone_item = new crazyFlyZone(*tmp_rect, index); + addItem(tmp_crazyfly_zone_item); - QGraphicsScene::mousePressEvent(mouseEvent); + break; + } + } + } + else + { + QGraphicsScene::mousePressEvent(mouseEvent); + } } void myGraphicsScene::mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent) { if(startedRect) { - tmp_rect_item->setRect(QRectF(*p1, mouseEvent->scenePos())); - qDebug("Mouse Position: %d, %d", (mouseEvent->scenePos()).toPoint().x(), (mouseEvent->scenePos()).toPoint().y()); - qDebug("Rectangle BottomRight Position: %d, %d", tmp_rect_item->rect().bottomRight().x(), tmp_rect_item->rect().bottomRight().y()); + switch(mode) + { + case mode_table: + { + tmp_table_piece_item->setRect(QRectF(*p1, mouseEvent->scenePos())); + break; + } + case mode_crazyfly_zones: + { + tmp_crazyfly_zone_item->setRect(QRectF(*p1, mouseEvent->scenePos())); + qDebug("Mouse Position: %d, %d", (mouseEvent->scenePos()).toPoint().x(), (mouseEvent->scenePos()).toPoint().y()); + qDebug("Rectangle BottomRight Position: %d, %d", tmp_crazyfly_zone_item->rect().bottomRight().x(), tmp_crazyfly_zone_item->rect().bottomRight().y()); + break; + } + } + } QGraphicsScene::mouseMoveEvent(mouseEvent); } -void myGraphicsScene::addRectangleToVector(crazyFlyZone* rect) +void myGraphicsScene::addCrazyFlyZoneToVector(crazyFlyZone* rect) +{ + crazyfly_zones.push_back(rect); + emit numCrazyFlyZonesChanged(crazyfly_zones.size()); +} + +void myGraphicsScene::addTablePieceToVector(tablePiece* rect) { - rectangles.push_back(rect); - emit numRectanglesChanged(rectangles.size()); + table_pieces.push_back(rect); } -void myGraphicsScene::updateIndexesAndLabels() +void myGraphicsScene::updateIndexesAndLabelsCrazyFlyZones() { - for(int i = 0; i < rectangles.size(); i++) + for(int i = 0; i < crazyfly_zones.size(); i++) { - rectangles[i]->setIndex(i); + crazyfly_zones[i]->setIndex(i); std::string str = std::to_string(i + 1); - rectangles[i]->updateLabel(str.c_str()); + crazyfly_zones[i]->updateLabel(str.c_str()); qDebug("reset Index %d and update label",i); } } -void myGraphicsScene::removeRectangle(int index) +void myGraphicsScene::changeModeTo(int next_mode) { - this->removeItem(rectangles[index]); - rectangles.erase(rectangles.begin() + index); - qDebug("removed Rectangle %d", index); - updateIndexesAndLabels(); - emit numRectanglesChanged(rectangles.size()); // for tab managing + mode = next_mode; } -void myGraphicsScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent) +int myGraphicsScene::getMode(void) { - if(startedRect) + return mode; +} + +void myGraphicsScene::lockTablePieces(void) +{ + for(int i = 0; i < table_pieces.size(); i++) { - if (mouseEvent->button() != Qt::LeftButton) - return; - // TODO: If too small, etc etc, dont add it to the container and remove it - - tmp_rect_item->setRect(tmp_rect_item->rect().normalized()); - addRectangleToVector(tmp_rect_item); - std::string str = std::to_string(rectangles.size()); - tmp_rect_item->setLabel(str.c_str()); - setSelectedRectangle(rectangles.size() - 1); //select just created rectangle - tmp_rect = 0; - startedRect = false; + table_pieces[i]->lock(); + table_pieces[i]->setDarkColor(); + } +} + +void myGraphicsScene::unlockTablePieces(void) +{ + for(int i = 0; i < table_pieces.size(); i++) + { + table_pieces[i]->unlock(); + table_pieces[i]->setLightColor(); + } +} + +void myGraphicsScene::lockCrazyFlyZones(void) +{ + for(int i = 0; i < crazyfly_zones.size(); i++) + { + crazyfly_zones[i]->lock(); } - int selected_rect = checkSelectedRectangle(); - if(selected_rect != -1) +} + +void myGraphicsScene::unlockCrazyFlyZones(void) +{ + for(int i = 0; i < crazyfly_zones.size(); i++) { - emit rectangleSelected(selected_rect); + crazyfly_zones[i]->unlock(); } +} + +void myGraphicsScene::setMode(int new_mode) +{ + switch(new_mode) + { + case mode_table: + { + lockCrazyFlyZones(); + unlockTablePieces(); + break; + } + case mode_crazyfly_zones: + { + lockTablePieces(); + unlockCrazyFlyZones(); + break; + } + } + mode = new_mode; + emit modeChanged(new_mode); +} + +void myGraphicsScene::removeCrazyFlyZone(int index) +{ + this->removeItem(crazyfly_zones[index]); + crazyfly_zones.erase(crazyfly_zones.begin() + index); + qDebug("removed CFzone %d", index); + updateIndexesAndLabelsCrazyFlyZones(); + emit numCrazyFlyZonesChanged(crazyfly_zones.size()); // for tab managing +} + +void myGraphicsScene::removeTable() +{ + for(int i = 0; i < table_pieces.size(); i++) + { + this->removeItem(table_pieces[i]); + } + table_pieces.clear(); +} + +void myGraphicsScene::removeTablePiece(int index) +{ + this->removeItem(table_pieces[index]); + table_pieces.erase(table_pieces.begin() + index); + qDebug("removed TabledPiece %d", index); +} + +void myGraphicsScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent) +{ + if (mouseEvent->button() != Qt::LeftButton) + return; + + switch(mode) + { + case mode_table: + { + if(startedRect) + { + tmp_table_piece_item->setRect(tmp_table_piece_item->rect().normalized()); + addTablePieceToVector(tmp_table_piece_item); + tmp_rect = 0; + startedRect = false; + } + break; + } + case mode_crazyfly_zones: + { + if(startedRect) + { + tmp_crazyfly_zone_item->setRect(tmp_crazyfly_zone_item->rect().normalized()); + addCrazyFlyZoneToVector(tmp_crazyfly_zone_item); + std::string str = std::to_string(crazyfly_zones.size()); + tmp_crazyfly_zone_item->setLabel(str.c_str()); + setSelectedCrazyFlyZone(crazyfly_zones.size() - 1); //select just created rectangle + tmp_rect = 0; + startedRect = false; + } + int selected_crazyfly_zone = checkSelectedCrazyFlyZone(); + if(selected_crazyfly_zone != -1) + { + emit crazyFlyZoneSelected(selected_crazyfly_zone); + } + break; + } + } + QGraphicsScene::mouseReleaseEvent(mouseEvent); } diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsScene.h b/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsScene.h index 86395f1f76bd535f26760e438ab6ea1bfd583018..3558f01e89781c7ef6bcb2a289bc8974332edaa8 100644 --- a/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsScene.h +++ b/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsScene.h @@ -6,6 +6,7 @@ #include <QGraphicsScene> #include "crazyFlyZone.h" +#include "tablePiece.h" class QGraphicsSceneMouseEvent; class QPointF; @@ -19,15 +20,24 @@ class myGraphicsScene : public QGraphicsScene public: explicit myGraphicsScene(QObject *parent = 0); - std::vector<crazyFlyZone*> rectangles; + std::vector<crazyFlyZone*> crazyfly_zones; + std::vector<tablePiece*> table_pieces; + int getMode(); + + void setMode(int new_mode); + enum {mode_table, mode_crazyfly_zones}; + + void removeTable(); public slots: - void removeRectangle(int index); - void setSelectedRectangle(int index); + void removeCrazyFlyZone(int index); + void setSelectedCrazyFlyZone(int index); + void changeModeTo(int next_mode); signals: - void numRectanglesChanged(int newNum); - void rectangleSelected(int index); + void numCrazyFlyZonesChanged(int newNum); + void crazyFlyZoneSelected(int index); + void modeChanged(int mode); protected: void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) override; @@ -37,18 +47,27 @@ protected: void keyPressEvent(QKeyEvent * keyEvent) override; private: - void addRectangleToVector(crazyFlyZone* rect); - int checkSelectedRectangle(); - void updateIndexesAndLabels(); + void lockTablePieces(void); + void unlockTablePieces(void); + void lockCrazyFlyZones(void); + void unlockCrazyFlyZones(void); + + void addCrazyFlyZoneToVector(crazyFlyZone* rect); + void addTablePieceToVector(tablePiece* rect); + int checkSelectedCrazyFlyZone(); + void updateIndexesAndLabelsCrazyFlyZones(); + void removeTablePiece(int index); QPen* pen; QBrush* brush; QRectF* tmp_rect; - crazyFlyZone* tmp_rect_item; + crazyFlyZone* tmp_crazyfly_zone_item; + tablePiece* tmp_table_piece_item; QPointF* p1; QPointF* p2; bool startedRect; + int mode; }; #endif diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsScene.o b/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsScene.o index 5d619140ad572da8080f2721274ce218e3065965..bcb5bf746bcbdda3e2cb18eb5d5306d2ff5433fb 100644 Binary files a/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsScene.o and b/crazyflie_ws/sandbox/crazypkg/gui/untitled/myGraphicsScene.o differ diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/tablePiece.cpp b/crazyflie_ws/sandbox/crazypkg/gui/untitled/tablePiece.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d38faed9e872ee9649ac49027435aeae3f896b9a --- /dev/null +++ b/crazyflie_ws/sandbox/crazypkg/gui/untitled/tablePiece.cpp @@ -0,0 +1,23 @@ +#include "tablePiece.h" + +tablePiece::tablePiece(const QRectF & rect, QGraphicsItem * parent) + : myGraphicsRectItem(rect, parent) +{ + setLightColor(); + this->setPen(Qt::NoPen); + this->setZValue(-10); +} + +void tablePiece::rectSizeChanged() // pure virtual coming from parent +{ +} + +void tablePiece::setLightColor() +{ + this->setBrush(QColor(123, 209, 226)); //last byte is transparency +} + +void tablePiece::setDarkColor() +{ + this->setBrush(QColor(10, 103, 164)); //last byte is transparency +} diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/tablePiece.h b/crazyflie_ws/sandbox/crazypkg/gui/untitled/tablePiece.h new file mode 100644 index 0000000000000000000000000000000000000000..17d2f1c5899628ea88eb935cde8f2811813596d2 --- /dev/null +++ b/crazyflie_ws/sandbox/crazypkg/gui/untitled/tablePiece.h @@ -0,0 +1,22 @@ +#ifndef TABLEPIECE_H +#define TABLEPIECE_H + + +#include <QGraphicsSimpleTextItem> + +#include "myGraphicsRectItem.h" + +class tablePiece : public myGraphicsRectItem +{ +public: + explicit tablePiece(const QRectF & rect, QGraphicsItem * parent = 0); + void rectSizeChanged(); // pure virtual, need to implement it + void setLightColor(); + void setDarkColor(); +protected: + +private: +}; + + +#endif diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/tablePiece.o b/crazyflie_ws/sandbox/crazypkg/gui/untitled/tablePiece.o new file mode 100644 index 0000000000000000000000000000000000000000..febfd63fdbe0398c5c3ad7cd4401ef6cb4d59f4e Binary files /dev/null and b/crazyflie_ws/sandbox/crazypkg/gui/untitled/tablePiece.o differ diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/ui_mainguiwindow.h b/crazyflie_ws/sandbox/crazypkg/gui/untitled/ui_mainguiwindow.h index 12a04b214644b1509cfb8c1201ee6bf206ca0b44..3ff850827693f2cfae6ce52a2bdb336321aafb5b 100644 --- a/crazyflie_ws/sandbox/crazypkg/gui/untitled/ui_mainguiwindow.h +++ b/crazyflie_ws/sandbox/crazypkg/gui/untitled/ui_mainguiwindow.h @@ -17,6 +17,7 @@ #include <QtWidgets/QHeaderView> #include <QtWidgets/QMainWindow> #include <QtWidgets/QMenuBar> +#include <QtWidgets/QPushButton> #include <QtWidgets/QStatusBar> #include <QtWidgets/QTabWidget> #include <QtWidgets/QToolBar> @@ -33,6 +34,8 @@ public: QTabWidget *tabWidget; QFrame *frame_drawing; myGraphicsView *graphicsView; + QPushButton *drawingModeButton; + QPushButton *removeTable; QFrame *frame_3; QMenuBar *menuBar; QToolBar *mainToolBar; @@ -62,8 +65,14 @@ public: frame_drawing->setFrameShadow(QFrame::Raised); graphicsView = new myGraphicsView(frame_drawing); graphicsView->setObjectName(QStringLiteral("graphicsView")); - graphicsView->setGeometry(QRect(10, 9, 621, 451)); + graphicsView->setGeometry(QRect(10, 9, 571, 401)); graphicsView->setMouseTracking(true); + drawingModeButton = new QPushButton(frame_drawing); + drawingModeButton->setObjectName(QStringLiteral("drawingModeButton")); + drawingModeButton->setGeometry(QRect(20, 430, 141, 21)); + removeTable = new QPushButton(frame_drawing); + removeTable->setObjectName(QStringLiteral("removeTable")); + removeTable->setGeometry(QRect(200, 430, 91, 21)); frame_3 = new QFrame(centralWidget); frame_3->setObjectName(QStringLiteral("frame_3")); frame_3->setGeometry(QRect(669, 21, 541, 469)); @@ -92,6 +101,8 @@ public: void retranslateUi(QMainWindow *MainGUIWindow) { MainGUIWindow->setWindowTitle(QApplication::translate("MainGUIWindow", "MainGUIWindow", 0)); + drawingModeButton->setText(QApplication::translate("MainGUIWindow", "CreateTableMode", 0)); + removeTable->setText(QApplication::translate("MainGUIWindow", "Remove Table", 0)); } // retranslateUi }; diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/untitled b/crazyflie_ws/sandbox/crazypkg/gui/untitled/untitled index 1081258369a864b2a993cf412f67f9b1a6b76b91..490fb173f046308f90293d5d4f698b8c0c9d2d05 100755 Binary files a/crazyflie_ws/sandbox/crazypkg/gui/untitled/untitled and b/crazyflie_ws/sandbox/crazypkg/gui/untitled/untitled differ diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/untitled.pro b/crazyflie_ws/sandbox/crazypkg/gui/untitled/untitled.pro index 72df6e827a015713cb2e02d0fa2fa414bcdf32fa..ae6a159305a57d56544a341f212dc921e1268584 100644 --- a/crazyflie_ws/sandbox/crazypkg/gui/untitled/untitled.pro +++ b/crazyflie_ws/sandbox/crazypkg/gui/untitled/untitled.pro @@ -18,13 +18,15 @@ SOURCES += main.cpp\ myGraphicsRectItem.cpp \ cornergrabber.cpp \ myGraphicsView.cpp \ - crazyFlyZone.cpp + crazyFlyZone.cpp \ + tablePiece.cpp HEADERS += mainguiwindow.h \ myGraphicsScene.h \ myGraphicsRectItem.h \ cornergrabber.h \ myGraphicsView.h \ - crazyFlyZone.h + crazyFlyZone.h \ + tablePiece.h FORMS += mainguiwindow.ui diff --git a/crazyflie_ws/sandbox/crazypkg/gui/untitled/untitled.pro.user b/crazyflie_ws/sandbox/crazypkg/gui/untitled/untitled.pro.user index 15028c2c063040d6fca80d7fa6e87cc965f9d7ed..fec6c73a872a71942754628a0cae632afcb9a9bc 100644 --- a/crazyflie_ws/sandbox/crazypkg/gui/untitled/untitled.pro.user +++ b/crazyflie_ws/sandbox/crazypkg/gui/untitled/untitled.pro.user @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE QtCreatorProject> -<!-- Written by QtCreator 4.0.2, 2017-04-06T16:39:03. --> +<!-- Written by QtCreator 4.0.2, 2017-04-11T15:55:42. --> <qtcreator> <data> <variable>EnvironmentId</variable>