Mercurial > pyarq-presupuestos
comparison Generic/globalVars.py @ 6:2fc6b47dbe70
rename module globals to globalVars
author | Miguel Ángel Bárcena Rodríguez <miguelangel@obraencurso.es> |
---|---|
date | Sat, 06 Nov 2010 22:33:32 +0100 |
parents | Generic/globals.py@2ac1551ad2ab |
children | 0359329a1c26 |
comparison
equal
deleted
inserted
replaced
5:6502bfdaa84d | 6:2fc6b47dbe70 |
---|---|
1 #!/usr/bin/python | |
2 # -*- coding: utf-8 -*- | |
3 ## File globalVars.py | |
4 ## This file is part of pyArq-Presupuestos. | |
5 ## | |
6 ## Copyright (C) 2010 Miguel Ángel Bárcena Rodríguez | |
7 ## <miguelangel@obraencurso.es> | |
8 ## | |
9 ## pyArq-Presupuestos is free software: you can redistribute it and/or modify | |
10 ## it under the terms of the GNU General Public License as published by | |
11 ## the Free Software Foundation, either version 3 of the License, or | |
12 ## (at your option) any later version. | |
13 ## | |
14 ## pyArq-Presupuestos is distributed in the hope that it will be useful, | |
15 ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 ## GNU General Public License for more details. | |
18 ## | |
19 ## You should have received a copy of the GNU General Public License | |
20 ## along with this program. If not, see <http://www.gnu.org/licenses/>. | |
21 | |
22 # module for global variables | |
23 import os | |
24 # path: Paths where find the program files needed | |
25 | |
26 version = "pyArq-Presupuestos v0.0.0" | |
27 path = { | |
28 "HOME" : "", | |
29 "APPDATA" : "", | |
30 "ICON" : "/images/pyArq-Presupuestos.svg", | |
31 "CHAPTER-ICON" : "/images/chapter.svg", | |
32 "UNIT-ICON" : "/images/unit.svg", | |
33 "MATERIAL-ICON" : "/images/material.svg", | |
34 "MACHINERY-ICON" : "/images/machinery.svg", | |
35 "LABOURFORCE-ICON": "/images/labourforce.svg", | |
36 "MENU-ICON": "/images/menu.svg", | |
37 "CONNECTED-ICON": "/images/connected.svg", | |
38 "DISCONNECTED-ICON": "/images/disconnected.svg", | |
39 "CLOSE-ICON": "/images/close.svg", | |
40 "DESCRIPTION-ICON": "/images/description.svg", | |
41 "SHEET-ICON": "/images/sheet.svg", | |
42 "DECOMPOSITION-ICON" : "/images/decomposition.svg", | |
43 "MEASURE-ICON" : "/images/measure.svg", | |
44 "ACUMULATEDLINE-ICON" : "/images/acumulatedline.svg", | |
45 "PARCIALLINE-ICON" : "/images/parcialline.svg", | |
46 "NORMALLINE-ICON" : "/images/normalline.svg", | |
47 "CALCULATEDLINE-ICON" : "/images/calculatedline.svg", | |
48 "ARROW-ICON": "/images/arrow.svg", | |
49 "IMAGE-ICON": "/images/image.svg", | |
50 "DXF-ICON": "/images/dxf.svg", | |
51 "DURUS-DATABASE": "/pyArq-Presupuestos/durus/", | |
52 "BUDGET": "/pyArq-Presupuestos/budget/", | |
53 "THROBBER-ICON": "/images/throbber.png", | |
54 "THROBBER-GIF": "/images/throbber.gif", | |
55 "BUDGET-ICON": "/images/budget.svg", | |
56 "PYARQ-ICON": "/images/pyArq.png", | |
57 } | |
58 | |
59 color = { | |
60 "ACTIVE" : "#CDD7FF", # blue | |
61 "INDEX-EVEN" : "#C4C4C4", # dark grey | |
62 "INDEX-UNEVEN" : "#DDDDDD", # grey | |
63 "EVEN" : "#E6E6E6", # dark white | |
64 "UNEVEN": "#FFFFFF", # white | |
65 "CHAPTER-EVEN": "#D8E6E6", # dark cian | |
66 "CHAPTER-UNEVEN": "#F0FFFF", # cian | |
67 "TEXT": "#000000", # black | |
68 "CALCULATED-TEXT": "#FF00FF", # | |
69 "SUBTOTAL": "#FAC8C8", | |
70 "SUBTOTAL-PARCIAL": "#ADD8E6", | |
71 } | |
72 desktop = { | |
73 "autodetect" : True, | |
74 "desktop" : "", | |
75 "browser" : "firefox", | |
76 "mailapp" : "evolution", | |
77 "imageapp" : "gthumb", | |
78 "cadapp" : "qcad", | |
79 } | |
80 | |
81 def getAppPath(key): | |
82 return path["APPDATA"] + path[key] | |
83 def getHomePath(key): | |
84 return path["HOME"] + path[key] | |
85 if os.name == 'posix': | |
86 path["HOME"] = os.environ.get('HOME') | |
87 elif sys.platform == 'win32': | |
88 path["HOME"] = os.environ.get('HOMEPATH') | |
89 # TODO: Mac Os, | |
90 # TODO: Test in diferents os | |
91 | |
92 #-# | |
93 path["BUDGET"] = "/pyArq-Presupuestos/" | |
94 #-# |