Page MenuHomePhabricator

Rename IRenderWindowPart::GetRenderWindow to GetQmitkRenderWindow
Closed, ResolvedPublic

Description

Rename GetRenderWindow and all similar methods (e.g. GetRenderWindows() and GetActiveRenderWindow()) to GetQmitkRenderWindow, since a QmitkRenderWindow is returned and we have many other RenderWindows (e.g. mitkRenderWindow, vtkRenderWindow, mitkBaseRenderWindow, etc.), which is very confusing for programmers.

Calls like this are very unfortunate:
GettRenderWindowPart()->GetRenderWindow("3d")->GetRenderWindow()

Event Timeline

Hmm, I agree that the naming is maybe unfortunate, but this will be a source-code breaking change.

It will break code for external users (I know that there are some using this API).

What is the status of this bug? should we rename GetRenderWindow or should we close this bug as wont fix?

We discussed that this should be renamed an announced on the users-list.

The QmitkStdMultiWidget also offers the GetRenderWindow1 (2,3,4) returning the QmitkRenderWindow* so this should also get renamed to GetQmitkRenderWindow1 (2,3,4).

For backward compatibility, the old functions still remain in the API but got marked as deprecated.

IMO an announcement over the mailing-list can be done together with all functions/classes which were newly marked as deprecated as soon as the MITK 2012.09 is released. In best case the T13081 gets fixed and the list of newly deprecated functions will be generated automatically.

The fix contains changes in the DEPRECATED macro in the mitkCommon.h. Requesting CoreModificationFlag.

[7d8f08]: Merge branch 'bug-12079-Rename-GetRenderWindow'

Merged commits:

2012-09-12 14:42:24 Jan Hering [f2373d]
Replaced deprecated call from measurementview

  • the IRenderWindowPart::GetRenderWindow() replaced by the IRenderWindowPart::GetQmitkRenderWindow() call

2012-09-05 16:59:56 Jan Hering [52f548]
Adapting calls to deprecated GetRenderWindows()


2012-09-05 16:47:20 Jan Hering [b333e4]
Replacing calls to deprecated GetActiveRenderWindow


2012-09-05 16:45:57 Jan Hering [960aa0]
Enhancing documentation for QmitkStdMultiWidgetEditor


2012-09-05 16:00:37 Jan Hering [e616a8]
Adapting QmitkStdMultiWidgetEditor to the new API

  • where applicable renaming GetRenderWindow -> GetQmitkRenderWindow
  • according to the API changes in IRenderWindowPart

2012-09-05 15:26:58 Jan Hering [22a9df]
Declaring the new functions

  • the previously used method declared as deprecated
  • adapted documentation, deprecated functions points to the new versions

2012-09-05 15:13:05 Jan Hering [fa7def]
Enhancing DEPRECATED() macro

  • using now (...) and VA_ARGS to enable the macros also for
  • functions with multiple parameters, to avoid defining the DEPRECATED
  • macro for each possible argument count