Skip to content
Snippets Groups Projects
Commit e800a3f0 authored by Jeffrey Fisher's avatar Jeffrey Fisher
Browse files

WIP

parent ef999e78
No related branches found
No related tags found
No related merge requests found
......@@ -12,10 +12,23 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
find_package(rclcpp REQUIRED)
find_package(qt_gui_cpp REQUIRED)
find_package(rqt_gui_cpp REQUIRED)
find_package(Qt5Widgets REQUIRED)
set(qubo_gui_SRCS
src/gui.cpp
)
set(qubo_gui_HEADERS
include/qubo_gui/gui.h
)
set(qubo_gui_UIS
src/gui.ui
)
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
# the following line skips the linter which checks for copyrights
......@@ -28,8 +41,22 @@ if(BUILD_TESTING)
ament_lint_auto_find_test_dependencies()
endif()
add_executable(${PROJECT_NAME} src/main.cpp)
qt5_wrap_cpp(qubo_gui_MOCS ${qubo_gui_HEADERS})
qt5_wrap_ui(qubo_gui_UIS_H ${qubo_gui_UIS})
add_library(${PROJECT_NAME} SHARED
${qubo_gui_SRCS}
${qubo_gui_MOCS}
${qubo_gui_UIS_H}
)
target_include_directories(${PROJECT_NAME} PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
)
target_link_libraries(${PROJECT_NAME} PUBLIC
${rclcpp_TARGETS}
${qt_gui_cpp_TARGETS}
${rqt_gui_cpp_TARGETS}
Qt5::Widgets
......@@ -37,8 +64,22 @@ target_link_libraries(${PROJECT_NAME} PUBLIC
install(
TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}
LIBRARY DESTINATION lib/${PROJECT_NAME}
RUNTIME DESTINATION bin/${PROJECT_NAME}
)
install(
DIRECTORY include/
DESTINATION include/${PROJECT_NAME}
)
install(FILES plugin.xml
DESTINATION share/${PROJECT_NAME}
)
pluginlib_export_plugin_description_file(qubo_gui "plugin.xml")
ament_export_targets(${PROJECT_NAME})
ament_package()
#if !defined(QUBO_GUI_H)
#define QUBO_GUI_H
#include <rqt_qui_cpp/plugin.h>
#include <QWidget>
class QuboWidget : public rqt_gui_cpp::Plugin
{
Q_OBJECT
public:
QuboWidget();
virtual void initPlugin(qt_gui_cpp::PluginContext& context);
virtual void shutdownPlugin();
// virtual void saveSetttings
}
#endif
......@@ -9,10 +9,22 @@
<buildtool_depend>ament_cmake</buildtool_depend>
<depend>rclcpp</depend>
<build_depend>qtbase5-dev</build_depend>
<build_depend>rqt_gui</build_depend>
<build_depend>rqt_gui_cpp</build_depend>
<build_depend>qt_gui_cpp</build_depend>
<exec_depend>rqt_gui</exec_depend>
<exec_depend>rqt_gui_cpp</exec_depend>
<exec_depend>qt_gui_cpp</exec_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<export>
<build_type>ament_cmake</build_type>
<rqt_gui plugi="${prefix}/plugin.xml"/>
</export>
</package>
<library path="qubo_gui">
<class name="qubo_gui/QuboWidget" type="qubo_gui::QuboWidget" base_class_type="rqt_gui_cpp::Plugin">
<description>
A GUI plugin for Qubo.
</description>
<qtgui>
<group>
<label>Qubo</label>
<icon type="theme">folder</icon>
<statustip>Plugins related to Qubo.</statustip>
</group>
<label>Qubo Widget</label>
<icon type="theme">image-x-generic</icon>
<statustip>A GUI plugin for Qubo.</statustip>
</qtgui>
</class>
</library>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QuboWidget</class>
<widget class="QWidget" name="QuboWidget">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>425</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Image View</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,1">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="toolbar_widget" native="true">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QComboBox" name="topics_combo_box">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="refresh_topics_push_button">
<property name="toolTip">
<string>Refresh topics</string>
</property>
<property name="icon">
<iconset theme="view-refresh">
<normaloff>.</normaloff>.</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="zoom_1_push_button">
<property name="toolTip">
<string>Original zoom</string>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="icon">
<iconset theme="zoom-original">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="num_gridlines_spin_box">
<property name="toolTip">
<string># of gridlines to overlay</string>
</property>
<property name="minimum">
<double>0</double>
</property>
<property name="maximum">
<double>20</double>
</property>
<property name="value">
<double>0</double>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="dynamic_range_check_box">
<property name="toolTip">
<string>Dynamic depth range</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="max_range_double_spin_box">
<property name="toolTip">
<string>Max depth</string>
</property>
<property name="suffix">
<string>m</string>
</property>
<property name="minimum">
<double>0.010000000000000</double>
</property>
<property name="maximum">
<double>100.000000000000000</double>
</property>
<property name="value">
<double>10.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="save_as_image_push_button">
<property name="toolTip">
<string>Save as image</string>
</property>
<property name="icon">
<iconset theme="image-x-generic">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QCheckBox" name="publish_click_location_check_box">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="publish_click_location_topic_line_edit">
<property name="toolTip">
<string>Click location topic (leave empty for auto-naming)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="smooth_image_check_box">
<property name="toolTip">
<string>Dynamic depth range</string>
</property>
<property name="text">
<string>Smooth scaling</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="rotate_left_push_button">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset theme="object-rotate-left">
<normaloff/>
</iconset>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="rotate_label">
<property name="text">
<string></string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="rotate_right_push_button">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset theme="object-rotate-right">
<normaloff/>
</iconset>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="color_scheme_combo_box">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="image_layout" stretch="1,0">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>767</width>
<height>650</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="rqt_image_view::RatioLayoutedFrame" name="image_frame">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>80</width>
<height>60</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::ActionsContextMenu</enum>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="lineWidth">
<number>1</number>
</property>
</widget>
</item>
<property name="margin">
<number>1</number>
</property>
</layout>
</widget>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>rqt_image_view::RatioLayoutedFrame</class>
<extends>QFrame</extends>
<header>rqt_image_view/ratio_layouted_frame.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
#include <iostream>
using std::cout;
int main()
{
cout << "hello world\n";
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment