q2rad 0.1.168__py3-none-any.whl → 0.1.169__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/q2lines.py +56 -4
- q2rad/version.py +1 -1
- {q2rad-0.1.168.dist-info → q2rad-0.1.169.dist-info}/METADATA +1 -1
- {q2rad-0.1.168.dist-info → q2rad-0.1.169.dist-info}/RECORD +7 -7
- {q2rad-0.1.168.dist-info → q2rad-0.1.169.dist-info}/LICENSE +0 -0
- {q2rad-0.1.168.dist-info → q2rad-0.1.169.dist-info}/WHEEL +0 -0
- {q2rad-0.1.168.dist-info → q2rad-0.1.169.dist-info}/entry_points.txt +0 -0
q2rad/q2lines.py
CHANGED
|
@@ -45,7 +45,20 @@ SQL_DATATYPES = (
|
|
|
45
45
|
)
|
|
46
46
|
HAS_DATADEC = ("dec", "numeric", "num")
|
|
47
47
|
HAS_DATALEN = ("char", "varchar") + HAS_DATADEC
|
|
48
|
-
WIDGETS = (
|
|
48
|
+
WIDGETS = (
|
|
49
|
+
"line",
|
|
50
|
+
"text",
|
|
51
|
+
"code",
|
|
52
|
+
"button",
|
|
53
|
+
"check",
|
|
54
|
+
"radio",
|
|
55
|
+
"combo",
|
|
56
|
+
"list",
|
|
57
|
+
"spin",
|
|
58
|
+
"image",
|
|
59
|
+
"widget",
|
|
60
|
+
"label",
|
|
61
|
+
)
|
|
49
62
|
# "date;"
|
|
50
63
|
# "frame;"
|
|
51
64
|
# "grid;"
|
|
@@ -78,6 +91,8 @@ class Q2Lines(Q2Form, Q2_save_and_run):
|
|
|
78
91
|
|
|
79
92
|
self.add_action("Run", self.form_runner, hotkey="F4")
|
|
80
93
|
self.add_action("Fill", self.filler)
|
|
94
|
+
self.add_action("-")
|
|
95
|
+
self.add_action("Select panel", icon="⭥", worker=self.select_panel, hotkey="Ctrl+F3")
|
|
81
96
|
|
|
82
97
|
def create_form(self):
|
|
83
98
|
self.add_control("id", "", datatype="int", pk="*", ai="*", noform=1, nogrid=1)
|
|
@@ -89,7 +104,7 @@ class Q2Lines(Q2Form, Q2_save_and_run):
|
|
|
89
104
|
to_column="name",
|
|
90
105
|
related="name",
|
|
91
106
|
datatype="char",
|
|
92
|
-
datalen=100
|
|
107
|
+
datalen=100,
|
|
93
108
|
)
|
|
94
109
|
self.add_control("column", _("Column name"), datalen=50)
|
|
95
110
|
self.add_control("/")
|
|
@@ -124,7 +139,6 @@ class Q2Lines(Q2Form, Q2_save_and_run):
|
|
|
124
139
|
self.add_control("/")
|
|
125
140
|
|
|
126
141
|
if self.add_control("/h", _("Data type")):
|
|
127
|
-
|
|
128
142
|
self.add_control(
|
|
129
143
|
"datatype",
|
|
130
144
|
gridlabel=_("Data type"),
|
|
@@ -140,7 +154,6 @@ class Q2Lines(Q2Form, Q2_save_and_run):
|
|
|
140
154
|
self.add_control("/")
|
|
141
155
|
|
|
142
156
|
if self.add_control("/h"): # Db
|
|
143
|
-
|
|
144
157
|
self.add_control(
|
|
145
158
|
"migrate",
|
|
146
159
|
_("Migrate"),
|
|
@@ -256,6 +269,45 @@ class Q2Lines(Q2Form, Q2_save_and_run):
|
|
|
256
269
|
self.controls.delete("save_and_run_actions_visible")
|
|
257
270
|
self.system_controls.insert(2, self._save_and_run_control)
|
|
258
271
|
|
|
272
|
+
def select_panel(self):
|
|
273
|
+
first_row = last_row = self.current_row
|
|
274
|
+
|
|
275
|
+
def is_panel_start():
|
|
276
|
+
return self.r.column in ("/f", "/h", "/v")
|
|
277
|
+
|
|
278
|
+
def is_panel_end():
|
|
279
|
+
return self.r.column == "/"
|
|
280
|
+
|
|
281
|
+
def seek_end():
|
|
282
|
+
nonlocal last_row
|
|
283
|
+
while last_row < self.model.row_count():
|
|
284
|
+
self.set_grid_index(last_row)
|
|
285
|
+
# if is_panel_start():
|
|
286
|
+
# break
|
|
287
|
+
if is_panel_end():
|
|
288
|
+
break
|
|
289
|
+
last_row += 1
|
|
290
|
+
|
|
291
|
+
def seek_start():
|
|
292
|
+
in_panel = -1 if is_panel_end() else 0
|
|
293
|
+
nonlocal first_row
|
|
294
|
+
while first_row > 0:
|
|
295
|
+
self.set_grid_index(first_row)
|
|
296
|
+
if is_panel_start():
|
|
297
|
+
if in_panel == 0:
|
|
298
|
+
break
|
|
299
|
+
else:
|
|
300
|
+
in_panel -= 1
|
|
301
|
+
elif is_panel_end():
|
|
302
|
+
in_panel += 1
|
|
303
|
+
first_row -= 1
|
|
304
|
+
|
|
305
|
+
if not is_panel_start():
|
|
306
|
+
seek_start()
|
|
307
|
+
if not is_panel_end():
|
|
308
|
+
seek_end()
|
|
309
|
+
self.set_grid_selected_rows([x for x in range(first_row, last_row + 1)])
|
|
310
|
+
|
|
259
311
|
def filler(self):
|
|
260
312
|
if self.model.row_count() > 0:
|
|
261
313
|
if q2AskYN("Lines list is not empty! Are you sure") != 2:
|
q2rad/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.169"
|
|
@@ -5,7 +5,7 @@ q2rad/q2appmanager.py,sha256=x37tKfvUu-w8Cbu_v-0kLJgnLPpJ2o4qKwWu90SqOaU,15464
|
|
|
5
5
|
q2rad/q2appselector.py,sha256=H6rF_zJ6qOsUwKrUwaYl_YmPPSnWTsPawu-5RyJs_Lc,12198
|
|
6
6
|
q2rad/q2constants.py,sha256=dQtN4OMvZw0FATDAFYjolI7eGMVUnNnbTl6qM-ggZ4I,3416
|
|
7
7
|
q2rad/q2forms.py,sha256=yhTjLYZ2-UIo2Cz1K4wPY_pgsy9YGtm1NoJpGF3oh7U,10165
|
|
8
|
-
q2rad/q2lines.py,sha256=
|
|
8
|
+
q2rad/q2lines.py,sha256=fzATf3sjDIccEEx3JdpJ0Czssc8Kn8sbP8o4Fd4ROGo,13600
|
|
9
9
|
q2rad/q2make.py,sha256=JgRocf8cDVIFiC_cuZtYh86ZvwQAy9p7o6TF3LHF0B4,4621
|
|
10
10
|
q2rad/q2market.py,sha256=koWwKKc1MVn0ud2XDu_dal8lBFEMLX8KABpZO_OzTIM,2597
|
|
11
11
|
q2rad/q2modules.py,sha256=N3OkUKfiwVZtmDyAtnJcs2Rprd7uIHd0HhjHTyFoN_s,4294
|
|
@@ -16,9 +16,9 @@ q2rad/q2raddb.py,sha256=aG5SPEe4cnU_gO8zFmVkTDmIC0gcQFEIUv5NYGuqLlE,4372
|
|
|
16
16
|
q2rad/q2reports.py,sha256=YhrbwFXTMTgtwIh5XSWaabseaZjRco34WO5mU676PU8,81238
|
|
17
17
|
q2rad/q2stylesettings.py,sha256=esbfQoPgP7lJN2GRkqeQKjDpHCqCilJBzZf-c73ThCU,3593
|
|
18
18
|
q2rad/q2utils.py,sha256=-U4TGTzinY-CrpMTdUAQQrOiG0BVGbeTykH9b6T5-nk,14136
|
|
19
|
-
q2rad/version.py,sha256=
|
|
20
|
-
q2rad-0.1.
|
|
21
|
-
q2rad-0.1.
|
|
22
|
-
q2rad-0.1.
|
|
23
|
-
q2rad-0.1.
|
|
24
|
-
q2rad-0.1.
|
|
19
|
+
q2rad/version.py,sha256=0jNP0V8_cGKtqhvR_2w5o7Tl2dCLVzXaHcXzP8PoChg,23
|
|
20
|
+
q2rad-0.1.169.dist-info/entry_points.txt,sha256=DmsJQE6f3wYuhdN2h6ARYxSe8_d03paeepfGpdVj5rs,42
|
|
21
|
+
q2rad-0.1.169.dist-info/LICENSE,sha256=JRR3LlR18ghhYXT4G2cWgXmnxRvcuVcKlqncWWK4MRY,10347
|
|
22
|
+
q2rad-0.1.169.dist-info/METADATA,sha256=ioZ0Lq8YtD_-Z7ORGg4Bz30RpSBpDIxYMa9gtytfjN8,3509
|
|
23
|
+
q2rad-0.1.169.dist-info/WHEEL,sha256=WGfLGfLX43Ei_YORXSnT54hxFygu34kMpcQdmgmEwCQ,88
|
|
24
|
+
q2rad-0.1.169.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|