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

Basic fixes #1

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 1 addition & 6 deletions CustomMarkups/CMakeLists.txt
@@ -1,5 +1,5 @@
#-----------------------------------------------------------------------------
set(MODULE_NAME "CustomMarkups")
set(MODULE_NAME CustomMarkups)
set(MODULE_TITLE ${MODULE_NAME})

string(TOUPPER ${MODULE_NAME} MODULE_NAME_UPPER)
Expand All @@ -17,8 +17,6 @@ set(MODULE_EXPORT_DIRECTIVE "Q_SLICER_QTMODULES_${MODULE_NAME_UPPER}_EXPORT")
set(MODULE_INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}/Logic
${CMAKE_CURRENT_BINARY_DIR}/Logic
${CMAKE_CURRENT_SOURCE_DIR}/MRML
${CMAKE_CURRENT_BINARY_DIR}/MRML
${CMAKE_CURRENT_SOURCE_DIR}/Widgets
${CMAKE_CURRENT_BINARY_DIR}/Widgets
${qSlicerMarkupsModuleWidgets_INCLUDE_DIRS}
Expand All @@ -37,8 +35,6 @@ set(MODULE_TARGET_LIBRARIES
vtkSlicer${MODULE_NAME}ModuleMRML
vtkSlicer${MODULE_NAME}ModuleLogic
qSlicer${MODULE_NAME}ModuleWidgets
vtkSlicerMarkupsModuleLogic
qSlicerMarkupsModuleWidgets
)

#-----------------------------------------------------------------------------
Expand All @@ -50,5 +46,4 @@ slicerMacroBuildLoadableModule(
SRCS ${MODULE_SRCS}
MOC_SRCS ${MODULE_MOC_SRCS}
TARGET_LIBRARIES ${MODULE_TARGET_LIBRARIES}
NO_INSTALL
)
6 changes: 3 additions & 3 deletions CustomMarkups/Logic/vtkSlicerCustomMarkupsLogic.h
Expand Up @@ -21,16 +21,16 @@
#ifndef __vtkSlicerCustomMarkupsMarkupslogic_h_
#define __vtkSlicerCustomMarkupsMarkupslogic_h_

#include <vtkSlicerMarkupsLogic.h>
#include <vtkSlicerModuleLogic.h>

#include "vtkSlicerCustomMarkupsModuleLogicExport.h"

class VTK_SLICER_CUSTOMMARKUPS_MODULE_LOGIC_EXPORT vtkSlicerCustomMarkupsLogic:
public vtkSlicerMarkupsLogic
public vtkSlicerModuleLogic
{
public:
static vtkSlicerCustomMarkupsLogic* New();
vtkTypeMacro(vtkSlicerCustomMarkupsLogic, vtkSlicerMarkupsLogic);
vtkTypeMacro(vtkSlicerCustomMarkupsLogic, vtkSlicerModuleLogic);
void PrintSelf(ostream& os, vtkIndent indent) override;

protected:
Expand Down

This file was deleted.

9 changes: 7 additions & 2 deletions CustomMarkups/Widgets/qMRMLMarkupsTestLineWidget.h
Expand Up @@ -20,20 +20,25 @@

#ifndef __qSlicerTestLineWidget_h_
#define __qSlicerTestLineWidget_h_
// Qt includes
#include <QWidget>

// Markups widgets includes
#include "qMRMLMarkupsAbstractOptionsWidget.h"
#include "qSlicerCustomMarkupsModuleWidgetsExport.h"

// CTK includes
#include <ctkPimpl.h>
#include <ctkVTKObject.h>

class qMRMLMarkupsTestLineWidgetPrivate;
class vtkMRMLMarkupsNode;

class Q_SLICER_MODULE_CUSTOMMARKUPS_WIDGETS_EXPORT
qMRMLMarkupsTestLineWidget : public qMRMLMarkupsAbstractOptionsWidget
{
Q_OBJECT

Q_PROPERTY(QString className READ className CONSTANT);
QVTK_OBJECT

public:

Expand Down
16 changes: 0 additions & 16 deletions CustomMarkups/qSlicerCustomMarkupsModule.cxx
Expand Up @@ -118,14 +118,6 @@ void qSlicerCustomMarkupsModule::setup()
{
this->Superclass::setup();

// This is a test class, therefore we do not register anything if
// not in testing mode (to avoid cluttering the markups module).
bool isTestingEnabled = qSlicerApplication::testAttribute(qSlicerCoreApplication::AA_EnableTesting);
if (!isTestingEnabled)
{
return;
}

// Create and configure the options widgets
auto optionsWidgetFactory = qMRMLMarkupsOptionsWidgetsFactory::instance();
optionsWidgetFactory->registerOptionsWidget(new qMRMLMarkupsTestLineWidget());
Expand All @@ -140,13 +132,5 @@ qSlicerAbstractModuleRepresentation* qSlicerCustomMarkupsModule::createWidgetRep
//-----------------------------------------------------------------------------
vtkMRMLAbstractLogic* qSlicerCustomMarkupsModule::createLogic()
{
// This is a test class, therefore we do not register anything (to avoid cluttering the markups module)
// unless the application is in testing mode.
bool isTestingEnabled = qSlicerApplication::testAttribute(qSlicerCoreApplication::AA_EnableTesting);
if (!isTestingEnabled)
{
return nullptr;
}

return vtkSlicerCustomMarkupsLogic::New();
}