示例#1
0
    def _ui_execute_hfv4(self):
        vbox = QtWidgets.QVBoxLayout()
        self.executeHFv4.setLayout(vbox)

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()
        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.text_button_width())
        button.setText("Find Holiday v4")
        button.setToolTip('Find holidays in the loaded surface using selected mode')
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_find_holes_v4)

        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.single_line_height())
        icon_info = QtCore.QFileInfo(os.path.join(self.media, 'small_info.png'))
        button.setIcon(QtGui.QIcon(icon_info.absoluteFilePath()))
        button.setToolTip('Open the manual page')
        button.setStyleSheet(GuiSettings.stylesheet_info_button())
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_open_manual)

        hbox.addStretch()
示例#2
0
    def _ui_execute_vcv8(self):
        vbox = QtWidgets.QVBoxLayout()
        self.executeVCv8.setLayout(vbox)

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)

        hbox.addStretch()
        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.text_button_width() + 16)
        button.setText("VALSOU check v8")
        button.setToolTip('Check VALSOU values against surface')
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_valsou_check_v8)

        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.single_line_height())
        icon_info = QtCore.QFileInfo(os.path.join(self.media, 'small_info.png'))
        button.setIcon(QtGui.QIcon(icon_info.absoluteFilePath()))
        button.setToolTip('Open the manual page')
        button.setStyleSheet("QPushButton { background-color: rgba(255, 255, 255, 0); }\n"
                             "QPushButton:hover { background-color: rgba(230, 230, 230, 100); }\n")
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_open_manual)

        hbox.addStretch()
示例#3
0
    def _update_root_folders(self):
        """ update the submission folder list widget """
        submission_list = self.parent_win.prj.submission_list
        self.root_folders.clear()
        for folder in submission_list:

            new_item = QtWidgets.QListWidgetItem()
            if self.prj.is_valid_project_folder(folder)[0]:
                new_item.setIcon(
                    QtGui.QIcon(
                        os.path.join(self.parent_win.media, 'project.png')))

            elif self.prj.is_valid_survey_folder(folder)[0]:
                new_item.setIcon(
                    QtGui.QIcon(os.path.join(self.parent_win.media,
                                             'srv.png')))

            elif self.prj.is_valid_report_folder(folder)[0]:
                new_item.setIcon(
                    QtGui.QIcon(
                        os.path.join(self.parent_win.media, 'report.png')))

            else:
                new_item.setIcon(
                    QtGui.QIcon(
                        os.path.join(self.parent_win.media, 'folder.png')))

            new_item.setText(folder)
            new_item.setFont(GuiSettings.console_font())
            new_item.setForeground(GuiSettings.console_fg_color())
            self.root_folders.addItem(new_item)
示例#4
0
    def _ui_execute_fsv3(self):
        vbox = QtWidgets.QVBoxLayout()
        self.executeFSv3.setLayout(vbox)

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)

        hbox.addStretch()
        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.text_button_width())
        button.setText("Feature scan v3")
        button.setToolTip(
            'Scan features in the loaded file checking their validity')
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_feature_scan_v3)

        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.single_line_height())
        icon_info = QtCore.QFileInfo(os.path.join(self.media,
                                                  'small_info.png'))
        button.setIcon(QtGui.QIcon(icon_info.absoluteFilePath()))
        button.setToolTip('Open the manual page')
        button.setStyleSheet(
            "QPushButton { background-color: rgba(255, 255, 255, 0); }\n"
            "QPushButton:hover { background-color: rgba(230, 230, 230, 100); }\n"
        )
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_open_manual)
        hbox.addStretch()
示例#5
0
    def _ui_execute_bcv2(self):
        vbox = QtWidgets.QVBoxLayout()
        self.executeBQv2.setLayout(vbox)

        vbox.addStretch()

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)

        hbox.addStretch()
        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.text_button_width() * 1.3)
        button.setText("BAG Checks v2")
        button.setToolTip('Perform checks on BAG files')
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_bag_checks_v2)

        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.single_line_height())
        icon_info = QtCore.QFileInfo(os.path.join(self.media,
                                                  'small_info.png'))
        button.setIcon(QtGui.QIcon(icon_info.absoluteFilePath()))
        button.setToolTip('Open the manual page')
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_open_manual)

        hbox.addStretch()

        vbox.addStretch()
示例#6
0
    def _ui_execute_scv3(self):
        vbox = QtWidgets.QVBoxLayout()
        self.executeSCv3.setLayout(vbox)

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)

        hbox.addStretch()

        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.text_button_width() + 24)
        button.setText("Submission checks v3")
        button.setToolTip('Check the submission data directory')
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_submission_checks_v3)

        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.single_line_height())
        icon_info = QtCore.QFileInfo(os.path.join(self.media,
                                                  'small_info.png'))
        button.setIcon(QtGui.QIcon(icon_info.absoluteFilePath()))
        button.setToolTip('Open the manual page')
        button.setStyleSheet(
            "QPushButton { background-color: rgba(255, 255, 255, 0); }\n"
            "QPushButton:hover { background-color: rgba(230, 230, 230, 100); }\n"
        )
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_open_manual_v3)

        hbox.addStretch()
示例#7
0
    def _ui_parameters_btv2(self):
        vbox = QtWidgets.QVBoxLayout()
        self.setParametersBTv2.setLayout(vbox)

        vbox.addStretch()

        # set decimal places
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()

        self.set_dec_places_label_gtv2 = QtWidgets.QLabel(
            "Truncate after decimal place: ")
        self.set_dec_places_label_gtv2.setDisabled(False)
        hbox.addWidget(self.set_dec_places_label_gtv2)
        self.set_dec_places_label_gtv2.setFixedHeight(
            GuiSettings.single_line_height())
        self.set_dec_places_gtv2 = QtWidgets.QLineEdit("")
        hbox.addWidget(self.set_dec_places_gtv2)
        self.set_dec_places_gtv2.setFixedHeight(
            GuiSettings.single_line_height())
        self.set_dec_places_gtv2.setValidator(
            QtGui.QIntValidator(0, 99, self.set_dec_places_gtv2))
        self.set_dec_places_gtv2.setAlignment(QtCore.Qt.AlignRight
                                              | QtCore.Qt.AlignVCenter)
        self.set_dec_places_gtv2.setReadOnly(False)
        self.set_dec_places_gtv2.setFont(GuiSettings.console_font())
        self.set_dec_places_gtv2.setFixedWidth(30)
        self.set_dec_places_gtv2.setDisabled(False)
        self.set_dec_places_gtv2.setText("1")

        hbox.addStretch()

        vbox.addStretch()
示例#8
0
    def _ui_execute_sav4(self):
        vbox = QtWidgets.QVBoxLayout()
        self.executeSEv4.setLayout(vbox)

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)

        hbox.addStretch()
        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.text_button_width() + 16)
        button.setText("SBDARE export v4")
        button.setToolTip('Export SBDARE values')
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_sbdare_export_v4)

        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.single_line_height())
        icon_info = QtCore.QFileInfo(os.path.join(self.media,
                                                  'small_info.png'))
        button.setIcon(QtGui.QIcon(icon_info.absoluteFilePath()))
        button.setToolTip('Open the manual page')
        button.setStyleSheet(
            "QPushButton { background-color: rgba(255, 255, 255, 0); }\n"
            "QPushButton:hover { background-color: rgba(230, 230, 230, 100); }\n"
        )
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_open_manual)

        hbox.addStretch()
示例#9
0
    def _ui_execute_gqv6(self):
        vbox = QtWidgets.QVBoxLayout()
        self.executeGQv6.setLayout(vbox)

        vbox.addStretch()

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)

        hbox.addStretch()
        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.text_button_width())
        button.setText("Grid QA v6")
        button.setToolTip('Perform quality assessment on loaded grids')
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_grid_qa_v6)

        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.single_line_height())
        icon_info = QtCore.QFileInfo(os.path.join(self.media, 'small_info.png'))
        button.setIcon(QtGui.QIcon(icon_info.absoluteFilePath()))
        button.setToolTip('Open the manual page')
        button.setStyleSheet(GuiSettings.stylesheet_info_button())
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_open_manual)

        hbox.addStretch()

        vbox.addStretch()
示例#10
0
    def _ui_execute_btv2(self):
        vbox = QtWidgets.QVBoxLayout()
        self.executeBTv2.setLayout(vbox)

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)

        hbox.addStretch()
        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.text_button_width() + 6)
        button.setText("Grid Truncate v2")
        button.setToolTip(
            'Truncate the grid inputs to the given decimal place')
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_truncate)

        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.single_line_height())
        icon_info = QtCore.QFileInfo(os.path.join(self.media,
                                                  'small_info.png'))
        button.setIcon(QtGui.QIcon(icon_info.absoluteFilePath()))
        button.setToolTip('Open the manual page')
        button.setStyleSheet(
            "QPushButton { background-color: rgba(255, 255, 255, 0); }\n"
            "QPushButton:hover { background-color: rgba(230, 230, 230, 100); }\n"
        )
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_open_manual)

        hbox.addStretch()
示例#11
0
 def _update_input_s57_list(self):
     """ update the s57 list widget """
     s57_list = self.parent_win.prj.s57_list
     self.input_s57.clear()
     for s57 in s57_list:
         new_item = QtWidgets.QListWidgetItem()
         if os.path.splitext(s57)[-1] == ".000":
             new_item.setIcon(QtGui.QIcon(os.path.join(self.parent_win.media, 's57.png')))
         new_item.setText(s57)
         new_item.setFont(GuiSettings.console_font())
         new_item.setForeground(GuiSettings.console_fg_color())
         self.input_s57.addItem(new_item)
示例#12
0
 def _update_input_grid_list(self):
     """ update the grid list widget """
     grid_list = self.parent_win.prj.grid_list
     self.input_grids.clear()
     for grid in grid_list:
         new_item = QtWidgets.QListWidgetItem()
         if os.path.splitext(grid)[-1] == ".bag":
             new_item.setIcon(QtGui.QIcon(os.path.join(self.parent_win.media, 'bag.png')))
         elif os.path.splitext(grid)[-1] == ".csar":
             new_item.setIcon(QtGui.QIcon(os.path.join(self.parent_win.media, 'csar.png')))
         elif GridsManager.is_kluster_path(grid):
             new_item.setIcon(QtGui.QIcon(os.path.join(self.parent_win.media, 'kluster.png')))
         new_item.setText(grid)
         new_item.setFont(GuiSettings.console_font())
         new_item.setForeground(GuiSettings.console_fg_color())
         self.input_grids.addItem(new_item)
示例#13
0
    def _add_folder(self, selection):

        path_len = len(selection)
        logger.debug("folder path length: %d" % path_len)
        if path_len > 140:

            msg = 'The selected path is %d characters long. ' \
                  'This may trigger the filename truncation of generated outputs (max allowed path length: 260).\n\n' \
                  'Do you really want to use: %s?' % (path_len, selection)
            msg_box = QtWidgets.QMessageBox(self)
            msg_box.setWindowTitle("Output folder")
            msg_box.setText(msg)
            msg_box.setStandardButtons(QtWidgets.QMessageBox.Yes
                                       | QtWidgets.QMessageBox.No)
            msg_box.setDefaultButton(QtWidgets.QMessageBox.No)
            reply = msg_box.exec_()

            if reply == QtWidgets.QMessageBox.No:
                return

        # attempt to read the data
        try:
            self.prj.output_folder = selection

        except Exception as e:  # more general case that catches all the exceptions
            msg = '<b>Error setting the output folder to \"%s\".</b>' % selection
            msg += '<br><br><font color=\"red\">%s</font>' % e
            # noinspection PyCallByClass
            QtWidgets.QMessageBox.critical(self, "Output Folder Error", msg,
                                           QtWidgets.QMessageBox.Ok)
            logger.debug('output folder NOT set: %s' % selection)
            return

        self.output_folder.clear()
        new_item = QtWidgets.QListWidgetItem()
        new_item.setIcon(
            QtGui.QIcon(os.path.join(self.parent_win.media, 'folder.png')))
        new_item.setText("%s" % self.prj.output_folder)
        new_item.setFont(GuiSettings.console_font())
        new_item.setForeground(GuiSettings.console_fg_color())
        self.output_folder.addItem(new_item)

        QtCore.QSettings().setValue("chart_export_folder",
                                    self.prj.output_folder)

        logger.debug("new output folder: %s" % self.prj.output_folder)
示例#14
0
    def _ui_execute_adv1(self):
        vbox = QtWidgets.QVBoxLayout()
        self.executeADv1.setLayout(vbox)

        vbox.addStretch()

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)

        hbox.addStretch()

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()

        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.text_button_width() + 50)
        button.setText("Anomaly Detector v1 beta")
        button.setStyleSheet("QPushButton { color: #D73232;}")
        button.setToolTip('Detect anomalies in the loaded surfaces')
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_anomaly_detector_v1)
        # button.setDisabled(True)

        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.single_line_height())
        icon_info = QtCore.QFileInfo(os.path.join(self.media,
                                                  'small_info.png'))
        button.setIcon(QtGui.QIcon(icon_info.absoluteFilePath()))
        button.setToolTip('Open the manual page')
        button.setStyleSheet(GuiSettings.stylesheet_info_button())
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_open_manual_v1)

        hbox.addStretch()

        vbox.addStretch()
示例#15
0
    def _ui_execute_ffv8(self):
        vbox = QtWidgets.QVBoxLayout()
        self.executeFFv8.setLayout(vbox)

        vbox.addStretch()

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)

        hbox.addStretch()

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()

        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.text_button_width())
        button.setText("Find fliers v8")
        button.setToolTip('Find fliers in the loaded surfaces')
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_find_fliers_v8)
        # button.setDisabled(True)

        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.single_line_height())
        icon_info = QtCore.QFileInfo(os.path.join(self.media,
                                                  'small_info.png'))
        button.setIcon(QtGui.QIcon(icon_info.absoluteFilePath()))
        button.setToolTip('Open the manual page')
        button.setStyleSheet(GuiSettings.stylesheet_info_button())
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_open_manual_v8)

        hbox.addStretch()

        vbox.addStretch()
示例#16
0
    def _ui_execute_dsv2(self):
        vbox = QtWidgets.QVBoxLayout()
        self.executeDSv2.setLayout(vbox)

        vbox.addStretch()

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)

        hbox.addStretch()

        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.text_button_width() * 1.3)
        button.setText("Designated Scan v2")
        button.setToolTip('Perform checks on grid designated soundings')
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_scan_designated_v2)

        button = QtWidgets.QPushButton()
        hbox.addWidget(button)
        button.setFixedHeight(GuiSettings.single_line_height())
        button.setFixedWidth(GuiSettings.single_line_height())
        icon_info = QtCore.QFileInfo(os.path.join(self.media,
                                                  'small_info.png'))
        button.setIcon(QtGui.QIcon(icon_info.absoluteFilePath()))
        button.setToolTip('Open the manual page')
        button.setStyleSheet(
            "QPushButton { background-color: rgba(255, 255, 255, 0); }\n"
            "QPushButton:hover { background-color: rgba(230, 230, 230, 100); }\n"
        )
        # noinspection PyUnresolvedReferences
        button.clicked.connect(self.click_open_manual_v2)

        hbox.addStretch()

        vbox.addStretch()
示例#17
0
    def _ui_parameters_xyv1(self):
        vbox = QtWidgets.QVBoxLayout()
        self.setParametersXYv1.setLayout(vbox)

        vbox.addStretch()

        # set decimal places
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()

        self.set_geo_label_xyv1 = QtWidgets.QLabel(
            "Force conversion to geographic WGS84:")
        self.set_geo_label_xyv1.setDisabled(False)
        hbox.addWidget(self.set_geo_label_xyv1)
        self.set_geo_label_xyv1.setFixedHeight(
            GuiSettings.single_line_height())
        self.set_geo_xyv1 = QtWidgets.QCheckBox("")
        hbox.addWidget(self.set_geo_xyv1)
        self.set_geo_xyv1.setFixedHeight(GuiSettings.single_line_height())
        self.set_geo_xyv1.setDisabled(False)
        self.set_geo_xyv1.setChecked(True)

        hbox.addStretch()

        # set elevation/depth
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()

        self.set_z_label_xyv1 = QtWidgets.QLabel("Z convention:")
        self.set_z_label_xyv1.setDisabled(False)
        hbox.addWidget(self.set_z_label_xyv1)
        self.set_z_label_xyv1.setFixedHeight(GuiSettings.single_line_height())
        self.set_z_xyv1 = QtWidgets.QGroupBox("")
        self.set_z_xyv1.setFlat(True)
        self.set_z_xyv1.setHidden(True)
        hbox.addWidget(self.set_z_xyv1)
        self.set_z_depth = QtWidgets.QRadioButton("&Depth")
        hbox.addWidget(self.set_z_depth)
        self.set_z_elevation = QtWidgets.QRadioButton("&Elevation")
        hbox.addWidget(self.set_z_elevation)
        self.set_z_depth.setChecked(True)

        hbox.addStretch()

        # set decimal places
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()

        self.set_dec_places_label_xyv1 = QtWidgets.QLabel(
            "Truncate after decimal place: ")
        hbox.addWidget(self.set_dec_places_label_xyv1)
        self.set_dec_places_label_xyv1.setFixedHeight(
            GuiSettings.single_line_height())
        self.set_flag_truncation_xyv1 = QtWidgets.QCheckBox(self)
        hbox.addWidget(self.set_flag_truncation_xyv1)
        self.set_flag_truncation_xyv1.setChecked(False)
        # noinspection PyUnresolvedReferences
        self.set_flag_truncation_xyv1.clicked.connect(self._flag_truncation)
        self.set_dec_places_xyv1 = QtWidgets.QLineEdit("")
        hbox.addWidget(self.set_dec_places_xyv1)
        self.set_dec_places_xyv1.setFixedHeight(
            GuiSettings.single_line_height())
        self.set_dec_places_xyv1.setValidator(
            QtGui.QIntValidator(0, 99, self.set_dec_places_xyv1))
        self.set_dec_places_xyv1.setAlignment(QtCore.Qt.AlignRight
                                              | QtCore.Qt.AlignVCenter)
        self.set_dec_places_xyv1.setReadOnly(False)
        self.set_dec_places_xyv1.setFont(GuiSettings.console_font())
        self.set_dec_places_xyv1.setFixedWidth(30)
        self.set_dec_places_xyv1.setDisabled(True)
        self.set_dec_places_xyv1.setText("1")

        hbox.addStretch()

        vbox.addStretch()
示例#18
0
    def _ui_parameters_xyv2(self):
        vbox = QtWidgets.QVBoxLayout()
        self.setParametersXYv2.setLayout(vbox)

        vbox.addStretch()

        # set crs
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()

        self.set_crs_group_xyv2 = QtWidgets.QGroupBox(
            "Coordinate Reference System")
        self.set_crs_group_xyv2.setFlat(True)
        hbox.addWidget(self.set_crs_group_xyv2)

        gvbox = QtWidgets.QVBoxLayout()
        self.set_crs_group_xyv2.setLayout(gvbox)

        self.set_keep_crs_xyv2 = QtWidgets.QRadioButton("Keep original CRS")
        gvbox.addWidget(self.set_keep_crs_xyv2)
        self.set_keep_crs_xyv2.setChecked(True)

        self.set_geo_crs_xyv2 = QtWidgets.QRadioButton(
            "Convert to Geographic WGS84")
        gvbox.addWidget(self.set_geo_crs_xyv2)

        self.set_epsg_crs_xyv2 = QtWidgets.QRadioButton(
            "Convert to EPSG code:")
        gvbox.addWidget(self.set_epsg_crs_xyv2)

        ghbox = QtWidgets.QHBoxLayout()
        gvbox.addLayout(ghbox)
        ghbox.addStretch()
        self.set_epsg_xyv2 = QtWidgets.QComboBox()
        self.set_epsg_xyv2.addItems(list(self.crs.keys()))
        self.set_epsg_xyv2.setEditable(True)
        self.set_epsg_xyv2.setCurrentText("")
        ghbox.addWidget(self.set_epsg_xyv2)
        ghbox.addStretch()

        gvbox.addStretch()

        hbox.addStretch()

        # set elevation/depth
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()

        self.set_z_label_xyv2 = QtWidgets.QLabel("Z convention:")
        hbox.addWidget(self.set_z_label_xyv2)
        self.set_z_label_xyv2.setFixedHeight(GuiSettings.single_line_height())
        self.set_z_xyv2 = QtWidgets.QGroupBox("")
        self.set_z_xyv2.setFlat(True)
        self.set_z_xyv2.setStyleSheet("border:0; padding:0; margin:0;")
        hbox.addWidget(self.set_z_xyv2)
        group_hbox = QtWidgets.QHBoxLayout()
        self.set_z_xyv2.setLayout(group_hbox)
        self.set_z_depth = QtWidgets.QRadioButton("&Depth")
        group_hbox.addWidget(self.set_z_depth)
        self.set_z_elevation = QtWidgets.QRadioButton("&Elevation")
        group_hbox.addWidget(self.set_z_elevation)
        self.set_z_depth.setChecked(True)

        hbox.addStretch()

        # set decimal places
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()

        self.set_dec_places_label_xyv2 = QtWidgets.QLabel(
            "Truncate after decimal place: ")
        hbox.addWidget(self.set_dec_places_label_xyv2)
        self.set_dec_places_label_xyv2.setFixedHeight(
            GuiSettings.single_line_height())
        self.set_flag_truncation_xyv2 = QtWidgets.QCheckBox(self)
        hbox.addWidget(self.set_flag_truncation_xyv2)
        self.set_flag_truncation_xyv2.setChecked(False)
        # noinspection PyUnresolvedReferences
        self.set_flag_truncation_xyv2.clicked.connect(self._flag_truncation)
        self.set_dec_places_xyv2 = QtWidgets.QLineEdit("")
        hbox.addWidget(self.set_dec_places_xyv2)
        self.set_dec_places_xyv2.setFixedHeight(
            GuiSettings.single_line_height())
        self.set_dec_places_xyv2.setValidator(
            QtGui.QIntValidator(0, 99, self.set_dec_places_xyv2))
        self.set_dec_places_xyv2.setAlignment(QtCore.Qt.AlignRight
                                              | QtCore.Qt.AlignVCenter)
        self.set_dec_places_xyv2.setReadOnly(False)
        self.set_dec_places_xyv2.setFont(GuiSettings.console_font())
        self.set_dec_places_xyv2.setFixedWidth(30)
        self.set_dec_places_xyv2.setDisabled(True)
        self.set_dec_places_xyv2.setText("1")

        hbox.addStretch()

        # set output order
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()

        self.set_output_order_label_xyv2 = QtWidgets.QLabel("Output order: ")
        hbox.addWidget(self.set_output_order_label_xyv2)
        self.set_output_order_xyv2 = QtWidgets.QComboBox()
        self.set_output_order_xyv2.addItems(
            ['xyz', 'xzy', 'yxz', 'yzx', 'zxy', 'zyx'])
        self.set_output_order_xyv2.setCurrentText('yxz')
        hbox.addWidget(self.set_output_order_xyv2)

        hbox.addStretch()

        vbox.addStretch()
示例#19
0
    def _ui_parameters_btv2(self):
        # - top
        vbox = QtWidgets.QVBoxLayout()
        self.setParametersBTv2.setLayout(vbox)
        vbox.addStretch()

        flag_text_length = 160

        # -- flag valsou
        flag_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(flag_hbox)
        flag_hbox.addStretch()
        text_set_valsous = QtWidgets.QLabel("Use VALSOU features: ")
        flag_hbox.addWidget(text_set_valsous)
        text_set_valsous.setFixedHeight(GuiSettings.single_line_height())
        text_set_valsous.setMinimumWidth(flag_text_length)
        self.set_use_valsous_v2 = QtWidgets.QCheckBox(self)
        flag_hbox.addWidget(self.set_use_valsous_v2)
        self.set_use_valsous_v2.setChecked(self.use_valsous_v2)
        flag_hbox.addStretch()

        # -- flag depcnt
        flag_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(flag_hbox)
        flag_hbox.addStretch()
        text_set_depcnt = QtWidgets.QLabel("Use DEPCNT features: ")
        flag_hbox.addWidget(text_set_depcnt)
        text_set_depcnt.setFixedHeight(GuiSettings.single_line_height())
        text_set_depcnt.setMinimumWidth(flag_text_length)
        self.set_use_depcnt_v2 = QtWidgets.QCheckBox(self)
        flag_hbox.addWidget(self.set_use_depcnt_v2)
        self.set_use_depcnt_v2.setChecked(self.use_depcnt_v2)
        flag_hbox.addStretch()

        # -- calculate deeps
        flag_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(flag_hbox)
        flag_hbox.addStretch()
        text_detect_deeps = QtWidgets.QLabel("Detect deeps: ")
        flag_hbox.addWidget(text_detect_deeps)
        text_detect_deeps.setFixedHeight(GuiSettings.single_line_height())
        text_detect_deeps.setMinimumWidth(flag_text_length)
        self.set_detect_deeps_v2 = QtWidgets.QCheckBox(self)
        flag_hbox.addWidget(self.set_detect_deeps_v2)
        self.set_detect_deeps_v2.setChecked(self.detect_deeps_v2)
        flag_hbox.addStretch()

        # meter multiplier
        meter_multi_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(meter_multi_hbox)
        meter_multi_hbox.addStretch()
        self.text_set_meter_th_v2 = QtWidgets.QLabel("Force threshold (m): ")
        meter_multi_hbox.addWidget(self.text_set_meter_th_v2)
        self.text_set_meter_th_v2.setFixedHeight(
            GuiSettings.single_line_height())
        self.text_set_meter_th_v2.setMinimumWidth(120)
        self.set_meter_th_v2 = QtWidgets.QLineEdit("")
        meter_multi_hbox.addWidget(self.set_meter_th_v2)
        self.set_meter_th_v2.setFixedHeight(GuiSettings.single_line_height())
        self.set_meter_th_v2.setValidator(
            QtGui.QDoubleValidator(0.01, 9999.9, 2, self.set_meter_th_v2))
        self.set_meter_th_v2.setAlignment(QtCore.Qt.AlignRight
                                          | QtCore.Qt.AlignVCenter)
        self.set_meter_th_v2.setReadOnly(False)
        self.set_meter_th_v2.setFont(GuiSettings.console_font())
        self.set_meter_th_v2.setFixedWidth(60)
        self.set_meter_th_v2.setText("1.0")
        self.disable_meter_th()
        meter_multi_hbox.addStretch()

        # - top
        vbox.addSpacing(10)

        # -- Chart Sounding Unit
        csu_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(csu_hbox)
        # stretch
        csu_hbox.addStretch()
        csu_hbox.addSpacing(40)

        # -- left label
        # label
        text_field = QtWidgets.QLabel("Sounding Units: ")
        text_field.setAlignment(QtCore.Qt.AlignVCenter)
        text_field.setFixedWidth(80)
        csu_hbox.addWidget(text_field)

        # -- toggle area
        toggle_vbox = QtWidgets.QVBoxLayout()
        csu_hbox.addLayout(toggle_vbox)

        # --- knob 1 label
        label1_hbox = QtWidgets.QHBoxLayout()
        toggle_vbox.addLayout(label1_hbox)
        # stretch
        label1_hbox.addStretch()
        # feet label
        text_field = QtWidgets.QLabel("Meters")
        text_field.setAlignment(QtCore.Qt.AlignCenter)
        text_field.setFixedWidth(40)
        label1_hbox.addWidget(text_field)
        # stretch
        label1_hbox.addStretch()

        # --- knob
        knob_hbox = QtWidgets.QHBoxLayout()
        toggle_vbox.addLayout(knob_hbox)
        # stretch
        knob_hbox.addStretch()
        # units
        self.toggle_units_v2 = QtWidgets.QDial()
        self.toggle_units_v2.setNotchesVisible(True)
        self.toggle_units_v2.setFocusPolicy(QtCore.Qt.StrongFocus)
        self.toggle_units_v2.setRange(0, 2)
        self.toggle_units_v2.setFixedSize(QtCore.QSize(50, 50))
        self.toggle_units_v2.setInvertedAppearance(False)
        # noinspection PyUnresolvedReferences
        self.toggle_units_v2.valueChanged.connect(self.unit_changed)
        knob_hbox.addWidget(self.toggle_units_v2)
        # stretch
        knob_hbox.addStretch()

        # --- knob 2 label
        label2_hbox = QtWidgets.QHBoxLayout()
        toggle_vbox.addLayout(label2_hbox)
        # stretch
        label2_hbox.addStretch()
        # feet label
        text_field = QtWidgets.QLabel("Feet")
        text_field.setAlignment(QtCore.Qt.AlignCenter)
        text_field.setFixedWidth(40)
        label2_hbox.addWidget(text_field)
        # fathoms label
        text_office = QtWidgets.QLabel("Fathoms")
        text_office.setAlignment(QtCore.Qt.AlignCenter)
        text_office.setFixedWidth(45)
        label2_hbox.addWidget(text_office)
        # stretch
        label2_hbox.addStretch()

        # stretch
        csu_hbox.addStretch()

        # - top
        vbox.addStretch()
示例#20
0
    def _ui_settings_params_hfv4(self):
        self.paramsHFv4 = QtWidgets.QGroupBox("Parameters")
        self.settings_hfv4_vbox.addWidget(self.paramsHFv4)

        vbox = QtWidgets.QVBoxLayout()
        vbox.setContentsMargins(30, 10, 30, 10)
        self.paramsHFv4.setLayout(vbox)

        # slider holiday area limit

        slider_label_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(slider_label_hbox)
        # stretch
        slider_label_hbox.addStretch()
        # mode
        self.upper_limit_label_v4 = QtWidgets.QLabel("Upper holiday area limit (as multiple of minimum holiday size):")
        self.upper_limit_label_v4.setAlignment(QtCore.Qt.AlignCenter)
        self.upper_limit_label_v4.setDisabled(True)
        slider_label_hbox.addWidget(self.upper_limit_label_v4)
        # stretch
        slider_label_hbox.addStretch()

        slider_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(slider_hbox)
        # stretch
        slider_hbox.addStretch()

        slider_gbox = QtWidgets.QGridLayout()
        slider_hbox.addLayout(slider_gbox)

        # labels
        text_sz = 36
        text_value = QtWidgets.QLabel("100")
        text_value.setFixedWidth(text_sz + 8)
        text_value.setAlignment(QtCore.Qt.AlignLeft)
        text_value.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        slider_gbox.addWidget(text_value, 0, 0, 1, 1)
        text_value = QtWidgets.QLabel("400")
        text_value.setFixedWidth(text_sz)
        text_value.setAlignment(QtCore.Qt.AlignCenter)
        text_value.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        slider_gbox.addWidget(text_value, 0, 1, 1, 1)
        text_value = QtWidgets.QLabel("1000")
        text_value.setFixedWidth(text_sz + 20)
        text_value.setAlignment(QtCore.Qt.AlignCenter)
        text_value.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        slider_gbox.addWidget(text_value, 0, 2, 1, 1)
        text_value = QtWidgets.QLabel("4000")
        text_value.setFixedWidth(text_sz)
        text_value.setAlignment(QtCore.Qt.AlignCenter)
        text_value.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        slider_gbox.addWidget(text_value, 0, 3, 1, 1)
        text_value = QtWidgets.QLabel("unlimited")
        text_value.setFixedWidth(text_sz + 8)
        text_value.setAlignment(QtCore.Qt.AlignRight)
        text_value.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        slider_gbox.addWidget(text_value, 0, 4, 1, 1)

        # slider
        self.upper_limit_v4 = QtWidgets.QSlider(QtCore.Qt.Horizontal)
        self.upper_limit_v4.setRange(1, 5)
        self.upper_limit_v4.setSingleStep(1)
        self.upper_limit_v4.setValue(3)
        self.upper_limit_v4.setTickInterval(1)
        self.upper_limit_v4.setTickPosition(QtWidgets.QSlider.TicksBelow)
        self.upper_limit_v4.setDisabled(True)
        slider_gbox.addWidget(self.upper_limit_v4, 1, 0, 1, 5)

        # stretch
        slider_hbox.addStretch()

        vbox.addSpacing(6)

        # slider minimum resolution

        slider_label_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(slider_label_hbox)
        # stretch
        slider_label_hbox.addStretch()
        # mode
        self.slider_pct_min_res_label_v4 = QtWidgets.QLabel(
            "Resolution (as percentage of minimum resolution among tiles):")
        self.slider_pct_min_res_label_v4.setAlignment(QtCore.Qt.AlignCenter)
        self.slider_pct_min_res_label_v4.setDisabled(True)
        self.slider_pct_min_res_label_v4.setHidden(True)
        slider_label_hbox.addWidget(self.slider_pct_min_res_label_v4)
        # stretch
        slider_label_hbox.addStretch()

        slider_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(slider_hbox)
        # stretch
        slider_hbox.addStretch()

        slider_gbox = QtWidgets.QGridLayout()
        slider_hbox.addLayout(slider_gbox)

        # labels
        text_sz = 36
        text_value = QtWidgets.QLabel("50%")
        text_value.setFixedWidth(text_sz)
        text_value.setAlignment(QtCore.Qt.AlignLeft)
        text_value.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        text_value.setHidden(True)
        slider_gbox.addWidget(text_value, 0, 0, 1, 1)
        text_value = QtWidgets.QLabel("66%")
        text_value.setFixedWidth(text_sz)
        text_value.setAlignment(QtCore.Qt.AlignCenter)
        text_value.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        text_value.setHidden(True)
        slider_gbox.addWidget(text_value, 0, 1, 1, 1)
        text_value = QtWidgets.QLabel("100%")
        text_value.setFixedWidth(text_sz)
        text_value.setAlignment(QtCore.Qt.AlignRight)
        text_value.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        text_value.setHidden(True)
        slider_gbox.addWidget(text_value, 0, 2, 1, 1)

        # slider
        self.slider_pct_min_res_v4 = QtWidgets.QSlider(QtCore.Qt.Horizontal)
        self.slider_pct_min_res_v4.setRange(1, 3)
        self.slider_pct_min_res_v4.setSingleStep(1)
        self.slider_pct_min_res_v4.setValue(3)
        self.slider_pct_min_res_v4.setTickInterval(1)
        self.slider_pct_min_res_v4.setTickPosition(QtWidgets.QSlider.TicksBelow)
        self.slider_pct_min_res_v4.setDisabled(True)
        self.slider_pct_min_res_v4.setHidden(True)
        slider_gbox.addWidget(self.slider_pct_min_res_v4, 1, 0, 1, 3)

        # stretch
        slider_hbox.addStretch()

        # # slider sizer
        #
        # slider_label_hbox = QtWidgets.QHBoxLayout()
        # vbox.addLayout(slider_label_hbox)
        # # stretch
        # slider_label_hbox.addStretch()
        # # mode
        # text_obj = QtWidgets.QLabel(
        # "Sizer rule (from coarsest allowed resolution resolution to holiday size in nodes):")
        # text_obj.setAlignment(QtCore.Qt.AlignCenter)
        # slider_label_hbox.addWidget(text_obj)
        # # stretch
        # slider_label_hbox.addStretch()
        #
        # slider_hbox = QtWidgets.QHBoxLayout()
        # vbox.addLayout(slider_hbox)
        # # stretch
        # slider_hbox.addStretch()
        #
        # slider_gbox = QtWidgets.QGridLayout()
        # slider_hbox.addLayout(slider_gbox)
        #
        # self.slider_hole_sizer_v4 = QtWidgets.QSlider(QtCore.Qt.Horizontal)
        # self.slider_hole_sizer_v4.setRange(1, 3)
        # self.slider_hole_sizer_v4.setSingleStep(1)
        # self.slider_hole_sizer_v4.setValue(3)
        # self.slider_hole_sizer_v4.setTickInterval(1)
        # self.slider_hole_sizer_v4.setTickPosition(QtWidgets.QSlider.TicksBelow)
        # slider_gbox.addWidget(self.slider_hole_sizer_v4, 0, 0, 1, 3)
        # # labels
        # text_sz = 36
        # text_value = QtWidgets.QLabel("2x")
        # text_value.setFixedWidth(text_sz + 8)
        # text_value.setAlignment(QtCore.Qt.AlignLeft)
        # text_value.setStyleSheet("QLabel { color: rgb(155, 155, 155); }")
        # slider_gbox.addWidget(text_value, 1, 0, 1, 1)
        # text_value = QtWidgets.QLabel("2x+1")
        # text_value.setFixedWidth(text_sz)
        # text_value.setAlignment(QtCore.Qt.AlignCenter)
        # text_value.setStyleSheet("QLabel { color: rgb(155, 155, 155); }")
        # slider_gbox.addWidget(text_value, 1, 1, 1, 1)
        # text_value = QtWidgets.QLabel("3x")
        # text_value.setFixedWidth(text_sz + 8)
        # text_value.setAlignment(QtCore.Qt.AlignRight)
        # text_value.setStyleSheet("QLabel { color: rgb(155, 155, 155); }")
        # slider_gbox.addWidget(text_value, 1, 2, 1, 1)
        #
        # # stretch
        # slider_hbox.addStretch()

        # slider ref depth

        # slider_label_hbox = QtWidgets.QHBoxLayout()
        # vbox.addLayout(slider_label_hbox)
        # # stretch
        # slider_label_hbox.addStretch()
        # # strategy
        # text_obj = QtWidgets.QLabel("Analytic approach:")
        # text_obj.setAlignment(QtCore.Qt.AlignCenter)
        # slider_label_hbox.addWidget(text_obj)
        # # stretch
        # slider_label_hbox.addStretch()
        # # mode
        # text_obj = QtWidgets.QLabel("Median depth from:")
        # text_obj.setAlignment(QtCore.Qt.AlignCenter)
        # slider_label_hbox.addWidget(text_obj)
        # # stretch
        # slider_label_hbox.addStretch()
        #
        # slider_hbox = QtWidgets.QHBoxLayout()
        # vbox.addLayout(slider_hbox)
        # # stretch
        # slider_hbox.addStretch()
        #
        # slider_gbox = QtWidgets.QGridLayout()
        # slider_hbox.addLayout(slider_gbox)
        #
        # self.slider_strategy_v4 = QtWidgets.QSlider(QtCore.Qt.Horizontal)
        # self.slider_strategy_v4.setRange(0, 1)
        # self.slider_strategy_v4.setSingleStep(1)
        # self.slider_strategy_v4.setValue(0)
        # self.slider_strategy_v4.setTickInterval(1)
        # self.slider_strategy_v4.setTickPosition(QtWidgets.QSlider.TicksBelow)
        # slider_gbox.addWidget(self.slider_strategy_v4, 0, 0, 1, 2)
        #
        # # labels
        # text_sz = 48
        # text_value = QtWidgets.QLabel("Per-Tile")
        # text_value.setFixedWidth(text_sz + 8)
        # text_value.setAlignment(QtCore.Qt.AlignLeft)
        # text_value.setStyleSheet("QLabel { color: rgb(155, 155, 155); }")
        # slider_gbox.addWidget(text_value, 1, 0, 1, 1)
        # text_value = QtWidgets.QLabel("Brute Force")
        # text_value.setFixedWidth(text_sz + 8)
        # text_value.setAlignment(QtCore.Qt.AlignRight)
        # text_value.setStyleSheet("QLabel { color: rgb(155, 155, 155); }")
        # slider_gbox.addWidget(text_value, 1, 1, 1, 1)
        #
        # # stretch
        # slider_hbox.addStretch()
        #
        # slider_gbox = QtWidgets.QGridLayout()
        # slider_hbox.addLayout(slider_gbox)
        #
        # self.slider_ref_depth_v4 = QtWidgets.QSlider(QtCore.Qt.Horizontal)
        # self.slider_ref_depth_v4.setRange(0, 1)
        # self.slider_ref_depth_v4.setSingleStep(1)
        # self.slider_ref_depth_v4.setValue(1)
        # self.slider_ref_depth_v4.setTickInterval(1)
        # self.slider_ref_depth_v4.setTickPosition(QtWidgets.QSlider.TicksBelow)
        # slider_gbox.addWidget(self.slider_ref_depth_v4, 0, 0, 1, 2)
        # # labels
        # text_sz = 48
        # text_value = QtWidgets.QLabel("Tile")
        # text_value.setFixedWidth(text_sz + 8)
        # text_value.setAlignment(QtCore.Qt.AlignLeft)
        # text_value.setStyleSheet("QLabel { color: rgb(155, 155, 155); }")
        # slider_gbox.addWidget(text_value, 1, 0, 1, 1)
        # text_value = QtWidgets.QLabel("Perimeter")
        # text_value.setFixedWidth(text_sz)
        # text_value.setAlignment(QtCore.Qt.AlignRight)
        # text_value.setStyleSheet("QLabel { color: rgb(155, 155, 155); }")
        # slider_gbox.addWidget(text_value, 1, 1, 1, 1)
        #
        # # stretch
        # slider_hbox.addStretch()

        # locker

        vbox.addSpacing(6)

        lock_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(lock_hbox)
        lock_hbox.addStretch()
        self.locker_v4 = QtWidgets.QPushButton()
        self.locker_v4.setIconSize(QtCore.QSize(24, 24))
        self.locker_v4.setFixedHeight(28)
        edit_icon = QtGui.QIcon()
        edit_icon.addFile(os.path.join(self.parent_win.media, 'lock.png'), state=QtGui.QIcon.Off)
        edit_icon.addFile(os.path.join(self.parent_win.media, 'unlock.png'), state=QtGui.QIcon.On)
        self.locker_v4.setIcon(edit_icon)
        self.locker_v4.setCheckable(True)
        # noinspection PyUnresolvedReferences
        self.locker_v4.clicked.connect(self.on_editable_v4)
        self.locker_v4.setToolTip("Unlock editing for parameters")
        lock_hbox.addWidget(self.locker_v4)
        lock_hbox.addStretch()
示例#21
0
    def __init__(self, parent_win, prj):
        QtWidgets.QMainWindow.__init__(self)

        # store a project reference
        self.prj = prj
        self.parent_win = parent_win

        # ui
        self.panel = QtWidgets.QFrame()
        self.setCentralWidget(self.panel)
        self.vbox = QtWidgets.QVBoxLayout()
        self.panel.setLayout(self.vbox)

        self.loadData = QtWidgets.QGroupBox(
            "Data inputs  [drap-and-drop to add, right click to drop files]")
        self.loadData.setStyleSheet(
            "QGroupBox::title { color: rgb(155, 155, 155); }")
        self.vbox.addWidget(self.loadData)

        vbox = QtWidgets.QVBoxLayout()
        self.loadData.setLayout(vbox)

        # add grids
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        text_add_grids = QtWidgets.QLabel("BAG grids:")
        hbox.addWidget(text_add_grids)
        # text_add_grids.setFixedHeight(GuiSettings.single_line_height())
        text_add_grids.setMinimumWidth(68)
        self.input_grids = QtWidgets.QListWidget()
        hbox.addWidget(self.input_grids)
        self.input_grids.setSelectionMode(
            QtWidgets.QAbstractItemView.ExtendedSelection)
        self.input_grids.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
        # noinspection PyUnresolvedReferences
        self.input_grids.customContextMenuRequested.connect(
            self.make_grids_context_menu)
        self.input_grids.setAlternatingRowColors(True)
        # Enable dropping onto the input grid list
        self.input_grids.setAcceptDrops(True)
        self.input_grids.installEventFilter(self)
        button_add_grids = QtWidgets.QPushButton()
        hbox.addWidget(button_add_grids)
        button_add_grids.setFixedHeight(GuiSettings.single_line_height())
        button_add_grids.setFixedWidth(GuiSettings.single_line_height())
        button_add_grids.setText(" + ")
        button_add_grids.setToolTip(
            'Add (or drag-and-drop) BAG and CSAR files')
        # noinspection PyUnresolvedReferences
        button_add_grids.clicked.connect(self.click_add_grids)

        vbox.addStretch()

        # add s57 CS
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        text_add_cs = QtWidgets.QLabel("S57 H-Cell CS:")
        hbox.addWidget(text_add_cs)
        text_add_cs.setFixedHeight(GuiSettings.single_line_height())
        text_add_cs.setMinimumWidth(68)
        self.input_cs = QtWidgets.QListWidget()
        hbox.addWidget(self.input_cs)
        self.input_cs.setSelectionMode(
            QtWidgets.QAbstractItemView.ExtendedSelection)
        self.input_cs.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
        # noinspection PyUnresolvedReferences
        self.input_cs.customContextMenuRequested.connect(
            self.make_s57_context_menu)
        self.input_cs.setAlternatingRowColors(True)
        self.input_cs.setMaximumHeight(26)
        # Enable dropping onto the input s57 list
        self.input_cs.setAcceptDrops(True)
        self.input_cs.installEventFilter(self)
        button_add_cs = QtWidgets.QPushButton()
        hbox.addWidget(button_add_cs)
        button_add_cs.setFixedHeight(GuiSettings.single_line_height())
        button_add_cs.setFixedWidth(GuiSettings.single_line_height())
        button_add_cs.setText(" + ")
        button_add_cs.setToolTip('Add (or drag-and-drop) CS S57 file')
        # noinspection PyUnresolvedReferences
        button_add_cs.clicked.connect(self.click_add_s57)

        # add ss
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        text_add_ss = QtWidgets.QLabel("S57 SS:")
        hbox.addWidget(text_add_ss)
        text_add_ss.setFixedHeight(GuiSettings.single_line_height())
        text_add_ss.setMinimumWidth(68)
        self.input_ss = QtWidgets.QListWidget()
        hbox.addWidget(self.input_ss)
        self.input_ss.setSelectionMode(
            QtWidgets.QAbstractItemView.ExtendedSelection)
        self.input_ss.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
        # noinspection PyUnresolvedReferences
        self.input_ss.customContextMenuRequested.connect(
            self.make_ss_context_menu)
        self.input_ss.setAlternatingRowColors(True)
        self.input_ss.setMaximumHeight(26)
        # Enable dropping onto the input ss list
        self.input_ss.setAcceptDrops(True)
        self.input_ss.installEventFilter(self)
        button_add_ss = QtWidgets.QPushButton()
        hbox.addWidget(button_add_ss)
        button_add_ss.setFixedHeight(GuiSettings.single_line_height())
        button_add_ss.setFixedWidth(GuiSettings.single_line_height())
        button_add_ss.setText(" + ")
        button_add_ss.setToolTip('Add (or drag-and-drop) SS file')
        # noinspection PyUnresolvedReferences
        button_add_ss.clicked.connect(self.click_add_ss)

        vbox.addStretch()

        # clear data
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()
        button_clear_data = QtWidgets.QPushButton()
        hbox.addWidget(button_clear_data)
        button_clear_data.setFixedHeight(GuiSettings.single_line_height())
        # button_clear_data.setFixedWidth(GuiSettings.single_line_height())
        button_clear_data.setText("Clear data")
        button_clear_data.setToolTip('Clear all data loaded')
        # noinspection PyUnresolvedReferences
        button_clear_data.clicked.connect(self.click_clear_data)
        hbox.addStretch()

        self.vbox.addStretch()

        # data outputs
        self.savedData = QtWidgets.QGroupBox(
            "Data outputs [drap-and-drop the desired output folder]")
        self.savedData.setStyleSheet(
            "QGroupBox::title { color: rgb(155, 155, 155); }")
        self.savedData.setMaximumHeight(GuiSettings.single_line_height() * 8)
        self.vbox.addWidget(self.savedData)

        vbox = QtWidgets.QVBoxLayout()
        self.savedData.setLayout(vbox)

        # set optional formats
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        text_set_formats = QtWidgets.QLabel("Formats:")
        hbox.addWidget(text_set_formats)
        text_set_formats.setFixedHeight(GuiSettings.single_line_height())
        text_set_formats.setMinimumWidth(64)
        self.output_pdf = QtWidgets.QCheckBox("PDF")
        self.output_pdf.setChecked(True)
        self.output_pdf.setDisabled(True)
        hbox.addWidget(self.output_pdf)
        self.output_s57 = QtWidgets.QCheckBox("S57")
        self.output_s57.setChecked(True)
        self.output_s57.setDisabled(True)
        hbox.addWidget(self.output_s57)
        self.output_shp = QtWidgets.QCheckBox("Shapefile")
        self.output_shp.setToolTip(
            'Activate/deactivate the creation of Shapefiles in output')
        self.output_shp.setChecked(self.prj.output_shp)
        # noinspection PyUnresolvedReferences
        self.output_shp.clicked.connect(self.click_output_shp)
        hbox.addWidget(self.output_shp)
        self.output_kml = QtWidgets.QCheckBox("KML")
        self.output_kml.setToolTip(
            'Activate/deactivate the creation of KML files in output')
        self.output_kml.setChecked(self.prj.output_kml)
        # noinspection PyUnresolvedReferences
        self.output_kml.clicked.connect(self.click_output_kml)
        hbox.addWidget(self.output_kml)

        hbox.addSpacing(36)

        text_set_prj_folder = QtWidgets.QLabel("Create project folder: ")
        hbox.addWidget(text_set_prj_folder)
        text_set_prj_folder.setFixedHeight(GuiSettings.single_line_height())
        self.output_prj_folder = QtWidgets.QCheckBox("")
        self.output_prj_folder.setToolTip(
            'Create a sub-folder with project name')
        self.output_prj_folder.setChecked(self.prj.output_project_folder)
        # noinspection PyUnresolvedReferences
        self.output_prj_folder.clicked.connect(
            self.click_output_project_folder)
        hbox.addWidget(self.output_prj_folder)

        text_set_subfolders = QtWidgets.QLabel("Per-tool sub-folders: ")
        hbox.addWidget(text_set_subfolders)
        text_set_subfolders.setFixedHeight(GuiSettings.single_line_height())
        self.output_subfolders = QtWidgets.QCheckBox("")
        self.output_subfolders.setToolTip('Create a sub-folder for each tool')
        self.output_subfolders.setChecked(self.prj.output_subfolders)
        # noinspection PyUnresolvedReferences
        self.output_subfolders.clicked.connect(self.click_output_subfolders)
        hbox.addWidget(self.output_subfolders)

        hbox.addStretch()

        # add folder
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        text_add_folder = QtWidgets.QLabel("Folder:")
        hbox.addWidget(text_add_folder)
        text_add_folder.setFixedHeight(GuiSettings.single_line_height())
        text_add_folder.setMinimumWidth(64)
        self.output_folder = QtWidgets.QListWidget()
        hbox.addWidget(self.output_folder)
        self.output_folder.setMinimumHeight(GuiSettings.single_line_height())
        self.output_folder.setMaximumHeight(GuiSettings.single_line_height() *
                                            2)
        self.output_folder.clear()
        new_item = QtWidgets.QListWidgetItem()
        new_item.setIcon(
            QtGui.QIcon(os.path.join(self.parent_win.media, 'folder.png')))
        new_item.setText(
            "%s" % os.path.abspath(self.prj.output_folder).replace("\\", "/"))
        new_item.setFont(GuiSettings.console_font())
        new_item.setForeground(GuiSettings.console_fg_color())
        self.output_folder.addItem(new_item)
        # Enable dropping onto the input ss list
        self.output_folder.setAcceptDrops(True)
        self.output_folder.installEventFilter(self)
        button_add_folder = QtWidgets.QPushButton()
        hbox.addWidget(button_add_folder)
        button_add_folder.setFixedHeight(GuiSettings.single_line_height())
        button_add_folder.setFixedWidth(GuiSettings.single_line_height())
        button_add_folder.setText(" .. ")
        button_add_folder.setToolTip('Add (or drag-and-drop) output folder')
        # noinspection PyUnresolvedReferences
        button_add_folder.clicked.connect(self.click_add_folder)

        # open folder
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()

        button_default_output = QtWidgets.QPushButton()
        hbox.addWidget(button_default_output)
        button_default_output.setFixedHeight(GuiSettings.single_line_height())
        # button_open_output.setFixedWidth(GuiSettings.single_line_height())
        button_default_output.setText("Use default")
        button_default_output.setToolTip('Use the default output folder')
        # noinspection PyUnresolvedReferences
        button_default_output.clicked.connect(self.click_default_output)

        button_open_output = QtWidgets.QPushButton()
        hbox.addWidget(button_open_output)
        button_open_output.setFixedHeight(GuiSettings.single_line_height())
        # button_open_output.setFixedWidth(GuiSettings.single_line_height())
        button_open_output.setText("Open folder")
        button_open_output.setToolTip('Open the output folder')
        # noinspection PyUnresolvedReferences
        button_open_output.clicked.connect(self.click_open_output)

        hbox.addStretch()

        self.installEventFilter(self)
示例#22
0
    def _ui_settings_debug_hfv4(self):
        self.debugHFv4 = QtWidgets.QGroupBox("Debug")
        self.debugHFv4.setHidden(True)
        self.settings_hfv4_vbox.addWidget(self.debugHFv4)

        vbox = QtWidgets.QVBoxLayout()
        vbox.setContentsMargins(10, 5, 5, 10)
        self.debugHFv4.setLayout(vbox)

        # slider visual debug

        # - labels

        slider_label_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(slider_label_hbox)

        # stretch
        slider_label_hbox.addStretch()

        # # mode
        # text_obj = QtWidgets.QLabel("Visual debug mode:")
        # text_obj.setAlignment(QtCore.Qt.AlignCenter)
        # slider_label_hbox.addWidget(text_obj)
        #
        # slider_label_hbox.addSpacing(15)

        # export ascii
        text_obj = QtWidgets.QLabel("Save oversampled grid:")
        text_obj.setAlignment(QtCore.Qt.AlignCenter)
        slider_label_hbox.addWidget(text_obj)

        # stretch
        slider_label_hbox.addStretch()

        # - values

        slider_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(slider_hbox)
        # stretch
        slider_hbox.addStretch()

        # visual debug

        slider_gbox = QtWidgets.QGridLayout()
        slider_hbox.addLayout(slider_gbox)

        # # labels
        # text_sz = 36
        # text_value = QtWidgets.QLabel("On")
        # text_value.setFixedWidth(text_sz + 8)
        # text_value.setAlignment(QtCore.Qt.AlignLeft)
        # text_value.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        # slider_gbox.addWidget(text_value, 0, 0, 1, 1)
        # text_value = QtWidgets.QLabel("Off")
        # text_value.setFixedWidth(text_sz)
        # text_value.setAlignment(QtCore.Qt.AlignCenter)
        # text_value.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        # slider_gbox.addWidget(text_value, 0, 1, 1, 1)
        # # slider
        # self.slider_visual_debug_v4 = QtWidgets.QSlider(QtCore.Qt.Horizontal)
        # self.slider_visual_debug_v4.setRange(1, 2)
        # self.slider_visual_debug_v4.setSingleStep(1)
        # self.slider_visual_debug_v4.setValue(2)
        # self.slider_visual_debug_v4.setTickInterval(1)
        # self.slider_visual_debug_v4.setTickPosition(QtWidgets.QSlider.TicksBelow)
        # slider_gbox.addWidget(self.slider_visual_debug_v4, 1, 0, 1, 2)
        #
        # spacer = QtWidgets.QSpacerItem(1, 1)
        # slider_gbox.addItem(spacer, 1, 2, 1, 1)
        #
        # slider_hbox.addSpacing(30)

        # ascii export

        slider_gbox = QtWidgets.QGridLayout()
        slider_hbox.addLayout(slider_gbox)

        # labels
        text_sz = 36
        text_value = QtWidgets.QLabel("On")
        text_value.setFixedWidth(text_sz + 8)
        text_value.setAlignment(QtCore.Qt.AlignLeft)
        text_value.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        slider_gbox.addWidget(text_value, 0, 0, 1, 1)
        text_value = QtWidgets.QLabel("Off")
        text_value.setFixedWidth(text_sz)
        text_value.setAlignment(QtCore.Qt.AlignCenter)
        text_value.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        slider_gbox.addWidget(text_value, 0, 1, 1, 1)
        # slider
        self.slider_export_ascii_v4 = QtWidgets.QSlider(QtCore.Qt.Horizontal)
        self.slider_export_ascii_v4.setRange(1, 2)
        self.slider_export_ascii_v4.setSingleStep(1)
        self.slider_export_ascii_v4.setValue(2)
        self.slider_export_ascii_v4.setTickInterval(1)
        self.slider_export_ascii_v4.setTickPosition(QtWidgets.QSlider.TicksBelow)
        slider_gbox.addWidget(self.slider_export_ascii_v4, 1, 0, 1, 2)

        # stretch
        slider_hbox.addStretch()
示例#23
0
    def __init__(self, parent_win, prj):
        QtWidgets.QMainWindow.__init__(self)
        # Enable dragging and dropping onto the GUI
        self.setAcceptDrops(True)

        # store a project reference
        self.prj = prj
        self.parent_win = parent_win
        self.media = self.parent_win.media

        # ui
        self.panel = QtWidgets.QFrame()
        self.setCentralWidget(self.panel)
        self.vbox = QtWidgets.QVBoxLayout()
        self.panel.setLayout(self.vbox)

        self.dataInputs = QtWidgets.QGroupBox(
            "Drag-and-drop 'OPR-X###-XX-##' or 'X#####' folders")
        self.dataInputs.setStyleSheet(
            "QGroupBox::title { color: rgb(155, 155, 155); }")
        self.vbox.addWidget(self.dataInputs)

        vbox = QtWidgets.QVBoxLayout()
        self.dataInputs.setLayout(vbox)

        # add folder
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        text_add_root = QtWidgets.QLabel("Root folders:")
        hbox.addWidget(text_add_root)
        # text_add_grids.setFixedHeight(GuiSettings.single_line_height())
        text_add_root.setMinimumWidth(64)
        self.root_folders = QtWidgets.QListWidget()
        hbox.addWidget(self.root_folders)
        self.root_folders.setSelectionMode(
            QtWidgets.QAbstractItemView.ExtendedSelection)
        self.root_folders.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
        # noinspection PyUnresolvedReferences
        self.root_folders.customContextMenuRequested.connect(
            self.make_roots_context_menu)
        self.root_folders.setAlternatingRowColors(True)
        button_add_roots = QtWidgets.QPushButton()
        hbox.addWidget(button_add_roots)
        button_add_roots.setFixedHeight(GuiSettings.single_line_height())
        button_add_roots.setFixedWidth(GuiSettings.single_line_height())
        button_add_roots.setText(" + ")
        button_add_roots.setToolTip(
            'Add (or drag-and-drop) root submission folders')
        # noinspection PyUnresolvedReferences
        button_add_roots.clicked.connect(self.click_add_roots)

        vbox.addSpacing(6)

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()
        text_non_opr = QtWidgets.QLabel("Non-OPR project")
        hbox.addWidget(text_non_opr)
        text_non_opr.setFixedHeight(GuiSettings.single_line_height())
        text_non_opr.setMinimumWidth(80)
        self.set_non_opr_v3 = QtWidgets.QCheckBox(self)
        hbox.addWidget(self.set_non_opr_v3)
        self.set_non_opr_v3.setChecked(False)
        hbox.addStretch()

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()

        # clear data
        button_clear_data = QtWidgets.QPushButton()
        hbox.addWidget(button_clear_data)
        button_clear_data.setFixedHeight(GuiSettings.single_line_height())
        # button_clear_data.setFixedWidth(GuiSettings.single_line_height())
        button_clear_data.setText("Clear data")
        button_clear_data.setToolTip('Clear all data loaded')
        # noinspection PyUnresolvedReferences
        button_clear_data.clicked.connect(self.click_clear_data)

        # output folder
        button_open_output = QtWidgets.QPushButton()
        hbox.addWidget(button_open_output)
        button_open_output.setFixedHeight(GuiSettings.single_line_height())
        # button_open_output.setFixedWidth(GuiSettings.single_line_height())
        button_open_output.setText("Output folder")
        button_open_output.setToolTip('Open the folder with the check reports')
        # noinspection PyUnresolvedReferences
        button_open_output.clicked.connect(self.click_open_output)

        hbox.addStretch()

        # self.vbox.addStretch()
        self.vbox.addSpacing(10)

        # - Submission checks v3
        self.toggle_profiles_v3 = None
        self.toggle_behaviors_v3 = None
        self.toggle_specs_v3 = None
        self.recursive_behavior_v3 = None
        self.set_gsf_noaa_only_v3 = None
        self.submissionChecksV3 = QtWidgets.QGroupBox("Submission Checks v3")
        self.submissionChecksV3.setStyleSheet(
            "QGroupBox::title { color: rgb(155, 155, 155); }")
        self.vbox.addWidget(self.submissionChecksV3)
        scv3_hbox = QtWidgets.QHBoxLayout()
        self.submissionChecksV3.setLayout(scv3_hbox)
        # -- parameters
        self.setParametersSCv3 = QtWidgets.QGroupBox("Parameters")
        self.setParametersSCv3.setStyleSheet(
            "QGroupBox::title { color: rgb(155, 155, 155); }")
        scv3_hbox.addWidget(self.setParametersSCv3)
        self._ui_parameters_scv3()
        # -- execution
        self.executeSCv3 = QtWidgets.QGroupBox("Execution")
        self.executeSCv3.setStyleSheet(
            "QGroupBox::title { color: rgb(155, 155, 155); }")
        scv3_hbox.addWidget(self.executeSCv3)
        self._ui_execute_scv3()
示例#24
0
    def _ui_settings_params_checks_ffv8(self, vbox: QtWidgets.QVBoxLayout,
                                        min_group_box: int) -> None:
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()

        set_checks_ffv8 = QtWidgets.QGroupBox("Checks")
        set_checks_ffv8.setMinimumWidth(min_group_box)
        hbox.addWidget(set_checks_ffv8)
        chk_vbox = QtWidgets.QVBoxLayout()
        set_checks_ffv8.setLayout(chk_vbox)

        # set height
        height_hbox = QtWidgets.QHBoxLayout()
        chk_vbox.addLayout(height_hbox)
        self.set_height_label_ffv8 = QtWidgets.QLabel("Force flier heights to")
        self.set_height_label_ffv8.setDisabled(True)
        height_hbox.addWidget(self.set_height_label_ffv8)
        self.set_height_label_ffv8.setFixedHeight(
            GuiSettings.single_line_height())
        self.set_height_ffv8 = QtWidgets.QLineEdit("")
        height_hbox.addWidget(self.set_height_ffv8)
        self.set_height_ffv8.setFixedHeight(GuiSettings.single_line_height())
        # self.set_height_ffv8.setValidator(QtGui.QDoubleValidator(0.00001, 9999, 5, self.set_height_ffv8))
        # noinspection PyUnresolvedReferences
        self.set_height_ffv8.setAlignment(QtCore.Qt.AlignRight
                                          | QtCore.Qt.AlignVCenter)
        self.set_height_ffv8.setReadOnly(False)
        self.set_height_ffv8.setFont(GuiSettings.console_font())
        self.set_height_ffv8.setFixedWidth(60)
        self.set_height_ffv8.setDisabled(True)
        self.set_height_label2_ffv8 = QtWidgets.QLabel("meters")
        self.set_height_label2_ffv8.setDisabled(True)
        height_hbox.addWidget(self.set_height_label2_ffv8)
        height_hbox.addStretch()

        chk_vbox.addSpacing(6)

        self.set_check_laplacian_ffv8 = QtWidgets.QCheckBox(
            "#1: Laplacian Operator")
        self.set_check_laplacian_ffv8.setDisabled(True)
        self.set_check_laplacian_ffv8.setChecked(
            self.settings.value("survey/ff8_laplacian", 0) == 1)
        chk_vbox.addWidget(self.set_check_laplacian_ffv8)

        self.set_check_curv_ffv8 = QtWidgets.QCheckBox(
            "#2: Gaussian Curvature")
        self.set_check_curv_ffv8.setDisabled(True)
        self.set_check_curv_ffv8.setChecked(
            self.settings.value("survey/ff8_gaussian", 1) == 1)
        chk_vbox.addWidget(self.set_check_curv_ffv8)

        self.set_check_adjacent_ffv8 = QtWidgets.QCheckBox(
            "#3: Adjacent Cells")
        self.set_check_adjacent_ffv8.setDisabled(True)
        self.set_check_adjacent_ffv8.setChecked(
            self.settings.value("survey/ff8_adjacent", 1) == 1)
        chk_vbox.addWidget(self.set_check_adjacent_ffv8)

        self.set_check_slivers_ffv8 = QtWidgets.QCheckBox("#4: Edge Slivers")
        self.set_check_slivers_ffv8.setDisabled(True)
        self.set_check_slivers_ffv8.setChecked(
            self.settings.value("survey/ff8_slivers", 1) == 1)
        chk_vbox.addWidget(self.set_check_slivers_ffv8)

        self.set_check_isolated_ffv8 = QtWidgets.QCheckBox(
            "#5: Isolated Nodes")
        self.set_check_isolated_ffv8.setDisabled(True)
        self.set_check_isolated_ffv8.setChecked(
            self.settings.value("survey/ff8_orphans", 0) == 1)
        chk_vbox.addWidget(self.set_check_isolated_ffv8)

        self.set_check_edges_ffv8 = QtWidgets.QCheckBox("#6: Noisy Edges")
        self.set_check_edges_ffv8.setDisabled(True)
        self.set_check_edges_ffv8.setChecked(
            self.settings.value("survey/ff8_edges", 0) == 1)
        self.set_check_edges_ffv8.stateChanged.connect(self.click_set_6)
        chk_vbox.addWidget(self.set_check_edges_ffv8)

        slider_pct_gbox = QtWidgets.QGridLayout()
        chk_vbox.addLayout(slider_pct_gbox)

        # labels
        text_sz = 36
        text_label = QtWidgets.QLabel("")
        slider_pct_gbox.addWidget(text_label, 0, 0, 1, 1)

        self.text_pct_90 = QtWidgets.QLabel("90")
        self.text_pct_90.setFixedWidth(text_sz)
        self.text_pct_90.setAlignment(QtCore.Qt.AlignLeft)
        self.text_pct_90.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        self.text_pct_90.setDisabled(True)
        slider_pct_gbox.addWidget(self.text_pct_90, 0, 1, 1, 1)
        self.text_pct_100 = QtWidgets.QLabel("100")
        self.text_pct_100.setFixedWidth(text_sz)
        self.text_pct_100.setAlignment(QtCore.Qt.AlignLeft)
        self.text_pct_100.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        self.text_pct_100.setDisabled(True)
        slider_pct_gbox.addWidget(self.text_pct_100, 0, 2, 1, 1)
        self.text_pct_125 = QtWidgets.QLabel("125")
        self.text_pct_125.setFixedWidth(text_sz)
        self.text_pct_125.setAlignment(QtCore.Qt.AlignCenter)
        self.text_pct_125.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        self.text_pct_125.setDisabled(True)
        slider_pct_gbox.addWidget(self.text_pct_125, 0, 3, 1, 1)
        self.text_pct_150 = QtWidgets.QLabel("150")
        self.text_pct_150.setFixedWidth(text_sz)
        self.text_pct_150.setAlignment(QtCore.Qt.AlignRight)
        self.text_pct_150.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        self.text_pct_150.setDisabled(True)
        slider_pct_gbox.addWidget(self.text_pct_150, 0, 4, 1, 1)
        self.text_pct_200 = QtWidgets.QLabel("200")
        self.text_pct_200.setFixedWidth(text_sz)
        self.text_pct_200.setAlignment(QtCore.Qt.AlignRight)
        self.text_pct_200.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        self.text_pct_200.setDisabled(True)
        slider_pct_gbox.addWidget(self.text_pct_200, 0, 5, 1, 1)

        self.text_pct = QtWidgets.QLabel("Pct. TVU")
        self.text_pct.setDisabled(True)
        slider_pct_gbox.addWidget(self.text_pct, 1, 0, 1, 1)

        self.slider_edges_pct_tvu_v8 = QtWidgets.QSlider(QtCore.Qt.Horizontal)
        self.slider_edges_pct_tvu_v8.setRange(1, 5)
        self.slider_edges_pct_tvu_v8.setSingleStep(1)
        self.slider_edges_pct_tvu_v8.setValue(2)
        self.slider_edges_pct_tvu_v8.setTickInterval(1)
        self.slider_edges_pct_tvu_v8.setTickPosition(
            QtWidgets.QSlider.TicksBelow)
        self.slider_edges_pct_tvu_v8.setDisabled(True)
        slider_pct_gbox.addWidget(self.slider_edges_pct_tvu_v8, 1, 1, 1, 5)

        slider_distance_gbox = QtWidgets.QGridLayout()
        chk_vbox.addLayout(slider_distance_gbox)

        # labels
        text_sz = 36
        text_label = QtWidgets.QLabel("")
        slider_distance_gbox.addWidget(text_label, 0, 0, 1, 1)

        self.text_distance_2 = QtWidgets.QLabel("2")
        self.text_distance_2.setFixedWidth(text_sz)
        self.text_distance_2.setAlignment(QtCore.Qt.AlignLeft)
        self.text_distance_2.setStyleSheet(
            GuiSettings.stylesheet_slider_labels())
        self.text_distance_2.setDisabled(True)
        self.text_distance_2.setHidden(True)
        slider_distance_gbox.addWidget(self.text_distance_2, 0, 1, 1, 4)
        self.text_distance_3 = QtWidgets.QLabel("3")
        self.text_distance_3.setFixedWidth(text_sz)
        self.text_distance_3.setAlignment(QtCore.Qt.AlignRight)
        self.text_distance_3.setStyleSheet(
            GuiSettings.stylesheet_slider_labels())
        self.text_distance_3.setDisabled(True)
        self.text_distance_3.setHidden(True)
        slider_distance_gbox.addWidget(self.text_distance_3, 0, 5, 1, 1)

        self.text_distance = QtWidgets.QLabel("Distance")
        self.text_distance.setHidden(True)
        self.text_distance.setDisabled(True)
        slider_distance_gbox.addWidget(self.text_distance, 1, 0, 1, 1)

        self.slider_edges_distance_v8 = QtWidgets.QSlider(QtCore.Qt.Horizontal)
        self.slider_edges_distance_v8.setRange(2, 3)
        self.slider_edges_distance_v8.setSingleStep(1)
        self.slider_edges_distance_v8.setValue(3)
        self.slider_edges_distance_v8.setTickInterval(1)
        self.slider_edges_distance_v8.setTickPosition(
            QtWidgets.QSlider.TicksBelow)
        self.slider_edges_distance_v8.setDisabled(True)
        self.slider_edges_distance_v8.setHidden(True)
        slider_distance_gbox.addWidget(self.slider_edges_distance_v8, 1, 1, 1,
                                       5)

        hbox.addStretch()
示例#25
0
    def _ui_settings_params_filters_ffv8(self, vbox: QtWidgets.QVBoxLayout,
                                         min_group_box: int) -> None:
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()

        set_filters_ffv8 = QtWidgets.QGroupBox("Filters")
        set_filters_ffv8.setMinimumWidth(min_group_box)
        hbox.addWidget(set_filters_ffv8)
        flt_vbox = QtWidgets.QVBoxLayout()
        set_filters_ffv8.setLayout(flt_vbox)

        # set distance
        distance_hbox = QtWidgets.QHBoxLayout()
        flt_vbox.addLayout(distance_hbox)
        self.set_distance_label_ffv8 = QtWidgets.QLabel("Distance <=")
        self.set_distance_label_ffv8.setDisabled(True)
        distance_hbox.addWidget(self.set_distance_label_ffv8)
        self.set_distance_label_ffv8.setFixedHeight(
            GuiSettings.single_line_height())
        self.set_distance_ffv8 = QtWidgets.QLineEdit("")
        distance_hbox.addWidget(self.set_distance_ffv8)
        self.set_distance_ffv8.setFixedHeight(GuiSettings.single_line_height())
        # self.set_distance_ffv8.setValidator(QtGui.QDoubleValidator(0.00001, 9999, 5, self.set_distance_ffv8))
        # noinspection PyUnresolvedReferences
        self.set_distance_ffv8.setAlignment(QtCore.Qt.AlignRight
                                            | QtCore.Qt.AlignVCenter)
        self.set_distance_ffv8.setReadOnly(False)
        self.set_distance_ffv8.setFont(GuiSettings.console_font())
        self.set_distance_ffv8.setFixedWidth(60)
        self.set_distance_ffv8.setText("%.1f" %
                                       FindFliersV8.default_filter_distance)
        self.set_distance_ffv8.setDisabled(True)
        self.set_distance_label2_ffv8 = QtWidgets.QLabel("nodes")
        self.set_distance_label2_ffv8.setDisabled(True)
        distance_hbox.addWidget(self.set_distance_label2_ffv8)
        distance_hbox.addStretch()

        # set delta_z
        delta_z_hbox = QtWidgets.QHBoxLayout()
        flt_vbox.addLayout(delta_z_hbox)
        self.set_delta_z_label_ffv8 = QtWidgets.QLabel("Delta Z <=")
        self.set_delta_z_label_ffv8.setDisabled(True)
        delta_z_hbox.addWidget(self.set_delta_z_label_ffv8)
        self.set_delta_z_label_ffv8.setFixedHeight(
            GuiSettings.single_line_height())
        self.set_delta_z_ffv8 = QtWidgets.QLineEdit("")
        delta_z_hbox.addWidget(self.set_delta_z_ffv8)
        self.set_delta_z_ffv8.setFixedHeight(GuiSettings.single_line_height())
        # self.set_delta_z_ffv8.setValidator(QtGui.QDoubleValidator(0.00001, 9999, 5, self.set_delta_z_ffv8))
        # noinspection PyUnresolvedReferences
        self.set_delta_z_ffv8.setAlignment(QtCore.Qt.AlignRight
                                           | QtCore.Qt.AlignVCenter)
        self.set_delta_z_ffv8.setReadOnly(False)
        self.set_delta_z_ffv8.setFont(GuiSettings.console_font())
        self.set_delta_z_ffv8.setFixedWidth(60)
        self.set_delta_z_ffv8.setText("%.2f" %
                                      FindFliersV8.default_filter_delta_z)
        self.set_delta_z_ffv8.setDisabled(True)
        self.set_delta_z_label2_ffv8 = QtWidgets.QLabel("meters")
        self.set_delta_z_label2_ffv8.setDisabled(True)
        delta_z_hbox.addWidget(self.set_delta_z_label2_ffv8)
        delta_z_hbox.addStretch()

        flt_vbox.addSpacing(6)

        self.set_filter_fff_ffv8 = QtWidgets.QCheckBox(
            "#1: Use Features from S57 File")
        self.set_filter_fff_ffv8.setDisabled(True)
        self.set_filter_fff_ffv8.setChecked(
            self.settings.value("survey/ff8_fff", 0) == 1)
        flt_vbox.addWidget(self.set_filter_fff_ffv8)

        self.set_filter_designated_ffv8 = QtWidgets.QCheckBox(
            "#2: Use Designated (SR BAG only)")
        self.set_filter_designated_ffv8.setDisabled(True)
        self.set_filter_designated_ffv8.setChecked(
            self.settings.value("survey/ff8_designated", 0) == 1)
        flt_vbox.addWidget(self.set_filter_designated_ffv8)

        hbox.addStretch()
示例#26
0
    def _ui_parameters_vcv8(self):
        hbox = QtWidgets.QHBoxLayout()
        self.setParametersVCv8.setLayout(hbox)
        hbox.addStretch()

        vbox = QtWidgets.QVBoxLayout()
        hbox.addLayout(vbox)
        vbox.addStretch()

        label_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(label_hbox)
        # stretch
        label_hbox.addStretch()
        # specs
        empty = QtWidgets.QLabel("")
        empty.setAlignment(QtCore.Qt.AlignCenter)
        empty.setFixedWidth(160)
        label_hbox.addWidget(empty)
        # stretch
        label_hbox.addStretch()

        toggle_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(toggle_hbox)
        # stretch
        toggle_hbox.addStretch()
        # mode
        self.toggle_mode_v8 = QtWidgets.QDial()
        self.toggle_mode_v8.setNotchesVisible(True)
        self.toggle_mode_v8.setWrapping(False)
        self.toggle_mode_v8.setFocusPolicy(QtCore.Qt.StrongFocus)
        self.toggle_mode_v8.setRange(0, 1)
        self.toggle_mode_v8.setSliderPosition(0)
        self.toggle_mode_v8.setFixedSize(QtCore.QSize(40, 40))
        self.toggle_mode_v8.setInvertedAppearance(False)
        toggle_hbox.addWidget(self.toggle_mode_v8)
        # stretch
        toggle_hbox.addStretch()

        label2_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(label2_hbox)
        # stretch
        label2_hbox.addStretch()
        # mode
        text_obj = QtWidgets.QLabel("Full coverage")
        text_obj.setAlignment(QtCore.Qt.AlignCenter)
        text_obj.setFixedWidth(85)
        label2_hbox.addWidget(text_obj)
        text_cov = QtWidgets.QLabel("Object detection")
        text_cov.setAlignment(QtCore.Qt.AlignCenter)
        text_cov.setFixedWidth(85)
        label2_hbox.addWidget(text_cov)
        # stretch
        label2_hbox.addStretch()

        vbox.addSpacing(10)

        options_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(options_hbox)
        options_hbox.addStretch()

        text_set_overlap = QtWidgets.QLabel("Deconflict across grids")
        options_hbox.addWidget(text_set_overlap)
        text_set_overlap.setFixedHeight(GuiSettings.single_line_height())
        text_set_overlap.setMinimumWidth(80)
        # text_set_overlap.setStyleSheet("QLabel { color :  rgba(200, 0, 0, 200); }")
        self.set_overlap_fsv8 = QtWidgets.QCheckBox(self)
        self.set_overlap_fsv8.setToolTip("Test the flagged features across all the input grids")
        options_hbox.addWidget(self.set_overlap_fsv8)
        self.set_overlap_fsv8.setChecked(False)

        options_hbox.addSpacing(10)

        text_set_include_laser = QtWidgets.QLabel("Include TECSOU=laser")
        options_hbox.addWidget(text_set_include_laser)
        text_set_include_laser.setFixedHeight(GuiSettings.single_line_height())
        text_set_include_laser.setMinimumWidth(80)
        # text_set_neighborhood.setStyleSheet("QLabel { color :  rgba(200, 0, 0, 200); }")
        self.set_include_laser_fsv8 = QtWidgets.QCheckBox(self)
        self.set_include_laser_fsv8.setToolTip("Uncheck to skip features with TECSOU=laser")
        options_hbox.addWidget(self.set_include_laser_fsv8)
        self.set_include_laser_fsv8.setChecked(True)

        options_hbox.addStretch()

        vbox.addStretch()

        hbox.addStretch()
示例#27
0
    def _ui_settings_params_checks_ffv8(self, vbox: QtWidgets.QVBoxLayout,
                                        min_group_box: int) -> None:
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()

        set_checks_ffv8 = QtWidgets.QGroupBox("Checks")
        set_checks_ffv8.setMinimumWidth(min_group_box)
        hbox.addWidget(set_checks_ffv8)
        chk_vbox = QtWidgets.QVBoxLayout()
        set_checks_ffv8.setLayout(chk_vbox)

        # set height
        height_hbox = QtWidgets.QHBoxLayout()
        chk_vbox.addLayout(height_hbox)
        self.set_height_label_ffv8 = QtWidgets.QLabel("Force flier heights to")
        self.set_height_label_ffv8.setDisabled(True)
        height_hbox.addWidget(self.set_height_label_ffv8)
        self.set_height_label_ffv8.setFixedHeight(
            GuiSettings.single_line_height())
        self.set_height_ffv8 = QtWidgets.QLineEdit("")
        height_hbox.addWidget(self.set_height_ffv8)
        self.set_height_ffv8.setFixedHeight(GuiSettings.single_line_height())
        # self.set_height_ffv8.setValidator(QtGui.QDoubleValidator(0.00001, 9999, 5, self.set_height_ffv8))
        # noinspection PyUnresolvedReferences
        self.set_height_ffv8.setAlignment(QtCore.Qt.AlignRight
                                          | QtCore.Qt.AlignVCenter)
        self.set_height_ffv8.setReadOnly(False)
        self.set_height_ffv8.setFont(GuiSettings.console_font())
        self.set_height_ffv8.setFixedWidth(60)
        self.set_height_ffv8.setDisabled(True)
        self.set_height_label2_ffv8 = QtWidgets.QLabel("meters")
        self.set_height_label2_ffv8.setDisabled(True)
        height_hbox.addWidget(self.set_height_label2_ffv8)
        height_hbox.addStretch()

        chk_vbox.addSpacing(6)

        self.set_check_laplacian_ffv8 = QtWidgets.QCheckBox(
            "#1: Laplacian Operator")
        self.set_check_laplacian_ffv8.setDisabled(True)
        self.set_check_laplacian_ffv8.setChecked(
            self.settings.value("survey/ff8_laplacian", 0) == 1)
        chk_vbox.addWidget(self.set_check_laplacian_ffv8)

        self.set_check_curv_ffv8 = QtWidgets.QCheckBox(
            "#2: Gaussian Curvature")
        self.set_check_curv_ffv8.setDisabled(True)
        self.set_check_curv_ffv8.setChecked(
            self.settings.value("survey/ff8_gaussian", 1) == 1)
        chk_vbox.addWidget(self.set_check_curv_ffv8)

        self.set_check_adjacent_ffv8 = QtWidgets.QCheckBox(
            "#3: Adjacent Cells")
        self.set_check_adjacent_ffv8.setDisabled(True)
        self.set_check_adjacent_ffv8.setChecked(
            self.settings.value("survey/ff8_adjacent", 1) == 1)
        chk_vbox.addWidget(self.set_check_adjacent_ffv8)

        self.set_check_slivers_ffv8 = QtWidgets.QCheckBox("#4: Edge Slivers")
        self.set_check_slivers_ffv8.setDisabled(True)
        self.set_check_slivers_ffv8.setChecked(
            self.settings.value("survey/ff8_slivers", 1) == 1)
        chk_vbox.addWidget(self.set_check_slivers_ffv8)

        self.set_check_isolated_ffv8 = QtWidgets.QCheckBox(
            "#5: Isolated Nodes")
        self.set_check_isolated_ffv8.setDisabled(True)
        self.set_check_isolated_ffv8.setChecked(
            self.settings.value("survey/ff8_orphans", 0) == 1)
        chk_vbox.addWidget(self.set_check_isolated_ffv8)

        self.set_check_edges_ffv8 = QtWidgets.QCheckBox("#6: Noisy Edges")
        self.set_check_edges_ffv8.setDisabled(True)
        self.set_check_edges_ffv8.setChecked(
            self.settings.value("survey/ff8_edges", 0) == 1)
        chk_vbox.addWidget(self.set_check_edges_ffv8)

        hbox.addStretch()
示例#28
0
    def _ui_settings_gqv6(self):
        vbox = QtWidgets.QVBoxLayout()
        self.setSettingsGQv6.setLayout(vbox)

        # vbox.addStretch()

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()
        self.text_set_tvu_qc = QtWidgets.QLabel("Force TVU QC calculation")
        self.text_set_tvu_qc.setFixedHeight(GuiSettings.single_line_height())
        self.text_set_tvu_qc.setMinimumWidth(80)
        self.text_set_tvu_qc.setHidden(True)
        hbox.addWidget(self.text_set_tvu_qc)
        self.set_force_tvu_qc_gqv6 = QtWidgets.QCheckBox(self)
        hbox.addWidget(self.set_force_tvu_qc_gqv6)
        self.set_force_tvu_qc_gqv6.setChecked(True)
        self.set_force_tvu_qc_gqv6.setHidden(True)

        hbox.addStretch()

        vbox.addStretch()

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        # stretch
        hbox.addStretch()
        # mode
        self.set_toggle_mode_gqv6 = QtWidgets.QDial()
        self.set_toggle_mode_gqv6.setNotchesVisible(True)
        self.set_toggle_mode_gqv6.setWrapping(False)
        self.set_toggle_mode_gqv6.setFocusPolicy(QtCore.Qt.StrongFocus)
        self.set_toggle_mode_gqv6.setRange(0, 1)
        self.set_toggle_mode_gqv6.setSliderPosition(1)
        self.set_toggle_mode_gqv6.setFixedSize(QtCore.QSize(40, 40))
        self.set_toggle_mode_gqv6.setInvertedAppearance(False)
        hbox.addWidget(self.set_toggle_mode_gqv6)
        hbox.addStretch()

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)

        # stretch
        hbox.addStretch()
        # mode
        text_obj = QtWidgets.QLabel("Object detection")
        text_obj.setAlignment(QtCore.Qt.AlignCenter)
        text_obj.setFixedWidth(85)
        hbox.addWidget(text_obj)
        text_cov = QtWidgets.QLabel("Full coverage")
        text_cov.setAlignment(QtCore.Qt.AlignCenter)
        text_cov.setFixedWidth(85)
        hbox.addWidget(text_cov)
        # stretch
        hbox.addStretch()

        vbox.addSpacing(9)

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()
        # histograms
        text_hist = QtWidgets.QLabel("<i>Histograms</i>")
        hbox.addWidget(text_hist)
        hbox.addStretch()

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()
        # histograms: depth
        text_hist_depth = QtWidgets.QLabel("depth:")
        hbox.addWidget(text_hist_depth)
        text_hist_depth.setFixedHeight(GuiSettings.single_line_height())
        self.hist_depth_v6 = QtWidgets.QCheckBox(self)
        hbox.addWidget(self.hist_depth_v6)
        self.hist_depth_v6.setChecked(True)
        # histograms: density
        text_hist_density = QtWidgets.QLabel("density:")
        hbox.addWidget(text_hist_density)
        text_hist_density.setFixedHeight(GuiSettings.single_line_height())
        self.hist_density_v6 = QtWidgets.QCheckBox(self)
        hbox.addWidget(self.hist_density_v6)
        self.hist_density_v6.setChecked(True)
        # histograms: tvu qc
        text_hist_tvu_qc = QtWidgets.QLabel("TVU (IHO S-44):")
        hbox.addWidget(text_hist_tvu_qc)
        text_hist_tvu_qc.setFixedHeight(GuiSettings.single_line_height())
        self.hist_tvu_qc_v6 = QtWidgets.QCheckBox(self)
        hbox.addWidget(self.hist_tvu_qc_v6)
        self.hist_tvu_qc_v6.setChecked(True)
        # histograms: pct res
        text_hist_pct_res = QtWidgets.QLabel("% resolution:")
        hbox.addWidget(text_hist_pct_res)
        text_hist_pct_res.setFixedHeight(GuiSettings.single_line_height())
        self.hist_pct_res_v6 = QtWidgets.QCheckBox(self)
        hbox.addWidget(self.hist_pct_res_v6)
        self.hist_pct_res_v6.setChecked(True)
        hbox.addStretch()

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()
        # catzoc
        text_hist_catzoc = QtWidgets.QLabel("TVU (IHO S-57 CATZOC) [Branch]:")
        hbox.addWidget(text_hist_catzoc)
        text_hist_catzoc.setFixedHeight(GuiSettings.single_line_height())
        self.hist_catzoc = QtWidgets.QCheckBox(self)
        self.hist_catzoc.stateChanged.connect(self.click_set_catzoc)
        hbox.addWidget(self.hist_catzoc)
        self.hist_catzoc.setChecked(False)
        hbox.addStretch()

        slider_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(slider_hbox)
        slider_hbox.addStretch()

        slider_gbox = QtWidgets.QGridLayout()
        slider_hbox.addLayout(slider_gbox)

        text_sz = 34
        self.text_slider_a1 = QtWidgets.QLabel("A1")
        self.text_slider_a1.setDisabled(True)
        self.text_slider_a1.setFixedWidth(text_sz)
        self.text_slider_a1.setAlignment(QtCore.Qt.AlignLeft)
        self.text_slider_a1.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        slider_gbox.addWidget(self.text_slider_a1, 0, 1, 1, 1)
        self.text_slider_a2b = QtWidgets.QLabel("A2 / B   ")
        self.text_slider_a2b.setDisabled(True)
        self.text_slider_a2b.setFixedWidth(text_sz)
        self.text_slider_a2b.setAlignment(QtCore.Qt.AlignCenter)
        self.text_slider_a2b.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        slider_gbox.addWidget(self.text_slider_a2b, 0, 2, 1, 1)
        self.text_slider_c = QtWidgets.QLabel(" C ")
        self.text_slider_c.setDisabled(True)
        self.text_slider_c.setFixedWidth(text_sz - 8)
        self.text_slider_c.setAlignment(QtCore.Qt.AlignCenter)
        self.text_slider_c.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        slider_gbox.addWidget(self.text_slider_c, 0, 3, 1, 1)
        self.text_slider_all = QtWidgets.QLabel("All ")
        self.text_slider_all.setDisabled(True)
        self.text_slider_all.setFixedWidth(text_sz)
        self.text_slider_all.setAlignment(QtCore.Qt.AlignRight)
        self.text_slider_all.setStyleSheet(GuiSettings.stylesheet_slider_labels())
        slider_gbox.addWidget(self.text_slider_all, 0, 4, 1, 1)

        self.text_catzoc_slider = QtWidgets.QLabel("Choose:")
        self.text_catzoc_slider.setDisabled(True)
        slider_gbox.addWidget(self.text_catzoc_slider, 1, 0, 1, 1)

        self.catzoc_slider = QtWidgets.QSlider(QtCore.Qt.Horizontal)
        self.catzoc_slider.setRange(1, 4)
        self.catzoc_slider.setSingleStep(1)
        self.catzoc_slider.setValue(4)
        self.catzoc_slider.setTickInterval(1)
        self.catzoc_slider.setTickPosition(QtWidgets.QSlider.TicksBelow)
        self.catzoc_slider.setDisabled(True)
        slider_gbox.addWidget(self.catzoc_slider, 1, 1, 1, 4)

        slider_hbox.addStretch()

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()
        # plot vs
        text_plot_vs = QtWidgets.QLabel("<i>Plot depth vs.</i>")
        hbox.addWidget(text_plot_vs)
        hbox.addStretch()

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()
        # depth vs density
        text_depth_vs_density = QtWidgets.QLabel("Density:")
        hbox.addWidget(text_depth_vs_density)
        text_depth_vs_density.setFixedHeight(GuiSettings.single_line_height())
        self.depth_vs_density_v6 = QtWidgets.QCheckBox(self)
        hbox.addWidget(self.depth_vs_density_v6)
        self.depth_vs_density_v6.setChecked(False)
        # depth vs tvu qc
        text_depth_vs_tvu_qc = QtWidgets.QLabel(" TVU (IHO S-44):")
        hbox.addWidget(text_depth_vs_tvu_qc)
        text_depth_vs_tvu_qc.setFixedHeight(GuiSettings.single_line_height())
        self.depth_vs_tvu_qc_v6 = QtWidgets.QCheckBox(self)
        hbox.addWidget(self.depth_vs_tvu_qc_v6)
        self.depth_vs_tvu_qc_v6.setChecked(False)
        hbox.addStretch()

        vbox.addSpacing(9)

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()

        vbox.addStretch()
示例#29
0
    def _ui_parameters_vcv7(self):
        hbox = QtWidgets.QHBoxLayout()
        self.setParametersVCv7.setLayout(hbox)
        hbox.addStretch()

        vbox = QtWidgets.QVBoxLayout()
        hbox.addLayout(vbox)
        vbox.addStretch()

        label_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(label_hbox)
        # stretch
        label_hbox.addStretch()
        # specs
        text_2017 = QtWidgets.QLabel("2017")
        text_2017.setAlignment(QtCore.Qt.AlignCenter)
        text_2017.setFixedWidth(160)
        label_hbox.addWidget(text_2017)
        # # spacing
        # label_hbox.addSpacing(20)
        # specs
        empty = QtWidgets.QLabel("")
        empty.setAlignment(QtCore.Qt.AlignCenter)
        empty.setFixedWidth(160)
        label_hbox.addWidget(empty)
        # stretch
        label_hbox.addStretch()

        toggle_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(toggle_hbox)
        # stretch
        toggle_hbox.addStretch()
        # specs
        self.toggle_specs_v7 = QtWidgets.QDial()
        self.toggle_specs_v7.setNotchesVisible(True)
        self.toggle_specs_v7.setFocusPolicy(QtCore.Qt.StrongFocus)
        self.toggle_specs_v7.setRange(2016, 2018)
        self.toggle_specs_v7.setValue(2018)
        self.toggle_specs_v7.setFixedSize(QtCore.QSize(40, 40))
        self.toggle_specs_v7.setInvertedAppearance(False)
        toggle_hbox.addWidget(self.toggle_specs_v7)
        # noinspection PyUnresolvedReferences
        self.toggle_specs_v7.valueChanged.connect(self.changed_specs)
        # spacing
        toggle_hbox.addSpacing(120)
        # mode
        self.toggle_mode_v7 = QtWidgets.QDial()
        self.toggle_mode_v7.setNotchesVisible(True)
        self.toggle_mode_v7.setWrapping(False)
        self.toggle_mode_v7.setFocusPolicy(QtCore.Qt.StrongFocus)
        self.toggle_mode_v7.setRange(0, 1)
        self.toggle_mode_v7.setSliderPosition(0)
        self.toggle_mode_v7.setFixedSize(QtCore.QSize(40, 40))
        self.toggle_mode_v7.setInvertedAppearance(False)
        toggle_hbox.addWidget(self.toggle_mode_v7)
        # stretch
        toggle_hbox.addStretch()

        label2_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(label2_hbox)
        # stretch
        label2_hbox.addStretch()
        # specs
        label2_hbox.addSpacing(40)
        text_2016 = QtWidgets.QLabel("2016")
        text_2016.setAlignment(QtCore.Qt.AlignCenter)
        text_2016.setFixedWidth(40)
        label2_hbox.addWidget(text_2016)
        text_2018 = QtWidgets.QLabel("2018+")
        text_2018.setAlignment(QtCore.Qt.AlignCenter)
        text_2018.setFixedWidth(70)
        label2_hbox.addWidget(text_2018)
        # spacing
        label2_hbox.addSpacing(10)
        # mode
        text_obj = QtWidgets.QLabel("Full coverage")
        text_obj.setAlignment(QtCore.Qt.AlignCenter)
        text_obj.setFixedWidth(85)
        label2_hbox.addWidget(text_obj)
        text_cov = QtWidgets.QLabel("Object detection")
        text_cov.setAlignment(QtCore.Qt.AlignCenter)
        text_cov.setFixedWidth(85)
        label2_hbox.addWidget(text_cov)
        # stretch
        label2_hbox.addStretch()

        vbox.addSpacing(10)

        # survey scale
        scale_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(scale_hbox)
        scale_hbox.addStretch()
        self.text_set_scale_v7 = QtWidgets.QLabel("Survey scale:   1 :")
        scale_hbox.addWidget(self.text_set_scale_v7)
        self.text_set_scale_v7.setFixedHeight(GuiSettings.single_line_height())
        self.text_set_scale_v7.setMinimumWidth(90)
        self.set_scale_fsv7 = QtWidgets.QLineEdit("")
        scale_hbox.addWidget(self.set_scale_fsv7)
        self.set_scale_fsv7.setFixedHeight(GuiSettings.single_line_height())
        self.set_scale_fsv7.setValidator(QtGui.QIntValidator(1, 99999999, self.set_scale_fsv7))
        self.set_scale_fsv7.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
        self.set_scale_fsv7.setReadOnly(False)
        self.set_scale_fsv7.setFont(GuiSettings.console_font())
        self.set_scale_fsv7.setStyleSheet(GuiSettings.stylesheet_console_fg_color())
        self.set_scale_fsv7.setFixedWidth(60)
        self.text_set_scale_v7.setDisabled(True)
        self.set_scale_fsv7.setDisabled(True)
        scale_hbox.addStretch()

        vbox.addSpacing(10)

        options_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(options_hbox)
        options_hbox.addStretch()

        text_set_overlap = QtWidgets.QLabel("Deconflict across grids")
        options_hbox.addWidget(text_set_overlap)
        text_set_overlap.setFixedHeight(GuiSettings.single_line_height())
        text_set_overlap.setMinimumWidth(80)
        # text_set_overlap.setStyleSheet("QLabel { color :  rgba(200, 0, 0, 200); }")
        self.set_overlap_fsv7 = QtWidgets.QCheckBox(self)
        self.set_overlap_fsv7.setToolTip("Test the flagged features across all the input grids")
        options_hbox.addWidget(self.set_overlap_fsv7)
        self.set_overlap_fsv7.setChecked(False)

        options_hbox.addSpacing(10)

        text_set_include_laser = QtWidgets.QLabel("Include TECSOU=laser")
        options_hbox.addWidget(text_set_include_laser)
        text_set_include_laser.setFixedHeight(GuiSettings.single_line_height())
        text_set_include_laser.setMinimumWidth(80)
        # text_set_neighborhood.setStyleSheet("QLabel { color :  rgba(200, 0, 0, 200); }")
        self.set_include_laser_fsv7 = QtWidgets.QCheckBox(self)
        self.set_include_laser_fsv7.setToolTip("Uncheck to skip features with TECSOU=laser")
        options_hbox.addWidget(self.set_include_laser_fsv7)
        self.set_include_laser_fsv7.setChecked(True)

        options_hbox.addStretch()

        vbox.addStretch()

        hbox.addStretch()
示例#30
0
    def _ui_parameters_dsv2(self):
        vbox = QtWidgets.QVBoxLayout()
        self.setParametersDSv1.setLayout(vbox)

        vbox.addStretch()

        toggle_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(toggle_hbox)
        # stretch
        toggle_hbox.addStretch()
        # specs
        self.toggle_specs_v2 = QtWidgets.QDial()
        self.toggle_specs_v2.setNotchesVisible(True)
        self.toggle_specs_v2.setFocusPolicy(QtCore.Qt.StrongFocus)
        self.toggle_specs_v2.setRange(2016, 2017)
        self.toggle_specs_v2.setValue(2017)
        self.toggle_specs_v2.setFixedSize(QtCore.QSize(48, 48))
        self.toggle_specs_v2.setInvertedAppearance(False)
        toggle_hbox.addWidget(self.toggle_specs_v2)
        # stretch
        toggle_hbox.addStretch()

        label_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(label_hbox)
        # stretch
        label_hbox.addStretch()
        # specs
        label_hbox.addSpacing(20)
        text_0 = QtWidgets.QLabel("2016")
        text_0.setAlignment(QtCore.Qt.AlignLeft)
        text_0.setFixedWidth(40)
        label_hbox.addWidget(text_0)
        text_1 = QtWidgets.QLabel("2017+")
        text_1.setAlignment(QtCore.Qt.AlignRight)
        text_1.setFixedWidth(40)
        # text_1.setStyleSheet("QLabel { color :  rgb(200, 0, 0, 200); }")
        label_hbox.addWidget(text_1)
        label_hbox.addSpacing(5)
        # stretch
        label_hbox.addStretch()

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)

        vbox.addSpacing(10)

        # survey scale
        scale_hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(scale_hbox)
        scale_hbox.addStretch()
        text_set_scale = QtWidgets.QLabel("Survey scale:   1 :")
        scale_hbox.addWidget(text_set_scale)
        text_set_scale.setFixedHeight(GuiSettings.single_line_height())
        text_set_scale.setMinimumWidth(90)
        self.set_scale_dsv2 = QtWidgets.QLineEdit("")
        scale_hbox.addWidget(self.set_scale_dsv2)
        self.set_scale_dsv2.setFixedHeight(GuiSettings.single_line_height())
        self.set_scale_dsv2.setValidator(
            QtGui.QIntValidator(1, 99999999, self.set_scale_dsv2))
        self.set_scale_dsv2.setAlignment(QtCore.Qt.AlignRight
                                         | QtCore.Qt.AlignVCenter)
        self.set_scale_dsv2.setReadOnly(False)
        self.set_scale_dsv2.setFont(GuiSettings.console_font())
        self.set_scale_dsv2.setStyleSheet(
            GuiSettings.stylesheet_console_fg_color())
        self.set_scale_dsv2.setFixedWidth(60)
        scale_hbox.addStretch()

        vbox.addSpacing(20)

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()
        text_checks = QtWidgets.QLabel("Additional checks:")
        hbox.addWidget(text_checks)
        # text_checks.setFixedHeight(GuiSettings.single_line_height())
        text_checks.setMinimumWidth(80)
        text_checks.setStyleSheet("QLabel { color : #aaaaaa; }")
        hbox.addStretch()

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        hbox.addStretch()
        text_set_neighborhood = QtWidgets.QLabel("Evaluate neighborhood")
        hbox.addWidget(text_set_neighborhood)
        text_set_neighborhood.setFixedHeight(GuiSettings.single_line_height())
        text_set_neighborhood.setMinimumWidth(80)
        # text_set_neighborhood.setStyleSheet("QLabel { color :  rgba(200, 0, 0, 200); }")
        self.set_neighborhood_dsv2 = QtWidgets.QCheckBox(self)
        self.set_neighborhood_dsv2.setToolTip(
            "Experimental check that evaluates the neighborhood of each "
            "designated sounding")
        hbox.addWidget(self.set_neighborhood_dsv2)
        self.set_neighborhood_dsv2.setChecked(False)
        hbox.addStretch()

        vbox.addStretch()