本文整理汇总了Python中utilities.get_qgis_app函数的典型用法代码示例。如果您正苦于以下问题:Python get_qgis_app函数的具体用法?Python get_qgis_app怎么用?Python get_qgis_app使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_qgis_app函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: get_qgis_app
(at your option) any later version.
"""
__author__ = '[email protected]'
__date__ = '2015-09-13'
__copyright__ = 'Copyright 2015, Tomasz Hak'
import unittest
from PyQt4.QtGui import QDialogButtonBox, QDialog
from MPZPInfo_dialog import mpzpDialog
from utilities import get_qgis_app
QGIS_APP = get_qgis_app()
class mpzpDialogTest(unittest.TestCase):
"""Test dialog works."""
def setUp(self):
"""Runs before each test."""
self.dialog = mpzpDialog(None)
def tearDown(self):
"""Runs after each test."""
self.dialog = None
def test_dialog_ok(self):
"""Test we can click OK."""
开发者ID:tomplamka,项目名称:MPZP,代码行数:31,代码来源:test_MPZPInfo_dialog.py
示例2: get_qgis_app
__date__ = '2015-03-26'
__copyright__ = 'Copyright 2015, Riccardo Klinger / Geolicious'
import unittest
# This import is to enable SIP API V2
# noinspection PyUnresolvedReferences
import qgis # pylint: disable=unused-import
from qgis.core import QgsProject
from qgis.core import QgsVectorLayer, QgsMapLayerRegistry
from PyQt4 import QtCore, QtTest
from PyQt4.QtCore import *
from PyQt4.QtGui import QDialogButtonBox, QDialog
from utilities import get_qgis_app
QGIS_APP, CANVAS, IFACE, PARENT = get_qgis_app()
from maindialog import MainDialog
class qgis2web_classDialogTest(unittest.TestCase):
"""Test most common plugin actions"""
def setUp(self):
"""Runs before each test"""
self.dialog = MainDialog(IFACE)
self.dialog.paramsTreeOL.itemWidget(self.dialog.paramsTreeOL.findItems("Template",
(Qt.MatchExactly |
Qt.MatchRecursive))[0], 1).setCurrentIndex(1)
def tearDown(self):
"""Runs after each test"""
开发者ID:gitter-badger,项目名称:qgis2web,代码行数:31,代码来源:test_qgis2web_dialog.py
注:本文中的utilities.get_qgis_app函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论