BUG: #3315 allow editor extensions to define custom cursor

The mechanism for editor extensions to declare their cursor had
already existed, but it was being ignored.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22334 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fix serialization of display node representation property

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22335 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Exposes RepresentationType and InterpolationType enums to python

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22336 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Consider specific file writer before generic one.

Ideally the file reader/writer should be reworked to have a more
consistent API. More specifically after the user select a file type
in the "save dialog", the corresponding "file writer id" should be
passed down the qSlicerCoreIOManager::saveScene/saveNodes methods.

This would prevent confusion for the user. Indeed, if a writer fails a
clear error message would be displated and the system wouldn't try an other
possible writer.

See issue #3322

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22337 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Add qSlicerScriptedFileWriter interface

User can now register python based file writer.

For example:

# File MyCustomSceneExporter.py

import json
import os
import zipfile
import contextlib
import datetime
import vtk, slicer

class MyCustomSceneExporter:
  def __init__(self, parent):
    parent.title = "[...]"
    parent.categories = ["..."]
    parent.dependencies = []
    parent.contributors = ["..."]
    parent.helpText = """[...]"""
    parent.acknowledgementText = """[...]"""
    self.parent = parent

class MyCustomSceneExporterFileWriter:
    def __init__(self, parent):
        self.parent = parent

    def description(self):
        return 'Custom Scene File'

    def fileType(self):
        return 'SceneFile'

    def canWriteObject(self, obj):
        return isinstance(obj, slicer.vtkMRMLScene)

    def extensions(self, obj):
        return ['CustomScene File (*.customscene.zip)']

    def write(self, properties):
        self.exportModels(properties['fileName'])
        return True

    [...]

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22338 3bd1e089-480b-0410-8dfb-8563597acbee