Migration guide from CamiTK 5.0 to CamiTK 5.2
CamiTK 5.2 fixes a lot of bugs (see the Release Notes) and introduces one big new feature: the viewer extension (ability to define plugins that provides new viewers, see the viewer extension documentation for more information). Viewer extensions are now a first class type of extension, and are as easy to create and integrate as action and component extensions. They also makes applications easier to build and test.
The methods in the Component
class that used a pointer to a Viewer
in the previous versions of CamiTK are now using a QString
to name the required viewer. This ensures safety and modularity to access a specific viewer (e.g., to manage the case where the corresponding viewer extension is not currently loaded).
Deprecated API members
Since CamiTK 5.1
Thanks to the CAMITK_API_DEPRECATED
macro, deprecated methods are now marked by the compiler. You should get a compilation warnings with a explanation message if you use deprecated CamiTK API members.
This is the list of deprecated members since CamiTK 5.1 (they still works but beware: they might disappear very soon from the API):
setComponentName
: Please usesetComponentClassName
instead to set the class of components that an ActionExtension acts on.
Workspace .camitk files
Since CamiTK 5.2
Components, Action parameters and Viewer parameters are now saved by the PersistenceManager.
It works by saving and loading CamiTK Properties or Qt Properties of Components, Actions and Viewers. CEP developers should use the CamiTK Property system to store the relevant data. When loading the workspace, properties are updated, and an event is generated. Actions, Components and Viewers should be able to manage property changes.
If there is a need for a specific way to save or load data for an extension, the Action or Component can override the PersistenceInterface
methods toVariant
and fromVariant
.
Action property loading is disabled in 5.2.0 because some actions can crash if invalid parameters are set (e.g. a component’s name to use a non-existing Component pointer). Please check that your extension can manage loading properties.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.