Skip to content

Commit

Permalink
Rename C++ directory modmesh/view/ to modmesh/pilot/ and the exte…
Browse files Browse the repository at this point in the history
…nsion module name `_modmesh.view` to `_modmesh.pilot`
  • Loading branch information
yungyuc committed Dec 26, 2024
1 parent 446852d commit 446f2ae
Show file tree
Hide file tree
Showing 36 changed files with 78 additions and 82 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/devbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ jobs:
- name: make pytest BUILD_QT=OFF
run: |
python3 -c "import modmesh; assert modmesh.HAS_VIEW == False"
python3 -c "import modmesh; assert modmesh.HAS_PILOT == False"
make pytest VERBOSE=1
- name: make buildext BUILD_QT=ON USE_PYTEST_HELPER_BINDING=OFF
Expand All @@ -234,7 +234,7 @@ jobs:
- name: make pytest BUILD_QT=ON USE_PYTEST_HELPER_BINDING=ON
run: |
python3 -c "import modmesh; assert modmesh.HAS_VIEW == True"
python3 -c "import modmesh; assert modmesh.HAS_PILOT == True"
make pytest VERBOSE=1
- name: make pilot
Expand Down Expand Up @@ -614,7 +614,7 @@ jobs:
cmake --build build --config Release --target pilot
# Deploy the Qt environment for the pilot executable and copy necessary files
Copy-Item -Path ".\build\cpp\binary\viewer\Release\pilot.exe" -Destination $destination
Copy-Item -Path ".\build\cpp\binary\pilot\Release\pilot.exe" -Destination $destination
windeployqt --release "$destination\pilot.exe"
Copy-Item -Path ".\modmesh" -Destination $destination -Recurse
# PUI is necessary
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ endif()

add_subdirectory(cpp/binary/pymod_modmesh)
if(BUILD_QT)
add_subdirectory(cpp/binary/viewer)
add_subdirectory(cpp/binary/pilot)
endif()

add_custom_target(flake8)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
# get the root of the modmdesh project
set(PROJECT_ROOT_DIR ${PROJECT_SOURCE_DIR}/../../../)

if(NOT DEFINED INSTALL_VIEWERDIR)
set(INSTALL_VIEWERDIR "pilot")
if(NOT DEFINED INSTALL_PILOTDIR)
set(INSTALL_PILOTDIR "pilot")
endif()

set(CMAKE_AUTOMOC ON)
Expand All @@ -27,19 +27,19 @@ find_package(Qt6 COMPONENTS 3DExtras)

if(APPLE)
set(MACOSX_BUNDLE_ICON_FILE solvcon.icns)
set(app_icon_macos ${PROJECT_ROOT_DIR}/resources/viewer/solvcon.icns)
set(app_icon_macos ${PROJECT_ROOT_DIR}/resources/pilot/solvcon.icns)
set_source_files_properties(${app_icon_macos} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")

qt_add_executable(
pilot
MACOSX_BUNDLE
viewer.cpp
pilot.cpp
${app_icon_macos}
)
else()
qt_add_executable(
pilot
viewer.cpp
pilot.cpp
)
endif()

Expand All @@ -59,9 +59,9 @@ endif(WIN32)
qt_add_resources(
pilot "app_icon"
PREFIX "/"
BASE ${PROJECT_ROOT_DIR}/resources/viewer
BASE ${PROJECT_ROOT_DIR}/resources/pilot
FILES
${PROJECT_ROOT_DIR}/resources/viewer/icon.ico
${PROJECT_ROOT_DIR}/resources/pilot/icon.ico
)

if(HIDE_SYMBOL)
Expand All @@ -86,7 +86,7 @@ endif()
# See https://gitlab.kitware.com/cmake/cmake/-/merge_requests/777
file(WRITE "${pilot_BINARY_DIR}/.rcc/.clang-tidy" "---
Checks: '-*,llvm-twine-local'")
file(WRITE "${pilot_BINARY_DIR}/viewer_autogen/.clang-tidy" "---
file(WRITE "${pilot_BINARY_DIR}/pilot_autogen/.clang-tidy" "---
Checks: '-bugprone-suspicious-include,llvm-twine-local'")

set_target_properties(
Expand All @@ -111,7 +111,7 @@ endif()
add_custom_target(run_pilot_pytest $<TARGET_FILE:pilot> --mode=pytest)

install(TARGETS pilot
RUNTIME DESTINATION "${INSTALL_VIEWERDIR}"
BUNDLE DESTINATION "${INSTALL_VIEWERDIR}"
LIBRARY DESTINATION "${INSTALL_VIEWERDIR}"
RUNTIME DESTINATION "${INSTALL_PILOTDIR}"
BUNDLE DESTINATION "${INSTALL_PILOTDIR}"
LIBRARY DESTINATION "${INSTALL_PILOTDIR}"
)
File renamed without changes.
4 changes: 2 additions & 2 deletions cpp/modmesh/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ add_subdirectory(onedim)
add_subdirectory(multidim)
add_subdirectory(python)
add_subdirectory(spacetime)
add_subdirectory(view)
add_subdirectory(pilot)
add_subdirectory(inout)
add_subdirectory(serialization)
add_subdirectory(transform)
Expand Down Expand Up @@ -98,7 +98,7 @@ set(MODMESH_TERMINAL_FILES
CACHE FILEPATH "" FORCE)

set(MODMESH_GRAPHIC_FILES
${MODMESH_VIEW_FILES}
${MODMESH_PILOT_FILES}
CACHE FILEPATH "" FORCE)

if (BUILD_QT)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

cmake_minimum_required(VERSION 3.16)

set(MODMESH_VIEW_PYMODHEADERS
set(MODMESH_PILOT_PYMODHEADERS
${CMAKE_CURRENT_SOURCE_DIR}/R3DWidget.hpp
${CMAKE_CURRENT_SOURCE_DIR}/RWorld.hpp
${CMAKE_CURRENT_SOURCE_DIR}/RManager.hpp
Expand All @@ -13,12 +13,12 @@ set(MODMESH_VIEW_PYMODHEADERS
${CMAKE_CURRENT_SOURCE_DIR}/RPythonConsoleDockWidget.hpp
${CMAKE_CURRENT_SOURCE_DIR}/RStaticMesh.hpp
${CMAKE_CURRENT_SOURCE_DIR}/RAction.hpp
${CMAKE_CURRENT_SOURCE_DIR}/view.hpp
${CMAKE_CURRENT_SOURCE_DIR}/wrap_view.hpp
${CMAKE_CURRENT_SOURCE_DIR}/pilot.hpp
${CMAKE_CURRENT_SOURCE_DIR}/wrap_pilot.hpp
CACHE FILEPATH "" FORCE
)

set(MODMESH_VIEW_PYMODSOURCES
set(MODMESH_PILOT_PYMODSOURCES
${CMAKE_CURRENT_SOURCE_DIR}/R3DWidget.cpp
${CMAKE_CURRENT_SOURCE_DIR}/RWorld.cpp
${CMAKE_CURRENT_SOURCE_DIR}/RManager.cpp
Expand All @@ -28,13 +28,13 @@ set(MODMESH_VIEW_PYMODSOURCES
${CMAKE_CURRENT_SOURCE_DIR}/RPythonConsoleDockWidget.cpp
${CMAKE_CURRENT_SOURCE_DIR}/RStaticMesh.cpp
${CMAKE_CURRENT_SOURCE_DIR}/RAction.cpp
${CMAKE_CURRENT_SOURCE_DIR}/wrap_view.cpp
${CMAKE_CURRENT_SOURCE_DIR}/wrap_pilot.cpp
CACHE FILEPATH "" FORCE
)

set(MODMESH_VIEW_FILES
${MODMESH_VIEW_PYMODHEADERS}
${MODMESH_VIEW_PYMODSOURCES}
set(MODMESH_PILOT_FILES
${MODMESH_PILOT_PYMODHEADERS}
${MODMESH_PILOT_PYMODSOURCES}
CACHE FILEPATH "" FORCE)

# vim: set ff=unix fenc=utf8 nobomb et sw=4 ts=4 sts=4:
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <modmesh/view/R3DWidget.hpp> // Must be the first include.
#include <modmesh/view/RAxisMark.hpp>
#include <modmesh/view/RStaticMesh.hpp>
#include <modmesh/pilot/R3DWidget.hpp> // Must be the first include.
#include <modmesh/pilot/RAxisMark.hpp>
#include <modmesh/pilot/RStaticMesh.hpp>

namespace modmesh
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <modmesh/view/common_detail.hpp> // Must be the first include.
#include <modmesh/pilot/common_detail.hpp> // Must be the first include.

#include <modmesh/view/RWorld.hpp>
#include <modmesh/pilot/RWorld.hpp>

#include <Qt>
#include <QWidget>
Expand All @@ -39,7 +39,7 @@
#include <Qt3DCore/QEntity>
#include <Qt3DRender/QCamera>

#include <modmesh/view/RCameraController.hpp>
#include <modmesh/pilot/RCameraController.hpp>

#include <QResizeEvent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <modmesh/view/RAction.hpp> // Must be the first include.
#include <modmesh/pilot/RAction.hpp> // Must be the first include.

#include <functional>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <modmesh/view/common_detail.hpp> // Must be the first include.
#include <modmesh/pilot/common_detail.hpp> // Must be the first include.

#include <QAction>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <modmesh/view/common_detail.hpp> // Must be the first include.
#include <modmesh/view/RAxisMark.hpp>
#include <modmesh/pilot/common_detail.hpp> // Must be the first include.
#include <modmesh/pilot/RAxisMark.hpp>

#include <modmesh/modmesh.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <modmesh/view/common_detail.hpp> // Must be the first include.
#include <modmesh/pilot/common_detail.hpp> // Must be the first include.

#include <modmesh/modmesh.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <modmesh/view/RCameraController.hpp>
#include <modmesh/pilot/RCameraController.hpp>

#include <Qt3DInput/QKeyboardDevice>
#include <Qt3DInput/QMouseDevice>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <modmesh/view/common_detail.hpp> // Must be the first include.
#include <modmesh/pilot/common_detail.hpp> // Must be the first include.
#include <QCamera>
#include <QAbstractCameraController>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <modmesh/view/RManager.hpp> // Must be the first include.
#include <modmesh/pilot/RManager.hpp> // Must be the first include.

#include <vector>

#include <modmesh/view/RAction.hpp>
#include <modmesh/view/RParameter.hpp>
#include <modmesh/pilot/RAction.hpp>
#include <modmesh/pilot/RParameter.hpp>
#include <Qt>
#include <QMenuBar>
#include <QMenu>
Expand All @@ -52,7 +52,7 @@ RManager::RManager()
{
m_core = QApplication::instance();
static int argc = 1;
static char exename[] = "viewer";
static char exename[] = "pilot";
static char * argv[] = {exename};
if (nullptr == m_core)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <modmesh/view/common_detail.hpp> // Must be the first include.
#include <modmesh/pilot/common_detail.hpp> // Must be the first include.

#include <modmesh/view/RPythonConsoleDockWidget.hpp>
#include <modmesh/view/R3DWidget.hpp>
#include <modmesh/view/RAction.hpp>
#include <modmesh/pilot/RPythonConsoleDockWidget.hpp>
#include <modmesh/pilot/R3DWidget.hpp>
#include <modmesh/pilot/RAction.hpp>

#include <QMainWindow>
#include <QMdiArea>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <modmesh/view/RParameter.hpp> // Must be the first include.
#include <modmesh/pilot/RParameter.hpp> // Must be the first include.

namespace modmesh
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <modmesh/view/common_detail.hpp> // Must be the first include.
#include <modmesh/pilot/common_detail.hpp> // Must be the first include.

namespace modmesh
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <modmesh/view/RPythonConsoleDockWidget.hpp>
#include <modmesh/pilot/RPythonConsoleDockWidget.hpp>
#include <QVBoxLayout>
#include <QKeyEvent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <modmesh/view/RStaticMesh.hpp> // Must be the first include.
#include <modmesh/pilot/RStaticMesh.hpp> // Must be the first include.

#include <modmesh/view/common_detail.hpp>
#include <modmesh/pilot/common_detail.hpp>

namespace modmesh
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <modmesh/view/common_detail.hpp> // Must be the first include.
#include <modmesh/pilot/common_detail.hpp> // Must be the first include.

#include <modmesh/modmesh.hpp>

Expand Down
4 changes: 2 additions & 2 deletions cpp/modmesh/view/RWorld.cpp → cpp/modmesh/pilot/RWorld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <modmesh/view/RWorld.hpp> // Must be the first include.
#include <modmesh/pilot/RWorld.hpp> // Must be the first include.

#include <modmesh/view/common_detail.hpp>
#include <modmesh/pilot/common_detail.hpp>

namespace modmesh
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <modmesh/view/common_detail.hpp> // Must be the first include.
#include <modmesh/pilot/common_detail.hpp> // Must be the first include.

#include <modmesh/universe/universe.hpp>

Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions cpp/modmesh/view/view.hpp → cpp/modmesh/pilot/pilot.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <modmesh/view/common_detail.hpp> // Must be the first include.
#include <modmesh/pilot/common_detail.hpp> // Must be the first include.

#include <modmesh/view/R3DWidget.hpp>
#include <modmesh/view/RManager.hpp>
#include <modmesh/view/RPythonConsoleDockWidget.hpp>
#include <modmesh/view/RCameraController.hpp>
#include <modmesh/view/RStaticMesh.hpp>
#include <modmesh/view/RWorld.hpp>
#include <modmesh/view/RAxisMark.hpp>
#include <modmesh/pilot/R3DWidget.hpp>
#include <modmesh/pilot/RManager.hpp>
#include <modmesh/pilot/RPythonConsoleDockWidget.hpp>
#include <modmesh/pilot/RCameraController.hpp>
#include <modmesh/pilot/RStaticMesh.hpp>
#include <modmesh/pilot/RWorld.hpp>
#include <modmesh/pilot/RAxisMark.hpp>

// vim: set ff=unix fenc=utf8 et sw=4 ts=4 sts=4:
Loading

0 comments on commit 446f2ae

Please sign in to comment.