luxia--
[photoprint.git] / interfaces.py
1 # -*- coding: utf-8 -*-
2 #######################################################################################
3 # Copyright © 2009 Benoît Pin <pin@cri.ensmp.fr> #
4 # Plinn - http://plinn.org #
5 # #
6 # #
7 # This program is free software; you can redistribute it and/or #
8 # modify it under the terms of the GNU General Public License #
9 # as published by the Free Software Foundation; either version 2 #
10 # of the License, or (at your option) any later version. #
11 # #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
16 # #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program; if not, write to the Free Software #
19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #
20 #######################################################################################
21 """
22 Printable objects interfaces
23
24
25
26 """
27
28 from zope.interface import Interface, Attribute
29
30 class IPrintingSupport(Interface) :
31 """
32 Used to describe physical printing support
33 """
34
35 title = Attribute("Support title")
36 description = Attribute("support description - HTML format")
37 manufacturer = Attribute("Manufacturer name")
38 surfaceWeight = Attribute("Surface weight. SI unit (kg/m**2)")
39 category = Attribute("Category of support (glossy, mate...)")
40 availableSize = Attribute("Paper sheet or roll paper available for this support")
41
42
43 class IPrintableSheet(Interface) :
44 """
45 Printable sheet description
46 """
47
48 width = Attribute("Physical support width")
49 height = Attribute("Physical support height")
50 formatName = Attribute("Format name if exists")
51 deviceMargins = Attribute("Mapping of margins indexed by device model.")
52
53 sizeUnits = Attribute("Measurement units for all sizing attributes")
54
55 price = Attribute("Public price of the printed sheet")
56 manufacturerReference = Attribute("Manufacturer reference")
57
58
59 class IPrintableRoll(Interface):
60 """
61 Printable roll description
62 """
63 width = Attribute("Roll width")
64 maxLength = Attribute("Roll length")
65 formatName = Attribute("Format name if exists")
66 deviceMargins = Attribute("Mapping of margins (top and bottom) indexed by device model.")
67
68 sizeUnits = Attribute("Measurement units for all sizing attributes")
69
70 pricePerLength = Attribute("Public price of the printed support per length unit (ie. €/m)")
71 manufacturerReference = Attribute("Manufacturer reference")
72
73 class IPrintOrderTemplate(Interface):
74 """
75 predefined print order, suggested by the seller.
76 """
77
78 title = Attribute("order name")
79 description = Attribute("order description")
80
81 price = Attribute("Public price of the order")
82
83 class IPrintOrder(Interface) :
84 """
85 the general purpose print order
86 """