Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase from master #726

Merged
merged 23 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4b0dd0b
Update version to 1.1.0
ThomasKroes Oct 14, 2024
5b79fd9
Full support for learning center in view plugin hamburger menu (#698)
ThomasKroes Oct 14, 2024
1d9fca6
Option to use native or Qt file dialog, default to native (#696)
alxvth Oct 14, 2024
1214029
Break when all dependencies are loaded (#706)
alxvth Oct 22, 2024
419d2ab
Fix HTML rendering problems in sample scope plugin (#709)
ThomasKroes Oct 29, 2024
63a795a
Update build.yml (#712)
alxvth Oct 31, 2024
4626e30
Set XCODE_SCHEME_EXECUTABLE
ThomasKroes Nov 10, 2024
fc72dfc
Install dir should be relative (#714)
alxvth Nov 11, 2024
3342e31
Resolve linked data of all source datasets during selections (#713)
alxvth Nov 11, 2024
e5c40f7
Link statically to QuaZip (#716)
ThomasKroes Nov 14, 2024
ca435e0
Fix find package definitions again (#718)
alxvth Nov 15, 2024
7cca6c2
Fix regression cmake config (#719)
alxvth Nov 19, 2024
a62c6e6
Update CMakeLists.txt (#721)
alxvth Nov 19, 2024
3cca060
Put system plugins in SystemPlugins project group and data plugins in…
ThomasKroes Nov 19, 2024
fcdf193
Put dependencies in CoreDependencies project group
ThomasKroes Nov 19, 2024
b1e70ec
Tix toggle action drag and drop (#723)
ThomasKroes Nov 20, 2024
af4c7b2
Add DatasetImpl::setGuiName(const QString& guiName) (#724)
ThomasKroes Nov 20, 2024
15ea0ad
Fix invert selection on a subset
JulianThijssen Nov 20, 2024
a136e05
Fix the inverted selection better, so it only inverts within the subset
JulianThijssen Nov 20, 2024
a4bcf9d
Add type action to TransformationPlugin base class
ThomasKroes Nov 25, 2024
52d60a4
Set input datasets for transformation plugin in PluginManager::reques…
ThomasKroes Nov 25, 2024
fe86de5
Turn off workspace menu
ThomasKroes Nov 25, 2024
6bb4d4e
Add utility functions
ThomasKroes Nov 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ jobs:
steps:
- name: Checkout the source
if: ${{ github.event_name != 'pull_request'}}
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Checkout the source (pull_request version)
if: ${{ github.event_name == 'pull_request'}}
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
submodules: recursive
Expand All @@ -60,7 +60,7 @@ jobs:
sudo xcode-select -switch /Applications/Xcode_${{matrix.build-xcode-version}}.app

- name: Setup python version
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: "3.11"

Expand All @@ -72,7 +72,7 @@ jobs:
# refreshenv

- name: Start ssh key agent
uses: webfactory/ssh-agent@v0.7.0
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.RULESSUPPORT_DEPLOY_KEY }}

Expand All @@ -94,8 +94,23 @@ jobs:
conan-pem: ${{secrets.LKEB_UPLOAD_CERT_CHAIN}}
rs_ssh_key: ${{ secrets.RULESSUPPORT_DEPLOY_KEY }}

- name: Linux Mac build
if: "!startsWith(runner.os, 'Windows')"
- name: Linux build
if: startsWith(matrix.os, 'ubuntu')
uses: ManiVaultStudio/github-actions/conan_linuxmac_build@main
with:
conan-compiler: ${{matrix.build-compiler}}
conan-cc: ${{matrix.build-cc}}
conan-cxx: ${{matrix.build-cxx}}
conan-compiler-version: ${{matrix.build-cversion}}
conan-libcxx-version: ${{matrix.build-libcxx}}
conan-build-type: ${{matrix.build-config}}
conan-build-os: ${{matrix.build-os}}
conan-user: ${{secrets.LKEB_UPLOAD_USER}}
conan-password: ${{secrets.LKEB_UPLOAD_USER_PASSWORD}}
conan-pem: ${{secrets.LKEB_UPLOAD_CERT_CHAIN}}

- name: Mac build
if: startsWith(matrix.os, 'macos')
uses: ManiVaultStudio/github-actions/conan_linuxmac_build@main
with:
conan-compiler: ${{matrix.build-compiler}}
Expand Down
43 changes: 26 additions & 17 deletions ManiVault/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

if (NOT (MSVC AND MSVC_VERSION LESS_EQUAL 1929))
if (NOT (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND MSVC_VERSION LESS 1930))
set(CMAKE_C_STANDARD 17)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS OFF)
Expand Down Expand Up @@ -128,18 +128,18 @@ CPMAddPackage(
OPTIONS "ZLIB_BUILD_EXAMPLES OFF" "SKIP_INSTALL_ALL ON"
)

set_target_properties(zlibstatic PROPERTIES EXCLUDE_FROM_ALL TRUE)
set_target_properties(zlib PROPERTIES EXCLUDE_FROM_ALL TRUE)

# Maintain build compatibility between find_package and CMakeLists.txt variants (for QuaZip)
add_library(ZLIB::ZLIB ALIAS zlib)
set(ZLIB_LIBRARIES zlib)
add_library(ZLIB::ZLIB ALIAS zlibstatic)
set(ZLIB_LIBRARIES zlibstatic)

# File compression: QuaZip
CPMAddPackage(
NAME quazip
GITHUB_REPOSITORY stachenov/quazip
GIT_TAG v1.4
OPTIONS "QUAZIP_QT_MAJOR_VERSION 6" "QUAZIP_BZIP2 OFF" "QUAZIP_INSTALL OFF"
OPTIONS "QUAZIP_QT_MAJOR_VERSION 6" "QUAZIP_BZIP2 OFF" "QUAZIP_INSTALL OFF" "BUILD_SHARED_LIBS OFF"
)

# Qt Advanced docking system
Expand Down Expand Up @@ -279,11 +279,17 @@ if(MSVC)
)
endif(MSVC)

# find libraries relative to the executable in the macOS .app tree
if(APPLE)
set_target_properties( ${MV_EXE} PROPERTIES BUILD_WITH_INSTALL_RPATH True)

# Find libraries relative to the executable in the macOS .app tree
set_target_properties(${MV_EXE} PROPERTIES BUILD_WITH_INSTALL_RPATH True)

endif()

set_target_properties(qt6advanceddocking QuaZip zlib zlibstatic
PROPERTIES
FOLDER CoreDependencies
)

# -----------------------------------------------------------------------------
# Plugin projects
Expand All @@ -297,13 +303,22 @@ add_subdirectory(src/plugins/LoggingPlugin)
add_subdirectory(src/plugins/TasksPlugin)
add_subdirectory(src/plugins/SampleScopePlugin)

set_target_properties(DataHierarchyPlugin DataPropertiesPlugin SharedParametersPlugin LoggingPlugin TasksPlugin SampleScopePlugin
PROPERTIES
FOLDER SystemPlugins
)

# Data plugins
add_subdirectory(src/plugins/PointData)
add_subdirectory(src/plugins/ColorData)
add_subdirectory(src/plugins/TextData)
add_subdirectory(src/plugins/ClusterData)
add_subdirectory(src/plugins/ImageData)

set_target_properties(PointData ColorData TextData ClusterData ImageData
PROPERTIES
FOLDER DataPlugins
)

# -----------------------------------------------------------------------------
# Installation
Expand All @@ -328,9 +343,10 @@ if(APPLE)
if(NOT retval EQUAL 0)
message(FATAL_ERROR \"macdeployqt failed\")
endif()
set(ADDITIONAL_LIBS \"$<TARGET_FILE:qt6advanceddocking>\" \"$<TARGET_FILE:QuaZip>\" \"$<TARGET_FILE:${MV_PUBLIC_LIB}>\" \"$<TARGET_FILE:zlib>\")
set(ADDITIONAL_LIBS \"$<TARGET_FILE:qt6advanceddocking>\" \"$<TARGET_FILE:${MV_PUBLIC_LIB}>\")
message(\"**** Copy additional libs: \${ADDITIONAL_LIBS}\")
file(COPY \${ADDITIONAL_LIBS} DESTINATION \"${BUNDLE_DIR}/Contents/Frameworks/\")
file(COPY \${ADDITIONAL_LIBS} DESTINATION \"${BUNDLE_DIR}/Contents/Frameworks/\")

"
COMPONENT MACOS_BUNDLE
)
Expand Down Expand Up @@ -497,15 +513,8 @@ if(NOT APPLE)
add_custom_command(TARGET ${MV_EXE} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo "Installing: dependency runtime libraries"
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:qt6advanceddocking> ${MV_INSTALL_DIR}/$<CONFIGURATION>$<IF:$<CXX_COMPILER_ID:MSVC>,,/lib/>
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:QuaZip> ${MV_INSTALL_DIR}/$<CONFIGURATION>$<IF:$<CXX_COMPILER_ID:MSVC>,,/lib/>
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:zlib> ${MV_INSTALL_DIR}/$<CONFIGURATION>$<IF:$<CXX_COMPILER_ID:MSVC>,,/lib/>
)

# Create symlink with slightly different name required on some linux distributions
if(UNIX)
include(CMakeQuaZipSymlink)
create_quazip_symlink()
endif()
endif()

# Install examples
Expand All @@ -530,7 +539,7 @@ add_custom_command(TARGET ${MV_EXE} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${advanced_docking_SOURCE_DIR}/LICENSE ${MV_INSTALL_DIR}/$<CONFIGURATION>/license/ads/LICENSE
COMMAND ${CMAKE_COMMAND} -E make_directory ${MV_INSTALL_DIR}/$<CONFIGURATION>/license/quazip
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${quazip_SOURCE_DIR}/COPYING ${MV_INSTALL_DIR}/$<CONFIGURATION>/license/quazip/LICENSE
COMMAND ${CMAKE_COMMAND} -E make_directory ${MV_INSTALL_DIR}/$<CONFIGURATION>/license/zlib
COMMAND ${CMAKE_COMMAND} -E make_directory ${MV_INSTALL_DIR}/$<CONFIGURATION>/license/zlib
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${zlib_SOURCE_DIR}/LICENSE ${MV_INSTALL_DIR}/$<CONFIGURATION>/license/zlib/LICENSE
COMMAND ${CMAKE_COMMAND} -E make_directory ${MV_INSTALL_DIR}/$<CONFIGURATION>/license/biovault_bfloat16
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${biovault_bfloat16_SOURCE_DIR}/LICENSE ${MV_INSTALL_DIR}/$<CONFIGURATION>/license/biovault_bfloat16/LICENSE
Expand Down
2 changes: 2 additions & 0 deletions ManiVault/cmake/CMakeMvSourcesPublic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ set(PUBLIC_ACTIONS_INTERNAL_HEADERS
src/actions/WidgetActionMimeData.h
src/actions/WidgetActionHighlightWidget.h
src/actions/WidgetActionBadge.h
src/actions/WidgetActionDrag.h
src/actions/TasksTreeAction.h
src/actions/TasksListAction.h
src/actions/SplashScreenAction.h
Expand Down Expand Up @@ -356,6 +357,7 @@ set(PUBLIC_ACTIONS_INTERNAL_SOURCES
src/actions/WidgetActionMimeData.cpp
src/actions/WidgetActionHighlightWidget.cpp
src/actions/WidgetActionBadge.cpp
src/actions/WidgetActionDrag.cpp
src/actions/TasksTreeAction.cpp
src/actions/TasksListAction.cpp
src/actions/SplashScreenAction.cpp
Expand Down
24 changes: 0 additions & 24 deletions ManiVault/cmake/CMakeQuaZipSymlink.cmake

This file was deleted.

15 changes: 8 additions & 7 deletions ManiVault/cmake/MvCoreConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
@PACKAGE_INIT@

set(ManiVault_INSTALL_DIR "@PACKAGE_MV_INSTALL_DIR@")
set(ManiVault_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../$<CONFIGURATION>/include/")
set(ManiVault_LIB_DIR "${CMAKE_CURRENT_LIST_DIR}/../../$<CONFIGURATION>/lib/")
set(ManiVault_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE INTERNAL "")
# cannot call set_and_check on variables including $<CONFIGURATION>
set_and_check(ManiVault_INSTALL_DIR "${PACKAGE_PREFIX_DIR}")
set(ManiVault_INCLUDE_DIR "${ManiVault_INSTALL_DIR}/$<CONFIGURATION>/include")
set(ManiVault_LIB_DIR "${ManiVault_INSTALL_DIR}/$<CONFIGURATION>/lib")
set_and_check(ManiVault_CMAKE_DIR "${PACKAGE_PREFIX_DIR}/cmake/mv" CACHE INTERNAL "")

list(APPEND ManiVault_LINK_LIBS ManiVault::Core ManiVault::PointData ManiVault::ClusterData ManiVault::ImageData ManiVault::ColorData ManiVault::TextData)

include("${CMAKE_CURRENT_LIST_DIR}/ManiVaultTargets.cmake")
include("${ManiVault_CMAKE_DIR}/ManiVaultTargets.cmake")

check_required_components("@PROJECT_NAME@")

# include some helper functions
include("${CMAKE_CURRENT_LIST_DIR}/mv_install_dependencies_utils.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/mv_check_and_set_AVX.cmake")
include("${ManiVault_CMAKE_DIR}/mv_install_dependencies_utils.cmake")
include("${ManiVault_CMAKE_DIR}/mv_check_and_set_AVX.cmake")

message(STATUS "Found ManiVault version ${ManiVault_VERSION}. Use for example as:")
message(STATUS " find_package(ManiVault COMPONENTS Core PointData ClusterData ImageData ColorData TextData CONFIG)")
Expand Down
5 changes: 5 additions & 0 deletions ManiVault/src/Set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,11 @@ QString DatasetImpl::getGuiName() const
return text();
}

void DatasetImpl::setGuiName(const QString& guiName)
{
setText(guiName);
}

//void DatasetImpl::setText(const QString& text)
//{
// WidgetAction::setText(text);
Expand Down
6 changes: 6 additions & 0 deletions ManiVault/src/Set.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ class CORE_EXPORT DatasetImpl : public gui::WidgetAction

/** Get the GUI name of the dataset */
QString getGuiName() const;

/**
* Set gui name to \p guiName
* @param guiName GUI name
*/
void setGuiName(const QString& guiName);

//void setText(const QString& text);

Expand Down
15 changes: 7 additions & 8 deletions ManiVault/src/TransformationPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
#include "TransformationPlugin.h"
#include "Application.h"

namespace mv
{

namespace plugin
namespace mv::plugin
{

TransformationPlugin::TransformationPlugin(const PluginFactory* factory) :
Plugin(factory),
_inputDatasets()
_typeAction(this, "Type")
{

}

mv::Datasets TransformationPlugin::getInputDatasets() const
Expand All @@ -33,10 +29,14 @@ void TransformationPlugin::setInputDataset(const Dataset<DatasetImpl>& inputData
setInputDatasets({ inputDataset });
}

gui::OptionAction& TransformationPlugin::getTypeAction()
{
return _typeAction;
}

TransformationPluginFactory::TransformationPluginFactory() :
PluginFactory(Type::TRANSFORMATION)
{

}

QIcon TransformationPluginFactory::getIcon(const QColor& color /*= Qt::black*/) const
Expand All @@ -50,4 +50,3 @@ QIcon TransformationPluginFactory::getCategoryIcon() const
}

}
}
24 changes: 14 additions & 10 deletions ManiVault/src/TransformationPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
#pragma once

#include "Plugin.h"
#include "actions/OptionAction.h"

#include "Set.h"

namespace mv
{

namespace plugin
namespace mv::plugin
{

/**
Expand Down Expand Up @@ -46,8 +44,8 @@ class CORE_EXPORT TransformationPlugin : public Plugin
Dataset<DatasetType> getInputDataset() {
if (_inputDatasets.size() > 0)
return Dataset<DatasetType>(_inputDatasets[0].get<DatasetType>());
else
return Dataset<DatasetImpl>();

return {};
}

/**
Expand All @@ -62,8 +60,16 @@ class CORE_EXPORT TransformationPlugin : public Plugin
*/
void setInputDataset(const Dataset<DatasetImpl>& inputDataset);


/**
* Get type action
* @return Reference to type action
*/
gui::OptionAction& getTypeAction();

private:
Datasets _inputDatasets; /** One, or more, input dataset */
Datasets _inputDatasets; /** One, or more, input dataset */
gui::OptionAction _typeAction; /** Transformation type action */
};

/**
Expand All @@ -81,7 +87,7 @@ class CORE_EXPORT TransformationPluginFactory : public PluginFactory
TransformationPluginFactory();

/** Destructor */
~TransformationPluginFactory() = default;
~TransformationPluginFactory() override = default;

/**
* Get plugin icon
Expand All @@ -102,6 +108,4 @@ class CORE_EXPORT TransformationPluginFactory : public PluginFactory

}

}

Q_DECLARE_INTERFACE(mv::plugin::TransformationPluginFactory, "ManiVault.TransformationPluginFactory")
2 changes: 2 additions & 0 deletions ManiVault/src/ViewPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ ViewPlugin::ViewPlugin(const PluginFactory* factory) :
shortcuts.add({ QKeySequence(Qt::Key_F12), "General", "Edit the view parameters" });

getLearningCenterAction().createViewPluginOverlayWidget();

addTitleBarMenuAction(&getLearningCenterAction());
}

void ViewPlugin::init()
Expand Down
Loading