q2rad 0.1.103__py3-none-any.whl → 0.1.105__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of q2rad might be problematic. Click here for more details.
- q2rad/q2appmanager.py +7 -3
- q2rad/q2appselector.py +2 -1
- q2rad/q2rad.py +0 -1
- q2rad/q2reports.py +32 -12
- q2rad/version.py +1 -1
- {q2rad-0.1.103.dist-info → q2rad-0.1.105.dist-info}/METADATA +1 -1
- {q2rad-0.1.103.dist-info → q2rad-0.1.105.dist-info}/RECORD +9 -9
- {q2rad-0.1.103.dist-info → q2rad-0.1.105.dist-info}/WHEEL +0 -0
- {q2rad-0.1.103.dist-info → q2rad-0.1.105.dist-info}/entry_points.txt +0 -0
q2rad/q2appmanager.py
CHANGED
|
@@ -310,6 +310,7 @@ class AppManager(Q2Form):
|
|
|
310
310
|
db: Q2Db = q2app.q2_app.db_logic
|
|
311
311
|
db_tables = db.get_tables()
|
|
312
312
|
wait_table = Q2WaitShow(len(data))
|
|
313
|
+
errors = []
|
|
313
314
|
for table in data:
|
|
314
315
|
wait_table.step(table)
|
|
315
316
|
if table not in db_tables:
|
|
@@ -319,9 +320,12 @@ class AppManager(Q2Form):
|
|
|
319
320
|
for row in data[table]:
|
|
320
321
|
wait_row.step()
|
|
321
322
|
if not db.insert(table, row):
|
|
322
|
-
|
|
323
|
+
errors.append(db.last_sql_error)
|
|
324
|
+
# print(db.last_sql_error)
|
|
323
325
|
wait_row.close()
|
|
324
326
|
wait_table.close()
|
|
327
|
+
if errors:
|
|
328
|
+
q2Mess("<br>".join(errors))
|
|
325
329
|
|
|
326
330
|
def import_data(self, file=""):
|
|
327
331
|
filetype = "JSON(*.json)"
|
|
@@ -350,8 +354,8 @@ class AppManager(Q2Form):
|
|
|
350
354
|
wait_row.step()
|
|
351
355
|
if not db.raw_insert(table, row):
|
|
352
356
|
errors.append(db.last_sql_error)
|
|
353
|
-
print(db.last_sql_error)
|
|
357
|
+
# print(db.last_sql_error)
|
|
354
358
|
wait_row.close()
|
|
359
|
+
wait_table.close()
|
|
355
360
|
if errors:
|
|
356
361
|
q2Mess("<br>".join(errors))
|
|
357
|
-
wait_table.close()
|
q2rad/q2appselector.py
CHANGED
|
@@ -284,6 +284,7 @@ class Q2AppSelect(Q2Form):
|
|
|
284
284
|
}
|
|
285
285
|
self._select_application(row)
|
|
286
286
|
self.q2_app.migrate_db_logic()
|
|
287
|
+
self.q2_app.migrate_db_logic()
|
|
287
288
|
|
|
288
289
|
demo_app_url = f"{self.q2_app.q2market_url}/demo_app.json"
|
|
289
290
|
demo_data_url = f"{self.q2_app.q2market_url}/demo_data.json"
|
|
@@ -293,7 +294,7 @@ class Q2AppSelect(Q2Form):
|
|
|
293
294
|
AppManager.import_json_app(json.load(response_app))
|
|
294
295
|
|
|
295
296
|
self.q2_app.open_selected_app()
|
|
296
|
-
|
|
297
|
+
self.q2_app.migrate_db_data()
|
|
297
298
|
AppManager.import_json_data(json.load(response_data))
|
|
298
299
|
self.close()
|
|
299
300
|
else:
|
q2rad/q2rad.py
CHANGED
q2rad/q2reports.py
CHANGED
|
@@ -983,6 +983,9 @@ class Q2ReportColumns(Q2Form, ReportForm):
|
|
|
983
983
|
self.add_control("/")
|
|
984
984
|
|
|
985
985
|
def column_remove(self):
|
|
986
|
+
rows_qt = len(self.columns_data.rows)
|
|
987
|
+
if rows_qt > 1 and q2AskYN(f"This will also remove column(s) in {rows_qt} row sections ") != 2:
|
|
988
|
+
return
|
|
986
989
|
selected_columns = list(set([x[1] for x in self.columns_sheet.get_selection()]))
|
|
987
990
|
selected_columns.reverse()
|
|
988
991
|
for current_column in selected_columns:
|
|
@@ -1212,6 +1215,7 @@ class Q2ReportRows(Q2Form, ReportForm):
|
|
|
1212
1215
|
self.table_page_footer_rows = None
|
|
1213
1216
|
|
|
1214
1217
|
self.spanned_cells = {}
|
|
1218
|
+
self.selection_first_cell = None
|
|
1215
1219
|
|
|
1216
1220
|
self.report_columns_form = report_columns_form
|
|
1217
1221
|
self.report_report_form: Q2ReportReport = report_columns_form.report_report_form
|
|
@@ -1409,7 +1413,7 @@ class Q2ReportRows(Q2Form, ReportForm):
|
|
|
1409
1413
|
selected_rows = self.get_selected_rows()
|
|
1410
1414
|
selected_rows.reverse()
|
|
1411
1415
|
for current_row in selected_rows:
|
|
1412
|
-
current_row = self.rows_sheet.current_row()
|
|
1416
|
+
# current_row = self.rows_sheet.current_row()
|
|
1413
1417
|
self.rows_data.heights.pop(current_row)
|
|
1414
1418
|
self.rows_sheet.remove_row(current_row)
|
|
1415
1419
|
tmp = {}
|
|
@@ -1705,8 +1709,8 @@ class Q2ReportRows(Q2Form, ReportForm):
|
|
|
1705
1709
|
# open up spanned cells
|
|
1706
1710
|
for x in selection:
|
|
1707
1711
|
if x in self.spanned_cells:
|
|
1708
|
-
for row in range(x[0], x[0]+self.spanned_cells[x][0]):
|
|
1709
|
-
for col in range(x[1], x[1]+self.spanned_cells[x][1]):
|
|
1712
|
+
for row in range(x[0], x[0] + self.spanned_cells[x][0]):
|
|
1713
|
+
for col in range(x[1], x[1] + self.spanned_cells[x][1]):
|
|
1710
1714
|
if (row, col) not in selection:
|
|
1711
1715
|
selection.append((row, col))
|
|
1712
1716
|
|
|
@@ -1746,18 +1750,18 @@ class Q2ReportRows(Q2Form, ReportForm):
|
|
|
1746
1750
|
row = self.rows_sheet.current_row()
|
|
1747
1751
|
column = self.rows_sheet.current_column()
|
|
1748
1752
|
cell_key = f"{row},{column}"
|
|
1749
|
-
|
|
1750
|
-
self.rows_data.cells[cell_key] = {}
|
|
1751
|
-
set_dict_default(self.rows_data.cells[cell_key], "data", "")
|
|
1752
|
-
set_dict_default(self.rows_data.cells[cell_key], "style", {})
|
|
1753
|
+
self.ensure_cell(cell_key)
|
|
1753
1754
|
|
|
1754
|
-
|
|
1755
|
+
# when selection - using style of first selected cell - fix it
|
|
1756
|
+
if len(self.rows_sheet.get_selection()) == 1:
|
|
1757
|
+
self.selection_first_cell = cell_key
|
|
1758
|
+
all_style.update(self.rows_data.cells[cell_key]["style"])
|
|
1755
1759
|
|
|
1756
|
-
|
|
1760
|
+
self.report_report_form.focus_changed(self.rows_sheet)
|
|
1757
1761
|
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1762
|
+
self.report_report_form.update_style_bar(
|
|
1763
|
+
all_style, self.rows_data.cells[cell_key]["style"], self.rows_data.cells[cell_key]
|
|
1764
|
+
)
|
|
1761
1765
|
|
|
1762
1766
|
def rows_sheet_focus_out(self):
|
|
1763
1767
|
pass
|
|
@@ -1868,6 +1872,16 @@ class Q2ReportRows(Q2Form, ReportForm):
|
|
|
1868
1872
|
self.add_table_footer(self.rows_data.get("table_footer"))
|
|
1869
1873
|
|
|
1870
1874
|
def apply_style(self):
|
|
1875
|
+
selection = self.rows_sheet.get_selection()
|
|
1876
|
+
if len(selection) > 1:
|
|
1877
|
+
for cell_key in selection:
|
|
1878
|
+
cell_key = "{0},{1}".format(cell_key[0],cell_key[1])
|
|
1879
|
+
if cell_key != self.selection_first_cell:
|
|
1880
|
+
self.ensure_cell(cell_key)
|
|
1881
|
+
self.rows_data.cells[cell_key]["style"] = dict(
|
|
1882
|
+
self.rows_data.cells[self.selection_first_cell]["style"]
|
|
1883
|
+
)
|
|
1884
|
+
|
|
1871
1885
|
self.rows_sheet.sheet_styles = self.get_style()
|
|
1872
1886
|
self.rows_sheet.cell_styles = {}
|
|
1873
1887
|
self.rows_sheet.clear_spans()
|
|
@@ -1884,6 +1898,12 @@ class Q2ReportRows(Q2Form, ReportForm):
|
|
|
1884
1898
|
self.rows_sheet.set_span(row, column, rowspan, colspan)
|
|
1885
1899
|
self.rows_sheet.set_cell_style_sheet(None, row, column)
|
|
1886
1900
|
|
|
1901
|
+
def ensure_cell(self, cell_key):
|
|
1902
|
+
if cell_key not in self.rows_data.cells:
|
|
1903
|
+
self.rows_data.cells[cell_key] = {}
|
|
1904
|
+
set_dict_default(self.rows_data.cells[cell_key], "data", "")
|
|
1905
|
+
set_dict_default(self.rows_data.cells[cell_key], "style", {})
|
|
1906
|
+
|
|
1887
1907
|
def add_table_header(self, header_data={}):
|
|
1888
1908
|
if self.rows_data.role != "table":
|
|
1889
1909
|
return
|
q2rad/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.105"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
q2rad/__init__.py,sha256=sUmWCYp2n0GJN5uzzKpn9l9ZFlArwAuHGVPMYslda_8,181
|
|
2
2
|
q2rad/__main__.py,sha256=5EIdlccW2g7DO-vdSyh2K1nZ8L66wy1h9hFY0coYr-o,88
|
|
3
3
|
q2rad/q2actions.py,sha256=LE-3IhmJanbsF4nXnEKyBr-TO2i-Gv7Y9aJET_mTrk0,5892
|
|
4
|
-
q2rad/q2appmanager.py,sha256
|
|
5
|
-
q2rad/q2appselector.py,sha256=
|
|
4
|
+
q2rad/q2appmanager.py,sha256=2eiIxVp7GCMPrc3OsRi0L5gGjRyyTDPLboaetyYrqxU,12811
|
|
5
|
+
q2rad/q2appselector.py,sha256=svYrNwPBAPYJbIOO6Ri1OwiWTcbnW5equQ3EVexIwKo,11267
|
|
6
6
|
q2rad/q2constants.py,sha256=uZPYPt9MCe5bX0iX-iOC350ZtTRcujI49Kags1zriAg,2896
|
|
7
7
|
q2rad/q2forms.py,sha256=7jhBOkSsPFLUf6S7Jv-D6Lrty7WHCeWHQb5tMmSozVs,8474
|
|
8
8
|
q2rad/q2lines.py,sha256=YH0wlj0Ml3-LdPDezbSugWY7a2ZmEfqdHF8I7Gt_0YQ,10415
|
|
@@ -10,12 +10,12 @@ q2rad/q2market.py,sha256=LgMaqa2ltb3ff1M6MQV69MLM551vPUaXIiIlQkBYkyY,2133
|
|
|
10
10
|
q2rad/q2modules.py,sha256=ngQcf2CUcgGSuRcb3_9tKSq3O7QjDvnoJnAqhkfvc7c,2844
|
|
11
11
|
q2rad/q2packages.py,sha256=4IgDx8tgz_Hbtz8WIP_yxFxhSmDAP8CeptcKosc-1ic,2825
|
|
12
12
|
q2rad/q2queries.py,sha256=ZHVqXNEXiQyobJLbmrqSW4_zDGGhmJU_PO-Dyty9Gww,11231
|
|
13
|
-
q2rad/q2rad.py,sha256
|
|
13
|
+
q2rad/q2rad.py,sha256=-SvWK3JRb9F_ngLRziKWZUt3Hgs2KmfNGC-hXN86XbU,28105
|
|
14
14
|
q2rad/q2raddb.py,sha256=StXGNY46t9xoOU7u5f560TiTFIzJO9sOb0zfnVS9KyA,3590
|
|
15
|
-
q2rad/q2reports.py,sha256=
|
|
15
|
+
q2rad/q2reports.py,sha256=K-kAbHCo_21iJo-A2y6VJ7n7uUTsz4BJPg7ahBwQqfk,78690
|
|
16
16
|
q2rad/q2utils.py,sha256=WWyjBhuSDDLgRalzoV4C-HeA7jl9UPJFrDpSgL29nCg,2979
|
|
17
|
-
q2rad/version.py,sha256=
|
|
18
|
-
q2rad-0.1.
|
|
19
|
-
q2rad-0.1.
|
|
20
|
-
q2rad-0.1.
|
|
21
|
-
q2rad-0.1.
|
|
17
|
+
q2rad/version.py,sha256=ppTftgcwUDE11ucuRwa71-fgfQHzPtNmPLGiBtkNs-U,23
|
|
18
|
+
q2rad-0.1.105.dist-info/entry_points.txt,sha256=DmsJQE6f3wYuhdN2h6ARYxSe8_d03paeepfGpdVj5rs,42
|
|
19
|
+
q2rad-0.1.105.dist-info/WHEEL,sha256=vxFmldFsRN_Hx10GDvsdv1wroKq8r5Lzvjp6GZ4OO8c,88
|
|
20
|
+
q2rad-0.1.105.dist-info/METADATA,sha256=Q_ozH57-FeeWmCsm4U1CWd7rrhWBJEeS9boEFauFocw,2697
|
|
21
|
+
q2rad-0.1.105.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|