comparison Generic/globalVars.py @ 12:29a4044a95ff

svg to png
author Miguel Ángel Bárcena Rodríguez <miguelangel@obraencurso.es>
date Thu, 30 Dec 2010 12:28:33 +0100
parents fe9c55f86698
children 60bc5117926c
comparison
equal deleted inserted replaced
11:fe9c55f86698 12:29a4044a95ff
19 ## You should have received a copy of the GNU General Public License 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/>. 20 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
21 21
22 # module for global variables 22 # module for global variables
23 import os 23 import os
24 # path: Paths where find the program files needed 24 import sys
25 25
26 version = "pyArq Presupuestos v0.0.0" 26 version = "pyArq Presupuestos v0.0.0"
27 changeset = 10 27 changeset = 10
28 baseversion = 0 28 baseversion = 0
29
30 # path: Paths where find the program files needed
29 path = { 31 path = {
30 "HOME" : "", 32 "HOME" : "",
31 "APPDATA" : "", 33 "APPDATA" : "",
32 "DURUS-DATABASE": "/pyArq-Presupuestos/durus/", 34 "DURUS-DATABASE": "/pyArq-Presupuestos/durus/",
33 "BUDGET": "/pyArq-Presupuestos/budget/", 35 "BUDGET": "/pyArq-Presupuestos/budget/",
34 "ICON" : "/images/pyArq-Presupuestos.svg", 36 "ICON" : "/images/pyArq-Presupuestos.png",
35 "CHAPTER-ICON" : "/images/chapter.svg", 37 "CHAPTER-ICON" : "/images/chapter.png",
36 "UNIT-ICON" : "/images/unit.svg", 38 "UNIT-ICON" : "/images/unit.png",
37 "MATERIAL-ICON" : "/images/material.svg", 39 "MATERIAL-ICON" : "/images/material.png",
38 "MACHINERY-ICON" : "/images/machinery.svg", 40 "MACHINERY-ICON" : "/images/machinery.png",
39 "LABOURFORCE-ICON": "/images/labourforce.svg", 41 "LABOURFORCE-ICON": "/images/labourforce.png",
40 "MENU-ICON": "/images/menu.svg", 42 "MENU-ICON": "/images/menu.png",
41 "CONNECTED-ICON": "/images/connected.svg", 43 "CONNECTED-ICON": "/images/connected.png",
42 "DISCONNECTED-ICON": "/images/disconnected.svg", 44 "DISCONNECTED-ICON": "/images/disconnected.png",
43 "CLOSE-ICON": "/images/close.svg", 45 "CLOSE-ICON": "/images/close.png",
44 "DESCRIPTION-ICON": "/images/description.svg", 46 "DESCRIPTION-ICON": "/images/description.png",
45 "SHEET-ICON": "/images/sheet.svg", 47 "SHEET-ICON": "/images/sheet.png",
46 "DECOMPOSITION-ICON" : "/images/decomposition.svg", 48 "DECOMPOSITION-ICON" : "/images/decomposition.png",
47 "MEASURE-ICON" : "/images/measure.svg", 49 "MEASURE-ICON" : "/images/measure.png",
48 "ACUMULATEDLINE-ICON" : "/images/acumulatedline.svg", 50 "ACUMULATEDLINE-ICON" : "/images/acumulatedline.png",
49 "PARCIALLINE-ICON" : "/images/parcialline.svg", 51 "PARCIALLINE-ICON" : "/images/parcialline.png",
50 "NORMALLINE-ICON" : "/images/normalline.svg", 52 "NORMALLINE-ICON" : "/images/normalline.png",
51 "CALCULATEDLINE-ICON" : "/images/calculatedline.svg", 53 "CALCULATEDLINE-ICON" : "/images/calculatedline.png",
52 "ARROW-ICON": "/images/arrow.svg", 54 "ARROW-ICON": "/images/arrow.png",
53 "IMAGE-ICON": "/images/image.svg", 55 "IMAGE-ICON": "/images/image.png",
54 "DXF-ICON": "/images/dxf.svg", 56 "DXF-ICON": "/images/dxf.png",
55 "THROBBER-ICON": "/images/throbber.png", 57 "THROBBER-ICON": "/images/throbber.png",
56 "THROBBER-GIF": "/images/throbber.gif", 58 "THROBBER-GIF": "/images/throbber.gif",
57 "BUDGET-ICON": "/images/budget.svg", 59 "BUDGET-ICON": "/images/budget.png",
58 "PYARQ-ICON": "/images/pyArq.png", 60 "PYARQ-ICON": "/images/pyArq.png",
59 } 61 }
60 62
61 color = { 63 color = {
62 "ACTIVE" : "#CDD7FF", # blue 64 "ACTIVE" : "#CDD7FF", # blue
69 "TEXT": "#000000", # black 71 "TEXT": "#000000", # black
70 "CALCULATED-TEXT": "#FF00FF", # 72 "CALCULATED-TEXT": "#FF00FF", #
71 "SUBTOTAL": "#FAC8C8", 73 "SUBTOTAL": "#FAC8C8",
72 "SUBTOTAL-PARCIAL": "#ADD8E6", 74 "SUBTOTAL-PARCIAL": "#ADD8E6",
73 } 75 }
76
74 desktop = { 77 desktop = {
75 "autodetect" : True, 78 "autodetect" : True,
76 "desktop" : "", 79 "desktop" : "",
77 "browser" : "firefox", 80 "browser" : "firefox",
78 "mailapp" : "evolution", 81 "mailapp" : "evolution",
80 "cadapp" : "qcad", 83 "cadapp" : "qcad",
81 } 84 }
82 85
83 def getAppPath(key): 86 def getAppPath(key):
84 return path["APPDATA"] + path[key] 87 return path["APPDATA"] + path[key]
88
85 def getHomePath(key): 89 def getHomePath(key):
86 return path["HOME"] + path[key] 90 return path["HOME"] + path[key]
91
87 if os.name == 'posix': 92 if os.name == 'posix':
88 path["HOME"] = os.environ.get('HOME') 93 path["HOME"] = os.environ.get('HOME')
89 elif sys.platform == 'win32': 94 elif sys.platform == 'win32':
90 path["HOME"] = os.environ.get('HOMEPATH') 95 path["HOME"] = os.environ.get('HOMEPATH')
91 # TODO: Mac Os, 96 # TODO: Mac Os,