Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ endif()
set(PROJECT "ExamplePlugins")
PROJECT(${PROJECT})

add_subdirectory(Common)

add_subdirectory(ExampleView)
add_subdirectory(ExampleViewJS)
add_subdirectory(ExampleViewOpenGL)
Expand Down
17 changes: 17 additions & 0 deletions Common/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
set(DIR ${CMAKE_CURRENT_SOURCE_DIR})

set(COMMON_HEADERS
${DIR}/Common.h
PARENT_SCOPE
)

set(COMMON_SOURCES
${DIR}/Common.cpp
PARENT_SCOPE
)

set(COMMON_FILES
${COMMON_HEADERS}
${COMMON_SOURCES}
PARENT_SCOPE
)
16 changes: 16 additions & 0 deletions Common/common.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include "Common.h"

QString getExampleNotificationMessage()
{
return { "ManiVault Studio features a notification system that can be triggered from:<br>"
"<table>"
"<tr>"
"<th style='text-align: left;'>Within a plugin: </th>"
"<td><a href='https://github.com/ManiVaultStudio/core/blob/3088ad09de6b5a5f3e84b24ffba44294bbb8001d/ManiVault/src/Plugin.h#L170'>addNotification(...)</a></td>"
"</tr>"
"<tr>"
"<th style='text-align: left;'>The help manager: </th>"
"<td><a href='https://github.com/ManiVaultStudio/core/blob/126bd905d64d9b795dce188a06e9321eef132bd3/ManiVault/src/AbstractHelpManager.h#L100'>mv::help().addNotification(...)</a></td>"
"</tr>"
"</table>" };
}
5 changes: 5 additions & 0 deletions Common/common.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#pragma once

#include <QString>

QString getExampleNotificationMessage();
11 changes: 9 additions & 2 deletions ExampleAnalysis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ find_package(Qt6 COMPONENTS Widgets WebEngineWidgets REQUIRED)

find_package(ManiVault COMPONENTS Core PointData CONFIG QUIET)

# -----------------------------------------------------------------------------
# Include Common directory
# -----------------------------------------------------------------------------
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../Common ${CMAKE_CURRENT_BINARY_DIR}/Common)

# -----------------------------------------------------------------------------
# Source files
# -----------------------------------------------------------------------------
Expand All @@ -40,19 +45,21 @@ set(PLUGIN_SOURCES
src/ExampleAnalysisPlugin.json
)

source_group( Plugin FILES ${PLUGIN_SOURCES})
source_group(Plugin FILES ${PLUGIN_SOURCES})
source_group(Common FILES ${COMMON_FILES})

# -----------------------------------------------------------------------------
# CMake Target
# -----------------------------------------------------------------------------
# Create dynamic library for the plugin
add_library(${PROJECT_NAME} SHARED ${PLUGIN_SOURCES})
add_library(${PROJECT_NAME} SHARED ${PLUGIN_SOURCES} ${COMMON_FILES})

# -----------------------------------------------------------------------------
# Target include directories
# -----------------------------------------------------------------------------
# Include ManiVault headers, including system data plugins
target_include_directories(${PROJECT_NAME} PRIVATE "${ManiVault_INCLUDE_DIR}")
target_include_directories(${PROJECT_NAME} PRIVATE Common)

# -----------------------------------------------------------------------------
# Target properties
Expand Down
15 changes: 3 additions & 12 deletions ExampleAnalysis/src/ExampleAnalysisPlugin.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "ExampleAnalysisPlugin.h"

#include "../Common/Common.h"

#include "PointData/PointData.h"

#include <event/Event.h>
Expand Down Expand Up @@ -161,18 +163,7 @@ void ExampleAnalysisPlugin::init()

_eventListener.registerDataEventByType(PointType, std::bind(&ExampleAnalysisPlugin::onDataEvent, this, std::placeholders::_1));

addNotification("ManiVault Studio features a notification system that can be triggered from:<br>"
"<table>"
"<tr>"
"<th style='text-align: left;'>Within a plugin: </th>"
"<td><a href='https://github.com/ManiVaultStudio/core/blob/3088ad09de6b5a5f3e84b24ffba44294bbb8001d/ManiVault/src/Plugin.h#L170'>addNotification(...)</a></td>"
"</tr>"
"<tr>"
"<th style='text-align: left;'>The help manager: </th>"
"<td><a href='https://github.com/ManiVaultStudio/core/blob/126bd905d64d9b795dce188a06e9321eef132bd3/ManiVault/src/AbstractHelpManager.h#L100'>mv::help().addNotification(...)</a></td>"
"</tr>"
"</table>"
);
addNotification(getExampleNotificationMessage());
}

void ExampleAnalysisPlugin::onDataEvent(mv::DatasetEvent* dataEvent)
Expand Down
10 changes: 8 additions & 2 deletions ExampleData/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ find_package(Qt6 COMPONENTS Widgets WebEngineWidgets REQUIRED)

find_package(ManiVault COMPONENTS Core PointData CONFIG QUIET)

# -----------------------------------------------------------------------------
# Include Common directory
# -----------------------------------------------------------------------------
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../Common ${CMAKE_CURRENT_BINARY_DIR}/Common)

# -----------------------------------------------------------------------------
# Source files
# -----------------------------------------------------------------------------
Expand All @@ -45,13 +50,14 @@ set(PLUGIN_HEADERS
src/ExampleDataPlugin.h
)

source_group( Plugin FILES ${PLUGIN_SOURCES})
source_group(Plugin FILES ${PLUGIN_SOURCES})
source_group(Common FILES ${COMMON_FILES})

# -----------------------------------------------------------------------------
# CMake Target
# -----------------------------------------------------------------------------
# Create dynamic library for the plugin
add_library(${PROJECT_NAME} SHARED ${PLUGIN_SOURCES})
add_library(${PROJECT_NAME} SHARED ${PLUGIN_SOURCES} ${COMMON_FILES})

target_sources(${PROJECT_NAME} PRIVATE
${PLUGIN_SOURCES}
Expand Down
15 changes: 3 additions & 12 deletions ExampleData/src/ExampleDataPlugin.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "ExampleDataPlugin.h"

#include "../Common/Common.h"

#include "Application.h"

#include <QtCore>
Expand All @@ -17,18 +19,7 @@ ExampleDataPlugin::~ExampleDataPlugin(void)

void ExampleDataPlugin::init()
{
addNotification("ManiVault Studio features a notification system that can be triggered from:<br>"
"<table>"
"<tr>"
"<th style='text-align: left;'>Within a plugin: </th>"
"<td><a href='https://github.com/ManiVaultStudio/core/blob/3088ad09de6b5a5f3e84b24ffba44294bbb8001d/ManiVault/src/Plugin.h#L170'>addNotification(...)</a></td>"
"</tr>"
"<tr>"
"<th style='text-align: left;'>The help manager: </th>"
"<td><a href='https://github.com/ManiVaultStudio/core/blob/126bd905d64d9b795dce188a06e9321eef132bd3/ManiVault/src/AbstractHelpManager.h#L100'>mv::help().addNotification(...)</a></td>"
"</tr>"
"</table>"
);
addNotification(getExampleNotificationMessage());
}

/**
Expand Down
10 changes: 8 additions & 2 deletions ExampleDependencies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ if(${MV_EXAMPLES_USE_VCPKG})
endif()
endif()

# -----------------------------------------------------------------------------
# Include Common directory
# -----------------------------------------------------------------------------
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../Common ${CMAKE_CURRENT_BINARY_DIR}/Common)

# -----------------------------------------------------------------------------
# Source files
# -----------------------------------------------------------------------------
Expand All @@ -59,13 +64,14 @@ set(PLUGIN_SOURCES
src/ExampleDependenciesPlugin.json
)

source_group( Plugin FILES ${PLUGIN_SOURCES})
source_group(Plugin FILES ${PLUGIN_SOURCES})
source_group(Common FILES ${COMMON_FILES})

# -----------------------------------------------------------------------------
# CMake Target
# -----------------------------------------------------------------------------
# Create dynamic library for the plugin
add_library(${PROJECT_NAME} SHARED ${PLUGIN_SOURCES})
add_library(${PROJECT_NAME} SHARED ${PLUGIN_SOURCES} ${COMMON_FILES})

# -----------------------------------------------------------------------------
# Target include directories
Expand Down
15 changes: 3 additions & 12 deletions ExampleDependencies/src/ExampleDependenciesPlugin.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "ExampleDependenciesPlugin.h"

#include "../Common/Common.h"

#include <PointData/PointData.h>

#include <algorithm>
Expand Down Expand Up @@ -51,18 +53,7 @@ void ExampleDependenciesPlugin::init()
// Start the analysis when the user clicks the start analysis push button
connect(&_settingsAction.getStartAnalysisAction(), &mv::gui::TriggerAction::triggered, this, &ExampleDependenciesPlugin::compute);

addNotification("ManiVault Studio features a notification system that can be triggered from:<br>"
"<table>"
"<tr>"
"<th style='text-align: left;'>Within a plugin: </th>"
"<td><a href='https://github.com/ManiVaultStudio/core/blob/3088ad09de6b5a5f3e84b24ffba44294bbb8001d/ManiVault/src/Plugin.h#L170'>addNotification(...)</a></td>"
"</tr>"
"<tr>"
"<th style='text-align: left;'>The help manager: </th>"
"<td><a href='https://github.com/ManiVaultStudio/core/blob/126bd905d64d9b795dce188a06e9321eef132bd3/ManiVault/src/AbstractHelpManager.h#L100'>mv::help().addNotification(...)</a></td>"
"</tr>"
"</table>"
);
addNotification(getExampleNotificationMessage());
}

void ExampleDependenciesPlugin::compute()
Expand Down
10 changes: 8 additions & 2 deletions ExampleLoader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ find_package(Qt6 COMPONENTS Widgets WebEngineWidgets REQUIRED)

find_package(ManiVault COMPONENTS Core PointData CONFIG QUIET)

# -----------------------------------------------------------------------------
# Include Common directory
# -----------------------------------------------------------------------------
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../Common ${CMAKE_CURRENT_BINARY_DIR}/Common)

# -----------------------------------------------------------------------------
# Source files
# -----------------------------------------------------------------------------
Expand All @@ -38,13 +43,14 @@ set(PLUGIN_SOURCES
src/ExampleLoaderPlugin.json
)

source_group( Plugin FILES ${PLUGIN_SOURCES})
source_group(Plugin FILES ${PLUGIN_SOURCES})
source_group(Common FILES ${COMMON_FILES})

# -----------------------------------------------------------------------------
# CMake Target
# -----------------------------------------------------------------------------
# Create dynamic library for the plugin
add_library(${PROJECT_NAME} SHARED ${PLUGIN_SOURCES})
add_library(${PROJECT_NAME} SHARED ${PLUGIN_SOURCES} ${COMMON_FILES})

# -----------------------------------------------------------------------------
# Target include directories
Expand Down
15 changes: 3 additions & 12 deletions ExampleLoader/src/ExampleLoaderPlugin.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "ExampleLoaderPlugin.h"

#include "../Common/Common.h"

#include "PointData/PointData.h"
#include "Set.h"

Expand Down Expand Up @@ -35,18 +37,7 @@ ExampleLoaderPlugin::~ExampleLoaderPlugin(void)
*/
void ExampleLoaderPlugin::init()
{
addNotification("ManiVault Studio features a notification system that can be triggered from:<br>"
"<table>"
"<tr>"
"<th style='text-align: left;'>Within a plugin: </th>"
"<td><a href='https://github.com/ManiVaultStudio/core/blob/3088ad09de6b5a5f3e84b24ffba44294bbb8001d/ManiVault/src/Plugin.h#L170'>addNotification(...)</a></td>"
"</tr>"
"<tr>"
"<th style='text-align: left;'>The help manager: </th>"
"<td><a href='https://github.com/ManiVaultStudio/core/blob/126bd905d64d9b795dce188a06e9321eef132bd3/ManiVault/src/AbstractHelpManager.h#L100'>mv::help().addNotification(...)</a></td>"
"</tr>"
"</table>"
);
addNotification(getExampleNotificationMessage());
}

/**
Expand Down
10 changes: 8 additions & 2 deletions ExampleTransformation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ find_package(Qt6 COMPONENTS Widgets WebEngineWidgets REQUIRED)

find_package(ManiVault COMPONENTS Core PointData CONFIG QUIET)

# -----------------------------------------------------------------------------
# Include Common directory
# -----------------------------------------------------------------------------
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../Common ${CMAKE_CURRENT_BINARY_DIR}/Common)

# -----------------------------------------------------------------------------
# Source files
# -----------------------------------------------------------------------------
Expand All @@ -38,13 +43,14 @@ set(PLUGIN_SOURCES
src/ExampleTransformationPlugin.json
)

source_group( Plugin FILES ${PLUGIN_SOURCES})
source_group(Plugin FILES ${PLUGIN_SOURCES})
source_group(Common FILES ${COMMON_FILES})

# -----------------------------------------------------------------------------
# CMake Target
# -----------------------------------------------------------------------------
# Create dynamic library for the plugin
add_library(${PROJECT_NAME} SHARED ${PLUGIN_SOURCES})
add_library(${PROJECT_NAME} SHARED ${PLUGIN_SOURCES} ${COMMON_FILES})

# -----------------------------------------------------------------------------
# Target include directories
Expand Down
15 changes: 3 additions & 12 deletions ExampleTransformation/src/ExampleTransformationPlugin.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "ExampleTransformationPlugin.h"

#include "../Common/Common.h"

#include <PointData/PointData.h>

#include <QDebug>
Expand All @@ -22,18 +24,7 @@ ExampleTransformationPlugin::ExampleTransformationPlugin(const PluginFactory* fa
TransformationPlugin(factory),
_type(Type::Abs)
{
addNotification("ManiVault Studio features a notification system that can be triggered from:<br>"
"<table>"
"<tr>"
"<th style='text-align: left;'>Within a plugin: </th>"
"<td><a href='https://github.com/ManiVaultStudio/core/blob/3088ad09de6b5a5f3e84b24ffba44294bbb8001d/ManiVault/src/Plugin.h#L170'>addNotification(...)</a></td>"
"</tr>"
"<tr>"
"<th style='text-align: left;'>The help manager: </th>"
"<td><a href='https://github.com/ManiVaultStudio/core/blob/126bd905d64d9b795dce188a06e9321eef132bd3/ManiVault/src/AbstractHelpManager.h#L100'>mv::help().addNotification(...)</a></td>"
"</tr>"
"</table>"
);
addNotification(getExampleNotificationMessage());
}

void ExampleTransformationPlugin::transform()
Expand Down
10 changes: 8 additions & 2 deletions ExampleView/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ find_package(Qt6 COMPONENTS Widgets WebEngineWidgets REQUIRED)

find_package(ManiVault COMPONENTS Core PointData CONFIG QUIET)

# -----------------------------------------------------------------------------
# Include Common directory
# -----------------------------------------------------------------------------
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../Common ${CMAKE_CURRENT_BINARY_DIR}/Common)

# -----------------------------------------------------------------------------
# Source files
# -----------------------------------------------------------------------------
Expand All @@ -42,13 +47,14 @@ set(PLUGIN_MOC_HEADERS
src/ExampleViewPlugin.h
)

source_group( Plugin FILES ${PLUGIN_SOURCES})
source_group(Plugin FILES ${PLUGIN_SOURCES})
source_group(Common FILES ${COMMON_FILES})

# -----------------------------------------------------------------------------
# CMake Target
# -----------------------------------------------------------------------------
# Create dynamic library for the plugin
add_library(${PROJECT_NAME} SHARED ${PLUGIN_SOURCES})
add_library(${PROJECT_NAME} SHARED ${PLUGIN_SOURCES} ${COMMON_FILES})

# -----------------------------------------------------------------------------
# Target include directories
Expand Down
15 changes: 3 additions & 12 deletions ExampleView/src/ExampleViewPlugin.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "ExampleViewPlugin.h"

#include "../Common/Common.h"

#include <event/Event.h>

#include <DatasetsMimeData.h>
Expand Down Expand Up @@ -115,18 +117,7 @@ void ExampleViewPlugin::init()
_eventListener.addSupportedEventType(static_cast<std::uint32_t>(EventType::DatasetDataSelectionChanged));
_eventListener.registerDataEventByType(PointType, std::bind(&ExampleViewPlugin::onDataEvent, this, std::placeholders::_1));

addNotification("ManiVault Studio features a notification system that can be triggered from:<br>"
"<table>"
"<tr>"
"<th style='text-align: left;'>Within a plugin: </th>"
"<td><a href='https://github.com/ManiVaultStudio/core/blob/3088ad09de6b5a5f3e84b24ffba44294bbb8001d/ManiVault/src/Plugin.h#L170'>addNotification(...)</a></td>"
"</tr>"
"<tr>"
"<th style='text-align: left;'>The help manager: </th>"
"<td><a href='https://github.com/ManiVaultStudio/core/blob/126bd905d64d9b795dce188a06e9321eef132bd3/ManiVault/src/AbstractHelpManager.h#L100'>mv::help().addNotification(...)</a></td>"
"</tr>"
"</table>"
);
addNotification(getExampleNotificationMessage());
}

void ExampleViewPlugin::onDataEvent(mv::DatasetEvent* dataEvent)
Expand Down
Loading
Loading