Commit 9e9f3b09 authored by roangel's avatar roangel
Browse files

solved directory problem by adding INCLUDEPATH += 3450PWD/include to...

solved directory problem by adding INCLUDEPATH += 3450PWD/include to CrazyFlyGUI.pro. Now we can freely choose where to locate header and source files for GUI
parent c0760578
......@@ -11,11 +11,27 @@ find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
)
)
## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
#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
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
qt5_wrap_ui(UIS_HDRS gui/untitled/mainguiwindow.ui)
qt5_wrap_cpp(SRC_HDRS gui/untitled/mainguiwindow.h)
## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
......@@ -103,10 +119,10 @@ find_package(catkin REQUIRED COMPONENTS
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES d_fall_gui
# CATKIN_DEPENDS roscpp rospy std_msgs
# DEPENDS system_lib
INCLUDE_DIRS include
LIBRARIES
CATKIN_DEPENDS roscpp rospy std_msgs
DEPENDS
)
###########
......@@ -135,6 +151,8 @@ include_directories(
## The recommended prefix ensures that target names across packages don't collide
# add_executable(${PROJECT_NAME}_node src/d_fall_gui_node.cpp)
add_executable(GUI )
## Rename C++ executable without prefix
## The above recommended prefix causes long target names, the following renames the
## target back to the shorter version for ease of user use
......
......@@ -11,27 +11,29 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = CrazyFlyGUI
TEMPLATE = app
INCLUDEPATH += $$PWD/include
SOURCES += \
../../src/cornergrabber.cpp \
../../src/crazyFlyZone.cpp \
../../src/crazyFlyZoneTab.cpp \
../../src/main.cpp \
../../src/mainguiwindow.cpp \
../../src/myGraphicsRectItem.cpp \
../../src/myGraphicsScene.cpp \
../../src/myGraphicsView.cpp \
../../src/tablePiece.cpp
src/cornergrabber.cpp \
src/crazyFlyZone.cpp \
src/crazyFlyZoneTab.cpp \
src/main.cpp \
src/mainguiwindow.cpp \
src/myGraphicsRectItem.cpp \
src/myGraphicsScene.cpp \
src/myGraphicsView.cpp \
src/tablePiece.cpp
HEADERS += \
../../include/cornergrabber.h \
../../include/crazyFlyZone.h \
../../include/crazyFlyZoneTab.h \
../../include/mainguiwindow.h \
../../include/myGraphicsRectItem.h \
../../include/myGraphicsScene.h \
../../include/myGraphicsView.h \
../../include/tablePiece.h
include/cornergrabber.h \
include/crazyFlyZone.h \
include/crazyFlyZoneTab.h \
include/mainguiwindow.h \
include/myGraphicsRectItem.h \
include/myGraphicsScene.h \
include/myGraphicsView.h \
include/tablePiece.h
FORMS += \
../../src/mainguiwindow.ui
src/mainguiwindow.ui
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.0.2, 2017-04-20T11:30:47. -->
<!-- Written by QtCreator 4.0.2, 2017-04-20T13:52:03. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
......
#include "../../include/cornergrabber.h"
#include "cornergrabber.h"
CornerGrabber::CornerGrabber(QGraphicsItem *parent, int corner) :
QGraphicsItem(parent),
......
#include "../../include/crazyFlyZone.h"
#include "crazyFlyZone.h"
crazyFlyZone::crazyFlyZone(const QRectF & rect, int index, QGraphicsItem * parent)
: myGraphicsRectItem(rect, parent)
......
#include "../../include/crazyFlyZoneTab.h"
#include "crazyFlyZoneTab.h"
#include <QLayout>
......
#include "../../include/mainguiwindow.h"
#include "mainguiwindow.h"
#include "ui_mainguiwindow.h"
#include <QApplication>
......
#include "../../include/mainguiwindow.h"
#include "mainguiwindow.h"
#include "ui_mainguiwindow.h"
#include "../../include/crazyFlyZoneTab.h"
#include "crazyFlyZoneTab.h"
#include <QObject>
#include <QDoubleSpinBox>
......
......@@ -270,7 +270,7 @@
</rect>
</property>
<property name="text">
<string>Fit AllT</string>
<string>Fit All</string>
</property>
</widget>
</widget>
......@@ -316,7 +316,7 @@
<customwidget>
<class>myGraphicsView</class>
<extends>QGraphicsView</extends>
<header>../../include/myGraphicsView.h</header>
<header>./include/myGraphicsView.h</header>
</customwidget>
</customwidgets>
<resources/>
......
#include "../../include/myGraphicsRectItem.h"
#include "myGraphicsRectItem.h"
#include <QGraphicsSceneMouseEvent>
#include <QGraphicsRectItem>
......
#include "../../include/myGraphicsScene.h"
#include "myGraphicsScene.h"
#include <QGraphicsSceneMouseEvent>
#include <QRect>
......
#include "../../include/myGraphicsView.h"
#include "myGraphicsView.h"
#include <QApplication>
#include <QMouseEvent>
......
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