py10x-universe 0.1.3__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.
Files changed (214) hide show
  1. core_10x/__init__.py +42 -0
  2. core_10x/backbone/__init__.py +0 -0
  3. core_10x/backbone/backbone_store.py +59 -0
  4. core_10x/backbone/backbone_traitable.py +30 -0
  5. core_10x/backbone/backbone_user.py +66 -0
  6. core_10x/backbone/bound_data_domain.py +49 -0
  7. core_10x/backbone/namespace.py +101 -0
  8. core_10x/backbone/vault.py +38 -0
  9. core_10x/code_samples/__init__.py +0 -0
  10. core_10x/code_samples/_package_manifest.py +3 -0
  11. core_10x/code_samples/directories.py +181 -0
  12. core_10x/code_samples/person.py +76 -0
  13. core_10x/concrete_traits.py +356 -0
  14. core_10x/conftest.py +12 -0
  15. core_10x/curve.py +321 -0
  16. core_10x/data_domain.py +48 -0
  17. core_10x/data_domain_binder.py +45 -0
  18. core_10x/directory.py +250 -0
  19. core_10x/entity.py +8 -0
  20. core_10x/entity_filter.py +5 -0
  21. core_10x/environment_variables.py +147 -0
  22. core_10x/exec_control.py +84 -0
  23. core_10x/experimental/__init__.py +0 -0
  24. core_10x/experimental/data_protocol_ex.py +34 -0
  25. core_10x/global_cache.py +121 -0
  26. core_10x/manual_tests/__init__.py +0 -0
  27. core_10x/manual_tests/calendar_test.py +35 -0
  28. core_10x/manual_tests/ctor_update_bug.py +58 -0
  29. core_10x/manual_tests/debug_graph_on.py +17 -0
  30. core_10x/manual_tests/debug_graphoff_inside_graph_on.py +28 -0
  31. core_10x/manual_tests/enum_bits_test.py +17 -0
  32. core_10x/manual_tests/env_vars_trivial_test.py +12 -0
  33. core_10x/manual_tests/existing_traitable.py +33 -0
  34. core_10x/manual_tests/k10x_test1.py +13 -0
  35. core_10x/manual_tests/named_constant_test.py +121 -0
  36. core_10x/manual_tests/nucleus_trivial_test.py +42 -0
  37. core_10x/manual_tests/polars_test.py +14 -0
  38. core_10x/manual_tests/py_class_test.py +4 -0
  39. core_10x/manual_tests/rc_test.py +42 -0
  40. core_10x/manual_tests/rdate_test.py +12 -0
  41. core_10x/manual_tests/reference_serialization_bug.py +19 -0
  42. core_10x/manual_tests/resource_trivial_test.py +10 -0
  43. core_10x/manual_tests/store_uri_test.py +6 -0
  44. core_10x/manual_tests/trait_definition_test.py +19 -0
  45. core_10x/manual_tests/trait_filter_test.py +15 -0
  46. core_10x/manual_tests/trait_flag_modification_test.py +42 -0
  47. core_10x/manual_tests/trait_modification_bug.py +26 -0
  48. core_10x/manual_tests/traitable_as_of_test.py +82 -0
  49. core_10x/manual_tests/traitable_heir_test.py +39 -0
  50. core_10x/manual_tests/traitable_history_test.py +41 -0
  51. core_10x/manual_tests/traitable_serialization_test.py +54 -0
  52. core_10x/manual_tests/traitable_trivial_test.py +71 -0
  53. core_10x/manual_tests/trivial_graph_test.py +16 -0
  54. core_10x/manual_tests/ts_class_association_test.py +64 -0
  55. core_10x/manual_tests/ts_trivial_test.py +35 -0
  56. core_10x/named_constant.py +425 -0
  57. core_10x/nucleus.py +81 -0
  58. core_10x/package_manifest.py +85 -0
  59. core_10x/package_refactoring.py +153 -0
  60. core_10x/py_class.py +431 -0
  61. core_10x/rc.py +155 -0
  62. core_10x/rdate.py +339 -0
  63. core_10x/resource.py +189 -0
  64. core_10x/roman_number.py +67 -0
  65. core_10x/testlib/__init__.py +0 -0
  66. core_10x/testlib/test_store.py +240 -0
  67. core_10x/testlib/traitable_history_tests.py +787 -0
  68. core_10x/testlib/ts_tests.py +280 -0
  69. core_10x/trait.py +377 -0
  70. core_10x/trait_definition.py +176 -0
  71. core_10x/trait_filter.py +205 -0
  72. core_10x/trait_method_error.py +36 -0
  73. core_10x/traitable.py +1082 -0
  74. core_10x/traitable_cli.py +153 -0
  75. core_10x/traitable_heir.py +33 -0
  76. core_10x/traitable_id.py +31 -0
  77. core_10x/ts_store.py +172 -0
  78. core_10x/ts_store_type.py +26 -0
  79. core_10x/ts_union.py +147 -0
  80. core_10x/ui_hint.py +153 -0
  81. core_10x/unit_tests/test_concrete_traits.py +156 -0
  82. core_10x/unit_tests/test_converters.py +51 -0
  83. core_10x/unit_tests/test_curve.py +157 -0
  84. core_10x/unit_tests/test_directory.py +54 -0
  85. core_10x/unit_tests/test_documentation.py +172 -0
  86. core_10x/unit_tests/test_environment_variables.py +15 -0
  87. core_10x/unit_tests/test_filters.py +239 -0
  88. core_10x/unit_tests/test_graph.py +348 -0
  89. core_10x/unit_tests/test_named_constant.py +98 -0
  90. core_10x/unit_tests/test_rc.py +11 -0
  91. core_10x/unit_tests/test_rdate.py +484 -0
  92. core_10x/unit_tests/test_trait_method_error.py +80 -0
  93. core_10x/unit_tests/test_trait_modification.py +19 -0
  94. core_10x/unit_tests/test_traitable.py +959 -0
  95. core_10x/unit_tests/test_traitable_history.py +1 -0
  96. core_10x/unit_tests/test_ts_store.py +1 -0
  97. core_10x/unit_tests/test_ts_union.py +369 -0
  98. core_10x/unit_tests/test_ui_nodes.py +81 -0
  99. core_10x/unit_tests/test_xxcalendar.py +471 -0
  100. core_10x/vault/__init__.py +0 -0
  101. core_10x/vault/sec_keys.py +133 -0
  102. core_10x/vault/security_keys_old.py +168 -0
  103. core_10x/vault/vault.py +56 -0
  104. core_10x/vault/vault_traitable.py +56 -0
  105. core_10x/vault/vault_user.py +70 -0
  106. core_10x/xdate_time.py +136 -0
  107. core_10x/xnone.py +71 -0
  108. core_10x/xxcalendar.py +228 -0
  109. infra_10x/__init__.py +0 -0
  110. infra_10x/manual_tests/__init__.py +0 -0
  111. infra_10x/manual_tests/test_misc.py +16 -0
  112. infra_10x/manual_tests/test_prepare_filter_and_pipeline.py +25 -0
  113. infra_10x/mongodb_admin.py +111 -0
  114. infra_10x/mongodb_store.py +346 -0
  115. infra_10x/mongodb_utils.py +129 -0
  116. infra_10x/unit_tests/conftest.py +13 -0
  117. infra_10x/unit_tests/test_mongo_db.py +36 -0
  118. infra_10x/unit_tests/test_mongo_history.py +1 -0
  119. py10x_universe-0.1.3.dist-info/METADATA +406 -0
  120. py10x_universe-0.1.3.dist-info/RECORD +214 -0
  121. py10x_universe-0.1.3.dist-info/WHEEL +4 -0
  122. py10x_universe-0.1.3.dist-info/licenses/LICENSE +21 -0
  123. ui_10x/__init__.py +0 -0
  124. ui_10x/apps/__init__.py +0 -0
  125. ui_10x/apps/collection_editor_app.py +100 -0
  126. ui_10x/choice.py +212 -0
  127. ui_10x/collection_editor.py +135 -0
  128. ui_10x/concrete_trait_widgets.py +220 -0
  129. ui_10x/conftest.py +8 -0
  130. ui_10x/entity_stocker.py +173 -0
  131. ui_10x/examples/__init__.py +0 -0
  132. ui_10x/examples/_guess_word_data.py +14076 -0
  133. ui_10x/examples/collection_editor.py +17 -0
  134. ui_10x/examples/date_selector.py +14 -0
  135. ui_10x/examples/entity_stocker.py +18 -0
  136. ui_10x/examples/guess_word.py +392 -0
  137. ui_10x/examples/message_box.py +20 -0
  138. ui_10x/examples/multi_choice.py +17 -0
  139. ui_10x/examples/py_data_browser.py +66 -0
  140. ui_10x/examples/radiobox.py +29 -0
  141. ui_10x/examples/single_choice.py +31 -0
  142. ui_10x/examples/style_sheet.py +47 -0
  143. ui_10x/examples/trivial_entity_editor.py +18 -0
  144. ui_10x/platform.py +20 -0
  145. ui_10x/platform_interface.py +517 -0
  146. ui_10x/py_data_browser.py +249 -0
  147. ui_10x/qt6/__init__.py +0 -0
  148. ui_10x/qt6/conftest.py +8 -0
  149. ui_10x/qt6/manual_tests/__init__.py +0 -0
  150. ui_10x/qt6/manual_tests/basic_test.py +35 -0
  151. ui_10x/qt6/platform_implementation.py +275 -0
  152. ui_10x/qt6/utils.py +665 -0
  153. ui_10x/rio/__init__.py +0 -0
  154. ui_10x/rio/apps/examples/examples/__init__.py +22 -0
  155. ui_10x/rio/apps/examples/examples/components/__init__.py +3 -0
  156. ui_10x/rio/apps/examples/examples/components/collection_editor.py +15 -0
  157. ui_10x/rio/apps/examples/examples/pages/collection_editor.py +21 -0
  158. ui_10x/rio/apps/examples/examples/pages/login_page.py +88 -0
  159. ui_10x/rio/apps/examples/examples/pages/style_sheet.py +21 -0
  160. ui_10x/rio/apps/examples/rio.toml +14 -0
  161. ui_10x/rio/component_builder.py +497 -0
  162. ui_10x/rio/components/__init__.py +9 -0
  163. ui_10x/rio/components/group_box.py +31 -0
  164. ui_10x/rio/components/labeled_checkbox.py +18 -0
  165. ui_10x/rio/components/line_edit.py +37 -0
  166. ui_10x/rio/components/radio_button.py +32 -0
  167. ui_10x/rio/components/separator.py +24 -0
  168. ui_10x/rio/components/splitter.py +121 -0
  169. ui_10x/rio/components/tree_view.py +75 -0
  170. ui_10x/rio/conftest.py +35 -0
  171. ui_10x/rio/internals/__init__.py +0 -0
  172. ui_10x/rio/internals/app.py +192 -0
  173. ui_10x/rio/manual_tests/__init__.py +0 -0
  174. ui_10x/rio/manual_tests/basic_test.py +24 -0
  175. ui_10x/rio/manual_tests/splitter.py +27 -0
  176. ui_10x/rio/platform_implementation.py +91 -0
  177. ui_10x/rio/style_sheet.py +53 -0
  178. ui_10x/rio/unit_tests/test_collection_editor.py +68 -0
  179. ui_10x/rio/unit_tests/test_internals.py +630 -0
  180. ui_10x/rio/unit_tests/test_style_sheet.py +37 -0
  181. ui_10x/rio/widgets/__init__.py +46 -0
  182. ui_10x/rio/widgets/application.py +109 -0
  183. ui_10x/rio/widgets/button.py +48 -0
  184. ui_10x/rio/widgets/button_group.py +60 -0
  185. ui_10x/rio/widgets/calendar.py +23 -0
  186. ui_10x/rio/widgets/checkbox.py +24 -0
  187. ui_10x/rio/widgets/dialog.py +137 -0
  188. ui_10x/rio/widgets/group_box.py +27 -0
  189. ui_10x/rio/widgets/layout.py +34 -0
  190. ui_10x/rio/widgets/line_edit.py +37 -0
  191. ui_10x/rio/widgets/list.py +105 -0
  192. ui_10x/rio/widgets/message_box.py +70 -0
  193. ui_10x/rio/widgets/scroll_area.py +31 -0
  194. ui_10x/rio/widgets/spacer.py +6 -0
  195. ui_10x/rio/widgets/splitter.py +45 -0
  196. ui_10x/rio/widgets/text_edit.py +28 -0
  197. ui_10x/rio/widgets/tree.py +89 -0
  198. ui_10x/rio/widgets/unit_tests/test_button.py +101 -0
  199. ui_10x/rio/widgets/unit_tests/test_button_group.py +33 -0
  200. ui_10x/rio/widgets/unit_tests/test_calendar.py +114 -0
  201. ui_10x/rio/widgets/unit_tests/test_checkbox.py +109 -0
  202. ui_10x/rio/widgets/unit_tests/test_group_box.py +158 -0
  203. ui_10x/rio/widgets/unit_tests/test_label.py +43 -0
  204. ui_10x/rio/widgets/unit_tests/test_line_edit.py +140 -0
  205. ui_10x/rio/widgets/unit_tests/test_list.py +146 -0
  206. ui_10x/table_header_view.py +305 -0
  207. ui_10x/table_view.py +174 -0
  208. ui_10x/trait_editor.py +189 -0
  209. ui_10x/trait_widget.py +131 -0
  210. ui_10x/traitable_editor.py +200 -0
  211. ui_10x/traitable_view.py +131 -0
  212. ui_10x/unit_tests/conftest.py +8 -0
  213. ui_10x/unit_tests/test_platform.py +9 -0
  214. ui_10x/utils.py +661 -0
@@ -0,0 +1,517 @@
1
+ from __future__ import annotations
2
+
3
+ import abc
4
+ from typing import TYPE_CHECKING
5
+
6
+ if TYPE_CHECKING:
7
+ from collections.abc import Callable
8
+ from datetime import date
9
+
10
+
11
+ class ABCMetaSlotted(abc.ABCMeta):
12
+ def __new__(cls, name, bases, class_dict, **kwargs):
13
+ class_dict.setdefault('__slots__', ())
14
+ return super().__new__(cls, name, bases, class_dict, **kwargs)
15
+
16
+
17
+ class Object(abc.ABC, metaclass=ABCMetaSlotted): ...
18
+
19
+
20
+ # fmt: off
21
+ QueuedConnection = None
22
+ AutoConnection = None
23
+ DirectConnection = None
24
+ UniqueConnection = None
25
+ BlockingQueuedConnection = None
26
+ # fmt: on
27
+
28
+
29
+ class signal_decl(abc.ABC, metaclass=ABCMetaSlotted):
30
+ @abc.abstractmethod
31
+ def __init__(self, *args): ...
32
+
33
+ @abc.abstractmethod
34
+ def connect(self, method, type=None): ...
35
+
36
+ @abc.abstractmethod
37
+ def emit(self, *args): ...
38
+
39
+
40
+ class MouseEvent(abc.ABC, metaclass=ABCMetaSlotted):
41
+ @abc.abstractmethod
42
+ def is_left_button(self) -> bool: ...
43
+
44
+ @abc.abstractmethod
45
+ def is_right_button(self) -> bool: ...
46
+
47
+
48
+ class Point(abc.ABC, metaclass=ABCMetaSlotted):
49
+ @abc.abstractmethod
50
+ def x(self) -> int: ...
51
+
52
+ @abc.abstractmethod
53
+ def y(self) -> int: ...
54
+
55
+
56
+ class SizePolicy(abc.ABC, metaclass=ABCMetaSlotted):
57
+ MINIMUM_EXPANDING = None
58
+ PREFERRED = None
59
+
60
+
61
+ class FontMetrics(abc.ABC, metaclass=ABCMetaSlotted):
62
+ @abc.abstractmethod
63
+ def average_char_width(self) -> int: ...
64
+
65
+
66
+ class Color(abc.ABC, metaclass=ABCMetaSlotted): ...
67
+
68
+
69
+ class Widget(abc.ABC, metaclass=ABCMetaSlotted):
70
+ @abc.abstractmethod
71
+ def __init__(self, *args, **kwargs) -> None: ...
72
+
73
+ @abc.abstractmethod
74
+ def set_layout(self, layout: Layout): ...
75
+
76
+ @abc.abstractmethod
77
+ def set_style_sheet(self, sh: str): ...
78
+
79
+ @abc.abstractmethod
80
+ def style_sheet(self) -> str: ...
81
+
82
+ @abc.abstractmethod
83
+ def set_enabled(self, enabled: bool): ...
84
+
85
+ @abc.abstractmethod
86
+ def set_geometry(self, *args): ...
87
+
88
+ @abc.abstractmethod
89
+ def width(self) -> int: ...
90
+
91
+ @abc.abstractmethod
92
+ def height(self) -> int: ...
93
+
94
+ @abc.abstractmethod
95
+ def map_to_global(self, point: Point) -> Point: ...
96
+
97
+ # @abc.abstractmethod
98
+ # def mouse_press_event(self, event: MouseEvent): ...
99
+ #
100
+ # @abc.abstractmethod
101
+ # def focus_out_event(self, event): ...
102
+ #
103
+ @abc.abstractmethod
104
+ def set_size_policy(self, *args): ...
105
+
106
+ @abc.abstractmethod
107
+ def set_minimum_width(self, width: int): ...
108
+
109
+ # @abc.abstractmethod
110
+ # def set_maximum_width(self, width: int): ...
111
+
112
+ @abc.abstractmethod
113
+ def set_minimum_height(self, height: int): ...
114
+
115
+ @abc.abstractmethod
116
+ def font_metrics(self) -> FontMetrics: ...
117
+
118
+
119
+ # fmt: off
120
+ Horizontal = 0
121
+ Vertical = 1
122
+ # fmt: on
123
+
124
+
125
+ class Layout(abc.ABC, metaclass=ABCMetaSlotted):
126
+ @abc.abstractmethod
127
+ def __init__(self, *args, **kwargs): ...
128
+
129
+ @abc.abstractmethod
130
+ def add_widget(self, widget: Widget, **kwargs): ...
131
+
132
+ @abc.abstractmethod
133
+ def set_spacing(self, spacing: int): ...
134
+
135
+ @abc.abstractmethod
136
+ def set_contents_margins(self, left, top, right, bottom): ...
137
+
138
+
139
+ class BoxLayout(Layout, abc.ABC, metaclass=ABCMetaSlotted):
140
+ @abc.abstractmethod
141
+ def add_layout(self, layout: Layout, **kwargs): ...
142
+
143
+
144
+ class HBoxLayout(BoxLayout, abc.ABC, metaclass=ABCMetaSlotted): ...
145
+
146
+
147
+ class VBoxLayout(BoxLayout, abc.ABC, metaclass=ABCMetaSlotted): ...
148
+
149
+
150
+ class FormLayout(Layout):
151
+ @abc.abstractmethod
152
+ def add_row(self, w1: Widget, w2: Widget = None): ...
153
+
154
+
155
+ class Splitter(Widget):
156
+ @abc.abstractmethod
157
+ def add_widget(self, widget: Widget): ...
158
+
159
+ @abc.abstractmethod
160
+ def set_handle_width(self, width: int): ...
161
+
162
+ @abc.abstractmethod
163
+ def set_stretch_factor(self, widget_index: int, factor: int): ...
164
+
165
+ @abc.abstractmethod
166
+ def replace_widget(self, widget_index: int, widget: Widget): ...
167
+
168
+
169
+ class Label(Widget):
170
+ @abc.abstractmethod
171
+ def set_text(self, text: str): ...
172
+
173
+
174
+ class Style(abc.ABC, metaclass=ABCMetaSlotted):
175
+ State_Active = None
176
+
177
+ @abc.abstractmethod
178
+ def standard_icon(self, style_icon): ...
179
+
180
+
181
+ class PushButton(Label):
182
+ @abc.abstractmethod
183
+ def clicked_connect(self, bound_method): ...
184
+
185
+ @abc.abstractmethod
186
+ def set_flat(self, flat: bool): ...
187
+
188
+
189
+ class LineEdit(Label, abc.ABC, metaclass=ABCMetaSlotted):
190
+ @abc.abstractmethod
191
+ def text(self) -> str: ...
192
+
193
+ @abc.abstractmethod
194
+ def text_edited_connect(self, bound_method): ...
195
+
196
+ @abc.abstractmethod
197
+ def editing_finished_connect(self, bound_method): ...
198
+
199
+ @abc.abstractmethod
200
+ def set_read_only(self, readonly: bool): ...
201
+
202
+ @abc.abstractmethod
203
+ def set_password_mode(self): ...
204
+
205
+ @abc.abstractmethod
206
+ def set_tool_tip(self, tooltip: str): ...
207
+
208
+ @abc.abstractmethod
209
+ def mouse_press_event(self, event: MouseEvent): ...
210
+
211
+
212
+ class TextEdit(Widget, abc.ABC, metaclass=ABCMetaSlotted):
213
+ @abc.abstractmethod
214
+ def to_plain_text(self) -> str: ...
215
+
216
+ @abc.abstractmethod
217
+ def set_plain_text(self, text: str): ...
218
+
219
+ @abc.abstractmethod
220
+ def set_read_only(self, readonly: bool): ...
221
+
222
+ @abc.abstractmethod
223
+ def focus_out_event(self, event): ...
224
+
225
+
226
+ class CheckBox(Label):
227
+ @abc.abstractmethod
228
+ def set_checked(self, checked: bool): ...
229
+
230
+ @abc.abstractmethod
231
+ def is_checked(self) -> bool: ...
232
+
233
+ @abc.abstractmethod
234
+ def state_changed_connect(self, bound_method): ...
235
+
236
+
237
+ class ComboBox(Widget): ...
238
+
239
+
240
+ class GroupBox(Widget):
241
+ @abc.abstractmethod
242
+ def set_title(self, title: str): ...
243
+
244
+
245
+ class RadioButton(Widget):
246
+ @abc.abstractmethod
247
+ def set_checked(self, checked: bool): ...
248
+
249
+
250
+ class ButtonGroup(Widget):
251
+ @abc.abstractmethod
252
+ def add_button(self, rb: RadioButton, id: int): ...
253
+
254
+ @abc.abstractmethod
255
+ def button(self, id: int) -> RadioButton: ...
256
+
257
+ @abc.abstractmethod
258
+ def checked_id(self) -> int: ...
259
+
260
+
261
+ class ListItem(abc.ABC, metaclass=ABCMetaSlotted):
262
+ @abc.abstractmethod
263
+ def row(self): ...
264
+
265
+ @abc.abstractmethod
266
+ def set_selected(self, selected: bool): ...
267
+
268
+
269
+ MatchExactly = None
270
+
271
+
272
+ class ListWidget(Widget):
273
+ @abc.abstractmethod
274
+ def add_item(self, item): ...
275
+
276
+ @abc.abstractmethod
277
+ def add_items(self, items: list): ...
278
+
279
+ @abc.abstractmethod
280
+ def clicked_connect(self, bound_method): ...
281
+
282
+ @abc.abstractmethod
283
+ def clear(self): ...
284
+
285
+ @abc.abstractmethod
286
+ def find_items(self, text, flags): ...
287
+
288
+ @abc.abstractmethod
289
+ def row(self, item: ListItem) -> int: ...
290
+
291
+ @abc.abstractmethod
292
+ def take_item(self, row: int): ...
293
+
294
+
295
+ class TreeItem(Widget):
296
+ @abc.abstractmethod
297
+ def child_count(self): ...
298
+
299
+ @abc.abstractmethod
300
+ def set_expanded(self, expanded: bool): ...
301
+
302
+ @abc.abstractmethod
303
+ def set_text(self, col: int, text: str): ...
304
+
305
+ @abc.abstractmethod
306
+ def set_tool_tip(self, col: int, tooltip: str): ...
307
+
308
+
309
+ class TreeWidget(Widget):
310
+ @abc.abstractmethod
311
+ def set_column_count(self, column_count: int): ...
312
+
313
+ @abc.abstractmethod
314
+ def set_header_labels(self, labels: list): ...
315
+
316
+ @abc.abstractmethod
317
+ def top_level_item_count(self) -> int: ...
318
+
319
+ @abc.abstractmethod
320
+ def top_level_item(self, i: int) -> TreeItem: ...
321
+
322
+ @abc.abstractmethod
323
+ def resize_column_to_contents(self, col: int): ...
324
+
325
+ @abc.abstractmethod
326
+ def item_expanded_connect(self, item): ...
327
+
328
+ @abc.abstractmethod
329
+ def item_clicked_connect(self, bound_method): ...
330
+
331
+ @abc.abstractmethod
332
+ def item_pressed_connect(self, bound_method): ...
333
+
334
+ @abc.abstractmethod
335
+ def item_changed_connect(self, bound_method): ...
336
+
337
+ @abc.abstractmethod
338
+ def edit_item(self, item, col: int): ...
339
+
340
+ @abc.abstractmethod
341
+ def open_persistent_editor(self, item, col: int): ...
342
+
343
+
344
+ class CalendarWidget(Widget):
345
+ @abc.abstractmethod
346
+ def set_grid_visible(self, grid_visible: bool): ...
347
+
348
+ @abc.abstractmethod
349
+ def set_selected_date(self, selected_date: date): ...
350
+
351
+ @abc.abstractmethod
352
+ def selected_date(self) -> date: ...
353
+
354
+
355
+ class Dialog(Widget):
356
+ @abc.abstractmethod
357
+ def set_window_title(self, title: str): ...
358
+
359
+ @abc.abstractmethod
360
+ def set_window_flags(self, flags): ...
361
+
362
+ @abc.abstractmethod
363
+ def reject(self): ...
364
+
365
+ @abc.abstractmethod
366
+ def done(self, rc: int): ...
367
+
368
+ @abc.abstractmethod
369
+ def set_modal(self, modal: bool): ...
370
+
371
+ @abc.abstractmethod
372
+ def exec(self): ...
373
+
374
+ @abc.abstractmethod
375
+ def show(self): ...
376
+
377
+
378
+ class MessageBox(abc.ABC, metaclass=ABCMetaSlotted):
379
+ @classmethod
380
+ @abc.abstractmethod
381
+ def question(cls, parent: Widget, title: str, message: str, on_close: Callable[[Dialog], None]) -> bool:
382
+ raise NotImplementedError
383
+
384
+ @classmethod
385
+ @abc.abstractmethod
386
+ def warning(cls, parent: Widget, title: str, message: str, on_close: Callable[[Dialog], None]):
387
+ raise NotImplementedError
388
+
389
+ @classmethod
390
+ @abc.abstractmethod
391
+ def information(cls, parent: Widget, title: str, message: str, on_close: Callable[[Dialog], None]):
392
+ raise NotImplementedError
393
+
394
+ @classmethod
395
+ @abc.abstractmethod
396
+ def is_yes_button(cls, sb) -> bool:
397
+ raise NotImplementedError
398
+
399
+
400
+ class Application(abc.ABC, metaclass=ABCMetaSlotted):
401
+ @classmethod
402
+ @abc.abstractmethod
403
+ def instance(cls) -> Application: ...
404
+
405
+ @abc.abstractmethod
406
+ def style(self): ...
407
+
408
+
409
+ class TEXT_ALIGN:
410
+ # fmt: off
411
+ TOP = None
412
+ V_CENTER = None
413
+ BOTTOM = None
414
+ LEFT = None
415
+ CENTER = None
416
+ RIGHT = None
417
+ # fmt: on
418
+
419
+
420
+ class SCROLL(abc.ABC, metaclass=ABCMetaSlotted):
421
+ # fmt: off
422
+ OFF = None
423
+ ON = None
424
+ AS_NEEDED = None
425
+ # fmt: on
426
+
427
+
428
+ class ScrollArea(Widget):
429
+ @abc.abstractmethod
430
+ def set_widget(self, w: Widget): ...
431
+
432
+ @abc.abstractmethod
433
+ def set_horizontal_scroll_bar_policy(self, h): ...
434
+
435
+ @abc.abstractmethod
436
+ def set_vertical_scroll_bar_policy(self, h): ...
437
+
438
+
439
+ class StandardItem(abc.ABC, metaclass=ABCMetaSlotted):
440
+ @abc.abstractmethod
441
+ def __init__(self, *args): ...
442
+
443
+ @abc.abstractmethod
444
+ def append_column(self, column: tuple): ...
445
+
446
+
447
+ class StandardItemModel(abc.ABC, metaclass=ABCMetaSlotted):
448
+ @abc.abstractmethod
449
+ def set_item(self, row: int, col: int, item: StandardItem): ...
450
+
451
+ @abc.abstractmethod
452
+ def column_count(self, *args) -> int: ...
453
+
454
+ @abc.abstractmethod
455
+ def index(self, row: int, col: int): ...
456
+
457
+
458
+ class ModelIndex(abc.ABC, metaclass=ABCMetaSlotted):
459
+ @abc.abstractmethod
460
+ def is_valid(self) -> bool: ...
461
+
462
+ @abc.abstractmethod
463
+ def child(self, row: int, col: int): ...
464
+
465
+ @abc.abstractmethod
466
+ def parent(self): ...
467
+
468
+ @abc.abstractmethod
469
+ def model(self) -> StandardItemModel: ...
470
+
471
+ @abc.abstractmethod
472
+ def data(self, role): ...
473
+
474
+
475
+ class AbstractTableModel(abc.ABC, metaclass=ABCMetaSlotted): ...
476
+
477
+
478
+ class HeaderView(abc.ABC, metaclass=ABCMetaSlotted):
479
+ @abc.abstractmethod
480
+ def set_model(self, model): ...
481
+
482
+ @abc.abstractmethod
483
+ def section_resized_connect(self, bound_method): ...
484
+
485
+ @abc.abstractmethod
486
+ def init_style_option(self, *args): ...
487
+
488
+
489
+ class Palette(abc.ABC, metaclass=ABCMetaSlotted):
490
+ # fmt: off
491
+ ButtonText = None
492
+ Button = None
493
+ Window = None
494
+ # fmt: on
495
+
496
+ @abc.abstractmethod
497
+ def set_brush(self, br_type, brush): ...
498
+
499
+
500
+ class StyleOptionHeader(abc.ABC, metaclass=ABCMetaSlotted):
501
+ palette: Palette
502
+
503
+
504
+ ForegroundRole = None
505
+ BackgroundRole = None
506
+
507
+
508
+ class Separator(abc.ABC, metaclass=ABCMetaSlotted): ...
509
+
510
+
511
+ # fmt: off
512
+ def init(style = '') -> Application: raise NotImplementedError
513
+ def to_clipboard(text: str, **kwargs): raise NotImplementedError
514
+ def from_clipboard(**kwargs) -> str: raise NotImplementedError
515
+ def separator(horizontal = True) -> Separator: raise NotImplementedError
516
+ def is_ui_thread() -> bool: raise NotImplementedError
517
+ # fmt: on