Skip to content

Commit 32a4bfe

Browse files
committed
I04_1-172: forgotten color in the configuration
+ scan stop after record table click corrected
1 parent 4b910e4 commit 32a4bfe

File tree

6 files changed

+16
-11
lines changed

6 files changed

+16
-11
lines changed

dls_barcode/config/barcode_config.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ def __init__(self, file, file_manager):
2525
else:
2626
default_store = "../store/"
2727

28-
self.color_ok = add(ColorConfigItem, "Read Color", Color.Green())
29-
self.color_accept = add(ColorConfigItem, "Partially Read Color", Color.Yellow())
30-
self.color_unreadable = add(ColorConfigItem, "Not Read Color", Color.Red())
31-
self.color_empty = add(ColorConfigItem, "Empty Color", Color.Grey())
28+
self.color_ok = add(ColorConfigItem, "Pin/Puck Read", Color.Green())
29+
self.color_accept = add(ColorConfigItem, "Puck Partially Read", Color.Yellow())
30+
self.color_unreadable = add(ColorConfigItem, "Pin/Puck Not Read", Color.Red())
31+
self.color_empty = add(ColorConfigItem, "Pin Empty", Color.Grey())
3232

3333
self.plate_type = add(EnumConfigItem, "Sample Plate Type", default=Geometry.UNIPUCK, extra_arg=Geometry.TYPES)
3434
self.top_barcode_size = add(EnumConfigItem, "Datamatrix Size", default=DataMatrix.DEFAULT_SIZE,
@@ -38,11 +38,11 @@ def __init__(self, file, file_manager):
3838
self.scan_beep = add(BoolConfigItem, "Beep While Scanning", default=True)
3939
self.scan_clipboard = add(BoolConfigItem, "Results to Clipboard", default=True)
4040

41-
self.image_puck = add(BoolConfigItem, "Draw Puck", default=True)
42-
self.image_pins = add(BoolConfigItem, "Draw Slot Highlights", default=True)
41+
self.image_puck = add(BoolConfigItem, "Puck Highlight", default=True)
42+
self.image_pins = add(BoolConfigItem, "Slots Highlight", default=True)
4343
self.image_crop = add(BoolConfigItem, "Crop to Puck", default=True)
4444

45-
self.store_directory = add(DirectoryConfigItem, "Startup Store Directory", default=default_store)
45+
self.store_directory = add(DirectoryConfigItem, "Store Directory", default=default_store)
4646
self.store_capacity = add(IntConfigItem, "Results History Size", default=50)
4747

4848
self.console_frame = add(BoolConfigItem, "Print Frame Summary", default=False)

dls_barcode/config/barcode_config_dialog.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def _init_ui(self):
3333
add(cfg.color_ok)
3434
add(cfg.color_unreadable)
3535
add(cfg.color_empty)
36+
add(cfg.color_accept)
3637

3738
self.start_group("Top Camera")
3839
add(cfg.top_barcode_size)

dls_barcode/config/camera_config_control.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class CameraConfigControl(ConfigControl):
99
RES_TEXT_WIDTH = 50
10-
BUTTON_WIDTH = 100
10+
BUTTON_WIDTH = 150
1111

1212
def __init__(self, camera_config):
1313
ConfigControl.__init__(self, camera_config)

dls_barcode/geometry/unipuck_locator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def find_location(self):
4242
hull = cv2.convexHull(match_cnt)
4343
hull_area = cv2.contourArea(hull)
4444
feature_area = cv2.contourArea(match_cnt)
45-
puck_area = math.pi * math.sqrt(radius)
45+
#puck_area = math.pi * math.sqrt(radius)
4646
area_factor = feature_area / hull_area
4747
#puck_area_factor = feature_area / puck_area
4848
if round(area_factor, 2) > FEATURE_HULL_MATCH_FACTOR:# and puck_area_factor > PUCK_FEATURE_AREA_FACTOR_MIN:

dls_barcode/gui/main_window.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def _init_ui(self):
8585
self._image_frame = ImageFrame("Plate Image")
8686

8787
# Scan record table - lists all the records in the store
88-
self._record_table = ScanRecordTable(self._barcode_table, self._image_frame, self._config, self._cleanup)
88+
self._record_table = ScanRecordTable(self._barcode_table, self._image_frame, self._config, self._to_run_on_table_clicked)
8989

9090
# Message display
9191
self._message_box = MessageBox()
@@ -116,6 +116,10 @@ def _init_ui(self):
116116

117117
self.show()
118118

119+
def _to_run_on_table_clicked(self):
120+
self._cleanup()
121+
self._scan_button.setStartLayout()
122+
119123
def _on_about_action_clicked(self):
120124
QtGui.QMessageBox.about(self, 'About', "Version: " + self._version)
121125

dls_util/config/control.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class ConfigControl(QWidget):
88
""" Base class for config controls. When subclassing, be sure to implement both update_from_config()
99
and save_to_config().
1010
"""
11-
LABEL_WIDTH = 115
11+
LABEL_WIDTH = 155
1212

1313
def __init__(self, item):
1414
super(ConfigControl, self).__init__()

0 commit comments

Comments
 (0)