Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius/properties.py
diff options
context:
space:
mode:
Diffstat (limited to 'tutorius/properties.py')
-rw-r--r--tutorius/properties.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/tutorius/properties.py b/tutorius/properties.py
index b363a2a..1905117 100644
--- a/tutorius/properties.py
+++ b/tutorius/properties.py
@@ -37,7 +37,8 @@ from .propwidgets import PropWidget, \
IntPropWidget, \
FloatPropWidget, \
IntArrayPropWidget, \
- ResourcePropWidget
+ ResourcePropWidget, \
+ ScreenClipPropWidget
import logging
LOGGER = logging.getLogger("properties")
@@ -390,6 +391,26 @@ class TResourceProperty(TutoriusProperty):
self.default = self.validate("")
+class TScreenClipProperty(TResourceProperty):
+ """
+ Represents an image resource from a screen capture
+
+ When the system encounters a resource, it knows that it refers to a file in
+ the resource folder and that it should translate this resource name to an
+ absolute file name before it is executed.
+ """
+
+ widget_class = ScreenClipPropWidget
+
+ def __init__(self, *args, **kwargs):
+ """
+ Creates a new resource pointing to an existing resource.
+
+ @param resource_name The file name of the resource (should be only the
+ file name itself, no directory information)
+ """
+ super(TScreenClipProperty, self).__init__(*args, **kwargs)
+
class TEnumProperty(TutoriusProperty):
"""
Represents a value in a given enumeration. This means that the value will