jbqt 0.1.17__py3-none-any.whl → 0.1.18__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 jbqt might be problematic. Click here for more details.
jbqt/widgets/chips.py
CHANGED
|
@@ -96,7 +96,7 @@ class ChipsWidget(IChipsWidget):
|
|
|
96
96
|
input_layout = QHBoxLayout()
|
|
97
97
|
self.input_field = QLineEdit(self)
|
|
98
98
|
self.add_button = QPushButton("Add", self)
|
|
99
|
-
self.add_button.clicked.connect(self.
|
|
99
|
+
self.add_button.clicked.connect(self.parse_chip_input)
|
|
100
100
|
|
|
101
101
|
self.clear_button = QPushButton(consts.ICONS.TRASH("darkred"), "", self)
|
|
102
102
|
self.clear_button.clicked.connect(self.remove_all)
|
|
@@ -124,7 +124,7 @@ class ChipsWidget(IChipsWidget):
|
|
|
124
124
|
if a1.type() == QEvent.Type.KeyPress and focus == self.input_field:
|
|
125
125
|
match a1.key():
|
|
126
126
|
case Qt.Key.Key_Return | Qt.Key.Key_Enter:
|
|
127
|
-
self.
|
|
127
|
+
self.parse_chip_input()
|
|
128
128
|
return super().eventFilter(a0, a1)
|
|
129
129
|
|
|
130
130
|
def get_unweight_chip(self, tag: str) -> str:
|
|
@@ -221,8 +221,16 @@ class ChipsWidget(IChipsWidget):
|
|
|
221
221
|
def emit_changes(self):
|
|
222
222
|
self.valuesChanged.emit(self.values)
|
|
223
223
|
|
|
224
|
+
def parse_chip_input(self) -> None:
|
|
225
|
+
text = self.input_field.text().strip()
|
|
226
|
+
if "," in text:
|
|
227
|
+
self.add_chips(utils.parse_csv_line(text))
|
|
228
|
+
else:
|
|
229
|
+
self.add_chip()
|
|
230
|
+
|
|
224
231
|
def add_chip(self):
|
|
225
232
|
text = self.input_field.text().strip()
|
|
233
|
+
|
|
226
234
|
if text and text not in self.values:
|
|
227
235
|
chip_button = ChipButton(text, self.update_chip, self.remove_chip)
|
|
228
236
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: jbqt
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.18
|
|
4
4
|
Summary:
|
|
5
5
|
Author: Joseph Bochinski
|
|
6
6
|
Author-email: stirgejr@gmail.com
|
|
@@ -9,7 +9,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.12
|
|
10
10
|
Requires-Dist: fuzzywuzzy (>=0.18.0,<0.19.0)
|
|
11
11
|
Requires-Dist: jbconsts (>=0.1.1,<0.2.0)
|
|
12
|
-
Requires-Dist: jbutils (>=0.1.
|
|
12
|
+
Requires-Dist: jbutils (>=0.1.27,<0.2.0)
|
|
13
13
|
Requires-Dist: pyqt6 (>=6.9.0,<7.0.0)
|
|
14
14
|
Requires-Dist: python-levenshtein (>=0.27.1,<0.28.0)
|
|
15
15
|
Requires-Dist: rich (>=14.0.0,<15.0.0)
|
|
@@ -18,11 +18,11 @@ jbqt/types/__init__.py,sha256=er6dhNIqsfQr8mdpA2f7LIvX2CPmRG2Xyqj0cneitpg,407
|
|
|
18
18
|
jbqt/view_icons.py,sha256=Jy_o5dFSzKZGUX7oBq0sEi8jTrI5eI4COu5e4bWKT9o,6559
|
|
19
19
|
jbqt/widgets/__init__.py,sha256=WxDWM5MDnB9NkvaYxE4AiT7tFjGB9fBirEx2iZUujeU,523
|
|
20
20
|
jbqt/widgets/chip_button.py,sha256=mmh9EZfYY-d0hiQbGIZDvmi6RrBfKgGein_f_69gnCY,6362
|
|
21
|
-
jbqt/widgets/chips.py,sha256=
|
|
21
|
+
jbqt/widgets/chips.py,sha256=THekZ4LUHQ5lXMbQoh16y0vYAb-0ulWNIv8YI5HMKwc,8349
|
|
22
22
|
jbqt/widgets/multiselect.py,sha256=ucL6QeFHs12DnHAHASMwdOD9YFYu4x4NDCYa6Pl41HM,7328
|
|
23
23
|
jbqt/widgets/simple.py,sha256=pj2PBdR1am7VtPi4jGxsKm5nOLyTwiZV4jCuTd58rpk,1841
|
|
24
24
|
jbqt/widgets/toast.py,sha256=S85PgcydbmICnjSY5VR6KUG_UZv4UERjvE_mP_zE9GA,1179
|
|
25
25
|
jbqt/widgets/widget_utils.py,sha256=IEVg60rJ6hL0_9wre7j-_aprg-fccNZhwwOtbVEmHvw,2525
|
|
26
|
-
jbqt-0.1.
|
|
27
|
-
jbqt-0.1.
|
|
28
|
-
jbqt-0.1.
|
|
26
|
+
jbqt-0.1.18.dist-info/METADATA,sha256=LuBD7VrwmWKKUeaDh81szdCSGcoC38FmX_SaUXPy7s0,544
|
|
27
|
+
jbqt-0.1.18.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
28
|
+
jbqt-0.1.18.dist-info/RECORD,,
|
|
File without changes
|