本文整理汇总了Python中safe.utilities.resources.get_ui_class函数的典型用法代码示例。如果您正苦于以下问题:Python get_ui_class函数的具体用法?Python get_ui_class怎么用?Python get_ui_class使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_ui_class函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: get_ui_class
from PyQt4.QtCore import pyqtSignature
from safe.common.version import get_version
from safe.storage.core import read_layer as safe_read_layer
from safe.storage.vector import Vector
from safe.utilities.gis import is_point_layer, is_polygon_layer
from safe.utilities.resources import html_footer, html_header, get_ui_class
from safe.utilities.utilities import add_ordered_combo_item
from safe.utilities.help import show_context_help
from safe.impact_functions.core import evacuated_population_weekly_needs
from safe import messaging as m
from safe.messaging import styles
INFO_STYLE = styles.INFO_STYLE
LOGGER = logging.getLogger('InaSAFE')
FORM_CLASS = get_ui_class('needs_calculator_dialog_base.ui')
class NeedsCalculatorDialog(QtGui.QDialog, FORM_CLASS):
"""Dialog implementation class for the InaSAFE minimum needs dialog.
"""
def __init__(self, parent=None):
"""Constructor for the minimum needs dialog.
:param parent: Parent widget of this dialog.
:type parent: QWidget
"""
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
开发者ID:NyakudyaA,项目名称:inasafe,代码行数:31,代码来源:needs_calculator_dialog.py
示例2: import
from safe.definitions.layer_purposes import (
layer_purpose_exposure, layer_purpose_hazard, layer_purpose_aggregation)
from safe.gui.tools.help.metadata_converter_help import metadata_converter_help
from safe.utilities.i18n import tr
from safe.utilities.keyword_io import KeywordIO
from safe.utilities.metadata import active_classification
from safe.utilities.metadata import (
convert_metadata, write_iso19115_metadata
)
from safe.utilities.qgis_utilities import (
display_warning_message_box, display_success_message_bar)
from safe.utilities.resources import (
get_ui_class, html_footer, html_header, resources_path)
from safe.utilities.utilities import is_keyword_version_supported
FORM_CLASS = get_ui_class('metadata_converter_dialog_base.ui')
LOGGER = logging.getLogger('InaSAFE')
accepted_layer_purposes = [
layer_purpose_hazard['key'],
layer_purpose_exposure['key'],
layer_purpose_aggregation['key']
]
class MetadataConverterDialog(QDialog, FORM_CLASS):
"""Dialog implementation class for the InaSAFE metadata converter tool."""
resized = pyqtSignal()
开发者ID:inasafe,项目名称:inasafe,代码行数:31,代码来源:metadata_converter_dialog.py
示例3: get_ui_class
# noinspection PyPackageRequirements
from PyQt4.QtGui import QDialogButtonBox, QDialog, QFileDialog, QMessageBox
from qgis.utils import iface
from safe.common.version import get_version
from safe import messaging as m
from safe.messaging import styles
from safe.utilities.styling import mmi_ramp
from safe.utilities.resources import html_footer, html_header, get_ui_class
from safe.gui.tools.shake_grid.shake_grid import convert_mmi_data
from safe.gui.tools.help.shakemap_converter_help import shakemap_converter_help
INFO_STYLE = styles.INFO_STYLE
LOGGER = logging.getLogger('InaSAFE')
FORM_CLASS = get_ui_class('shakemap_importer_dialog_base.ui')
class ShakemapConverterDialog(QDialog, FORM_CLASS):
"""Importer for shakemap grid.xml files."""
def __init__(self, parent=None):
"""Constructor for the dialog.
Show the grid converter dialog.
:param parent: parent - widget to use as parent.
:type parent: QWidget
"""
QDialog.__init__(self, parent)
self.parent = parent
开发者ID:dynaryu,项目名称:inasafe,代码行数:31,代码来源:shakemap_converter_dialog.py
示例4: get_ui_class
"""
__author__ = "[email protected]"
__revision__ = "b9e2d7536ddcf682e32a156d6d8b0dbc0bb73cc4"
__date__ = "28/09/2015"
__copyright__ = "Copyright 2012, Australia Indonesia Facility for " "Disaster Reduction"
# This import is to enable SIP API V2
# noinspection PyUnresolvedReferences
import qgis # pylint: disable=unused-import
from PyQt4 import QtGui
from safe.common.version import get_version
from safe.utilities.resources import get_ui_class, html_footer, html_header
from safe.gui.tools.help.dock_help import dock_help
FORM_CLASS = get_ui_class("help_dialog_base.ui")
class HelpDialog(QtGui.QDialog, FORM_CLASS):
"""About dialog for the InaSAFE plugin."""
def __init__(self, parent=None):
"""Constructor for the dialog.
:param parent: Parent widget of this dialog
:type parent: QWidget
"""
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
self.setWindowTitle(self.tr("InaSAFE %s Help" % get_version()))
开发者ID:Mloweedgar,项目名称:inasafe,代码行数:31,代码来源:help_dialog.py
示例5: import
__author__ = '[email protected]'
__revision__ = '37a1d2dc3b6017f6d0e7399526ef633aca3e3596'
__date__ = '26/10/2013'
__copyright__ = ('Copyright 2012, Australia Indonesia Facility for '
'Disaster Reduction')
# This import is to enable SIP API V2
# noinspection PyUnresolvedReferences
import qgis # pylint: disable=unused-import
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import pyqtSignature, pyqtSlot
from safe.utilities.resources import (
get_ui_class, resources_path, html_header, html_footer)
from safe.gui.tools.help.impact_report_help import impact_report_help
FORM_CLASS = get_ui_class('impact_report_dialog_base.ui')
class ImpactReportDialog(QtGui.QDialog, FORM_CLASS):
"""Impact report dialog for the InaSAFE plugin."""
def __init__(self, iface, dock=None, parent=None):
"""Constructor for the dialog.
:param iface: A Quantum GIS QGisAppInterface instance.
:type iface: QGisAppInterface
:param parent: Parent widget of this dialog
:type parent: QWidget
:param dock: Optional dock widget instance that we can notify of
开发者ID:akbargumbira,项目名称:inasafe,代码行数:31,代码来源:impact_report_dialog.py
示例6: import
from safe.utilities.gis import (
viewport_geo_array,
rectangle_geo_array,
validate_geo_array)
from safe.utilities.resources import (
html_footer, html_header, get_ui_class, resources_path)
from safe.messaging import styles
from safe.utilities.qgis_utilities import (
display_warning_message_box,
display_warning_message_bar)
from safe.gui.tools.rectangle_map_tool import RectangleMapTool
INFO_STYLE = styles.INFO_STYLE
LOGGER = logging.getLogger('InaSAFE')
FORM_CLASS = get_ui_class('osm_downloader_dialog_base.ui')
class OsmDownloaderDialog(QDialog, FORM_CLASS):
"""Downloader for OSM data."""
def __init__(self, parent=None, iface=None):
"""Constructor for import dialog.
:param parent: Optional widget to use as parent
:type parent: QWidget
:param iface: An instance of QGisInterface
:type iface: QGisInterface
"""
QDialog.__init__(self, parent)
开发者ID:tomkralidis,项目名称:inasafe,代码行数:31,代码来源:osm_downloader_dialog.py
示例7: import
QDialog, QProgressDialog, QMessageBox, QFileDialog, QRegExpValidator)
from safe.common.exceptions import (
CanceledImportDialogError,
FileMissingError)
from safe.utilities.resources import (
html_footer, html_header, get_ui_class, resources_path)
from safe.utilities.qgis_utilities import (
display_warning_message_box,
display_warning_message_bar)
from safe.gui.tools.help.peta_jakarta_help import peta_jakarta_help
LOGGER = logging.getLogger('InaSAFE')
FORM_CLASS = get_ui_class('peta_jakarta_dialog_base.ui')
__author__ = '[email protected]'
__revision__ = 'e0a49bd2cd46fc60ba5f97d483593fd69731b84a'
__date__ = '23/11/2015'
__copyright__ = ('Copyright 2015, Australia Indonesia Facility for '
'Disaster Reduction')
class PetaJakartaDialog(QDialog, FORM_CLASS):
"""Downloader for petajakarta data.
.. versionadded: 3.3
"""
def __init__(self, parent=None, iface=None):
开发者ID:jobel-openscience,项目名称:inasafe,代码行数:31,代码来源:peta_jakarta_dialog.py
示例8: import
extension_siblings, login_user, upload)
from safe.utilities.gis import qgis_version, layer_icon
from safe.utilities.i18n import tr
from safe.utilities.qgis_utilities import (
display_warning_message_box, display_success_message_bar)
from safe.utilities.qt import disable_busy_cursor, enable_busy_cursor
from safe.utilities.resources import get_ui_class, resources_path
from safe.utilities.settings import set_setting, setting
__copyright__ = 'Copyright 2018, The InaSAFE Project'
__license__ = 'GPL version 3'
__email__ = '[email protected]'
__revision__ = 'bd00bfeac510722b427544b186bfa10861749e51'
FORM_CLASS = get_ui_class('geonode_uploader.ui')
GEONODE_USER = 'geonode_user'
GEONODE_PASSWORD = 'geonode_password'
GEONODE_URL = 'geonode_url'
class GeonodeUploaderDialog(QDialog, FORM_CLASS):
"""Geonode uploader dialog."""
def __init__(self, parent=None):
"""Constructor for import dialog.
:param parent: Optional widget to use as parent.
:type parent: QWidget
"""
开发者ID:inasafe,项目名称:inasafe,代码行数:31,代码来源:geonode_uploader.py
示例9: get_defaults
from safe import metadata
# Aggregations' keywords
DEFAULTS = get_defaults()
female_ratio_attribute_key = DEFAULTS['FEMALE_RATIO_ATTR_KEY']
female_ratio_default_key = DEFAULTS['FEMALE_RATIO_KEY']
youth_ratio_attribute_key = DEFAULTS['YOUTH_RATIO_ATTR_KEY']
youth_ratio_default_key = DEFAULTS['YOUTH_RATIO_KEY']
adult_ratio_attribute_key = DEFAULTS['ADULT_RATIO_ATTR_KEY']
adult_ratio_default_key = DEFAULTS['ADULT_RATIO_KEY']
elderly_ratio_attribute_key = DEFAULTS['ELDERLY_RATIO_ATTR_KEY']
elderly_ratio_default_key = DEFAULTS['ELDERLY_RATIO_KEY']
LOGGER = logging.getLogger('InaSAFE')
FORM_CLASS = get_ui_class('keywords_dialog_base.ui')
class KeywordsDialog(QtGui.QDialog, FORM_CLASS):
"""Dialog implementation class for the InaSAFE keywords editor."""
def __init__(self, parent, iface, dock=None, layer=None):
"""Constructor for the dialog.
.. note:: In QtDesigner the advanced editor's predefined keywords
list should be shown in english always, so when adding entries to
cboKeyword, be sure to choose :safe_qgis:`Properties<<` and untick
the :safe_qgis:`translatable` property.
:param parent: Parent widget of this dialog.
:type parent: QWidget
开发者ID:severinmenard,项目名称:inasafe,代码行数:31,代码来源:keywords_dialog.py
示例10: get_ui_class
# coding=utf-8
"""Wizard Help Widget."""
# noinspection PyPackageRequirements
from qgis.PyQt.QtWidgets import QWidget
from safe.utilities.resources import get_ui_class, html_header, html_footer
__copyright__ = "Copyright 2016, The InaSAFE Project"
__license__ = "GPL version 3"
__email__ = "[email protected]"
__revision__ = 'bd00bfeac510722b427544b186bfa10861749e51'
HELP_WIDGET = get_ui_class('wizard/wizard_help.ui')
class WizardHelp(QWidget, HELP_WIDGET):
"""An abstract step.
Each step is a tab meant to be placed in the wizard.
Each derived class must implement mandatory methods.
"""
def __init__(self, parent=None):
"""Constructor
:param parent: parent - widget to use as parent.
:type parent: QWidget
"""
QWidget.__init__(self, parent)
开发者ID:inasafe,项目名称:inasafe,代码行数:31,代码来源:wizard_help.py
示例11: import
from safe.utilities.file_downloader import FileDownloader
from safe.utilities.qgis_utilities import display_warning_message_box
from safe.utilities.qt import disable_busy_cursor
from safe.utilities.resources import (
get_ui_class, html_footer,
html_header,
resources_path
)
from safe.utilities.settings import setting
# pylint: enable=unused-import
LOGGER = logging.getLogger('InaSAFE')
FORM_CLASS = get_ui_class('peta_bencana_dialog_base.ui')
__copyright__ = "Copyright 2015, The InaSAFE Project"
__license__ = "GPL version 3"
__email__ = "[email protected]"
__revision__ = 'bd00bfeac510722b427544b186bfa10861749e51'
class PetaBencanaDialog(QDialog, FORM_CLASS):
"""Downloader for PetaBencana data.
.. versionadded: 3.3
"""
def __init__(self, parent=None, iface=None):
开发者ID:inasafe,项目名称:inasafe,代码行数:31,代码来源:peta_bencana_dialog.py
示例12: import
from safe.messaging import styles
from safe.report.impact_report import ImpactReport
from safe.report.report_metadata import (
QgisComposerComponentsMetadata)
from safe.utilities.i18n import tr
from safe.utilities.resources import (
get_ui_class, resources_path, html_header, html_footer)
from safe.utilities.settings import setting
__copyright__ = "Copyright 2017, The InaSAFE Project"
__license__ = "GPL version 3"
__email__ = "[email protected]"
__revision__ = 'bd00bfeac510722b427544b186bfa10861749e51'
INFO_STYLE = styles.BLUE_LEVEL_4_STYLE
FORM_CLASS = get_ui_class('print_report_dialog.ui')
LOGGER = logging.getLogger('InaSAFE')
class PrintReportDialog(QtWidgets.QDialog, FORM_CLASS):
"""Print report dialog for the InaSAFE plugin."""
def __init__(self, impact_function, iface, dock=None, parent=None):
"""Constructor for the dialog.
:param iface: A Quantum GIS QgisAppInterface instance.
:type iface: QgisAppInterface
:param parent: Parent widget of this dialog
:type parent: QWidget
开发者ID:inasafe,项目名称:inasafe,代码行数:30,代码来源:print_report_dialog.py
示例13: import
InaSAFEError)
from safe.definitions.constants import RECENT
from safe.definitions.layer_purposes import (
layer_purpose_exposure, layer_purpose_hazard)
from safe.definitions.utilities import get_field_groups
from safe.gui.tools.help.field_mapping_help import field_mapping_help
from safe.gui.widgets.field_mapping_widget import FieldMappingWidget
from safe.utilities.default_values import set_inasafe_default_value_qsetting
from safe.utilities.i18n import tr
from safe.utilities.keyword_io import KeywordIO
from safe.utilities.qgis_utilities import display_warning_message_box
from safe.utilities.resources import (
get_ui_class, html_footer, html_header, resources_path)
from safe.utilities.utilities import get_error_message
FORM_CLASS = get_ui_class('field_mapping_dialog_base.ui')
LOGGER = logging.getLogger('InaSAFE')
class FieldMappingDialog(QDialog, FORM_CLASS):
"""Dialog implementation class for the InaSAFE field mapping tool."""
def __init__(self, parent=None, iface=None, setting=None):
"""Constructor."""
QDialog.__init__(self, parent)
self.setupUi(self)
self.setWindowTitle(self.tr('InaSAFE Field Mapping Tool'))
icon = resources_path('img', 'icons', 'show-mapping-tool.svg')
开发者ID:inasafe,项目名称:inasafe,代码行数:31,代码来源:field_mapping_dialog.py
示例14: get_wizard_step_ui_class
def get_wizard_step_ui_class(py_file_name):
return get_ui_class(os.path.join(
'wizard', re.sub(r"pyc?$", "ui", os.path.basename(py_file_name))))
开发者ID:timlinux,项目名称:inasafe,代码行数:3,代码来源:wizard_step.py
示例15: import
from PyQt4.QtGui import QFileDialog, QIcon
from safe.common.utilities import unique_filename, temp_dir
from safe.datastore.folder import Folder
from safe.gis.vector.multi_buffering import multi_buffering
from safe.gui.tools.wizard.wizard_dialog import WizardDialog
from safe.gui.tools.help.multi_buffer_help import multi_buffer_help
from safe.messaging import styles
from safe.utilities.resources import (
get_ui_class,
resources_path,
html_footer,
html_header)
INFO_STYLE = styles.BLUE_LEVEL_4_STYLE
LOGGER = logging.getLogger('InaSAFE')
FORM_CLASS = get_ui_class('multi_buffer_dialog_base.ui')
class MultiBufferDialog(QtGui.QDialog, FORM_CLASS):
"""Dialog implementation class for the InaSAFE multi buffer tool."""
def __init__(self, parent=None, iface=None, dock_widget=None):
"""Constructor for the multi buffer dialog.
:param parent: Parent widget of this dialog.
:type parent: QWidget
"""
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
self.setWindowTitle(self.tr('InaSAFE Multi Buffer Tool'))
self.parent = parent
开发者ID:akbargumbira,项目名称:inasafe,代码行数:31,代码来源:multi_buffer_dialog.py
示例16: get_ui_class
__revision__ = 'b9e2d7536ddcf682e32a156d6d8b0dbc0bb73cc4'
__date__ = '26/02/2014'
__copyright__ = ('Copyright 2012, Australia Indonesia Facility for '
'Disaster Reduction')
# This import is to enable SIP API V2
# noinspection PyUnresolvedReferences
import qgis # pylint: disable=unused-import
from PyQt4 import QtGui
from safe.common.version import get_version
from safe.defaults import limitations
from safe.utilities.resources import resources_path, get_ui_class
from safe.defaults import disclaimer
FORM_CLASS = get_ui_class('about_dialog_base.ui')
class AboutDialog(QtGui.QDialog, FORM_CLASS):
"""About dialog for the InaSAFE plugin."""
def __init__(self, parent=None):
"""Constructor for the dialog.
:param parent: Parent widget of this dialog
:type parent: QWidget
"""
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
self.setWindowTitle(self.tr('About InaSAFE %s' % get_version()))
开发者ID:Mloweedgar,项目名称:inasafe,代码行数:31,代码来源:about_dialog.py
示例17: get_ui_class
__author__ = '[email protected]'
__revision__ = 'f5cb765df85c67ce3e69f83dfdee91ae743329b6'
__date__ = '28/09/2015'
__copyright__ = ('Copyright 2012, Australia Indonesia Facility for '
'Disaster Reduction')
# This import is to enable SIP API V2
# noinspection PyUnresolvedReferences
import qgis # pylint: disable=unused-import
from PyQt4 import QtGui
from safe.common.version import get_version
from safe.utilities.resources import get_ui_class, html_footer, html_header
from safe.gui.tools.help.dock_help import dock_help
FORM_CLASS = get_ui_class('help_dialog_base.ui')
class HelpDialog(QtGui.QDialog, FORM_CLASS):
"""About dialog for the InaSAFE plugin."""
def __init__(self, parent=None):
"""Constructor for the dialog.
:param parent: Parent widget of this dialog
:type parent: QWidget
"""
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
self.setWindowTitle(self.tr('InaSAFE %s Help' % get_version()))
开发者ID:easmetz,项目名称:inasafe,代码行数:31,代码来源:help_dialog.py
示例18: get_ui_class
QFileDialog,
QTableWidgetItem,
QPushButton,
QDialogButtonBox)
from safe.gui.tools.batch import scenario_runner
from safe.utilities.gis import extent_string_to_array, read_impact_layer
from safe.utilities.resources import get_ui_class
from safe.report.impact_report import ImpactReport
from safe.common.exceptions import FileNotFoundError
from safe.common.utilities import temp_dir
from safe.utilities.help import show_context_help
from safe.utilities.resources import resources_path
LOGGER = logging.getLogger('InaSAFE')
FORM_CLASS = get_ui_class('batch_dialog_base.ui')
class BatchDialog(QDialog, FORM_CLASS):
"""Script Dialog for InaSAFE."""
def __init__(self, parent=None, iface=None, dock=None):
"""Constructor for the dialog.
:param parent: Widget to use as parent.
:type parent: PyQt4.QtGui.QWidget
:param iface: A QGisAppInterface instance we use to access QGIS via.
:type iface: QgsAppInterface
:param dock: A Dock widget needed to run the scenarios with. On
开发者ID:Charlotte-Morgan,项目名称:inasafe,代码行数:31,代码来源:batch_dialog.py
示例19: import
html_header,
html_footer,
get_ui_class,
resources_path)
from safe.utilities.gis import qgis_version
from safe.utilities.utilities import (
html_to_file,
add_ordered_combo_item)
from safe.gui.tools.help.impact_merge_help import impact_merge_help
from safe.utilities.keyword_io import KeywordIO
from safe.defaults import (
disclaimer, white_inasafe_logo_path, supporters_logo_path)
from safe.utilities.unicode import get_string
INFO_STYLE = styles.INFO_STYLE
FORM_CLASS = get_ui_class('impact_merge_dialog_base.ui')
class ImpactMergeDialog(QDialog, FORM_CLASS):
"""Tools for merging 2 impact layer based on different exposure."""
def __init__(self, parent=None, iface=None):
"""Constructor for dialog.
:param parent: Optional widget to use as parent
:type parent: QWidget
:param iface: An instance of QGisInterface
:type iface: QGisInterface
"""
QDialog.__init__(self, parent)
开发者ID:jobel-openscience,项目名称:inasafe,代码行数:31,代码来源:impact_merge_dialog.py
示例20: import
from qgis.core import (
QgsPoint,
QgsRectangle,
QgsCoordinateReferenceSystem,
QgsApplication,
QgsCoordinateTransform)
from safe.utilities.resources import html_header, html_footer, get_ui_class
from safe.gui.tools.rectangle_map_tool import RectangleMapTool
from safe.messaging import styles
from safe.gui.tools.help.extent_selector_help import extent_selector_help
INFO_STYLE = styles.INFO_STYLE
LOGGER = logging.getLogger('InaSAFE')
FORM_CLASS = get_ui_class('extent_selector_dialog_base.ui')
class ExtentSelectorDialog(QDialog, FORM_CLASS):
"""Dialog for letting user determine analysis extents.
"""
extent_defined = pyqtSignal(QgsRectangle, QgsCoordinateReferenceSystem)
clear_extent = pyqtSignal()
extent_selector_closed = pyqtSignal()
def __init__(self, iface, parent=None, extent=None, crs=None):
"""Constructor for the dialog.
:param iface: A Quantum GIS QGisAppInterface instance.
:type iface: QGisAppInterface
开发者ID:codeforresilience,项目名称:inasafe,代码行数:31,代码来源:extent_selector_dialog.py
注:本文中的safe.utilities.resources.get_ui_class函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论