-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to leveraging event filters (#22)
- Loading branch information
1 parent
b0dc097
commit d76fe62
Showing
376 changed files
with
14,835 additions
and
6,851 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,60 @@ | ||
find_package(tesseract_common REQUIRED) | ||
find_package(tesseract_scene_graph REQUIRED) | ||
find_package(tesseract_environment REQUIRED) | ||
find_package(Qt5 COMPONENTS Core Widgets REQUIRED) | ||
|
||
# Load variable for clang tidy args, compiler options and cxx version | ||
tesseract_variables() | ||
|
||
qt5_wrap_cpp(ACM_MODEL_headers_MOC include/tesseract_qt/acm/models/allowed_collision_matrix_model.h) | ||
|
||
add_library(${PROJECT_NAME}_acm_models SHARED ${ACM_MODEL_headers_MOC} src/models/allowed_collision_matrix_model.cpp) | ||
|
||
target_link_libraries( | ||
${PROJECT_NAME}_acm_models | ||
PUBLIC tesseract::tesseract_scene_graph | ||
tesseract::tesseract_common | ||
Qt5::Core | ||
Qt5::Gui | ||
${PROJECT_NAME}_common) | ||
target_include_directories( | ||
${PROJECT_NAME}_acm_models PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>" | ||
"$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/acm>" "$<INSTALL_INTERFACE:include>") | ||
|
||
qt5_wrap_cpp( | ||
ACM_headers_MOC | ||
include/tesseract_qt/acm/allowed_collision_matrix_model.h | ||
include/tesseract_qt/acm/allowed_collision_matrix_widget.h | ||
include/tesseract_qt/acm/allowed_collision_matrix_tree_view.h | ||
include/tesseract_qt/acm/add_allowed_collision_entry_dialog.h) | ||
qt5_wrap_ui(ACM_WIDGET_headers_UI include/tesseract_qt/acm/allowed_collision_matrix_widget.ui | ||
include/tesseract_qt/acm/add_allowed_collision_entry_dialog.ui) | ||
ACM_WIDGET_headers_MOC | ||
include/tesseract_qt/acm/widgets/allowed_collision_matrix_widget.h | ||
include/tesseract_qt/acm/widgets/allowed_collision_matrix_editor_widget.h | ||
include/tesseract_qt/acm/widgets/add_allowed_collision_entry_dialog.h) | ||
|
||
qt5_wrap_ui(ACM_WIDGET_headers_UI include/tesseract_qt/acm/widgets/allowed_collision_matrix_editor_widget.ui | ||
include/tesseract_qt/acm/widgets/add_allowed_collision_entry_dialog.ui) | ||
|
||
add_library( | ||
${PROJECT_NAME}_acm SHARED | ||
${ACM_headers_MOC} | ||
${PROJECT_NAME}_acm_widgets SHARED | ||
${ACM_WIDGET_headers_MOC} | ||
${ACM_WIDGET_headers_UI} | ||
src/allowed_collision_matrix_model.cpp | ||
src/allowed_collision_matrix_widget.cpp | ||
src/allowed_collision_matrix_tree_view.cpp | ||
src/add_allowed_collision_entry_dialog.cpp) | ||
src/widgets/allowed_collision_matrix_widget.cpp | ||
src/widgets/allowed_collision_matrix_editor_widget.cpp | ||
src/widgets/add_allowed_collision_entry_dialog.cpp) | ||
|
||
target_link_libraries( | ||
${PROJECT_NAME}_acm | ||
${PROJECT_NAME}_acm_widgets | ||
PUBLIC tesseract::tesseract_scene_graph | ||
tesseract::tesseract_common | ||
tesseract::tesseract_environment | ||
Qt5::Core | ||
Qt5::Widgets | ||
Qt5::Gui | ||
${PROJECT_NAME}_acm_models | ||
${PROJECT_NAME}_common) | ||
target_include_directories( | ||
${PROJECT_NAME}_acm PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>" | ||
"$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/acm>" "$<INSTALL_INTERFACE:include>") | ||
|
||
${PROJECT_NAME}_acm_widgets PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>" | ||
"$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/acm>" "$<INSTALL_INTERFACE:include>") | ||
add_subdirectory(demo) | ||
|
||
# Mark cpp header files for installation | ||
install(DIRECTORY include/${PROJECT_NAME} DESTINATION include) | ||
|
||
# Install | ||
install_targets(TARGETS ${PROJECT_NAME}_acm) | ||
install_targets(TARGETS ${PROJECT_NAME}_acm_models ${PROJECT_NAME}_acm_widgets) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
add_executable(${PROJECT_NAME}_acm_demo acm_demo.cpp) | ||
target_link_libraries(${PROJECT_NAME}_acm_demo PRIVATE ${PROJECT_NAME}_acm) | ||
target_link_libraries(${PROJECT_NAME}_acm_demo PRIVATE ${PROJECT_NAME}_acm_widgets) | ||
|
||
install_targets(TARGETS ${PROJECT_NAME}_acm_demo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
80 changes: 80 additions & 0 deletions
80
acm/include/tesseract_qt/acm/widgets/allowed_collision_matrix_editor_widget.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/** | ||
* @author Levi Armstrong <[email protected]> | ||
* | ||
* @copyright Copyright (C) 2022 Levi Armstrong <[email protected]> | ||
* | ||
* @par License | ||
* GNU Lesser General Public License Version 3, 29 June 2007 | ||
* @par | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 3 of the License, or (at your option) any later version. | ||
* @par | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* @par | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program; if not, write to the Free Software Foundation, | ||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
#ifndef TESSERACT_QT_ACM_GENERATE_ALLOWED_COLLISION_MATRIX_WIDGET_H | ||
#define TESSERACT_QT_ACM_GENERATE_ALLOWED_COLLISION_MATRIX_WIDGET_H | ||
|
||
#include <tesseract_common/macros.h> | ||
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH | ||
#ifndef Q_MOC_RUN | ||
#include <tesseract_qt/acm/models/allowed_collision_matrix_model.h> | ||
#include <tesseract_common/allowed_collision_matrix.h> | ||
#include <memory> | ||
#endif | ||
TESSERACT_COMMON_IGNORE_WARNINGS_POP | ||
|
||
#include <QWidget> | ||
|
||
namespace Ui | ||
{ | ||
class AllowedCollisionMatrixEditorWidget; | ||
} | ||
|
||
class QItemSelectionModel; | ||
|
||
namespace tesseract_gui | ||
{ | ||
class AddAllowedCollisionEntryDialog; | ||
class AllowedCollisionMatrixEditorWidget : public QWidget | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit AllowedCollisionMatrixEditorWidget(QWidget* parent = nullptr); | ||
explicit AllowedCollisionMatrixEditorWidget(ComponentInfo component_info, QWidget* parent = nullptr); | ||
~AllowedCollisionMatrixEditorWidget(); | ||
|
||
void setComponentInfo(ComponentInfo component_info); | ||
const ComponentInfo& getComponentInfo() const; | ||
|
||
void setModel(std::shared_ptr<AllowedCollisionMatrixModel> model); | ||
std::shared_ptr<AllowedCollisionMatrixModel> getModel(); | ||
std::shared_ptr<const AllowedCollisionMatrixModel> getModel() const; | ||
|
||
QItemSelectionModel& getSelectionModel(); | ||
const QItemSelectionModel& getSelectionModel() const; | ||
|
||
public Q_SLOTS: | ||
void onRemoveButtonClicked(); | ||
void onAddButtonClicked(); | ||
void onGenerateButtonClicked(); | ||
void onApplyButtonClicked(); | ||
|
||
private: | ||
struct Implementation; | ||
std::unique_ptr<Ui::AllowedCollisionMatrixEditorWidget> ui_; | ||
std::unique_ptr<Implementation> data_; | ||
}; | ||
|
||
} // namespace tesseract_gui | ||
|
||
#endif // TESSERACT_QT_ACM_GENERATE_ALLOWED_COLLISION_MATRIX_WIDGET_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.