* This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ """ from qgis.PyQt.QtCore import QFileInfo, pyqtSignal from qgis.core import QgsMapLayerRegistry, QgsRasterLayer, QgsProviderRegistry from qgis.PyQt.QtGui import QWidget, QDialogButtonBox, QFileDialog from GeoHealth.geohealth.core.tools import tr from GeoHealth.geohealth.utilities.resources import get_ui_class FORM_CLASS = get_ui_class('import_ui', 'open_raster.ui') class OpenRasterWidget(QWidget, FORM_CLASS): signalAskCloseWindow = pyqtSignal(int, name='signalAskCloseWindow') signalStatus = pyqtSignal(int, str, name='signalStatus') def __init__(self, parent=None): self.parent = parent super(OpenRasterWidget, self).__init__() self.setupUi(self) self.buttonBox.button(QDialogButtonBox.Open).clicked.connect( self.open_raster) self.buttonBox.button(QDialogButtonBox.Cancel).clicked.connect(
from matplotlib.figure import Figure from matplotlib.backends.backend_qt4agg import \ FigureCanvasQTAgg as FigureCanvas from qgis.PyQt.QtGui import \ QWidget, QDialogButtonBox, QApplication, QTableWidgetItem, QFileDialog from qgis.PyQt.QtCore import pyqtSignal, QSize from GeoHealth.geohealth.core.graph_toolbar import CustomNavigationToolbar from GeoHealth.geohealth.core.stats import Stats from GeoHealth.geohealth.core.tools import \ tr, display_message_bar, get_last_input_path, set_last_input_path from GeoHealth.geohealth.core.exceptions import \ GeoHealthException, NoLayerProvidedException, DifferentCrsException from GeoHealth.geohealth.utilities.resources import get_ui_class FORM_CLASS = get_ui_class('analysis', 'stats.ui') class StatsWidget(QWidget, FORM_CLASS): signalAskCloseWindow = pyqtSignal(name='signalAskCloseWindow') def __init__(self, parent=None): self.parent = parent super(StatsWidget, self).__init__() self.setupUi(self) self.label_progressStats.setText('') # Connect # noinspection PyUnresolvedReferences
* it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ """ from os.path import splitext, basename from qgis.core import QgsMapLayerRegistry, QgsVectorLayer from qgis.PyQt.QtGui import QWidget, QDialogButtonBox, QFileDialog from qgis.PyQt.QtCore import pyqtSignal from GeoHealth.geohealth.core.tools import tr from GeoHealth.geohealth.utilities.resources import get_ui_class FORM_CLASS = get_ui_class('import_ui', 'open_shapefile.ui') class OpenShapefileWidget(QWidget, FORM_CLASS): signalAskCloseWindow = pyqtSignal(int, name='signalAskCloseWindow') signalStatus = pyqtSignal(int, str, name='signalStatus') def __init__(self, parent=None): self.parent = parent super(OpenShapefileWidget, self).__init__() self.setupUi(self) self.buttonBox.button(QDialogButtonBox.Open).clicked.connect( self.open_shapefile) self.buttonBox.button(QDialogButtonBox.Cancel).clicked.connect(
* it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ """ from os.path import splitext, basename from qgis.core import QgsMapLayerRegistry, QgsVectorLayer from qgis.PyQt.QtGui import QWidget, QDialogButtonBox, QFileDialog from qgis.PyQt.QtCore import pyqtSignal from GeoHealth.geohealth.core.tools import tr from GeoHealth.geohealth.utilities.resources import get_ui_class FORM_CLASS = get_ui_class('import_ui', 'open_shapefile.ui') class OpenXlsDbfFileWidget(QWidget, FORM_CLASS): signalAskCloseWindow = pyqtSignal(int, name='signalAskCloseWindow') signalStatus = pyqtSignal(int, str, name='signalStatus') def __init__(self, parent=None): self.parent = parent super(OpenXlsDbfFileWidget, self).__init__() self.setupUi(self) self.buttonBox.button(QDialogButtonBox.Open).clicked.connect( self.open_table) self.buttonBox.button(QDialogButtonBox.Cancel).clicked.connect(
/*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ """ from GeoHealth.geohealth.gui.analysis.parent_incidence_density_dialog import ( IncidenceDensityDialog) from GeoHealth.geohealth.utilities.resources import get_ui_class FORM_CLASS = get_ui_class('analysis', 'density.ui') class DensityDialog(IncidenceDensityDialog, FORM_CLASS): def __init__(self, parent=None): """Constructor.""" IncidenceDensityDialog.__init__(self, parent) # noinspection PyArgumentList FORM_CLASS.setupUi(self, self) self.use_area = True self.use_point_layer = False self.setup_ui() def run_stats(self):
/*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ """ from GeoHealth.geohealth.gui.analysis.parent_incidence_density_dialog import ( IncidenceDensityDialog) from GeoHealth.geohealth.utilities.resources import get_ui_class FORM_CLASS = get_ui_class('analysis', 'incidence.ui') class IncidenceDialog(IncidenceDensityDialog, FORM_CLASS): def __init__(self, parent=None): """Constructor.""" IncidenceDensityDialog.__init__(self, parent) # noinspection PyArgumentList FORM_CLASS.setupUi(self, self) self.use_area = False self.use_point_layer = False self.setup_ui() def run_stats(self):
from qgis.PyQt.QtCore import pyqtSignal, QSettings, QVariant from processing.tools.system import getTempFilenameInTempFolder from GeoHealth.geohealth.core.blurring.layer_index import LayerIndex from GeoHealth.geohealth.core.blurring.blur import Blur from GeoHealth.geohealth.core.tools import \ get_last_input_path, set_last_input_path, tr, display_message_bar from GeoHealth.geohealth.core.exceptions import \ GeoHealthException, \ NoLayerProvidedException,\ NoFileNoDisplayException, \ DifferentCrsException,\ CreatingShapeFileException from GeoHealth.geohealth.utilities.resources import get_ui_class FORM_CLASS = get_ui_class('analysis', 'blur.ui') class BlurWidget(QWidget, FORM_CLASS): signalAskCloseWindow = pyqtSignal(name='signalAskCloseWindow') def __init__(self, parent=None): self.parent = parent super(BlurWidget, self).__init__() self.setupUi(self) self.label_progress.setText('') self.checkBox_envelope.setChecked(False) self.comboBox_envelope.setEnabled(False)
***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ """ from GeoHealth.geohealth.gui.analysis.parent_incidence_density_dialog import IncidenceDensityDialog from GeoHealth.geohealth.utilities.resources import get_ui_class FORM_CLASS = get_ui_class("analysis", "density_with_point.ui") class DensityPointDialog(IncidenceDensityDialog, FORM_CLASS): def __init__(self, parent=None): """Constructor.""" IncidenceDensityDialog.__init__(self, parent) # noinspection PyArgumentList FORM_CLASS.setupUi(self, self) self.use_area = True self.use_point_layer = True self.setup_ui() def run_stats(self):
begin : 2014-08-20 copyright : (C) 2014 by Etienne Trimaille email : [email protected] ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ """ from qgis.PyQt.QtGui import QWidget, QPixmap from GeoHealth.geohealth.utilities.resources import get_ui_class, resource FORM_CLASS = get_ui_class('default', 'about.ui') class AboutWidget(QWidget, FORM_CLASS): def __init__(self, parent=None): self.parent = parent super(AboutWidget, self).__init__() self.setupUi(self) self.logo_geohealth.setPixmap(QPixmap(resource('icon-100.png'))) self.logo_ird.setPixmap(QPixmap(resource('logo_ird.png'))) self.logo_umr.setPixmap(QPixmap(resource('espace-dev.png')))
/*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ """ from GeoHealth.geohealth.gui.analysis.parent_incidence_density_dialog import \ IncidenceDensityDialog from GeoHealth.geohealth.utilities.resources import get_ui_class FORM_CLASS = get_ui_class('analysis', 'incidence_with_point.ui') class IncidencePointDialog(IncidenceDensityDialog, FORM_CLASS): def __init__(self, parent=None): """Constructor.""" IncidenceDensityDialog.__init__(self, parent) # noinspection PyArgumentList FORM_CLASS.setupUi(self, self) self.use_area = False self.use_point_layer = True self.setup_ui() def run_stats(self):
* the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ """ from qgis.PyQt.QtGui import QDialog, QDialogButtonBox from qgis.PyQt.QtCore import QSize, pyqtSignal from matplotlib.backends.backend_qt4agg import \ FigureCanvasQTAgg as FigureCanvas from matplotlib.figure import Figure from GeoHealth.geohealth.core.graph_toolbar import CustomNavigationToolbar from GeoHealth.geohealth.utilities.resources import get_ui_class FORM_CLASS = get_ui_class('analysis', 'histogram.ui') class HistogramDialog(QDialog, FORM_CLASS): signalAskCloseWindow = pyqtSignal(int, name='signalAskCloseWindow') def __init__(self, parent=None): """Constructor.""" QDialog.__init__(self, parent) self.setupUi(self) # Connect slot. self.button_box.button(QDialogButtonBox.Ok).clicked.connect( self.draw_plot) self.button_box.button(QDialogButtonBox.Cancel).clicked.connect(
from GeoHealth.geohealth.gui.import_gui.open_raster import OpenRasterWidget from GeoHealth.geohealth.gui.import_gui.open_xls_dbf import ( OpenXlsDbfFileWidget) from GeoHealth.geohealth.gui.analysis.blur_dialog import BlurWidget from GeoHealth.geohealth.gui.analysis.stats_dialog import StatsWidget from GeoHealth.geohealth.gui.analysis.incidence_dialog import IncidenceDialog from GeoHealth.geohealth.gui.analysis.incidence_point_dialog import ( IncidencePointDialog) from GeoHealth.geohealth.gui.analysis.density_dialog import DensityDialog from GeoHealth.geohealth.gui.analysis.density_point_dialog import ( DensityPointDialog) from GeoHealth.geohealth.gui.export.csv import CsvExport from GeoHealth.geohealth.gui.about import AboutWidget from GeoHealth.geohealth.utilities.resources import get_ui_class, resource FORM_CLASS = get_ui_class('default', 'main.ui') class MainDialog(QDialog, FORM_CLASS): def __init__(self, parent=None): """Constructor.""" QDialog.__init__(self) self.parent = parent self.setupUi(self) # noinspection PyUnresolvedReferences self.menu.clicked.connect(self.expand) # noinspection PyUnresolvedReferences self.menu.clicked.connect(self.display_content) self.tree_menu = [{
* the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ """ import codecs from qgis.PyQt.QtGui import QWidget, QDialogButtonBox, QFileDialog from qgis.PyQt.QtCore import pyqtSignal from qgis.gui import QgsMapLayerProxyModel from GeoHealth.geohealth.core.tools import tr from GeoHealth.geohealth.utilities.resources import get_ui_class FORM_CLASS = get_ui_class('export', 'export_csv.ui') class CsvExport(QWidget, FORM_CLASS): signalAskCloseWindow = pyqtSignal(int, name='signalAskCloseWindow') signalStatus = pyqtSignal(int, str, name='signalStatus') def __init__(self, parent=None): self.parent = parent super(CsvExport, self).__init__() self.setupUi(self) self.buttonBox.button(QDialogButtonBox.Save).clicked.connect( self.save_csv) self.buttonBox.button(QDialogButtonBox.Cancel).clicked.connect(