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

ENH: Allow instantiation of more CTK objects in Python #1078

Merged
merged 1 commit into from
Apr 5, 2023
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
4 changes: 2 additions & 2 deletions Libs/Core/ctkErrorLogAbstractMessageHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ ctkErrorLogAbstractMessageHandlerPrivate::~ctkErrorLogAbstractMessageHandlerPriv
// ctkErrorLogAbstractMessageHandlerPrivate methods

// --------------------------------------------------------------------------
ctkErrorLogAbstractMessageHandler::ctkErrorLogAbstractMessageHandler()
: Superclass(), d_ptr(new ctkErrorLogAbstractMessageHandlerPrivate)
ctkErrorLogAbstractMessageHandler::ctkErrorLogAbstractMessageHandler(QObject* parent)
: Superclass(parent), d_ptr(new ctkErrorLogAbstractMessageHandlerPrivate)
{
}

Expand Down
2 changes: 1 addition & 1 deletion Libs/Core/ctkErrorLogAbstractMessageHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class CTK_CORE_EXPORT ctkErrorLogAbstractMessageHandler : public QObject
public:
typedef QObject Superclass;
/// Disabled by default.
ctkErrorLogAbstractMessageHandler();
ctkErrorLogAbstractMessageHandler(QObject* parent = 0);
virtual ~ctkErrorLogAbstractMessageHandler();

virtual QString handlerName()const = 0;
Expand Down
3 changes: 2 additions & 1 deletion Libs/Core/ctkErrorLogLevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
#include <QMetaEnum>

// --------------------------------------------------------------------------
ctkErrorLogLevel::ctkErrorLogLevel()
ctkErrorLogLevel::ctkErrorLogLevel(QObject* parent)
: Superclass(parent)
{
qRegisterMetaType<ctkErrorLogLevel::LogLevel>("ctkErrorLogLevel::LogLevel");
}
Expand Down
3 changes: 2 additions & 1 deletion Libs/Core/ctkErrorLogLevel.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ class CTK_CORE_EXPORT ctkErrorLogLevel : public QObject
Q_OBJECT
Q_FLAGS(LogLevel)
public:
ctkErrorLogLevel();
typedef QObject Superclass;
ctkErrorLogLevel(QObject* parent = 0);

enum LogLevel
{
Expand Down
3 changes: 2 additions & 1 deletion Libs/Core/ctkErrorLogQtMessageHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ QString ctkErrorLogQtMessageHandler::HandlerName = QLatin1String("Qt");
Q_DECLARE_METATYPE(ctkErrorLogQtMessageHandler*)

// --------------------------------------------------------------------------
ctkErrorLogQtMessageHandler::ctkErrorLogQtMessageHandler() : Superclass()
ctkErrorLogQtMessageHandler::ctkErrorLogQtMessageHandler(QObject* parent)
: Superclass(parent)
{
this->SavedQtMessageHandler = 0;

Expand Down
2 changes: 1 addition & 1 deletion Libs/Core/ctkErrorLogQtMessageHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class CTK_CORE_EXPORT ctkErrorLogQtMessageHandler : public ctkErrorLogAbstractMe
public:
typedef ctkErrorLogAbstractMessageHandler Superclass;

ctkErrorLogQtMessageHandler();
ctkErrorLogQtMessageHandler(QObject* parent = 0);

static QString HandlerName;

Expand Down
4 changes: 2 additions & 2 deletions Libs/Core/ctkErrorLogTerminalOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ ctkErrorLogTerminalOutputPrivate::~ctkErrorLogTerminalOutputPrivate()
// ctkErrorLogTerminalOutput methods

// --------------------------------------------------------------------------
ctkErrorLogTerminalOutput::ctkErrorLogTerminalOutput()
: d_ptr(new ctkErrorLogTerminalOutputPrivate)
ctkErrorLogTerminalOutput::ctkErrorLogTerminalOutput(QObject* parent)
: Superclass(parent), d_ptr(new ctkErrorLogTerminalOutputPrivate)
{
}

Expand Down
3 changes: 2 additions & 1 deletion Libs/Core/ctkErrorLogTerminalOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ class CTK_CORE_EXPORT ctkErrorLogTerminalOutput : public QObject
Q_FLAGS(TerminalOutputs)

public:
ctkErrorLogTerminalOutput();
typedef QObject Superclass;
ctkErrorLogTerminalOutput(QObject* parent = 0);
virtual ~ctkErrorLogTerminalOutput();

enum TerminalOutput
Expand Down
4 changes: 2 additions & 2 deletions Libs/QtTesting/ctkEventTranslatorPlayerWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ ctkEventTranslatorPlayerWidgetPrivate::~ctkEventTranslatorPlayerWidgetPrivate()
}

//-----------------------------------------------------------------------------
ctkEventTranslatorPlayerWidget::ctkEventTranslatorPlayerWidget()
: Superclass()
ctkEventTranslatorPlayerWidget::ctkEventTranslatorPlayerWidget(QWidget* parent, Qt::WindowFlags flags)
: Superclass(parent, flags)
, d_ptr(new ctkEventTranslatorPlayerWidgetPrivate)
{
Q_D(ctkEventTranslatorPlayerWidget);
Expand Down
2 changes: 1 addition & 1 deletion Libs/QtTesting/ctkEventTranslatorPlayerWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class CTK_QTTESTING_EXPORT ctkEventTranslatorPlayerWidget
Q_OBJECT
public:
typedef QMainWindow Superclass;
ctkEventTranslatorPlayerWidget();
ctkEventTranslatorPlayerWidget(QWidget* parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
~ctkEventTranslatorPlayerWidget();

void addTestCase(QWidget* widget, QString fileName, void(*newCallback)(void* data));
Expand Down