예제 #1
0
    def __init__(self, qgis_utils, db, conn_manager, parent=None):
        CobolBaseDialog.__init__(self, qgis_utils, db, conn_manager, parent)
        self.qgis_utils = qgis_utils
        self._db = db
        self.names = self._db.names
        self.conn_manager = conn_manager
        self.parent = parent
        self.progress_configuration(0, 1)  # start from: 0, number of steps: 1
        self.tool_name = QCoreApplication.translate("ETLCobolDialog",
                                                    "ETL-Cobol")
        self.setWindowTitle(
            QCoreApplication.translate("ETLCobolDialog",
                                       "ETL: Cobol to Supplies model"))
        self.db_source = SUPPLIES_DB_SOURCE

        load_ui('supplies/wig_cobol_supplies.ui', self.target_data)
        self.target_data.setVisible(True)

        self.target_data.btn_browse_connection.clicked.connect(
            self.show_settings)
        self.update_connection_info()

        self.restore_settings()

        # Trigger validations right now
        self.txt_file_path_blo.textChanged.emit(self.txt_file_path_blo.text())
        self.txt_file_path_uni.textChanged.emit(self.txt_file_path_uni.text())
        self.txt_file_path_ter.textChanged.emit(self.txt_file_path_ter.text())
        self.txt_file_path_pro.textChanged.emit(self.txt_file_path_pro.text())
        self.txt_file_path_gdb.textChanged.emit(self.txt_file_path_gdb.text())
    def __init__(self, qgis_utils, db, conn_manager, parent=None):
        CobolBaseDialog.__init__(self, qgis_utils, db, conn_manager, parent)
        self.qgis_utils = qgis_utils
        self._db = db
        self.conn_manager = conn_manager
        self.parent = parent
        self.names_gpkg = ''
        self.progress_configuration(0, 2)  # Start from: 0, number of steps: 2
        self._running_tool = False
        self.tool_name = QCoreApplication.translate("MissingCobolSupplies",
                                                    "Missing Supplies")
        self.setWindowTitle(
            QCoreApplication.translate("MissingCobolSupplies",
                                       "Find missing Cobol supplies"))

        load_ui('supplies/wig_missing_cobol_supplies_export.ui',
                self.target_data)
        self.target_data.setVisible(True)

        self.disable_widgets()

        self.target_data.btn_browse_file_folder_supplies.clicked.connect(
            make_folder_selector(
                self.target_data.txt_file_path_folder_supplies,
                title=QCoreApplication.translate("MissingCobolSupplies",
                                                 "Select folder to save data"),
                parent=None))

        dir_validator_folder = DirValidator(pattern=None, allow_empty_dir=True)
        self.target_data.txt_file_path_folder_supplies.setValidator(
            dir_validator_folder)
        self.target_data.txt_file_path_folder_supplies.textChanged.connect(
            self.validators.validate_line_edits)
        self.target_data.txt_file_path_folder_supplies.textChanged.connect(
            self.input_data_changed)

        self.restore_settings()
        self.target_data.txt_file_path_folder_supplies.setText(
            QSettings().value('Asistente-LADM_COL/etl_cobol/folder_path', ''))

        # Trigger validations right now
        self.txt_file_path_uni.textChanged.emit(self.txt_file_path_uni.text())
        self.txt_file_path_ter.textChanged.emit(self.txt_file_path_ter.text())
        self.txt_file_path_pro.textChanged.emit(self.txt_file_path_pro.text())
        self.txt_file_path_gdb.textChanged.emit(self.txt_file_path_gdb.text())
        self.target_data.txt_file_path_folder_supplies.textChanged.emit(
            self.target_data.txt_file_path_folder_supplies.text())
예제 #3
0
    def __init__(self, iface, db, qgis_utils, wizard_settings):
        super(AbsWizardFactory, self).__init__()
        self.iface = iface
        self._db = db
        self.qgis_utils = qgis_utils
        self.wizard_config = wizard_settings
        self.logger = Logger()
        self.names = self._db.names
        self.help_strings = HelpStrings()
        self.translatable_config_strings = TranslatableConfigStrings()
        load_ui(self.wizard_config[WIZARD_UI], self)

        self.WIZARD_FEATURE_NAME = self.wizard_config[WIZARD_FEATURE_NAME]
        self.WIZARD_TOOL_NAME = self.wizard_config[WIZARD_TOOL_NAME]
        self.EDITING_LAYER_NAME = self.wizard_config[WIZARD_EDITING_LAYER_NAME]
        self._layers = self.wizard_config[WIZARD_LAYERS]
        self.set_ready_only_field()

        self.init_gui()
 def _create_qwizard_page(self) -> QWizardPage:
     self.__qwizard_page = QWizardPage()
     ui_path = 'wizards/survey/wiz_create_plot_survey.ui'
     load_ui(ui_path, self.__qwizard_page)
     return self.__qwizard_page
 def _create_qwizard_page(self) -> QWizardPage:
     self.__qwizard_page = QWizardPage()
     ui_path = 'wizards/survey/wiz_associate_extaddress_survey.ui'
     load_ui(ui_path, self.__qwizard_page)
     return self.__qwizard_page
 def _init_qwizard_page(self) -> QWizardPage:
     qwizard_page = QWizardPage()
     ui_path = 'wizards/source_selector.ui'
     load_ui(ui_path, qwizard_page)
     return qwizard_page
 def _init_qwizard_page(self) -> QWizardPage:
     qwizard_page = QWizardPage()
     ui_path = 'wizards/survey/wiz_create_right_of_way_survey.ui'
     load_ui(ui_path, qwizard_page)
     return qwizard_page