summaryrefslogtreecommitdiff
path: root/src/main/python/utils/data.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/python/utils/data.py')
-rw-r--r--src/main/python/utils/data.py317
1 files changed, 10 insertions, 307 deletions
diff --git a/src/main/python/utils/data.py b/src/main/python/utils/data.py
index 593cb1b..863e4c6 100644
--- a/src/main/python/utils/data.py
+++ b/src/main/python/utils/data.py
@@ -1,311 +1,14 @@
-paperSizes = {
- "A0": {
- "72": [2384, 3370],
- "96": [3179, 4494],
- "150": [4967, 7022],
- "300": [9933, 14043]
- },
- "A1": {
- "72": [1684, 2384],
- "96": [2245, 3179],
- "150": [3508, 4967],
- "300": [7016, 9933]
- },
- "A2": {
- "72": [1191, 1684],
- "96": [1587, 2245],
- "150": [2480, 3508],
- "300": [4960, 7016]
- },
- "A3": {
- "72": [842, 1191],
- "96": [1123, 1587],
- "150": [1754, 2480],
- "300": [3508, 4960]
- },
- "A4": {
- "72": [595, 842],
- "96": [794, 1123],
- "150": [1240, 1754],
- "300": [2480, 3508]
- }
-}
+import json
+from .funcs import fileImporter
-sheetDimensionList = [f'A{i}' for i in range(5)]
+paperSizes = json.load(open(fileImporter("config/paperSizes.json")))
-ppiList = ["72", "96", "150", "300"]
+sheetDimensionList = list(paperSizes.keys())
+
+ppiList = paperSizes[sheetDimensionList[0]].keys()
+
+toolbarItems = json.load(open(fileImporter("config/items.json")))
+
+defaultToolbarItems = toolbarItems.keys()
-toolbarItems = {
- 'Ellipse': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse2': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse3': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse4': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse5': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse6': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse7': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse8': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse9': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse11': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse12': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse13': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse14': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse15': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse16': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse17': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse18': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse19': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse20': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse21': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse22': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse23': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse24': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse25': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse26': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse27': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse28': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse29': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse30': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse31': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse32': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse33': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse34': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse35': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse36': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse37': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse38': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse39': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse40': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse41': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse42': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse43': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse44': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse45': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
- 'Ellipse46': {
- 'name': 'Ellipse',
- 'icon': 'ellipse.png',
- 'object': 'QGraphicsEllipseItem',
- 'args': [20, 20, 300, 300]
- },
-}
-defaultToolbarItems = toolbarItems.keys() \ No newline at end of file