Au revoir cyberplus :-p
[photoprint.git] / interfaces.py
1 # -*- coding: utf-8 -*-
2 ############################################################
3 # Copyright © 2009 Benoît PIN <pinbe@luxia.fr> #
4 # Cliché - http://luxia.fr #
5 # #
6 # This program is free software; you can redistribute it #
7 # and/or modify it under the terms of the Creative Commons #
8 # "Attribution-Noncommercial 2.0 Generic" #
9 # http://creativecommons.org/licenses/by-nc/2.0/ #
10 ############################################################
11 """
12 Printable objects interfaces
13
14
15
16 """
17
18 from zope.interface import Interface, Attribute
19
20 class IPrintingSupport(Interface) :
21 """
22 Used to describe physical printing support
23 """
24
25 title = Attribute("Support title")
26 description = Attribute("support description - HTML format")
27 manufacturer = Attribute("Manufacturer name")
28 surfaceWeight = Attribute("Surface weight. SI unit (kg/m**2)")
29 category = Attribute("Category of support (glossy, mate...)")
30 availableSize = Attribute("Paper sheet or roll paper available for this support")
31
32
33 class IPrintableSheet(Interface) :
34 """
35 Printable sheet description
36 """
37
38 width = Attribute("Physical support width")
39 height = Attribute("Physical support height")
40 formatName = Attribute("Format name if exists")
41 deviceMargins = Attribute("Mapping of margins indexed by device model.")
42
43 sizeUnits = Attribute("Measurement units for all sizing attributes")
44
45 price = Attribute("Public price of the printed sheet")
46 manufacturerReference = Attribute("Manufacturer reference")
47
48
49 class IPrintableRoll(Interface):
50 """
51 Printable roll description
52 """
53 width = Attribute("Roll width")
54 maxLength = Attribute("Roll length")
55 formatName = Attribute("Format name if exists")
56 deviceMargins = Attribute("Mapping of margins (top and bottom) indexed by device model.")
57
58 sizeUnits = Attribute("Measurement units for all sizing attributes")
59
60 pricePerLength = Attribute("Public price of the printed support per length unit (ie. €/m)")
61 manufacturerReference = Attribute("Manufacturer reference")
62
63 class IPrintOrderTemplate(Interface):
64 """
65 predefined print order, suggested by the seller.
66 """
67
68 title = Attribute("order name")
69 description = Attribute("order description")
70
71 price = Attribute("Public price of the order")
72
73 class IPrintOrder(Interface) :
74 """
75 the general purpose print order
76 """