diff --git a/Classes/LoadMeasurements.py b/Classes/LoadMeasurements.py index b7bd1c6624a5cd1acea5e145406676177140a28e..bd8cf74be6bb3af462aa3c51abb9e3c512936fb4 100644 --- a/Classes/LoadMeasurements.py +++ b/Classes/LoadMeasurements.py @@ -25,9 +25,9 @@ from PyQt5.QtWidgets import QMessageBox from Classes.Oursin import Oursin from Classes.Measurement import Measurement - from Classes.Uncertainty import Uncertainty + class LoadMeasurements(QThread): def __init__(self, parent=None, path_meas=None, type_meas=None, name_meas=None, settings=None, measurements_dict={}, meas_updates=None): @@ -188,67 +188,81 @@ class LoadMeasurements(QThread): extrap_method = ['q', 'v'] current_settings = meas.current_settings() - # Change navigation reference - if self.settings['change_nav_ref']: - if self.settings['nav_ref'] == 'BT': - if current_settings['NavRef'] != 'bt_vel': - current_settings['NavRef'] = 'BT' + if 'change_nav_ref' in self.settings.keys(): + # Change navigation reference + if self.settings['change_nav_ref']: + if self.settings['nav_ref'] in ['BT', 0]: + if current_settings['NavRef'] != 'bt_vel': + current_settings['NavRef'] = 'BT' + change = True + elif self.settings['nav_ref'] in ['GPS', 1]: + current_settings['NavRef'] = 'GGA' + change = True + else: + current_settings['NavRef'] = None change = True - else: - current_settings['NavRef'] = None - change = True # Change extrapolation method - selected_type = extrap_method[self.settings['extrap_type_idx']] - if meas.extrap_fit.sel_fit[-1].data_type.lower() != selected_type: - meas.extrap_fit.change_data_type(transects=meas.transects, data_type=selected_type) - meas.extrap_fit.change_fit_method(meas.transects, 'automatic', len(meas.transects)) - change = True + if 'extrap_type_idx' in self.settings.keys(): + selected_type = extrap_method[self.settings['extrap_type_idx']] + if meas.extrap_fit.sel_fit[-1].data_type.lower() != selected_type: + meas.extrap_fit.change_data_type(transects=meas.transects, data_type=selected_type) + meas.extrap_fit.change_fit_method(meas.transects, 'automatic', len(meas.transects)) + change = True # Change Weighted extrapolation - if selected_type == 'q' and self.settings['use_weighted'] != meas.extrap_fit.norm_data[-1].use_weighted: - meas.current_settings()['UseWeighted'] = self.settings['use_weighted'] - current_settings['UseWeighted'] = self.settings['use_weighted'] - change = True - - # self.settings['extrap_subsection'] - if meas.extrap_fit.subsection[0] != self.settings['extrap_subsection'][0] or \ - meas.extrap_fit.subsection[1] != self.settings['extrap_subsection'][1]: - meas.extrap_fit.change_extents( - transects=meas.transects, - data_type=meas.extrap_fit.sel_fit[-1].data_type, - extents=self.settings['extrap_subsection'], - use_q=True, - sub_from_left=True, - ) - change = True + if 'use_weighted' in self.settings.keys(): + if selected_type == 'q' and self.settings['use_weighted'] != meas.extrap_fit.norm_data[-1].use_weighted: + meas.current_settings()['UseWeighted'] = self.settings['use_weighted'] + current_settings['UseWeighted'] = self.settings['use_weighted'] + change = True + + if 'extrap_subsection' in self.settings.keys(): + if meas.extrap_fit.subsection[0] != self.settings['extrap_subsection'][0] or \ + meas.extrap_fit.subsection[1] != self.settings['extrap_subsection'][1]: + meas.extrap_fit.change_extents( + transects=meas.transects, + data_type=meas.extrap_fit.sel_fit[-1].data_type, + extents=self.settings['extrap_subsection'], + use_q=True, + sub_from_left=True, + ) + change = True if change: meas.apply_settings(current_settings) change_extrap = False extrap_type = 'Manual' - top_method, bot_method = extrap_law[self.settings['extrap_law_idx']].split(' - ') - exponent = self.settings['extrap_exponent'] + if 'extrap_law_idx' in self.settings.keys() or 'extrap_exponent' in self.settings.keys(): + if 'extrap_law_idx' in self.settings.keys(): + top_method, bot_method = extrap_law[self.settings['extrap_law_idx']].split(' - ') + else: + top_method = current_settings['extrapTop'] + bot_method = current_settings['extrapBot'] + if 'extrap_exponent' in self.settings.keys(): + exponent = self.settings['extrap_exponent'] + else: + exponent = current_settings['extrapExp'] + + if top_method == 'Auto': + if meas.extrap_fit.fit_method.lower() != 'automatic': + meas.extrap_fit.change_fit_method(meas.transects, 'automatic', len(meas.transects)) + change_extrap = True + elif top_method != current_settings['extrapTop'] or bot_method != current_settings['extrapBot'] or \ + exponent != current_settings['extrapExp']: + if isinstance(exponent, str): + # Get sensitivity data + q_sen = meas.extrap_fit.q_sensitivity + if bot_method == 'Power': + exponent = q_sen.pp_exp + else: + exponent = q_sen.ns_exp - if top_method == 'Auto': - if meas.extrap_fit.fit_method.lower() != 'automatic': - meas.extrap_fit.change_fit_method(meas.transects, 'automatic', len(meas.transects)) + meas.extrap_fit.change_fit_method(transects=meas.transects, new_fit_method=extrap_type, + idx=len(meas.transects), top=top_method, + bot=bot_method, exponent=exponent) change_extrap = True - elif top_method != current_settings['extrapTop'] or bot_method != current_settings['extrapBot'] or \ - exponent != current_settings['extrapExp']: - if isinstance(exponent, str): - # Get sensitivity data - q_sen = meas.extrap_fit.q_sensitivity - if bot_method == 'Power': - exponent = q_sen.pp_exp - else: - exponent = q_sen.ns_exp - - meas.extrap_fit.change_fit_method(transects=meas.transects, new_fit_method=extrap_type, - idx=len(meas.transects), top=top_method, - bot=bot_method, exponent=exponent) - change_extrap = True # Apply change if change_extrap: @@ -406,5 +420,3 @@ class LoadMeasurements(QThread): perimeter += d return perimeter - - diff --git a/UI/TableUpdateCombo.py b/UI/TableUpdateCombo.py new file mode 100644 index 0000000000000000000000000000000000000000..43e177f20a33a97e8c8dbf5abd85a32ee2f9e299 --- /dev/null +++ b/UI/TableUpdateCombo.py @@ -0,0 +1,28 @@ +from PyQt5 import QtWidgets, QtGui, QtCore +from UI import wTableUpdateCombo + + +class TableUpdateCombo(QtWidgets.QDialog, wTableUpdateCombo.Ui_updateCombo): + """Dialog to allow users to change salinity. + + Parameters + ---------- + wSalinity.Ui_salinity : QDialog + Dialog window to allow users to change salinity + """ + + def __init__(self, values, parent=None, title=None): + super(TableUpdateCombo, self).__init__(parent) + self._translate = QtCore.QCoreApplication.translate + self.setupUi(self) + if title is not None: + self.label_value.setText(title) + + for i in range(len(values)): + self.cb_update.addItem("") + self.cb_update.setItemText(i, values[i]) + + # set qlineedit to numbers only, 2 decimals, and 0 to 69.99 ppt + # rx = QtCore.QRegExp("^([0-9]|[1-6][0-9])(\.\d{1,2})$") + # validator = QtGui.QRegExpValidator(rx, self) + # self.value.setValidator(validator) diff --git a/UI/TableUpdateDate.py b/UI/TableUpdateDate.py new file mode 100644 index 0000000000000000000000000000000000000000..0db10805071e6f1ad6e43c827fde8ed1af9c5fa8 --- /dev/null +++ b/UI/TableUpdateDate.py @@ -0,0 +1,24 @@ +from PyQt5 import QtWidgets, QtGui, QtCore +from UI import wTableUpdateDate + + +class TableUpdateDate(QtWidgets.QDialog, wTableUpdateDate.Ui_updateDate): + """Dialog to allow users to change salinity. + + Parameters + ---------- + wSalinity.Ui_salinity : QDialog + Dialog window to allow users to change salinity + """ + + def __init__(self, parent=None, title=None): + super(TableUpdateDate, self).__init__(parent) + self.setupUi(self) + if title is not None: + self.lb_update.setText(title) + + + # set qlineedit to numbers only, 2 decimals, and 0 to 69.99 ppt + # rx = QtCore.QRegExp("^([0-9]|[1-6][0-9])(\.\d{1,2})$") + # validator = QtGui.QRegExpValidator(rx, self) + # self.value.setValidator(validator) diff --git a/UI/TableUpdateValue.py b/UI/TableUpdateValue.py new file mode 100644 index 0000000000000000000000000000000000000000..39899cef96fb4517bd7c44eea2f18acfa672772f --- /dev/null +++ b/UI/TableUpdateValue.py @@ -0,0 +1,23 @@ +from PyQt5 import QtWidgets, QtGui, QtCore +from UI import wTableUpdateValue + + +class TableUpdateValue(QtWidgets.QDialog, wTableUpdateValue.Ui_updateValue): + """Dialog to allow users to change salinity. + + Parameters + ---------- + wSalinity.Ui_salinity : QDialog + Dialog window to allow users to change salinity + """ + + def __init__(self, parent=None, title=None): + super(TableUpdateValue, self).__init__(parent) + self.setupUi(self) + if title is not None: + self.label_value.setText(title) + + # set qlineedit to numbers only, 2 decimals, and 0 to 69.99 ppt + rx = QtCore.QRegExp("^([0-9]|[1-6][0-9])(\.\d{1,2})$") + validator = QtGui.QRegExpValidator(rx, self) + self.update_value.setValidator(validator) diff --git a/UI/main.py b/UI/main.py index c44a02bb77106a7358a28e59ac681215fabb9754..311ccb6740873ef3c77cc4a11840519260d5d233 100644 --- a/UI/main.py +++ b/UI/main.py @@ -45,6 +45,9 @@ from UI.MplCanvas import MplCanvas from UI.FigDischargeUncertainty import FigDischargeUncertainty from UI.FigTimeDischarge import FigTimeDischarge from UI.FigUncertaintySources import FigUncertaintySources +from UI.TableUpdateValue import TableUpdateValue +from UI.TableUpdateCombo import TableUpdateCombo +from UI.TableUpdateDate import TableUpdateDate def resource_path(relative_path): @@ -205,6 +208,7 @@ class ApplicationWindow(QMainWindow, Ui_MainWindow): self.columns_checked = None self.init_tables = True self.sorted_name = [] + self._init_table_meas = True # Save figure menu with Right click self.figsMenu = QtWidgets.QMenu(self) @@ -673,35 +677,12 @@ class ApplicationWindow(QMainWindow, Ui_MainWindow): def update_measurements_settings(self, settings): self.enable_menu(way=False) - - # error_txt = ', '.join(word for word in self.worker.measurement_error) - # error = QtWidgets.QMessageBox() - # error.setIcon(QtWidgets.QMessageBox.Critical) - # error.setWindowTitle("Close") - # error.setText( - # self._translate('Main', - # "Error encountered on measurements : " - # ) + error_txt - # ) - # error.setStandardButtons(QtWidgets.QMessageBox.Ok) - # error.setDefaultButton(QtWidgets.QMessageBox.Ok) - # error.exec() - self.popup = PopUpProgressB(self) - - # len(self.measurements_dict) - # len(self.mean_meas) - # dict_meas = {i: self.measurements_dict[i] for i in self.mean_meas.index} - # dict_meas = {i: self.raw_measurements_dict[i] for i in self.mean_meas.index} self.worker = LoadMeasurements(parent=self, measurements_dict=self.measurements_dict, meas_updates=self.mean_meas.index, settings=settings) - # self.worker = LoadMeasurements(parent=self, - # measurements_dict=self.measurements_dict, - # settings=settings) - self.worker.setTerminationEnabled(True) self.worker.started.connect(lambda: self.popup.show()) self.worker.pbar_value.connect(lambda x: self.popup.pbar.setValue(x)) @@ -930,6 +911,126 @@ class ApplicationWindow(QMainWindow, Ui_MainWindow): self.tableResume.resizeColumnToContents(0) self.tableResume.setEnabled(True) + @QtCore.pyqtSlot(int, int) + def table_meas_double_clicked(self, row, column): + """ Manages actions caused by the user clicking in selected columns + of the table. + + Parameters + ---------- + row: int + row in table clicked by user + column: int + column in table clicked by user + """ + update = False + if column > 0: + settings = {} + # General information on clicked cell + keys = list(self.columns_checked.keys()) + clicked_meas = self.meas_checked[row] + clicked_col = keys[column-1] + update_title, _, _, update_type = self.columns_checked[clicked_col] + + if update_type is not None: + update_settings: {} + if update_type == 'float': + update_settings = 'extrap_exponent' + # Ask for float + update_dialog = TableUpdateValue(self, title=update_title) + update_entered = update_dialog.exec_() + if update_entered: + try: + value = float(update_dialog.update_value.text()) + if 0 < value < 1: + settings |= {update_settings: value} + update = True + except ValueError: + if update_settings == 'extrap_exponent': + settings |= {'extrap_law_idx': 0} + update = True + else: + pass + elif update_type == 'date': + if clicked_col == 'start_time': + default_value = datetime.utcfromtimestamp( + self.mean_meas.loc[clicked_meas].start_time) + else: + default_value = datetime.utcfromtimestamp( + self.mean_meas.loc[clicked_meas].end_time) + + update_dialog = TableUpdateDate(self, title=update_title) + update_dialog.update_date.setDateTime(default_value) + update_entered = update_dialog.exec_() + + new_date_time = update_dialog.update_date.dateTime() + value = (new_date_time.toPyDateTime() - datetime(1970, 1, 1)).total_seconds() + if np.abs(value - self.mean_meas.loc[clicked_meas].start_time) > 60: + settings |= {clicked_col: value} + update = True + + elif update_type == 'combo': + # Init combo values + cb_values = None + # Meas data + meas = self.measurements_dict[clicked_meas] + meas_settings = meas.current_settings() + # Extrap law + if clicked_col in ['meas_top_method', 'meas_bot_method']: + update_settings = 'extrap_law_idx' + cb_values = [self._translate("Options", "Automatic"), + self._translate("Options", "Power - Power"), + self._translate("Options", "Constant - No Slip"), + self._translate("Options", "3-Point - No Slip")] + default_value = 0 + if meas.extrap_fit.fit_method == 'Automatic': + default_value = 0 + elif meas_settings['extrapTop'] == 'Power' and meas_settings['extrapBot'] == 'Power': + default_value = 1 + elif meas_settings['extrapTop'] == 'Constant' and meas_settings['extrapBot'] == 'No Slip': + default_value = 2 + elif meas_settings['extrapTop'] == '3-Point' and meas_settings['extrapBot'] == 'No Slip': + default_value = 3 + + # Navigation Reference + elif clicked_col == 'meas_navigation': + update_settings = 'nav_ref' + gps = True + for transect_idx in meas.checked_transect_idx: + if meas.transects[transect_idx].boat_vel.gga_vel is None: + gps = False + break + if gps: + cb_values = ["BT", "GPS"] + settings |= {'change_nav_ref': True} + + if meas_settings['NavRef'] == 'gga_vel': + default_value = 1 + else: + default_value = 0 + + if cb_values is not None: + # Update combo box + update_dialog = TableUpdateCombo(values=cb_values, title=update_title) + update_dialog.cb_update.setCurrentIndex(default_value) + update_entered = update_dialog.exec_() + if update_entered: + value = update_dialog.cb_update.currentIndex() + if value != default_value: + settings |= {update_settings: value} + update = True + + if update: + QApplication.setOverrideCursor(Qt.WaitCursor) + self.worker = LoadMeasurements(parent=self, + measurements_dict=self.measurements_dict, + meas_updates=[clicked_meas], + settings=settings) + self.worker.finished.connect(self.update_meas) + self.worker.finished.connect(QApplication.restoreOverrideCursor) + self.worker.start() + + def table_meas(self): """ Table with uncertainty decomposition. """ @@ -944,45 +1045,49 @@ class ApplicationWindow(QMainWindow, Ui_MainWindow): self.mean_meas['score'] = np.abs(300 * (self.mean_meas['meas_mean_q'] - discharge_reference) / \ (discharge_reference * self.discharge_deviation)) + if self._init_table_meas: + self.tableMeasurements.cellDoubleClicked.connect(self.table_meas_double_clicked) + self._init_table_meas = False + if self.columns is None: self.columns = { - 'meas_manufacturer': [self._translate("Main", 'Manufacturer'), None, 1], - 'meas_model': [self._translate("Main", 'Model'), None, 1], - 'meas_navigation': [self._translate("Main", 'Nav. Ref.'), None, 1], - 'meas_mean_q': [self._translate("Main", 'Discharge'), self.units['label_Q'], self.units['Q']], - 'deviation_to_ref': [self._translate("Main", 'Deviation to ref.'), '%', 1], - 'score': [self._translate("Main", 'Score'), '', 1], - 'meas_oursin_95': [self._translate("Main", 'U Total'), '%', 1], - 'meas_std_q': [self._translate("Main", 'Std discharge'), self.units['label_Q'], self.units['Q']], - 'meas_mean_v': [self._translate("Main", 'Mean V'), self.units['label_V'], self.units['V']], - 'meas_ntransects': [self._translate("Main", 'Nb. transects'), '', 1], - 'start_time': [self._translate("Main", 'Start time'), None, 1], - 'end_time': [self._translate("Main", 'End time'), None, 1], - 'meas_width': [self._translate("Main", 'Width'), self.units['label_L'], self.units['L']], - 'meas_area': [self._translate("Main", 'Area'), self.units['label_A'], self.units['A']], - 'meas_depth': [self._translate("Main", 'Depth'), self.units['label_L'], self.units['L']], - 'tr_perimeter': [self._translate("Main", 'Perimeter'), self.units['label_L'], self.units['L']], - 'meas_top_method': [self._translate("Main", 'Top law'), None, 1], - 'meas_bot_method': [self._translate("Main", 'Bot law'), None, 1], - 'meas_exponent': [self._translate("Main", 'Exponent'), '', 1], - 'meas_alpha': [self._translate("Main", 'Alpha'), '', 1], - 'meas_coef': [self._translate("Main", 'Coefficient'), '', 1], - 'tr_oursin_u_syst': [self._translate("Main", 'u System'), '%', 1], - 'tr_oursin_u_compass': [self._translate("Main", 'u Compass'), '%', 1], - 'tr_oursin_u_movbed': [self._translate("Main", 'u MB'), '%', 1], - 'tr_oursin_u_ens': [self._translate("Main", 'u Ensembles'), '%', 1], - 'tr_oursin_u_meas': [self._translate("Main", 'u Meas Q'), '%', 1], - 'tr_oursin_u_invalid': [self._translate("Main", 'u Invalid data'), '%', 1], - 'tr_oursin_u_top': [self._translate("Main", 'u Top Q'), '%', 1], - 'tr_oursin_u_bot': [self._translate("Main", 'u Bottom Q'), '%', 1], - 'tr_oursin_u_left': [self._translate("Main", 'u Left Q'), '%', 1], - 'tr_oursin_u_right': [self._translate("Main", 'u Right Q'), '%', 1], - 'tr_oursin_u_cov': [self._translate("Main", 'u CV'), '%', 1], - 'tr_q_bottom': [self._translate("Main", 'Bottom Q'), self.units['label_Q'], self.units['Q']], - 'tr_q_top': [self._translate("Main", 'Top Q'), self.units['label_Q'], self.units['Q']], - 'tr_q_middle': [self._translate("Main", 'Mid Q'), self.units['label_Q'], self.units['Q']], - 'tr_q_left': [self._translate("Main", 'Left Q'), self.units['label_Q'], self.units['Q']], - 'tr_q_right': [self._translate("Main", 'Right Q'), self.units['label_Q'], self.units['Q']] + 'meas_manufacturer': [self._translate("Main", 'Manufacturer'), None, 1, None], + 'meas_model': [self._translate("Main", 'Model'), None, 1, None], + 'meas_navigation': [self._translate("Main", 'Nav. Ref.'), None, 1, 'combo'], + 'meas_mean_q': [self._translate("Main", 'Discharge'), self.units['label_Q'], self.units['Q'], 'combo'], + 'deviation_to_ref': [self._translate("Main", 'Deviation to ref.'), '%', 1, None], + 'score': [self._translate("Main", 'Score'), '', 1, None], + 'meas_oursin_95': [self._translate("Main", 'U Total'), '%', 1, None], + 'meas_std_q': [self._translate("Main", 'Std discharge'), self.units['label_Q'], self.units['Q'], None], + 'meas_mean_v': [self._translate("Main", 'Mean V'), self.units['label_V'], self.units['V'], None], + 'meas_ntransects': [self._translate("Main", 'Nb. transects'), '', 1, None], + 'start_time': [self._translate("Main", 'Start time'), None, 1, 'date'], + 'end_time': [self._translate("Main", 'End time'), None, 1, 'date'], + 'meas_width': [self._translate("Main", 'Width'), self.units['label_L'], self.units['L'], None], + 'meas_area': [self._translate("Main", 'Area'), self.units['label_A'], self.units['A'], None], + 'meas_depth': [self._translate("Main", 'Depth'), self.units['label_L'], self.units['L'], None], + 'tr_perimeter': [self._translate("Main", 'Perimeter'), self.units['label_L'], self.units['L'], None], + 'meas_top_method': [self._translate("Main", 'Top law'), None, 1, 'combo'], + 'meas_bot_method': [self._translate("Main", 'Bot law'), None, 1, 'combo'], + 'meas_exponent': [self._translate("Main", 'Exponent'), '', 1, 'float'], + 'meas_alpha': [self._translate("Main", 'Alpha'), '', 1, None], + 'meas_coef': [self._translate("Main", 'Coefficient'), '', 1, None], + 'tr_oursin_u_syst': [self._translate("Main", 'u System'), '%', 1, None], + 'tr_oursin_u_compass': [self._translate("Main", 'u Compass'), '%', 1, None], + 'tr_oursin_u_movbed': [self._translate("Main", 'u MB'), '%', 1, None], + 'tr_oursin_u_ens': [self._translate("Main", 'u Ensembles'), '%', 1, None], + 'tr_oursin_u_meas': [self._translate("Main", 'u Meas Q'), '%', 1, None], + 'tr_oursin_u_invalid': [self._translate("Main", 'u Invalid data'), '%', 1, None], + 'tr_oursin_u_top': [self._translate("Main", 'u Top Q'), '%', 1, None], + 'tr_oursin_u_bot': [self._translate("Main", 'u Bottom Q'), '%', 1, None], + 'tr_oursin_u_left': [self._translate("Main", 'u Left Q'), '%', 1, None], + 'tr_oursin_u_right': [self._translate("Main", 'u Right Q'), '%', 1, None], + 'tr_oursin_u_cov': [self._translate("Main", 'u CV'), '%', 1, None], + 'tr_q_bottom': [self._translate("Main", 'Bottom Q'), self.units['label_Q'], self.units['Q'], None], + 'tr_q_top': [self._translate("Main", 'Top Q'), self.units['label_Q'], self.units['Q'], None], + 'tr_q_middle': [self._translate("Main", 'Mid Q'), self.units['label_Q'], self.units['Q'], None], + 'tr_q_left': [self._translate("Main", 'Left Q'), self.units['label_Q'], self.units['Q'], None], + 'tr_q_right': [self._translate("Main", 'Right Q'), self.units['label_Q'], self.units['Q'], None] } col_names = list(self.mean_meas.columns) @@ -1322,6 +1427,8 @@ class ApplicationWindow(QMainWindow, Ui_MainWindow): measurements_dict = copy.deepcopy(self.measurements_dict) measurements_dict['meas_checked'] = self.meas_checked + test = self.columns.keys() + settings = {'nav_ref': self.nav_ref, 'extrap_law_idx': self.extrap_law_idx, 'extrap_type_idx': self.extrap_type_idx, 'extrap_exponent': self.extrap_exponent, 'extrap_subsection': self.extrap_subsection, 'use_weighted': self.weighted, diff --git a/UI/wSelectFile.py b/UI/wSelectFile.py deleted file mode 100644 index e4a1e877564714a6e9af6c39aba503a0ea44991a..0000000000000000000000000000000000000000 --- a/UI/wSelectFile.py +++ /dev/null @@ -1,143 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'wSelectFile.ui' -# -# Created by: PyQt5 UI code generator 5.6 -# -# WARNING! All changes made in this file will be lost! - -from PyQt5 import QtCore, QtGui, QtWidgets - -class Ui_selectFile(object): - def setupUi(self, selectFile): - selectFile.setObjectName("selectFile") - selectFile.setWindowModality(QtCore.Qt.ApplicationModal) - selectFile.resize(308, 326) - font = QtGui.QFont() - font.setPointSize(10) - font.setBold(False) - font.setWeight(50) - selectFile.setFont(font) - self.gridLayout = QtWidgets.QGridLayout(selectFile) - self.gridLayout.setVerticalSpacing(20) - self.gridLayout.setObjectName("gridLayout") - self.horizontalLayout = QtWidgets.QHBoxLayout() - self.horizontalLayout.setObjectName("horizontalLayout") - self.cbTRDI = QtWidgets.QCheckBox(selectFile) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.cbTRDI.sizePolicy().hasHeightForWidth()) - self.cbTRDI.setSizePolicy(sizePolicy) - font = QtGui.QFont() - font.setPointSize(12) - font.setBold(True) - font.setWeight(75) - self.cbTRDI.setFont(font) - self.cbTRDI.setLayoutDirection(QtCore.Qt.LeftToRight) - self.cbTRDI.setObjectName("cbTRDI") - self.horizontalLayout.addWidget(self.cbTRDI) - self.pbTRDI = QtWidgets.QPushButton(selectFile) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pbTRDI.sizePolicy().hasHeightForWidth()) - self.pbTRDI.setSizePolicy(sizePolicy) - self.pbTRDI.setMinimumSize(QtCore.QSize(0, 40)) - font = QtGui.QFont() - font.setPointSize(12) - font.setBold(True) - font.setWeight(75) - self.pbTRDI.setFont(font) - self.pbTRDI.setAutoFillBackground(False) - self.pbTRDI.setObjectName("pbTRDI") - self.horizontalLayout.addWidget(self.pbTRDI) - self.gridLayout.addLayout(self.horizontalLayout, 4, 0, 1, 1) - spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.gridLayout.addItem(spacerItem, 6, 0, 1, 1) - self.horizontalLayout_3 = QtWidgets.QHBoxLayout() - self.horizontalLayout_3.setObjectName("horizontalLayout_3") - spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout_3.addItem(spacerItem1) - self.pbQRev = QtWidgets.QPushButton(selectFile) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pbQRev.sizePolicy().hasHeightForWidth()) - self.pbQRev.setSizePolicy(sizePolicy) - self.pbQRev.setMinimumSize(QtCore.QSize(0, 40)) - font = QtGui.QFont() - font.setPointSize(12) - font.setBold(True) - font.setWeight(75) - self.pbQRev.setFont(font) - self.pbQRev.setObjectName("pbQRev") - self.horizontalLayout_3.addWidget(self.pbQRev) - self.gridLayout.addLayout(self.horizontalLayout_3, 5, 0, 1, 1) - self.horizontalLayout_4 = QtWidgets.QHBoxLayout() - self.horizontalLayout_4.setObjectName("horizontalLayout_4") - spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout_4.addItem(spacerItem2) - self.pbCancel = QtWidgets.QPushButton(selectFile) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pbCancel.sizePolicy().hasHeightForWidth()) - self.pbCancel.setSizePolicy(sizePolicy) - self.pbCancel.setMinimumSize(QtCore.QSize(0, 40)) - font = QtGui.QFont() - font.setPointSize(12) - font.setBold(True) - font.setWeight(75) - self.pbCancel.setFont(font) - self.pbCancel.setObjectName("pbCancel") - self.horizontalLayout_4.addWidget(self.pbCancel) - self.gridLayout.addLayout(self.horizontalLayout_4, 7, 0, 1, 1) - self.horizontalLayout_2 = QtWidgets.QHBoxLayout() - self.horizontalLayout_2.setObjectName("horizontalLayout_2") - spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout_2.addItem(spacerItem3) - self.pbSonTek = QtWidgets.QPushButton(selectFile) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pbSonTek.sizePolicy().hasHeightForWidth()) - self.pbSonTek.setSizePolicy(sizePolicy) - self.pbSonTek.setMinimumSize(QtCore.QSize(0, 40)) - font = QtGui.QFont() - font.setPointSize(12) - font.setBold(True) - font.setWeight(75) - self.pbSonTek.setFont(font) - self.pbSonTek.setObjectName("pbSonTek") - self.horizontalLayout_2.addWidget(self.pbSonTek) - self.gridLayout.addLayout(self.horizontalLayout_2, 3, 0, 1, 1) - self.pbHelp = QtWidgets.QPushButton(selectFile) - self.pbHelp.setMinimumSize(QtCore.QSize(40, 40)) - self.pbHelp.setMaximumSize(QtCore.QSize(40, 40)) - font = QtGui.QFont() - font.setPointSize(14) - font.setBold(True) - font.setWeight(75) - self.pbHelp.setFont(font) - self.pbHelp.setObjectName("pbHelp") - self.gridLayout.addWidget(self.pbHelp, 1, 0, 1, 1, QtCore.Qt.AlignRight) - - self.retranslateUi(selectFile) - QtCore.QMetaObject.connectSlotsByName(selectFile) - selectFile.setTabOrder(self.pbSonTek, self.pbTRDI) - selectFile.setTabOrder(self.pbTRDI, self.cbTRDI) - selectFile.setTabOrder(self.cbTRDI, self.pbQRev) - selectFile.setTabOrder(self.pbQRev, self.pbCancel) - selectFile.setTabOrder(self.pbCancel, self.pbHelp) - - def retranslateUi(self, selectFile): - _translate = QtCore.QCoreApplication.translate - selectFile.setWindowTitle(_translate("selectFile", "Select File(s)")) - self.cbTRDI.setText(_translate("selectFile", "Checked Only")) - self.pbTRDI.setText(_translate("selectFile", "TRDI")) - self.pbQRev.setText(_translate("selectFile", "QRev")) - self.pbCancel.setText(_translate("selectFile", "Cancel")) - self.pbSonTek.setText(_translate("selectFile", "SonTek")) - self.pbHelp.setText(_translate("selectFile", "?")) - diff --git a/UI/wSelectFile.ui b/UI/wSelectFile.ui deleted file mode 100644 index 0b7b1ac5828668bab0ee755f08e584c8e0ebb76e..0000000000000000000000000000000000000000 --- a/UI/wSelectFile.ui +++ /dev/null @@ -1,266 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>selectFile</class> - <widget class="QDialog" name="selectFile"> - <property name="windowModality"> - <enum>Qt::ApplicationModal</enum> - </property> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>308</width> - <height>326</height> - </rect> - </property> - <property name="font"> - <font> - <pointsize>10</pointsize> - <weight>50</weight> - <bold>false</bold> - </font> - </property> - <property name="windowTitle"> - <string>Select File(s)</string> - </property> - <layout class="QGridLayout" name="gridLayout"> - <property name="verticalSpacing"> - <number>20</number> - </property> - <item row="4" column="0"> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QCheckBox" name="cbTRDI"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>12</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="layoutDirection"> - <enum>Qt::LeftToRight</enum> - </property> - <property name="text"> - <string>Checked Only</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="pbTRDI"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>40</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>12</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="autoFillBackground"> - <bool>false</bool> - </property> - <property name="text"> - <string>TRDI</string> - </property> - </widget> - </item> - </layout> - </item> - <item row="6" column="0"> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - <item row="5" column="0"> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="pbQRev"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>40</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>12</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string>QRev</string> - </property> - </widget> - </item> - </layout> - </item> - <item row="7" column="0"> - <layout class="QHBoxLayout" name="horizontalLayout_4"> - <item> - <spacer name="horizontalSpacer_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="pbCancel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>40</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>12</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string>Cancel</string> - </property> - </widget> - </item> - </layout> - </item> - <item row="3" column="0"> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="pbSonTek"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>40</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>12</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string>SonTek</string> - </property> - </widget> - </item> - </layout> - </item> - <item row="1" column="0" alignment="Qt::AlignRight"> - <widget class="QPushButton" name="pbHelp"> - <property name="minimumSize"> - <size> - <width>40</width> - <height>40</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>40</width> - <height>40</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string>?</string> - </property> - </widget> - </item> - </layout> - </widget> - <tabstops> - <tabstop>pbSonTek</tabstop> - <tabstop>pbTRDI</tabstop> - <tabstop>cbTRDI</tabstop> - <tabstop>pbQRev</tabstop> - <tabstop>pbCancel</tabstop> - <tabstop>pbHelp</tabstop> - </tabstops> - <resources/> - <connections/> -</ui> diff --git a/UI/wTableUpdateCombo.py b/UI/wTableUpdateCombo.py new file mode 100644 index 0000000000000000000000000000000000000000..b54d878ca1cee6ee5eda6e5d0b5c88d328cffba0 --- /dev/null +++ b/UI/wTableUpdateCombo.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'wTableUpdateCombo.ui' +# +# Created by: PyQt5 UI code generator 5.15.9 +# +# WARNING: Any manual changes made to this file will be lost when pyuic5 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt5 import QtCore, QtGui, QtWidgets + + +class Ui_updateCombo(object): + def setupUi(self, updateCombo): + updateCombo.setObjectName("updateCombo") + updateCombo.resize(288, 143) + self.gridLayout_2 = QtWidgets.QGridLayout(updateCombo) + self.gridLayout_2.setObjectName("gridLayout_2") + self.buttonBox = QtWidgets.QDialogButtonBox(updateCombo) + self.buttonBox.setOrientation(QtCore.Qt.Horizontal) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) + self.buttonBox.setObjectName("buttonBox") + self.gridLayout_2.addWidget(self.buttonBox, 1, 0, 1, 1) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + self.label_value = QtWidgets.QLabel(updateCombo) + font = QtGui.QFont() + font.setPointSize(10) + font.setBold(True) + font.setWeight(75) + self.label_value.setFont(font) + self.label_value.setObjectName("label_value") + self.horizontalLayout.addWidget(self.label_value) + self.cb_update = QtWidgets.QComboBox(updateCombo) + self.cb_update.setObjectName("cb_update") + self.horizontalLayout.addWidget(self.cb_update) + self.gridLayout_2.addLayout(self.horizontalLayout, 0, 0, 1, 1) + + self.retranslateUi(updateCombo) + self.buttonBox.accepted.connect(updateCombo.accept) # type: ignore + self.buttonBox.rejected.connect(updateCombo.reject) # type: ignore + QtCore.QMetaObject.connectSlotsByName(updateCombo) + + def retranslateUi(self, updateCombo): + _translate = QtCore.QCoreApplication.translate + updateCombo.setWindowTitle(_translate("updateCombo", "Update value")) + self.label_value.setText(_translate("updateCombo", "TextLabel")) + + +if __name__ == "__main__": + import sys + app = QtWidgets.QApplication(sys.argv) + updateCombo = QtWidgets.QDialog() + ui = Ui_updateCombo() + ui.setupUi(updateCombo) + updateCombo.show() + sys.exit(app.exec_()) diff --git a/UI/wTableUpdateCombo.ui b/UI/wTableUpdateCombo.ui new file mode 100644 index 0000000000000000000000000000000000000000..03c4c456a2cbf8f41d2e20072ccac86a5dfd5470 --- /dev/null +++ b/UI/wTableUpdateCombo.ui @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>updateCombo</class> + <widget class="QDialog" name="updateCombo"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>288</width> + <height>143</height> + </rect> + </property> + <property name="windowTitle"> + <string>Update value</string> + </property> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="1" column="0"> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> + <item row="0" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QLabel" name="label_value"> + <property name="font"> + <font> + <pointsize>10</pointsize> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string>TextLabel</string> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="cb_update"/> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>updateCombo</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>248</x> + <y>254</y> + </hint> + <hint type="destinationlabel"> + <x>157</x> + <y>274</y> + </hint> + </hints> + </connection> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> + <receiver>updateCombo</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>316</x> + <y>260</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>274</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/UI/wTableUpdateDate.py b/UI/wTableUpdateDate.py new file mode 100644 index 0000000000000000000000000000000000000000..ca353c3c6e0de86f8f02c543e218059b53873ebe --- /dev/null +++ b/UI/wTableUpdateDate.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'wTableUpdateDate.ui' +# +# Created by: PyQt5 UI code generator 5.15.9 +# +# WARNING: Any manual changes made to this file will be lost when pyuic5 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt5 import QtCore, QtGui, QtWidgets + + +class Ui_updateDate(object): + def setupUi(self, updateDate): + updateDate.setObjectName("updateDate") + updateDate.resize(288, 143) + self.gridLayout_2 = QtWidgets.QGridLayout(updateDate) + self.gridLayout_2.setObjectName("gridLayout_2") + self.buttonBox = QtWidgets.QDialogButtonBox(updateDate) + self.buttonBox.setOrientation(QtCore.Qt.Horizontal) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) + self.buttonBox.setObjectName("buttonBox") + self.gridLayout_2.addWidget(self.buttonBox, 1, 0, 1, 1) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + self.lb_update = QtWidgets.QLabel(updateDate) + font = QtGui.QFont() + font.setPointSize(10) + font.setBold(True) + font.setWeight(75) + self.lb_update.setFont(font) + self.lb_update.setObjectName("lb_update") + self.horizontalLayout.addWidget(self.lb_update) + self.update_date = QtWidgets.QDateTimeEdit(updateDate) + self.update_date.setObjectName("update_date") + self.horizontalLayout.addWidget(self.update_date) + self.gridLayout_2.addLayout(self.horizontalLayout, 0, 0, 1, 1) + + self.retranslateUi(updateDate) + self.buttonBox.accepted.connect(updateDate.accept) # type: ignore + self.buttonBox.rejected.connect(updateDate.reject) # type: ignore + QtCore.QMetaObject.connectSlotsByName(updateDate) + + def retranslateUi(self, updateDate): + _translate = QtCore.QCoreApplication.translate + updateDate.setWindowTitle(_translate("updateDate", "Update value")) + self.lb_update.setText(_translate("updateDate", "TextLabel")) + + +if __name__ == "__main__": + import sys + app = QtWidgets.QApplication(sys.argv) + updateDate = QtWidgets.QDialog() + ui = Ui_updateDate() + ui.setupUi(updateDate) + updateDate.show() + sys.exit(app.exec_()) diff --git a/UI/wTableUpdateDate.ui b/UI/wTableUpdateDate.ui new file mode 100644 index 0000000000000000000000000000000000000000..85fee69b05b6ebdf99873674fdcd9a91c425fa4b --- /dev/null +++ b/UI/wTableUpdateDate.ui @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>updateDate</class> + <widget class="QDialog" name="updateDate"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>288</width> + <height>143</height> + </rect> + </property> + <property name="windowTitle"> + <string>Update value</string> + </property> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="1" column="0"> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> + <item row="0" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QLabel" name="lb_update"> + <property name="font"> + <font> + <pointsize>10</pointsize> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string>TextLabel</string> + </property> + </widget> + </item> + <item> + <widget class="QDateTimeEdit" name="update_date"/> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>updateDate</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>248</x> + <y>254</y> + </hint> + <hint type="destinationlabel"> + <x>157</x> + <y>274</y> + </hint> + </hints> + </connection> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> + <receiver>updateDate</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>316</x> + <y>260</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>274</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/UI/wTableUpdateValue.py b/UI/wTableUpdateValue.py new file mode 100644 index 0000000000000000000000000000000000000000..867583cd14178e8c594b6728030234833d98a036 --- /dev/null +++ b/UI/wTableUpdateValue.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'wTableUpdateValue.ui' +# +# Created by: PyQt5 UI code generator 5.15.9 +# +# WARNING: Any manual changes made to this file will be lost when pyuic5 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt5 import QtCore, QtGui, QtWidgets + + +class Ui_updateValue(object): + def setupUi(self, updateValue): + updateValue.setObjectName("updateValue") + updateValue.resize(288, 143) + self.gridLayout_2 = QtWidgets.QGridLayout(updateValue) + self.gridLayout_2.setObjectName("gridLayout_2") + self.buttonBox = QtWidgets.QDialogButtonBox(updateValue) + self.buttonBox.setOrientation(QtCore.Qt.Horizontal) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) + self.buttonBox.setObjectName("buttonBox") + self.gridLayout_2.addWidget(self.buttonBox, 1, 0, 1, 1) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + self.label_value = QtWidgets.QLabel(updateValue) + font = QtGui.QFont() + font.setPointSize(10) + font.setBold(True) + font.setWeight(75) + self.label_value.setFont(font) + self.label_value.setObjectName("label_value") + self.horizontalLayout.addWidget(self.label_value) + self.update_value = QtWidgets.QLineEdit(updateValue) + self.update_value.setObjectName("update_value") + self.horizontalLayout.addWidget(self.update_value) + self.gridLayout_2.addLayout(self.horizontalLayout, 0, 0, 1, 1) + + self.retranslateUi(updateValue) + self.buttonBox.accepted.connect(updateValue.accept) # type: ignore + self.buttonBox.rejected.connect(updateValue.reject) # type: ignore + QtCore.QMetaObject.connectSlotsByName(updateValue) + + def retranslateUi(self, updateValue): + _translate = QtCore.QCoreApplication.translate + updateValue.setWindowTitle(_translate("updateValue", "Update value")) + self.label_value.setText(_translate("updateValue", "TextLabel")) + + +if __name__ == "__main__": + import sys + app = QtWidgets.QApplication(sys.argv) + updateValue = QtWidgets.QDialog() + ui = Ui_updateValue() + ui.setupUi(updateValue) + updateValue.show() + sys.exit(app.exec_()) diff --git a/UI/wTableUpdateValue.ui b/UI/wTableUpdateValue.ui new file mode 100644 index 0000000000000000000000000000000000000000..8ccfb9c759a6fcc3a552f7cd1f34b74051bc9d58 --- /dev/null +++ b/UI/wTableUpdateValue.ui @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>updateValue</class> + <widget class="QDialog" name="updateValue"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>288</width> + <height>143</height> + </rect> + </property> + <property name="windowTitle"> + <string>Update value</string> + </property> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="1" column="0"> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> + <item row="0" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QLabel" name="label_value"> + <property name="font"> + <font> + <pointsize>10</pointsize> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string>TextLabel</string> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="update_value"/> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>updateValue</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>248</x> + <y>254</y> + </hint> + <hint type="destinationlabel"> + <x>157</x> + <y>274</y> + </hint> + </hints> + </connection> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> + <receiver>updateValue</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>316</x> + <y>260</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>274</y> + </hint> + </hints> + </connection> + </connections> +</ui>