Commit b363e54a authored by roangel's avatar roangel
Browse files

Added svg Crazyfly class, with coordinate system

parent 551b118b
......@@ -30,11 +30,15 @@ set(CMAKE_AUTOMOC ON)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Svg REQUIRED)
# GUI -- Add src and includes
set(MY_LIB_PATH_SRC ${PROJECT_SOURCE_DIR}/GUI_Qt/CrazyFlyGUI/src)
set(MY_LIB_PATH_INC ${PROJECT_SOURCE_DIR}/GUI_Qt/CrazyFlyGUI/include)
# GUI -- Resource file
set(MY_RESOURCE_FILE_QRC ${PROJECT_SOURCE_DIR}/GUI_Qt/CrazyFlyGUI/CrazyFlyGUI.qrc)
# #set the default path for built executables to the "bin" directory
# set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
# #set the default path for built libraries to the "lib" directory
......@@ -56,6 +60,9 @@ set(SRC_HDRS_QOBJECT
qt5_wrap_ui(UIS_HDRS GUI_Qt/CrazyFlyGUI/src/mainguiwindow.ui)
qt5_wrap_cpp(SRC_MOC_HDRS ${SRC_HDRS_QOBJECT})
# GUI -- wrap resource file qrc->rcc
qt5_add_resources(MY_RESOURCE_FILE_RCC ${MY_RESOURCE_FILE_QRC})
## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
......@@ -208,7 +215,7 @@ add_executable(CentralManagerService src/CentralManagerService.cpp)
# Add sources here
# GUI -- Add sources here
set(MY_CPP_SOURCES # compilation of sources
${MY_LIB_PATH_SRC}/mainguiwindow.cpp
${MY_LIB_PATH_SRC}/main.cpp
......@@ -224,8 +231,8 @@ set(MY_CPP_SOURCES # compilation of sources
)
# Add executables here
add_executable(my_GUI ${MY_CPP_SOURCES} ${UIS_HDRS} ${SRC_MOC_HDRS})
# GUI -- Add executables here
add_executable(my_GUI ${MY_CPP_SOURCES} ${UIS_HDRS} ${SRC_MOC_HDRS} ${MY_RESOURCE_FILE_RCC})
qt5_use_modules(my_GUI Widgets)
......@@ -272,10 +279,13 @@ target_link_libraries(CentralManagerService ${catkin_LIBRARIES})
# GUI -- link libraries
target_link_libraries(my_GUI Qt5::Widgets) # GUI -- let my_GUI have acesss to Qt stuff
target_link_libraries(my_GUI Qt5::Svg)
# target_link_libraries(my_library Qt5::Widgets) # GUI -- let my_library have access to Qt stuff
# target_link_libraries(my_GUI my_library)
target_link_libraries(my_GUI ${catkin_LIBRARIES})
#############
## Install ##
#############
......
......@@ -16,6 +16,8 @@ CONFIG += c++11
RESOURCES = CrazyFlyGUI.qrc
QT+= svg
SOURCES += \
src/cornergrabber.cpp \
......@@ -27,7 +29,8 @@ SOURCES += \
src/myGraphicsScene.cpp \
src/myGraphicsView.cpp \
src/tablePiece.cpp \
src/marker.cpp
src/marker.cpp \
src/crazyFly.cpp
HEADERS += \
include/cornergrabber.h \
......@@ -39,7 +42,8 @@ HEADERS += \
include/myGraphicsView.h \
include/tablePiece.h \
include/globalDefinitions.h \
include/marker.h
include/marker.h \
include/crazyFly.h
FORMS += \
src/mainguiwindow.ui
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.0.2, 2017-05-11T12:29:20. -->
<!-- Written by QtCreator 4.0.2, 2017-05-11T18:09:24. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
......
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>images/drone.png</file>
<file>images/drone.png</file>
<file>images/drone.svg</file>
<file>images/drone_fixed.svg</file>
</qresource>
</RCC>
\ No newline at end of file
</RCC>
<?xml version="1.0" encoding="UTF-8"?>
<!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
<g><g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"><path d="M4689,4986.9c-254.7-46-528.5-157-741-300.6c-126.4-86.2-375.3-331.3-469.1-463.4c-677.8-951.6-333.2-2284.3,723.8-2795.5c97.7-45.9,241.3-101.5,319.8-120.6c136-36.4,143.6-40.2,139.8-90c-13.4-174.2-248.9-495.9-448.1-616.6C4105,535.1,3879.1,447,3861.8,462.4c-3.8,5.7-30.6,84.2-55.5,174.2c-26.8,90-70.8,214.5-97.7,275.7c-176.2,398.3-589.7,796.5-1001.4,965c-262.3,107.2-367.6,124.5-731.4,122.5c-308.3,0-348.5-3.8-507.4-53.6C342.5,1601.6-212.8,380,281.2-665.4c109.1-229.8,216.4-379.1,404-561c172.3-164.7,266.2-233.6,457.6-327.4c942.1-472.9,2085.2-82.3,2546.6,871.2c46,97.7,101.5,241.3,120.6,319.8c36.4,137.9,40.2,143.6,91.9,139.8c30.6-1.9,126.4-38.3,210.6-82.3c116.8-57.4,183.8-107.2,271.9-201c116.8-122.5,239.3-340.8,264.2-465.3c11.5-55.5,7.7-59.4-70.8-80.4c-352.3-88.1-630-237.4-878.9-472.9c-271.9-256.6-446.1-543.8-540-888.4c-38.3-139.8-44-203-42.1-495.9c0-308.3,3.8-348.5,53.6-505.5c203-664.4,691.2-1133.5,1367.1-1317.3c220.2-59.3,656.8-59.3,892.3,0c203,51.7,486.4,180,651,298.7c141.7,101.5,379.1,346.6,472.9,490.2c553.4,838.7,365.7,1947.3-428.9,2548.6c-183.8,139.8-442.3,266.1-645.3,319.7c-137.9,36.4-143.6,40.2-139.8,91.9c1.9,30.6,38.3,126.4,82.3,210.6c57.5,116.8,107.2,183.8,199.2,271.9C5746-384,5966.2-259.5,6086.8-236.5c59.4,11.5,61.3,9.6,82.3-70.8c93.8-377.2,241.3-639.5,507.4-909.5c270-271.9,522.7-419.3,880.8-517c109.2-28.7,197.2-36.4,469.1-34.5c308.3,0,348.5,3.8,505.5,53.6c296.8,90,557.2,239.3,773.6,440.4c593.6,555.3,762.1,1438,417.4,2167.5c-109.1,229.8-178,327.4-354.2,513.1c-237.4,245.1-480.6,396.4-798.4,495.9c-748.7,237.4-1581.6-30.6-2058.4-662.5c-139.8-183.8-266.2-442.3-319.8-645.3c-36.4-137.9-40.2-143.6-91.9-139.8c-30.6,1.9-126.4,38.3-210.6,82.3c-116.8,57.5-183.8,107.2-271.9,201.1c-116.8,122.5-239.3,340.8-264.2,465.3c-11.5,55.5-7.7,59.4,70.8,80.4c45.9,11.5,126.4,34.5,180,51.7c499.7,160.8,944,570.6,1148.9,1056.9c114.9,273.8,134,379.1,132.1,748.7c0,308.3-3.8,348.5-53.6,505.5C6544.4,4586.7,5633,5157.3,4689,4986.9z M5403.2,4663.3c180-46,490.2-203,616.6-314c384.9-331.3,570.6-729.5,570.6-1217.8c0-584-302.5-1102.9-806.1-1386.3c-114.9-63.2-327.4-143.6-442.3-164.7c-63.2-11.5-72.8-9.6-80.4,30.6c-38.3,178.1-88.1,754.4-88.1,1034v166.6l74.7,74.7c160.8,160.8,143.6,392.5-40.2,528.5c-53.6,40.2-210.6,65.1-291,44c-68.9-17.2-183.8-124.5-214.5-197.2c-57.4-134-9.6-329.3,97.7-400.2c46-30.6,47.9-38.3,47.9-235.5c0-317.9-63.2-982.3-95.7-1037.8c-19.1-28.7-271.9,40.2-427,118.7c-901.9,451.9-1168,1585.4-562.9,2382c113,147.4,294.9,310.2,461.5,409.8c120.6,72.8,373.4,164.7,528.5,191.5C4895.8,4716.9,5252,4701.6,5403.2,4663.3z M2406.6,1659.1c178.1-49.8,446.1-189.6,585.9-306.4c245.1-201.1,453.8-526.6,526.6-823.3c24.9-101.5,26.8-134,9.6-145.5c-51.7-30.6-744.8-93.8-1058.9-95.7h-166.6l-72.8,76.6c-132.1,137.9-319.8,147.4-467.2,24.9c-76.6-65.1-113-151.3-113-264.2c0-252.8,270-413.6,497.8-296.8c42.1,21.1,90,59.4,107.2,86.2c30.6,46,38.3,47.9,235.5,47.9c317.9,0,982.3-63.2,1037.8-95.7c15.3-9.6,9.6-55.5-19.2-160.8c-135.9-492.1-518.9-899.9-1003.3-1066.5c-698.9-241.3-1468.6,30.6-1859.2,658.7C365.5-249.9,331,314.9,557,797.4c206.8,440.4,584,750.6,1053.1,869.3C1793.9,1714.6,2226.6,1708.9,2406.6,1659.1z M8386.4,1638C9114,1465.7,9638.7,759.1,9590.8,16.2c-13.4-216.4-59.4-390.6-147.5-580.2c-91.9-197.2-157-291-308.3-444.2c-306.4-310.2-681.6-465.3-1122-465.3c-612.7,0-1158.4,340.8-1422.7,886.5c-91.9,191.5-151.3,411.7-116.8,434.7c51.7,30.6,746.8,93.8,1060.8,95.7c166.6,0,170.4-1.9,220.2-59.3c59.3-70.8,180-132.1,262.3-132.1c88.1,0,208.7,65.1,268.1,141.7c55.5,74.7,82.4,212.5,59.3,306.4c-17.2,68.9-124.5,183.8-197.2,214.5c-134,57.4-329.4,9.6-400.2-97.7c-30.6-45.9-38.3-47.9-235.5-47.9c-317.8,0-980.3,61.3-1035.9,95.7c-32.5,19.2,19.1,216.4,107.2,400.2c227.9,484.4,679.7,821.4,1204.4,901.8C7934.5,1687.8,8231.3,1674.4,8386.4,1638z M4742.6-1381.6c24.9-111.1,67-562.9,78.5-863.6l13.4-333.2L4756-2653c-141.7-134-153.2-321.7-28.7-469.1c65.1-76.6,151.3-113,264.2-113c252.8,0,413.6,270,296.8,497.8c-21.1,42.1-59.3,90-86.2,107.2c-45.9,30.6-47.9,38.3-47.9,245.1c0,323.6,61.3,968.9,95.7,1026.3c19.2,32.6,216.4-19.2,400.2-107.2c687.4-323.6,1045.4-1066.5,871.2-1807.5c-44.1-187.6-197.2-486.4-327.4-639.5c-203-243.2-497.8-428.9-806.1-513.2c-201-53.6-585.9-57.4-779.3-7.6c-386.8,101.5-733.3,346.6-942.1,668.2c-195.3,298.7-262.3,549.5-250.8,932.5c9.6,287.2,51.7,446.1,180,691.2c185.7,352.3,559.1,652.9,947.8,764C4706.2-1329.9,4731.1-1331.8,4742.6-1381.6z"/><path d="M5638.7,4200c-13.4-3.8-24.9-32.5-24.9-59.3c0-40.2,26.8-72.8,109.2-137.9c199.1-157,344.7-394.4,388.7-631.9c34.5-180,46-214.5,82.4-237.4c107.2-68.9,132.1,157,46,407.8c-84.3,241.3-227.9,446.1-421.3,597.4C5730.6,4209.5,5692.4,4222.9,5638.7,4200z"/><path d="M5416.6,3853.4c-19.1-19.2-32.6-44-32.6-53.6c0-9.6,51.7-67,114.9-128.3c130.2-124.5,201.1-250.8,235.5-419.3c26.8-128.3,67-174.2,124.5-137.9c80.4,51.7,26.8,321.7-105.3,520.8c-68.9,103.4-235.5,252.8-281.5,252.8C5458.7,3887.9,5433.9,3872.5,5416.6,3853.4z"/><path d="M4158.6,3125.8c-44-34.5-44-40.2-21.1-158.9c34.5-176.1,105.3-310.2,235.5-450c120.6-128.3,187.6-162.8,235.5-122.5c51.7,44,30.6,95.7-82.3,201.1c-122.5,113-208.7,271.9-229.8,425.1C4279.2,3135.4,4223.7,3177.5,4158.6,3125.8z"/><path d="M3739.3,3087.5c-23-44.1,17.2-279.6,72.8-427c82.3-216.4,325.5-520.8,476.8-599.3c49.8-24.9,61.3-24.9,97.7,0c65.1,46,47.9,91.9-65.1,180c-206.8,158.9-352.3,400.2-409.8,679.7c-17.2,84.2-38.3,164.7-46,178.1C3842.7,3133.4,3760.4,3127.7,3739.3,3087.5z"/><path d="M1801.6,1377.6c-310.2-42.1-591.7-203-811.9-459.5c-86.2-101.5-105.3-162.8-63.2-204.9c42.1-42.1,72.8-23,241.2,147.4c139.8,143.6,193.4,183.8,329.3,248.9c107.2,51.7,214.5,86.2,312.1,101.5c111.1,17.2,157,34.5,170.4,59.3C2023.7,1354.6,1950.9,1396.7,1801.6,1377.6z"/><path d="M1767.1,965.9c-162.8-44-319.8-137.9-432.7-260.4c-105.3-114.9-124.5-160.8-82.3-203c46-46,101.5-23,193.4,82.3c105.3,118.7,273.8,212.5,432.7,237.4c130.2,21.1,172.3,78.5,105.3,143.6C1947.1,1002.3,1903,1002.3,1767.1,965.9z"/><path d="M2527.2-387.8c-135.9-135.9-243.2-195.3-419.3-231.7c-126.4-24.9-164.7-63.2-128.3-130.2c38.3-74.7,308.3-19.2,497.8,101.5c120.6,78.5,264.2,237.4,264.2,296.8c0,38.3-46,84.2-84.2,84.2C2651.7-267.2,2592.4-320.8,2527.2-387.8z"/><path d="M2826-644.4c-201-220.2-430.8-340.8-720-379.1c-101.5-13.4-135.9-49.8-109.1-118.7c21.1-57.5,109.1-57.5,312.1-5.7c233.6,59.4,398.3,157,591.7,346.6c153.2,151.3,168.5,174.2,162.8,231.7c-3.8,51.7-15.3,63.2-53.6,68.9C2971.5-496.9,2933.2-527.6,2826-644.4z"/><path d="M7787.1,1369.9c-189.6-34.5-335.1-93.8-497.8-203c-139.8-93.8-292.9-247-344.7-344.7c-23-42.1-23-55.5,1.9-91.9c46-65.1,90-47.9,195.3,82.3c168.5,210.6,442.3,363.8,723.8,404c111.1,17.2,141.7,36.4,141.7,97.6c0,36.4-53.6,90-80.4,82.3C7923,1396.7,7861.8,1383.3,7787.1,1369.9z"/><path d="M7806.2,969.8c-191.5-47.9-371.5-160.8-486.4-306.4c-63.2-78.5-72.7-124.5-36.3-160.8c44-44,95.7-21.1,197.2,88.1c113,122.5,271.9,208.7,425.1,229.8c111,17.2,155.1,70.8,109.1,134C7982.4,1002.3,7946,1004.2,7806.2,969.8z"/><path d="M8556.8-382.1c-124.5-130.2-250.9-201-419.3-235.5c-128.3-26.8-174.2-67-137.9-122.5c17.2-26.8,47.9-34.5,137.9-32.5c160.8,1.9,371.5,103.4,511.2,245.1c120.6,124.5,141.7,172.3,93.8,224c-17.2,19.2-42.1,36.4-53.6,36.4C8677.5-267.2,8618.1-318.9,8556.8-382.1z"/><path d="M8888.1-608c-166.6-208.7-430.8-360-716.1-405.9c-122.5-19.2-164.7-44-164.7-95.7c0-93.8,174.2-97.6,425.1-11.5c195.3,68.9,331.2,155.1,497.8,319.8c151.2,151.3,191.5,224,149.3,275.7C9033.6-470.1,8978.1-493.1,8888.1-608z"/><path d="M5633-1814.3c-36.4-11.5-57.4-42.1-57.4-82.3c0-17.2,51.7-70.8,114.9-120.6c206.8-162.8,356.1-419.3,404-693.2c13.4-72.8,32.6-143.6,42.1-155.1c26.8-36.4,105.3-30.6,126.4,9.6c23,44-17.2,279.6-74.7,430.8C6082.9-2147.5,5746-1776,5633-1814.3z"/><path d="M5387.9-2166.6c-44.1-44-23-95.7,82.3-191.5c118.7-107.2,214.5-283.4,235.5-427c17.2-118.7,72.8-162.8,137.9-109.2c44.1,34.5,44.1,40.2,21.1,158.9c-36.4,183.8-109.1,317.9-250.8,463.4C5489.4-2145.5,5435.8-2118.7,5387.9-2166.6z"/><path d="M4120.3-2900c-59.4-72.8,32.6-382.9,164.7-557.2c61.3-78.5,210.6-199.1,248.9-199.1c15.3,0,40.2,23,57.4,49.8c32.5,47.9,32.5,47.9-86.2,160.8c-128.3,124.5-222.1,291-243.2,438.5c-7.7,47.9-21.1,99.6-30.6,113C4204.6-2861.7,4149-2865.5,4120.3-2900z"/><path d="M3718.2-2919.1c-57.4-68.9,28.7-421.2,157-637.6c76.6-132.1,338.9-400.2,405.9-417.4c105.3-24.9,149.4,95.7,55.5,155.1c-235.5,155.1-413.6,446.1-463.4,754.4c-11.5,67-28.7,132.1-42.1,147.4C3802.5-2882.7,3748.9-2882.7,3718.2-2919.1z"/></g></g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
viewBox="0 0 1000 1000"
enable-background="new 0 0 1000 1000"
xml:space="preserve"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="drone_fixed.svg"><defs
id="defs46"><marker
inkscape:isstock="true"
style="overflow:visible;"
id="marker5021"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow2Mend"><path
transform="scale(0.6) rotate(180) translate(0,0)"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
id="path5023" /></marker><marker
inkscape:stockid="Arrow2Lend"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow2Lend"
style="overflow:visible;"
inkscape:isstock="true"><path
id="path4251"
style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#00ff00;stroke-opacity:1;fill:#00ff00;fill-opacity:1"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="scale(1.1) rotate(180) translate(1,0)" /></marker><marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Lend"
style="overflow:visible;"
inkscape:isstock="true"><path
id="path4233"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#00ff00;stroke-width:1pt;stroke-opacity:1;fill:#00ff00;fill-opacity:1"
transform="scale(0.8) rotate(180) translate(12.5,0)" /></marker><marker
style="overflow:visible"
id="marker4783"
refY="0"
refX="0"
orient="auto"
overflow="visible"><path
style="fill:#009900;fill-rule:evenodd;stroke:#009900;stroke-width:0.625;stroke-linejoin:round"
inkscape:connector-curvature="0"
id="path4785"
d="M 8.7186,4.0337 -2.2074,0.016 8.7186,-4.0017 c -1.7455,2.3721 -1.7355,5.6174 0,8.0354 z"
transform="matrix(-0.3,0,0,-0.3,0.69,0)" /></marker><marker
style="overflow:visible"
id="marker4687-3"
refY="0"
refX="0"
orient="auto"
overflow="visible"><path
style="fill:#009900;fill-rule:evenodd;stroke:#009900;stroke-width:0.625;stroke-linejoin:round"
inkscape:connector-curvature="0"
id="path4689-6"
d="M 8.7186,4.0337 -2.2074,0.016 8.7186,-4.0017 c -1.7455,2.3721 -1.7355,5.6174 0,8.0354 z"
transform="matrix(-0.3,0,0,-0.3,0.69,0)" /></marker><marker
style="overflow:visible"
id="marker4687"
refY="0"
refX="0"
orient="auto"
overflow="visible"><path
style="fill:#009900;fill-rule:evenodd;stroke:#009900;stroke-width:0.625;stroke-linejoin:round"
inkscape:connector-curvature="0"
id="path4689"
d="M 8.7186,4.0337 -2.2074,0.016 8.7186,-4.0017 c -1.7455,2.3721 -1.7355,5.6174 0,8.0354 z"
transform="matrix(-0.3,0,0,-0.3,0.69,0)" /></marker><marker
inkscape:stockid="Arrow2Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow2Lend-3"
style="overflow:visible"
inkscape:isstock="true"><path
inkscape:connector-curvature="0"
id="path4251-6"
style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
transform="matrix(-1.1,0,0,-1.1,-1.1,0)" /></marker></defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1855"
inkscape:window-height="1056"
id="namedview44"
showgrid="false"
inkscape:zoom="4"
inkscape:cx="833.67431"
inkscape:cy="492.65047"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="g8" /><metadata
id="metadata4"> Svg Vector Icons : http://www.onlinewebfonts.com/icon <rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><g
id="g6"><g
transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
id="g8"><path
d="M 464.97859,4111.008 C 282.53677,3848.1414 140.21983,3511.756 79.988655,3200.4597 44.846489,3014.6085 41.524629,2582.7625 75.005732,2385.2846 314.35699,960.8919 1780.623,97.112307 3151.5158,574.24104 c 125.5327,45.28266 299.6696,122.2107 384.9898,174.13714 150.7093,87.06856 160.6749,90.39046 200.8873,43.53428 140.5685,-163.99662 215.923,-651.09103 147.2997,-930.74197 -38.5515,-152.36999 -159.0137,-426.86326 -187.5995,-428.5242 -8.3049,1.66094 -100.3562,46.85618 -200.7998,103.76545 -102.1044,55.24832 -249.4041,125.62001 -326.4196,155.60446 -502.2178,194.15591 -1211.7917,180.78091 -1718.9922,-31.82024 -323.0105,-135.58568 -430.1853,-212.51372 -746.46435,-532.28966 -269.5105,-269.5104 -301.33071,-307.9744 -396.70394,-490.4162 -682.99874,-1285.4853 -100.531,-2838.8199 1245.18529,-3320.8441 296.2603,-105.5138 520.5755,-142.2295 843.586,-137.2467 294.5995,6.6439 436.9163,28.4984 686.2331,113.8186 1236.9681,410.1665 1894.7904,1750.8999 1464.6052,2987.7805 -45.1952,125.62 -122.2107,299.6698 -174.1372,384.99 -88.7294,152.3699 -90.3904,160.6747 -41.8734,202.548 28.4111,25.0891 143.978,77.0155 256.0481,112.1576 152.2826,51.92648 254.3872,66.96234 413.4009,61.97953 209.1919,-4.98281 507.1132,-88.72943 637.716,-175.79803 58.5703,-38.4641 58.6577,-45.1953 8.3922,-132.1765 -230.959,-384.9898 -343.204,-758.2657 -354.918,-1181.7196 -13.3751,-462.0055 85.4076,-865.3531 304.5651,-1248.6821 88.7295,-155.6919 138.995,-215.923 396.7038,-470.3101 269.5107,-269.5104 307.9747,-301.3307 488.7555,-395.0431 758.2658,-403.3477 1595.1206,-386.6508 2346.6552,43.5343 244.3338,140.6559 626.0019,522.324 780.0329,780.0328 132.2638,222.6544 267.8495,582.5553 307.9745,830.2112 35.1421,212.601 28.4107,634.394 -15.1235,841.9249 -249.4041,1216.9494 -1382.6068,2021.983899 -2602.8779,1853.00444 -282.8855,-38.46402 -619.2708,-154.03092 -843.586,-284.63377 -152.37,-88.7295 -160.6748,-90.39046 -202.548,-41.87333 -25.0892,28.41093 -77.0156,143.97784 -112.1576,256.04801 -51.839,152.36999 -66.9625,254.387074 -63.5531,411.82732 7.3431,210.85279 91.0024,512.18344 176.3226,637.71604 41.8733,61.97952 45.1952,61.97952 133.8372,10.05309 411.74,-247.74329 769.9799,-348.09941 1238.629,-351.50873 473.7195,-1.66094 823.4799,90.39046 1221.9322,318.02755 120.5497,70.37168 204.209,140.56852 440.2383,379.91968 269.5104,269.5104 301.3306,307.9744 395.0429,488.7554 180.7809,338.1337 277.9027,696.2861 291.2777,1061.2574 33.4808,1004.348 -590.8599,1923.2885 -1529.9067,2259.6739 -296.2604,105.5138 -441.8118,130.6029 -758.1783,138.9076 -421.793,6.7312 -766.658,-73.6062 -1131.4543,-264.4402 C 5692.5017,4360.4123 5198.6761,3398.0249 5334.2617,2428.819 c 38.464,-282.8855 153.9436,-619.3583 284.5464,-843.6735 88.7295,-152.3699 90.3904,-160.6747 41.8734,-202.548 -28.411,-25.089 -143.9778,-77.0154 -256.0481,-112.1576 -152.37,-51.8391 -254.3869,-66.9624 -413.4882,-61.8921 -209.1918,4.9828 -507.1132,88.7294 -637.7161,175.7981 -58.5701,38.464 -58.6575,45.1952 -8.3921,132.1763 30.0719,50.1781 80.3373,140.6559 112.1576,202.5481 296.2604,577.3975 326.4198,1324.0366 80.4247,1928.2715 -138.9075,339.7946 -214.262,448.5429 -539.0208,769.9798 -269.5104,269.5104 -307.9744,301.3307 -488.7553,395.043 C 2436.7843,5383.1182 1141.2461,5085.1969 464.97859,4111.008 Z m 907.22651,341.4556 c 197.5651,117.1406 605.9831,251.0653 813.5139,264.5278 626.0895,46.8561 1136.5247,-138.9077 1563.3879,-565.7709 510.5225,-510.5225 699.6955,-1228.5759 507.2006,-1916.5576 -45.1953,-155.6918 -160.6748,-411.7397 -242.673,-530.6286 -45.1952,-65.3013 -55.2484,-72.0326 -97.0342,-43.5342 -189.1731,122.2106 -736.4987,582.4677 -980.9201,826.8891 l -145.6388,145.6388 0,130.6029 c 0,281.137 -217.5839,468.649 -497.1476,426.8632 -81.9982,-11.714 -241.012,-127.1936 -292.851,-215.9231 -45.1953,-75.2672 -51.8391,-269.5104 -15.1234,-359.9008 66.9624,-167.3186 279.4761,-296.2604 435.2555,-264.4402 66.9624,13.4623 75.3545,8.3921 247.7432,-163.9967 277.9026,-277.9026 803.4611,-913.9576 823.5672,-990.8857 8.3923,-41.7859 -272.8323,-202.54804 -477.0412,-269.51041 C 1830.9759,532.45513 607.47037,1290.7209 440.0643,2516.0623 c -30.07182,227.6371 -13.37488,528.9677 45.19521,761.6752 41.78595,169.0668 182.44192,470.3974 294.59952,629.4112 101.9297,148.6111 426.68837,446.6198 592.34607,545.3149 z m 6.6437,-5245.79348 c 199.2261,112.15759 555.7178,224.22781 780.0329,244.334 390.0602,38.46403 857.0485,-63.64048 1180.0588,-259.36986 110.4967,-66.96238 140.5686,-93.71237 135.5858,-118.80138 -18.4453,-71.9453 -569.0927,-733.08938 -842.0126,-1009.33098 l -145.6388,-145.6389 -130.6028,3.322 c -236.0292,5.0703 -408.418,-150.7091 -430.1851,-386.6509 -10.0531,-123.8716 33.4812,-231.0464 132.1763,-329.7416 220.9934,-220.9932 597.5911,-125.5326 694.6253,175.7107 18.3579,55.2483 26.75,130.6029 18.3579,169.0669 -13.4625,66.9623 -8.3922,75.3546 163.9966,247.7432 277.9025,277.9027 913.9576,803.4611 990.8857,823.5673 21.7672,4.9828 56.9093,-40.125 123.7843,-157.3528 311.3837,-548.9867 333.0634,-1240.29 55.2483,-1809.3827 -400.0259,-821.9063 -1310.5742,-1257.0744 -2201.1039,-1049.456 -640.6882,148.8733 -1164.58571,612.4522 -1388.81347,1231.8105 -204.20888,565.7707 -145.63879,1166.6837 160.67475,1680.528 118.80137,202.5481 502.04302,575.82395 702.93002,689.64252 z m 5245.881,5208.99058 c 786.6767,485.4334 1863.0574,326.4196 2470.6143,-364.8838 177.4589,-200.8871 289.529,-393.3821 378.2587,-636.1425 92.0513,-252.7261 117.1404,-391.6338 118.8014,-657.8222 C 9595.726,2217.7914 9403.3185,1754.2125 9018.3286,1369.2224 8482.717,833.61096 7707.7543,654.49099 6999.6666,900.48591 6751.9233,987.55447 6507.502,1128.123 6517.5551,1178.3885 c 18.4451,71.9452 570.841,734.8377 843.6733,1010.9919 145.6388,145.6388 150.6216,147.2998 244.3341,140.656 113.731,-10.0532 272.8322,41.8732 344.7774,113.8184 77.0155,77.0156 125.5326,239.3512 110.4967,358.2401 -16.7843,113.8186 -113.7311,257.7963 -216.0105,319.6884 -75.2671,45.1952 -269.5104,51.839 -359.9009,15.1234 -167.3184,-66.9624 -296.3478,-279.5636 -264.4402,-435.2554 13.3751,-66.8751 8.3923,-75.3545 -163.9966,-247.7433 -277.8151,-277.8152 -910.5483,-803.3736 -989.2247,-821.9063 -45.1952,-11.6266 -172.4762,205.87 -256.1355,443.5601 -224.2277,622.6802 -123.8716,1312.2352 264.5276,1841.203 110.4967,147.387 381.668,395.1305 549.074,498.8959 z m -545.6646,-5825.0269 c 118.8887,-75.3546 550.6475,-433.507 823.5671,-686.3205 l 302.9916,-279.5636 -3.4093,-133.8373 c -6.7312,-241.012 147.2998,-415.1492 384.99,-435.168 123.8717,-10.053 231.0465,33.4812 329.7415,132.1764 220.9934,220.9933 125.5327,597.5911 -175.7106,694.6253 -55.2483,18.3579 -130.5155,26.8374 -169.0669,18.3579 -66.875,-13.3751 -75.3545,-8.3922 -256.1354,172.3887 -282.8854,282.8854 -793.4079,900.5826 -813.5142,980.83259 -11.7139,45.28263 205.9575,172.38876 443.5602,256.13551 883.7985,318.02751 1846.1858,-18.44534 2341.6724,-818.4969 125.4452,-202.5481 252.8135,-597.5911 272.8322,-845.247 35.1422,-390.0602 -60.2311,-810.1049 -256.0479,-1153.3088 -128.8545,-222.5669 -462.0054,-562.3615 -674.6066,-687.8941 -426.8633,-249.4043 -944.0296,-338.0464 -1407.6958,-239.4385 -431.8462,90.3904 -709.6612,251.0651 -1034.4201,595.93 -242.6729,259.4574 -344.7774,435.168 -446.882,761.5877 -145.6388,470.3101 -81.9983,1059.509 160.6747,1496.4255 100.4435,184.1902 123.8717,204.2963 177.4591,170.8151 z"
id="path10"
inkscape:connector-curvature="0" /><path
d="m 1983.0837,4253.325 c -8.3922,-15.0359 6.6437,-50.1781 30.0718,-73.6062 35.1422,-35.1422 87.0686,-40.2124 216.0106,-25.089 311.2963,36.8031 646.1081,-43.4468 892.1904,-212.6012 187.5121,-127.1934 227.7246,-147.2997 279.5636,-135.4983 153.9434,33.4812 -21.7673,252.7261 -316.2791,396.7041 -284.6339,137.2466 -589.1991,190.7465 -890.5297,153.9434 -138.995,-15.2107 -184.1028,-36.8905 -211.0276,-103.8528 z"
id="path12"
inkscape:connector-curvature="0" /><path
d="m 2091.9194,3756.1774 c 0.087,-33.4812 9.9656,-66.9624 18.3578,-75.3544 8.3921,-8.3922 103.7655,-13.375 212.6011,-11.714 222.6543,4.9828 395.0431,-43.447 572.4146,-160.6749 135.5857,-88.7294 210.8529,-93.7123 229.3855,-11.714 25.089,115.4795 -257.7963,304.6525 -547.3255,363.2229 -150.6216,30.1592 -426.8633,15.1232 -467.0757,-25.0892 -11.7141,-11.714 -19.9314,-46.856 -18.3578,-78.6764 z"
id="path14"
inkscape:connector-curvature="0" /><path
d="m 1628.2531,2020.401 c -8.3048,-68.6233 -3.322,-73.6062 120.4623,-157.3528 184.1029,-123.7844 363.2227,-179.1201 599.2521,-187.5123 217.5838,-6.7312 306.3134,21.6798 312.9572,98.7826 6.7312,83.6594 -56.9094,110.4094 -247.7434,103.853 -205.8698,-8.3048 -420.132,55.2482 -572.5019,170.7279 -115.3922,85.3201 -200.7124,73.6059 -212.4263,-28.4984 z"
id="path16"
inkscape:connector-curvature="0" /><path
d="m 1295.1896,1620.3751 c 18.4451,-58.6577 259.4574,-229.3855 436.9163,-309.6354 261.1183,-117.2279 739.8206,-170.7278 940.7076,-107.0873 65.3014,21.7671 75.3546,31.8202 85.4077,85.4075 16.6969,97.1217 -38.4641,122.2108 -214.2621,100.4436 -319.6884,-41.8733 -657.8222,41.8733 -952.4217,235.9418 -88.6421,58.5702 -177.459,110.4967 -195.9043,115.4795 -50.178,9.9658 -117.1404,-66.9623 -100.4435,-120.5497 z"
id="path18"
inkscape:connector-curvature="0" /><path
d="m 1096.0508,-1568.2926 c -234.36826,-307.9744 -339.79476,-694.7126 -308.06185,-1111.4353 13.37488,-164.0841 50.26555,-234.3684 123.87161,-234.3684 73.60617,0 83.74674,43.5343 81.99835,339.7073 -3.32184,247.7433 8.39219,329.7416 70.28419,505.4522 48.5172,138.9076 112.1576,262.8668 184.1028,361.5618 82.0858,112.1576 107.0874,167.406 97.1217,200.7999 -35.0547,112.3323 -135.4983,85.4949 -249.3168,-61.7175 z"
id="path20"
inkscape:connector-curvature="0" /><path
d="m 1425.7923,-1958.3526 c -103.8528,-180.781 -159.0136,-400.1133 -150.6216,-605.8959 8.3923,-192.495 31.7329,-249.4042 105.5138,-249.4042 80.4248,0 108.8358,68.6233 97.1218,241.0121 -11.7142,195.8169 53.5873,425.1149 170.7278,585.7896 95.3733,132.2637 81.9982,219.245 -33.4812,217.584 -63.7279,0.087 -102.2794,-38.464 -189.2606,-189.0856 z"
id="path22"
inkscape:connector-curvature="0" /><path
d="m 3273.639,-2477.2673 c 0,-237.6028 -41.8732,-383.329 -163.9966,-569.0927 -88.7294,-132.2639 -88.7294,-199.2263 1.661,-225.9762 98.7826,-31.8202 286.2948,252.7261 346.4384,523.8975 36.8032,174.0497 23.4282,438.4898 -28.4983,490.4163 -33.481,33.4812 -113.8185,33.3937 -147.2122,0 -4.9828,-4.9828 -9.9658,-103.6781 -8.3923,-219.2449 z"
id="path24"
inkscape:connector-curvature="0" /><path
d="m 3759.16,-2440.3769 c 16.7843,-368.2055 -78.6764,-674.5191 -298.0088,-960.8138 -77.0154,-100.4435 -75.2672,-162.3356 8.3922,-199.1388 68.7107,-31.8202 145.6387,45.1078 277.8151,267.8496 152.2826,256.1354 210.9403,485.4334 214.2622,820.2453 1.6609,266.1884 -4.9829,299.5823 -60.2312,344.8648 -48.5172,41.8735 -68.6234,41.8735 -107.0874,13.3751 -36.8905,-30.2466 -43.5343,-90.5654 -35.1421,-286.3822 z"
id="path26"
inkscape:connector-curvature="0" /><path
d="m 6335.2006,3657.3948 c -135.5858,-195.9042 -210.9402,-374.9369 -257.709,-612.6269 -40.2124,-204.209 -40.125,-471.9712 0,-602.6613 16.697,-56.9094 28.411,-68.6234 81.9982,-78.6764 97.1218,-16.697 120.5499,36.803 98.7828,242.6729 -36.8032,331.4026 68.6233,704.6785 279.5635,985.9028 82.0857,112.1577 92.0514,155.692 38.5514,209.1919 -31.8202,31.8203 -125.5327,31.8203 -142.2295,1.661 -3.5841,-3.2344 -45.3699,-68.4485 -98.9574,-145.464 z"
id="path28"
inkscape:connector-curvature="0" /><path
d="m 6701.6579,3324.3313 c -125.5327,-209.2792 -184.1903,-465.3272 -157.353,-693.0517 13.3751,-123.8716 45.2828,-172.3888 108.8358,-172.3014 76.928,0 102.1045,65.214 95.3733,249.4042 -8.3047,205.8701 55.2483,420.1321 170.7277,572.5021 81.9985,112.0702 73.6936,197.4779 -21.767,212.5137 -70.1968,13.3749 -103.678,-16.7843 -195.8168,-169.0669 z"
id="path30"
inkscape:connector-curvature="0" /><path
d="m 8539.6263,2798.6854 c 4.9829,-222.6542 -43.6218,-395.0429 -160.6747,-572.4145 -88.7296,-135.5857 -93.7124,-210.8527 -13.4625,-227.6372 38.4641,-8.392 72.0327,11.714 148.9607,92.139 138.9076,142.2294 234.3682,415.1491 232.6199,661.1441 -3.4093,214.2621 -26.75,274.4933 -113.8185,277.8151 -31.8202,1.7484 -68.6234,-4.9828 -78.6764,-15.036 -9.8782,-10.053 -16.6094,-107.1747 -14.9485,-216.0105 z"
id="path32"
inkscape:connector-curvature="0" /><path
d="m 9026.7207,2890.8243 c 36.803,-328.0807 -61.8921,-691.3033 -271.1714,-980.8326 -90.3031,-123.8716 -105.5138,-182.4418 -60.3185,-227.637 81.9982,-81.9983 237.6027,66.9624 381.6679,361.5617 110.4967,230.959 153.9436,425.115 155.6044,714.7315 -0.087,264.4402 -28.4109,363.2228 -110.4966,371.5275 -88.642,8.3923 -117.053,-60.2311 -95.2858,-239.3511 z"
id="path34"
inkscape:connector-curvature="0" /><path
d="m 7235.6958,-1009.2529 c -21.7672,-41.8734 -13.3749,-86.9811 21.7672,-122.1233 15.036,-15.0359 107.0872,-16.6968 205.87,-4.9828 323.0977,38.464 677.8409,-55.2483 959.1528,-252.8136 75.3546,-51.9263 154.031,-97.0343 172.3888,-98.7826 55.2484,-8.3922 118.8014,65.3014 102.1045,118.8888 -18.3578,58.5702 -259.4573,229.3855 -441.8992,311.2964 -334.8118,150.53413 -954.0826,180.7809 -1019.3841,48.5171 z"
id="path36"
inkscape:connector-curvature="0" /><path
d="m 7329.4081,-1531.4894 c -0.087,-77.0156 63.5531,-103.7655 239.3512,-95.4608 197.4778,10.0532 435.2555,-60.2312 579.1458,-167.4059 118.8014,-88.7295 205.9574,-78.6764 216.0105,25.0891 8.3921,68.7108 3.4093,73.6936 -120.4623,157.3528 -192.495,128.8544 -373.2759,182.5293 -624.3411,185.8512 -219.4198,1.7484 -289.7041,-21.6798 -289.7041,-105.4264 z"
id="path38"
inkscape:connector-curvature="0" /><path
d="m 6862.4199,-3280.7284 c 11.714,-115.5669 363.2229,-306.2261 631.0723,-343.1166 122.2107,-15.0359 358.1525,10.0532 391.6337,43.5343 13.375,13.375 15.036,55.2484 6.6438,93.7124 -13.4624,70.2843 -13.4624,70.2843 -215.923,65.2141 -220.9933,-3.322 -448.5429,60.231 -595.9301,170.7277 -48.6046,35.1421 -105.5138,68.6233 -125.5327,72.0326 -51.7516,5.0702 -97.0342,-46.8561 -91.964,-102.1045 z"
id="path40"
inkscape:connector-curvature="0" /><path
d="m 6527.6081,-3648.9339 c 10.0531,-110.4092 393.2947,-343.1166 694.6254,-420.1321 182.4417,-48.5172 646.1082,-53.5874 719.7143,-10.0532 113.8186,70.2843 46.9435,214.2622 -87.0687,184.1029 -341.4555,-70.2843 -751.5345,28.411 -1064.5792,254.3871 -68.6233,48.5171 -140.5686,90.3903 -165.6575,92.0513 -55.1609,5.1578 -102.0171,-41.6985 -97.0343,-100.356 z"
id="path42"
inkscape:connector-curvature="0" /><path
style="fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:#00ff00;stroke-width:90;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:"
d="m 4996.3215,81.120533 0,3850.136467"
id="path3406"
inkscape:connector-curvature="0" /><path
style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:90;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:"
d="m 4951.2417,121.33711 3850.1363,0"
id="path3406-7"
inkscape:connector-curvature="0" /><path
sodipodi:type="star"
style="fill:#00ff00;fill-opacity:1;stroke:#00ff00;stroke-width:46.40126038;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path5605"
sodipodi:sides="3"
sodipodi:cx="4989.355"
sodipodi:cy="-3969.6777"
sodipodi:r1="240.85985"
sodipodi:r2="120.42993"
sodipodi:arg1="-1.5707963"
sodipodi:arg2="-0.52359878"
inkscape:flatsided="true"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 4989.355,-4210.5376 208.5907,361.2898 -417.1815,0 z"
transform="scale(1,-1)"
inkscape:transform-center-y="-6.0215087" /><path
sodipodi:type="star"
style="fill:#ff0000;fill-opacity:1;stroke:#ff0000;stroke-width:46.40126038;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path5605-3"
sodipodi:sides="3"
sodipodi:cx="9319.668"
sodipodi:cy="-68.642883"
sodipodi:r1="240.85985"
sodipodi:r2="120.42993"
sodipodi:arg1="-1.5707963"
sodipodi:arg2="-0.52359878"
inkscape:flatsided="true"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 9319.668,-309.50273 208.5907,361.289776 -417.1815,-1.1e-5 z"
transform="matrix(0,-1,-1,0,8848.5252,9443.3107)"
inkscape:transform-center-x="-6.0215077" /></g></g></svg>
\ No newline at end of file
#ifndef CRAZYFLY_H
#define CRAZYFLY_H
#include "globalDefinitions.h"
#include <QGraphicsSvgItem>
#include <QSvgRenderer>
#define DRONE_HEIGHT 100 * FROM_MILIMETERS_TO_UNITS
#define DRONE_WIDTH 100 * FROM_MILIMETERS_TO_UNITS
class crazyFly : public QGraphicsSvgItem
{
public:
explicit crazyFly(QPointF position, QGraphicsItem * parent = 0);
~crazyFly();
QRectF boundingRect() const;
void paint(QPainter * painter,
const QStyleOptionGraphicsItem * option,
QWidget * widget);
private:
qreal m_width;
qreal m_height;
};
#endif
......@@ -7,6 +7,7 @@
#include <QGridLayout>
#include <QGraphicsRectItem>
#ifdef CATKIN_MAKE
#include "rosNodeThread.h"
#include "d_fall_pps/UnlabeledMarker.h"
......@@ -18,7 +19,7 @@
#include "globalDefinitions.h"
#include "marker.h" // temporal, just to check
#include "crazyFly.h"
namespace Ui {
class MainGUIWindow;
......@@ -108,7 +109,8 @@ private:
void _init();
std::vector<Marker*> markers_vector;
QGraphicsPixmapItem* drone_image;
crazyFly* crazyFly_1;
#ifdef CATKIN_MAKE
rosNodeThread* _rosNodeThread;
......
#include "crazyFly.h"
#include <QPen>
#include <QBrush>
crazyFly::crazyFly(QPointF position, QGraphicsItem * parent)
: QGraphicsSvgItem(":/images/drone_fixed.svg")
{
m_width = DRONE_WIDTH;
m_height = DRONE_HEIGHT;
this->setPos(position);
}
crazyFly::~crazyFly()
{
}
QRectF crazyFly::boundingRect() const
{
// return QRectF(-original_width/2, -original_height/2, original_width, original_height);
return QRectF(-m_width/2, -m_height/2, m_width, m_height);
}
void crazyFly::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
this->renderer()->render(painter,this->boundingRect());
}
......@@ -70,10 +70,22 @@ void MainGUIWindow::_init()
ui->graphicsView->setScene(scene);
QPixmap pixmap(":/images/drone.png");
drone_image = new QGraphicsPixmapItem(pixmap);
drone_image->setPos(0,0);
scene->addItem(drone_image);
// QPixmap pixmap(":/images/drone.png");
// drone_image = new QGraphicsPixmapItem(pixmap);
// drone_image->setPos(-200,200);
// drone_image_svg->setTransformOriginPoint(b_rect.width()/2, b_rect.height()/2);
// // drone_image_svg->setScale(0.25);
// drone_image_svg->setRotation(20);
// scene->addItem(drone_image_svg);
// scene->addItem(drone_image);
crazyFly_1 = new crazyFly(QPointF(50,50));
// crazyFly_1->setRotation(45);
// crazyFly_1->setPos(0,0);
scene->addItem(crazyFly_1);
QObject::connect(ui->tabWidget, SIGNAL(tabCloseRequested(int)), scene, SLOT(removeCrazyFlyZone(int)));
QObject::connect(scene, SIGNAL(numCrazyFlyZonesChanged(int)), this, SLOT(set_tabs(int)));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment