from GeoPublicHealth.src.gui.analysis.composite_index_dialog import (
    CompositeIndexDialog)
from GeoPublicHealth.src.gui.analysis.incidence_dialog import IncidenceDialog
from GeoPublicHealth.src.gui.analysis.incidence_point_dialog import (
    IncidencePointDialog)
from GeoPublicHealth.src.gui.analysis.density_dialog import DensityDialog
from GeoPublicHealth.src.gui.analysis.density_point_dialog import (
    DensityPointDialog)
from GeoPublicHealth.src.gui.analysis.autocorrelation_dialog import (
    AutocorrelationDialog)
from GeoPublicHealth.src.gui.export.csv import CsvExport
from GeoPublicHealth.src.gui.export.kml import KmlExport
from GeoPublicHealth.src.gui.about import AboutWidget
from GeoPublicHealth.src.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)

        self.menu.clicked.connect(self.expand)
        self.menu.clicked.connect(self.display_content)

        self.tree_menu = [
            {
Example #2
0
 *   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 QgsProject, QgsRasterLayer, QgsProviderRegistry

from qgis.PyQt.QtWidgets import QWidget, QDialogButtonBox, QFileDialog

from GeoPublicHealth.src.core.tools import tr
from GeoPublicHealth.src.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(
/***************************************************************************
 *                                                                         *
 *   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 GeoPublicHealth.src.gui.analysis.parent_incidence_density_dialog import (
    IncidenceDensityDialog)
from GeoPublicHealth.src.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):
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
"""

from PyQt4.QtGui import QDialog, QDialogButtonBox
from PyQt4.QtCore import QSize, pyqtSignal
from matplotlib.backends.backend_qt4agg import \
    FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure

from GeoPublicHealth.src.core.graph_toolbar import CustomNavigationToolbar
from GeoPublicHealth.src.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(
Example #5
0
 *                                                                         *
 ***************************************************************************/
"""
from __future__ import print_function

from builtins import str
from qgis.PyQt.QtWidgets import QDialog, QDialogButtonBox
from qgis.PyQt.QtCore import QSize, pyqtSignal
from matplotlib.backends.backend_qt5agg import \
    FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure

from GeoPublicHealth.src.core.graph_toolbar import CustomNavigationToolbar
from GeoPublicHealth.src.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(
Example #6
0
/***************************************************************************
 *                                                                         *
 *   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 GeoPublicHealth.src.gui.analysis.parent_incidence_density_dialog import (
    IncidenceDensityDialog)
from GeoPublicHealth.src.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):
Example #7
0
    FieldException,\
    NotANumberException
import pysal
import libpysal
from esda.moran import Moran_Local
from libpysal.weights import Queen, Rook
from GeoPublicHealth.src.core.stats import Stats
import processing
import numpy as np

from qgis.gui import QgsFieldComboBox
from qgis.gui import QgsMapLayerComboBox

from GeoPublicHealth.src.utilities.resources import get_ui_class

FORM_CLASS = get_ui_class('analysis', 'autocorrelation.ui')


class CommonAutocorrelationDialog(QDialog):

    signalAskCloseWindow = pyqtSignal(int, name='signalAskCloseWindow')
    signalStatus = pyqtSignal(int, str, name='signalStatus')

    def __init__(self, parent=None):
        """Constructor.

        Base class for Incidence and Density dialogs.

        use_area : If you use the area of the polygon or the population field.
        use_point_layer : If you a point a layer, or a field in the polygon
         layer.
 *   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 PyQt4.QtCore import QFileInfo, pyqtSignal
from qgis.core import QgsMapLayerRegistry, QgsRasterLayer, QgsProviderRegistry

from PyQt4.QtGui import QWidget, QDialogButtonBox, QFileDialog

from GeoPublicHealth.src.core.tools import tr
from GeoPublicHealth.src.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(
/***************************************************************************
 *                                                                         *
 *   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 GeoPublicHealth.src.gui.analysis.parent_incidence_density_dialog import (
    IncidenceDensityDialog)
from GeoPublicHealth.src.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):
Example #10
0
from matplotlib.figure import Figure
from matplotlib.backends.backend_qt5agg import \
    FigureCanvasQTAgg as FigureCanvas
from qgis.PyQt.QtWidgets import QWidget, QDialogButtonBox, QApplication, QTableWidgetItem, QFileDialog
from qgis.PyQt.QtCore import pyqtSignal, QSize

from GeoPublicHealth.src.core.graph_toolbar import CustomNavigationToolbar
from GeoPublicHealth.src.core.stats import Stats
from GeoPublicHealth.src.core.tools import \
    tr, display_message_bar, get_last_input_path, set_last_input_path
from GeoPublicHealth.src.core.exceptions import \
    GeoPublicHealthException, NoLayerProvidedException, DifferentCrsException
from GeoPublicHealth.src.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
Example #11
0
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
"""

import codecs
from PyQt4.QtGui import QWidget, QDialogButtonBox, QFileDialog
from PyQt4.QtCore import pyqtSignal

from qgis.gui import QgsMapLayerProxyModel

from GeoPublicHealth.src.core.tools import tr
from GeoPublicHealth.src.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(
Example #12
0
 *   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 QgsProject, QgsVectorLayer

from qgis.PyQt.QtWidgets import QWidget, QDialogButtonBox, QFileDialog
from qgis.PyQt.QtCore import pyqtSignal

from GeoPublicHealth.src.core.tools import tr
from GeoPublicHealth.src.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(
from matplotlib.figure import Figure
from matplotlib.backends.backend_qt4agg import \
    FigureCanvasQTAgg as FigureCanvas
from PyQt4.QtGui import \
    QWidget, QDialogButtonBox, QApplication, QTableWidgetItem, QFileDialog
from PyQt4.QtCore import pyqtSignal, QSize

from GeoPublicHealth.src.core.graph_toolbar import CustomNavigationToolbar
from GeoPublicHealth.src.core.stats import Stats
from GeoPublicHealth.src.core.tools import \
    tr, display_message_bar, get_last_input_path, set_last_input_path
from GeoPublicHealth.src.core.exceptions import \
    GeoPublicHealthException, NoLayerProvidedException, DifferentCrsException
from GeoPublicHealth.src.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
/***************************************************************************
 *                                                                         *
 *   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 GeoPublicHealth.src.gui.analysis.parent_incidence_density_dialog import \
    IncidenceDensityDialog
from GeoPublicHealth.src.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):
Example #15
0
from qgis.PyQt.QtCore import pyqtSignal, QSettings, QVariant
from processing.tools.system import getTempFilename

from GeoPublicHealth.src.core.blurring.layer_index import LayerIndex
from GeoPublicHealth.src.core.blurring.blur import Blur
from GeoPublicHealth.src.core.tools import \
    get_last_input_path, set_last_input_path, tr, display_message_bar
from GeoPublicHealth.src.core.exceptions import \
    GeoPublicHealthException, \
    NoLayerProvidedException,\
    NoFileNoDisplayException, \
    DifferentCrsException,\
    CreatingShapeFileException
from GeoPublicHealth.src.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)
Example #16
0
        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 PyQt4.QtGui import QWidget, QPixmap
from GeoPublicHealth.src.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_geopublichealth.setPixmap(QPixmap(resource('icon-100.png')))
        self.logo_ird.setPixmap(QPixmap(resource('logo_ird.png')))
        self.logo_umr.setPixmap(QPixmap(resource('espace-dev.png')))
Example #17
0
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
"""

import codecs
from qgis.PyQt.QtWidgets import QWidget, QDialogButtonBox, QFileDialog
from qgis.PyQt.QtCore import pyqtSignal

from qgis.core import QgsMapLayerProxyModel
from qgis.core import QgsVectorFileWriter

from GeoPublicHealth.src.core.tools import tr
from GeoPublicHealth.src.utilities.resources import get_ui_class

FORM_CLASS = get_ui_class('export', 'export_kml.ui')


class KmlExport(QWidget, FORM_CLASS):

    signalAskCloseWindow = pyqtSignal(int, name='signalAskCloseWindow')
    signalStatus = pyqtSignal(int, str, name='signalStatus')

    def __init__(self, parent=None):
        self.parent = parent
        super(KmlExport, self).__init__()
        self.setupUi(self)

        self.buttonBox.button(QDialogButtonBox.Save).clicked.connect(
            self.save_kml)
        self.buttonBox.button(QDialogButtonBox.Cancel).clicked.connect(
from PyQt4.QtCore import pyqtSignal, QSettings, QVariant
from processing.tools.system import getTempFilenameInTempFolder

from GeoPublicHealth.src.core.blurring.layer_index import LayerIndex
from GeoPublicHealth.src.core.blurring.blur import Blur
from GeoPublicHealth.src.core.tools import \
    get_last_input_path, set_last_input_path, tr, display_message_bar
from GeoPublicHealth.src.core.exceptions import \
    GeoPublicHealthException, \
    NoLayerProvidedException,\
    NoFileNoDisplayException, \
    DifferentCrsException,\
    CreatingShapeFileException
from GeoPublicHealth.src.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)
 *   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 PyQt4.QtGui import QWidget, QDialogButtonBox, QFileDialog
from PyQt4.QtCore import pyqtSignal

from GeoPublicHealth.src.core.tools import tr
from GeoPublicHealth.src.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(
Example #20
0
from GeoPublicHealth.src.gui.analysis.composite_index_dialog import (
    CompositeIndexDialog)
from GeoPublicHealth.src.gui.analysis.incidence_dialog import IncidenceDialog
from GeoPublicHealth.src.gui.analysis.incidence_point_dialog import (
    IncidencePointDialog)
from GeoPublicHealth.src.gui.analysis.density_dialog import DensityDialog
from GeoPublicHealth.src.gui.analysis.density_point_dialog import (
    DensityPointDialog)
from GeoPublicHealth.src.gui.analysis.autocorrelation_dialog import (
    AutocorrelationDialog)
from GeoPublicHealth.src.gui.export.csv import CsvExport
from GeoPublicHealth.src.gui.export.kml import KmlExport
from GeoPublicHealth.src.gui.about import AboutWidget
from GeoPublicHealth.src.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)

        self.menu.clicked.connect(self.expand)
        self.menu.clicked.connect(self.display_content)

        self.tree_menu = [
            {
                'label':
Example #21
0
        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.QtWidgets import QWidget
from qgis.PyQt.QtGui import QPixmap
from GeoPublicHealth.src.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_geopublichealth.setPixmap(QPixmap(resource('icon-100.png')))
        self.logo_ird.setPixmap(QPixmap(resource('logo_ird.png')))
        self.logo_umr.setPixmap(QPixmap(resource('espace-dev.png')))
Example #22
0
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
"""

from builtins import str
import codecs
from qgis.PyQt.QtWidgets import QWidget, QDialogButtonBox, QFileDialog
from qgis.PyQt.QtCore import pyqtSignal

from qgis.core import QgsMapLayerProxyModel

from GeoPublicHealth.src.core.tools import tr
from GeoPublicHealth.src.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(
Example #23
0
from matplotlib.figure import Figure

from GeoPublicHealth.src.core.graph_toolbar import CustomNavigationToolbar
from GeoPublicHealth.src.core.tools import display_message_bar, tr
from GeoPublicHealth.src.core.exceptions import \
    GeoPublicHealthException,\
    NoLayerProvidedException,\
    DifferentCrsException,\
    FieldExistingException,\
    FieldException,\
    NotANumberException
from GeoPublicHealth.src.core.stats import Stats

from GeoPublicHealth.src.utilities.resources import get_ui_class

FORM_CLASS = get_ui_class('analysis', 'composite_index.ui')


class CommonCompositeIndexDialog(QDialog):

    signalAskCloseWindow = pyqtSignal(int, name='signalAskCloseWindow')
    signalStatus = pyqtSignal(int, str, name='signalStatus')

    def __init__(self, parent=None):
        """Constructor.

        Base class for Incidence and Density dialogs.

        use_area : If you use the area of the polygon or the population field.
        use_point_layer : If you a point a layer, or a field in the polygon
         layer.
from matplotlib.figure import Figure

from GeoPublicHealth.src.core.graph_toolbar import CustomNavigationToolbar
from GeoPublicHealth.src.core.tools import display_message_bar, tr
from GeoPublicHealth.src.core.exceptions import \
    GeoPublicHealthException,\
    NoLayerProvidedException,\
    DifferentCrsException,\
    FieldExistingException,\
    FieldException,\
    NotANumberException
from GeoPublicHealth.src.core.stats import Stats

from GeoPublicHealth.src.utilities.resources import get_ui_class

FORM_CLASS = get_ui_class('analysis', 'composite_index.ui')

class CommonCompositeIndexDialog(QDialog):

    signalAskCloseWindow = pyqtSignal(int, name='signalAskCloseWindow')
    signalStatus = pyqtSignal(int, str, name='signalStatus')

    def __init__(self, parent=None):
        """Constructor.

        Base class for Incidence and Density dialogs.

        use_area : If you use the area of the polygon or the population field.
        use_point_layer : If you a point a layer, or a field in the polygon
         layer.
        """