@@ -16,13 +16,13 @@ class ScanRecordTable(QGroupBox):
1616 details of the scan to appear in other GUI components (list of barcodes in the barcode
1717 table and image of the puck in the image frame).
1818 """
19- COLUMNS = ['Date' , 'Time' , 'Plate Type' , 'Valid' , 'Invalid' , 'Empty' ]
19+ COLUMNS = ['Date' , 'Time' , 'Plate Barcode' , 'Plate Type' , 'Valid' , 'Invalid' , 'Empty' ]
2020
2121 def __init__ (self , barcode_table , image_frame , options , to_run_on_table_clicked ):
2222 super (ScanRecordTable , self ).__init__ ()
2323
2424 # Read the store from file
25- self ._store = Store (options .store_directory .value (), options , FileManager ())
25+ self ._store = Store (options .store_directory .value (), options . store_capacity , FileManager ())
2626 self ._options = options
2727
2828 self ._barcodeTable = barcode_table
@@ -43,9 +43,10 @@ def _init_ui(self, to_run_on_table_clicked):
4343 self ._table .setColumnWidth (0 , 70 )
4444 self ._table .setColumnWidth (1 , 55 )
4545 self ._table .setColumnWidth (2 , 85 )
46- self ._table .setColumnWidth (3 , 60 )
47- self ._table .setColumnWidth (4 , 60 )
48- self ._table .setColumnWidth (5 , 60 )
46+ self ._table .setColumnWidth (3 , 70 )
47+ self ._table .setColumnWidth (4 , 45 )
48+ self ._table .setColumnWidth (5 , 50 )
49+ self ._table .setColumnWidth (6 , 45 )
4950 self ._table .setSelectionBehavior (QtGui .QAbstractItemView .SelectRows )
5051 self ._table .cellPressed .connect (to_run_on_table_clicked )
5152 self ._table .cellPressed .connect (self ._record_selected )
@@ -81,7 +82,7 @@ def _load_store_records(self):
8182 self ._table .setRowCount (self ._store .size ())
8283
8384 for n , record in enumerate (self ._store .records ):
84- items = [record .date , record .time , record .plate_type , record .num_valid_barcodes ,
85+ items = [record .date , record .time , record .holder_barcode , record . plate_type , record .num_valid_barcodes ,
8586 record .num_unread_slots , record .num_empty_slots ]
8687
8788 if (record .num_valid_barcodes + record .num_empty_slots ) == record .num_slots :
@@ -136,14 +137,7 @@ def _delete_selected_records(self):
136137 self ._store .delete_records (records_to_delete )
137138 self ._load_store_records ()
138139
139- def unique_side_barcode (self , plate ):
140- barcodes = []
141- plate_barcodes = plate .barcodes ()
142- store = self ._store
143- rec = store .records
144- for m ,record in enumerate (rec ):
145- barcodes = barcodes + record .barcodes [:]
146- if plate_barcodes [0 ] in barcodes :
147- return False
148- return True
140+ def is_new_holder_barcode (self , holder_barcode ):
141+ return self ._store .is_new_holder_barcode (holder_barcode )
142+
149143
0 commit comments