aboutsummaryrefslogtreecommitdiffstats
path: root/Lib/defconQt
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/defconQt')
-rw-r--r--Lib/defconQt/representationFactories/__init__.py24
1 files changed, 16 insertions, 8 deletions
diff --git a/Lib/defconQt/representationFactories/__init__.py b/Lib/defconQt/representationFactories/__init__.py
index 86b8b06..507102f 100644
--- a/Lib/defconQt/representationFactories/__init__.py
+++ b/Lib/defconQt/representationFactories/__init__.py
@@ -1,19 +1,27 @@
-from defcon.objects.glyph import addRepresentationFactory
+from defcon import Glyph, registerRepresentationFactory
from defconQt.representationFactories.qPainterPathFactory import (
QPainterPathFactory)
from defconQt.representationFactories.glyphViewFactory import (
NoComponentsQPainterPathFactory, OnlyComponentsQPainterPathFactory,
OutlineInformationFactory, StartPointsInformationFactory)
+# TODO: add a glyph pixmap factory parametrized on glyph size
+# TODO: fine-tune the destructive notifications
_factories = {
- "defconQt.QPainterPath": QPainterPathFactory,
- "defconQt.OnlyComponentsQPainterPath": OnlyComponentsQPainterPathFactory,
- "defconQt.NoComponentsQPainterPath": NoComponentsQPainterPathFactory,
- "defconQt.OutlineInformation": OutlineInformationFactory,
- "defconQt.StartPointsInformation": StartPointsInformationFactory,
+ "defconQt.QPainterPath": (QPainterPathFactory, None),
+ "defconQt.OnlyComponentsQPainterPath": (
+ OnlyComponentsQPainterPathFactory, None),
+ "defconQt.NoComponentsQPainterPath": (
+ NoComponentsQPainterPathFactory, None),
+ "defconQt.OutlineInformation": (
+ OutlineInformationFactory, None),
+ "defconQt.StartPointsInformation": (
+ StartPointsInformationFactory, None),
}
def registerAllFactories():
- for name, factory in _factories.items():
- addRepresentationFactory(name, factory)
+ for name, (factory, destructiveNotifications) in _factories.items():
+ registerRepresentationFactory(
+ Glyph, name, factory,
+ destructiveNotifications=destructiveNotifications)