Exemplo n.º 1
0
    def __init__(self, parent, title, db_action_type):
        QWizardPage.__init__(self, parent)

        self.workflow_wizard = parent
        self.db_action_type = db_action_type

        self.setupUi(self)
        self.setTitle(title)

        # in this context we use GENERATE for the schema import and IMPORT_DATA for the data import
        if self.db_action_type == DbActionType.GENERATE:
            self.description.setText(
                self.tr(
                    "Run the ili2db sessions to make the model imports (or skip to continue)."
                )
            )
        elif self.db_action_type == DbActionType.IMPORT_DATA:
            self.description.setText(
                self.tr(
                    "Run the ili2db sessions to make the data imports (or skip to continue)."
                )
            )
        elif self.db_action_type == DbActionType.EXPORT:
            self.description.setText(
                self.tr(
                    "Run the ili2db session to make the data export (or skip to continue)."
                )
            )

        self.session_widget_list = []
        self.session_status = []
        self.run_command_button.setEnabled(False)
        self.run_command_button.clicked.connect(self._run)
        self.is_complete = False
        self.pending_sessions = []
Exemplo n.º 2
0
 def __init__(self, title="Ready", sub_title=" "):
     QWizardPage.__init__(self)
     self.setTitle(title)
     self.setSubTitle(sub_title)
     self.setCommitPage(True)
     self.createWidgets()
     self.setButtonText(QWizard.CommitButton, "Start")
Exemplo n.º 3
0
    def __init__(self, iface):
        """Constructor."""

        QWizard.__init__(self)
        QWizardPage.__init__(self)

        p =  FORM_CLASS

        self.QWizard = p

        Page1(self, p.wizardPage1)



        self.addPage(Page1(self))
        super().__init__(parent)
        self.iface = iface
        loader = QtUiTools.QUiLoader()
        loader.load(FORM_CLASS, parent=None)
        self.dataInsert = {}

        self.radioButtonObjetoSelecAddFeature.clicked.connect(self.radioButtonControl)
        self.radioButtonFromFileAddFeature.clicked.connect(self.radioButtonControl)
        self.nextScreen.clicked.connect(self.enterAtributo)
        self.tablesGeo = DbTools().getTablesGeo("public")
Exemplo n.º 4
0
	def __init__(self, title = "Performing analysis", sub_title = " "):
		QWizardPage.__init__(self)
		self._task = None
		self._done = False
		self.setTitle(title);
		self.setSubTitle(sub_title);
		self.createWidgets()
Exemplo n.º 5
0
	def __init__(self, title = "Analysis finished", sub_title = " "):
		QWizardPage.__init__(self)

		self.setTitle(title)
		self.setSubTitle(sub_title)

		self.createWidgets()

		self.setButtonText(QWizard.FinishButton, "Restart")
		self.setButtonText(QWizard.CancelButton, "Close")
    def __init__(self, parent, title):
        QWizardPage.__init__(self)

        self.workflow_wizard = parent

        self.setupUi(self)

        self.setTitle(title)

        self.next_id = gui_utils.PageIds.ImportSourceSelection
        self.import_button.clicked.connect(self._on_import)
        self.generate_button.clicked.connect(self._on_generate)
        self.export_button.clicked.connect(self._on_export)
    def __init__(self, parent, title):
        QWizardPage.__init__(self, parent)

        self.workflow_wizard = parent

        self.setupUi(self)
        self.setFinalPage(True)
        self.setTitle(title)

        self.db_simple_factory = DbSimpleFactory()
        self.configuration = None

        self.create_project_button.clicked.connect(self._create_project)
Exemplo n.º 8
0
    def __init__(self, parent, title):
        QWizardPage.__init__(self, parent)
        self.workflow_wizard = parent

        self.setupUi(self)
        self.setTitle(title)

        self.workflow_wizard = parent
        self.is_complete = True

        self.model_list_view.setModel(self.workflow_wizard.import_models_model)
        self.model_list_view.clicked.connect(
            self.workflow_wizard.import_models_model.check)
        self.model_list_view.space_pressed.connect(
            self.workflow_wizard.import_models_model.check)
        self.model_list_view.model().modelReset.connect(
            self._update_models_dependent_info)

        self.crs = QgsCoordinateReferenceSystem()
        self.ili2db_options = Ili2dbOptionsDialog(self)
        self.ili2db_options_button.clicked.connect(self.ili2db_options.open)
        self.ili2db_options.finished.connect(self._fill_toml_file_info_label)

        self.crsSelector.crsChanged.connect(self._crs_changed)

        self.ilimetaconfigcache = IliDataCache(
            self.workflow_wizard.import_schema_configuration.base_configuration
        )
        self.metaconfig_delegate = MetaConfigCompleterDelegate()
        self.metaconfig = configparser.ConfigParser()
        self.current_models = None
        self.current_metaconfig_id = None
        self.ili_metaconfig_line_edit.setPlaceholderText(
            self.tr("[Search metaconfig / topping from UsabILIty Hub]"))
        self.ili_metaconfig_line_edit.setEnabled(False)
        completer = QCompleter(self.ilimetaconfigcache.model,
                               self.ili_metaconfig_line_edit)
        completer.setCaseSensitivity(Qt.CaseInsensitive)
        completer.setFilterMode(Qt.MatchContains)
        completer.popup().setItemDelegate(self.metaconfig_delegate)
        self.ili_metaconfig_line_edit.setCompleter(completer)
        self.ili_metaconfig_line_edit.textChanged.emit(
            self.ili_metaconfig_line_edit.text())
        self.ili_metaconfig_line_edit.textChanged.connect(
            self._complete_metaconfig_completer)
        self.ili_metaconfig_line_edit.punched.connect(
            self._complete_metaconfig_completer)
        self.ili_metaconfig_line_edit.textChanged.connect(
            self._on_metaconfig_completer_activated)
        self.workflow_wizard.ilireferencedatacache.model_refreshed.connect(
            self._update_linked_models)
    def __init__(self, parent, title):
        QWizardPage.__init__(self, parent)

        self.workflow_wizard = parent

        self.setupUi(self)
        self.setTitle(title)

        self.file_browse_button.clicked.connect(
            make_file_selector(
                self.input_line_edit,
                title=self.tr(
                    "Open Interlis Model, Transfer or Catalogue File"),
                file_filter=self.
                tr("Interlis Model / Transfer / Catalogue File (*.ili *.xtf *.itf *.XTF *.ITF *.xml *.XML *.xls *.XLS *.xlsx *.XLSX)"
                   ),
            ))

        self.fileValidator = FileValidator(
            pattern=["*." + ext for ext in self.ValidExtensions],
            allow_empty=False)

        self.ilicache = IliCache(
            self.workflow_wizard.import_schema_configuration.base_configuration
        )
        self.model_delegate = ModelCompleterDelegate()
        self._refresh_ili_models_cache()
        self.input_line_edit.setPlaceholderText(
            self.tr("[Browse for file or search model from repository]"))

        # very unhappy about this behavior, but okay for prototype
        self.first_time_punched = False
        self.input_line_edit.punched.connect(self._first_time_punch)

        self.source_list_view.setModel(self.workflow_wizard.source_model)
        self.add_button.clicked.connect(self._add_row)
        self.remove_button.clicked.connect(self._remove_selected_rows)

        self.add_button.setEnabled(self._valid_source())
        self.input_line_edit.textChanged.connect(
            lambda: self.add_button.setEnabled(self._valid_source()))
        self.remove_button.setEnabled(self._valid_selection())
        self.source_list_view.clicked.connect(
            lambda: self.remove_button.setEnabled(self._valid_selection()))
        self.add_button.setIcon(
            QgsApplication.getThemeIcon("/symbologyAdd.svg"))
        self.remove_button.setIcon(
            QgsApplication.getThemeIcon("/symbologyRemove.svg"))
        self.source_list_view.files_dropped.connect(
            self.workflow_wizard.append_dropped_files)
Exemplo n.º 10
0
    def __init__(self, parent, title):
        QWizardPage.__init__(self, parent)
        self.workflow_wizard = parent

        self.setupUi(self)
        self.setTitle(title)

        self.filter_data_panel = FilterDataPanel(self.workflow_wizard)
        self.filter_layout.addWidget(self.filter_data_panel)

        self.is_complete = False

        self.xtf_file_browse_button.clicked.connect(
            make_save_file_selector(
                self.xtf_file_line_edit,
                title=self.tr("Save in XTF Transfer File"),
                file_filter=self.
                tr("XTF Transfer File (*.xtf *XTF);;Interlis 1 Transfer File (*.itf *ITF);;XML (*.xml *XML);;GML (*.gml *GML)"
                   ),
                extension=".xtf",
                extensions=["." + ext for ext in self.ValidExtensions],
            ))

        self.validators = Validators()

        fileValidator = FileValidator(
            pattern=["*." + ext for ext in self.ValidExtensions],
            allow_non_existing=True,
        )

        self.xtf_file_line_edit.setValidator(fileValidator)
        self.xtf_file_line_edit.textChanged.connect(
            self.validators.validate_line_edits)
        self.xtf_file_line_edit.textChanged.connect(
            self._set_current_export_target)
        self.xtf_file_line_edit.textChanged.emit(
            self.xtf_file_line_edit.text())
    def __init__(self, parent, title, db_action_type):
        QWizardPage.__init__(self, parent)

        self.workflow_wizard = parent
        self.db_action_type = db_action_type

        self.setupUi(self)
        self.setTitle(title)

        # in this context we use GENERATE for the project generation and the IMPORT_DATA for the schema import (and the data import)
        if db_action_type == DbActionType.GENERATE:
            self.description.setText(
                self.tr(
                    "Select an existing database you want to generate a QGIS project from."
                )
            )
        elif db_action_type == DbActionType.EXPORT:
            self.description.setText(
                self.tr("Select an existing database you want to export from.")
            )
        else:
            self.description.setText(
                self.tr("Choose the database you want to create or import to.")
            )

        self.type_combo_box.clear()
        self._lst_panel = dict()
        self.db_simple_factory = DbSimpleFactory()

        for db_id in self.db_simple_factory.get_db_list(False):
            self.type_combo_box.addItem(displayDbIliMode[db_id], db_id)
            db_factory = self.db_simple_factory.create_factory(db_id)
            item_panel = db_factory.get_config_panel(self, db_action_type)
            self._lst_panel[db_id] = item_panel
            self.db_layout.addWidget(item_panel)

        self.type_combo_box.currentIndexChanged.connect(self._type_changed)
Exemplo n.º 12
0
 def validatePage(self):
     if not QWizardPage.validatePage(self):
         return False
     self.wizard().saveProperties()
     return True
Exemplo n.º 13
0
 def __init__(self, parent=None):
     print("oi")
     #super().__init__(parent)
     QWizardPage.__init__(self)
Exemplo n.º 14
0
 def __init__(self):
     QWizardPage.__init__(self)
     self._props = {}
    def __init__(self, parent, title):
        QWizardPage.__init__(self, parent)
        self.workflow_wizard = parent

        self.setupUi(self)
        self.setTitle(title)

        self.workflow_wizard = parent
        self.is_complete = True
        self.basket_handling = False

        self.workflow_wizard.ilireferencedatacache.file_download_succeeded.connect(
            lambda dataset_id, path: self._on_referencedata_received(path)
        )
        self.workflow_wizard.ilireferencedatacache.file_download_failed.connect(
            self._on_referencedata_failed
        )
        self.ilireferencedata_delegate = MetaConfigCompleterDelegate()
        self.ilireferencedata_line_edit.setPlaceholderText(
            self.tr("[Search referenced data files from UsabILIty Hub]")
        )
        self.ilireferencedata_line_edit.setEnabled(False)
        completer = QCompleter(
            self.workflow_wizard.ilireferencedatacache.model,
            self.ilireferencedata_line_edit,
        )
        completer.setCaseSensitivity(Qt.CaseInsensitive)
        completer.setFilterMode(Qt.MatchContains)
        completer.popup().setItemDelegate(self.ilireferencedata_delegate)
        self.ilireferencedata_line_edit.setCompleter(completer)
        self.ilireferencedata_line_edit.textChanged.emit(
            self.ilireferencedata_line_edit.text()
        )
        self.ilireferencedata_line_edit.textChanged.connect(
            self._complete_referencedata_completer
        )
        self.ilireferencedata_line_edit.punched.connect(
            self._complete_referencedata_completer
        )

        self.add_button.clicked.connect(self._add_row)
        self.remove_button.clicked.connect(self._remove_selected_rows)

        self.add_button.setEnabled(False)
        self.ilireferencedata_line_edit.textChanged.connect(
            lambda: self.add_button.setEnabled(self._valid_referencedata())
        )
        self.remove_button.setEnabled(self._valid_selection())
        self.file_table_view.clicked.connect(
            lambda: self.remove_button.setEnabled(self._valid_selection())
        )

        self.add_button.setIcon(QgsApplication.getThemeIcon("/symbologyAdd.svg"))
        self.remove_button.setIcon(QgsApplication.getThemeIcon("/symbologyRemove.svg"))

        self.workflow_wizard.import_data_file_model.sourceModel().setHorizontalHeaderLabels(
            [self.tr("Import File"), self.tr("Catalogue"), self.tr("Dataset")]
        )
        self.file_table_view.setModel(self.workflow_wizard.import_data_file_model)
        self.file_table_view.horizontalHeader().setSectionResizeMode(
            gui_utils.SourceModel.Columns.SOURCE, QHeaderView.Stretch
        )
        self.file_table_view.horizontalHeader().setSectionResizeMode(
            gui_utils.SourceModel.Columns.IS_CATALOGUE, QHeaderView.ResizeToContents
        )
        self.file_table_view.horizontalHeader().setSectionResizeMode(
            gui_utils.SourceModel.Columns.DATASET, QHeaderView.ResizeToContents
        )

        self.file_table_view.verticalHeader().setSectionsMovable(True)
        self.file_table_view.verticalHeader().setDragEnabled(True)
        self.file_table_view.verticalHeader().setDragDropMode(QHeaderView.InternalMove)
        self.file_table_view.resizeColumnsToContents()
        self.workflow_wizard.import_data_file_model.dataChanged.connect(
            self._update_delegates
        )

        self.db_connector = None

        self.datasetmanager_dlg = None
        self.datasetmanager_button.setCheckable(True)
        self.datasetmanager_button.clicked.connect(self._show_datasetmanager_dialog)
        self.datasetmanager_button.setIcon(
            QIcon(
                os.path.join(
                    os.path.dirname(__file__),
                    "../../images/QgisModelBaker-datasetmanager-icon.svg",
                )
            )
        )
 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
 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 _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