当前位置: 首页>>代码示例>>Python>>正文


Python TestQgsPalLabeling.setUpClass方法代码示例

本文整理汇总了Python中test_qgspallabeling_base.TestQgsPalLabeling.setUpClass方法的典型用法代码示例。如果您正苦于以下问题:Python TestQgsPalLabeling.setUpClass方法的具体用法?Python TestQgsPalLabeling.setUpClass怎么用?Python TestQgsPalLabeling.setUpClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在test_qgspallabeling_base.TestQgsPalLabeling的用法示例。


在下文中一共展示了TestQgsPalLabeling.setUpClass方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setUpClass

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import setUpClass [as 别名]
 def setUpClass(cls):
     TestQgsPalLabeling.setUpClass()
     cls.setUpServerProjectAndDir(TESTPROJPATH, TESTPROJDIR)
     cls.layer = TestQgsPalLabeling.loadFeatureLayer('background')
     cls.layer = TestQgsPalLabeling.loadFeatureLayer('point')
     cls.checkmismatch = 1000
     cls.checkgroup = ''
开发者ID:xxsurvey,项目名称:Quantum-GIS,代码行数:9,代码来源:test_qgspallabeling_server.py

示例2: setUpClass

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import setUpClass [as 别名]
    def setUpClass(cls):
        TestQgsPalLabeling.setUpClass()

        cls._TestProj = QgsProject.instance()
        cls._TestProj.setFileName(str(TESTPROJPATH).strip())
        if not cls._TestProjSetup:
            try:
                shutil.copy(cls._PalFeaturesDb, TESTPROJDIR)
                for qml in glob.glob(cls._PalDataDir + os.sep + '*.qml'):
                    shutil.copy(qml, TESTPROJDIR)
            except IOError, e:
                raise IOError(str(e) +
                              '\nCould not set up test server directory')
            cls._TestProjSetup = True
开发者ID:AnAvidDeveloper,项目名称:QGIS,代码行数:16,代码来源:test_qgspallabeling_server.py

示例3: setUpClass

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import setUpClass [as 别名]
    def setUpClass(cls):
        if not cls._BaseSetup:
            TestQgsPalLabeling.setUpClass()
        MAPSERV.startup()
        MAPSERV.web_dir_install(glob.glob(cls._PalDataDir + os.sep + '*.qml'))

        # noinspection PyArgumentList
        cls._TestProj = QgsProject.instance()
        cls._TestProjName = 'pal_test.qgs'
        cls._TestProj.setFileName(
            os.path.join(MAPSERV.web_dir(), cls._TestProjName))

        # the blue background (set via layer style) to match renderchecker's
        TestQgsPalLabeling.loadFeatureLayer('background', True)

        settings = QSettings()
        # noinspection PyArgumentList
        cls._CacheDir = settings.value(
            "cache/directory", QgsApplication.qgisSettingsDirPath() + "cache")
开发者ID:MERIDIAN-CHARTWARE,项目名称:QGIS-1,代码行数:21,代码来源:test_qgspallabeling_server.py

示例4: setUpClass

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import setUpClass [as 别名]
    def setUpClass(cls):
        TestQgsPalLabeling.setUpClass()
        MAPSERV.startup()
        MAPSERV.web_dir_install(glob.glob(cls._PalDataDir + os.sep + '*.qml'))

        # noinspection PyArgumentList
        cls._TestProj = QgsProject.instance()
        cls._TestProjName = 'pal_test.qgs'
        cls._TestProj.setFileName(
            os.path.join(MAPSERV.web_dir(), cls._TestProjName))

        # the blue background (set via layer style) to match renderchecker's
        cls._BkgrdLayer = TestQgsPalLabeling.loadFeatureLayer('background')
        cls._CheckMismatch = 200  # default for server tests; mismatch expected
        cls._CheckGroup = ''  # default '' will check against server control

        settings = QSettings()
        # noinspection PyArgumentList
        cls._CacheDir = settings.value(
            "cache/directory", QgsApplication.qgisSettingsDirPath() + "cache")
开发者ID:CSRedRat,项目名称:QGIS,代码行数:22,代码来源:test_qgspallabeling_server.py

示例5: setUpClass

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import setUpClass [as 别名]
 def setUpClass(cls):
     if not cls._BaseSetup:
         TestQgsPalLabeling.setUpClass()
开发者ID:Jokenbol,项目名称:QGIS,代码行数:5,代码来源:test_qgspallabeling_canvas.py

示例6: setUpClass

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import setUpClass [as 别名]
 def setUpClass(cls):
     if not cls._BaseSetup:
         TestQgsPalLabeling.setUpClass()
     cls._Pal.setDrawLabelRectOnly(True)
     cls._Pal.saveEngineSettings()
开发者ID:wongjimsan,项目名称:QGIS,代码行数:7,代码来源:test_qgspallabeling_placement.py

示例7: setUpClass

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import setUpClass [as 别名]
 def setUpClass(cls):
     TestQgsPalLabeling.setUpClass()
     cls.layer = TestQgsPalLabeling.loadFeatureLayer('point')
开发者ID:CSRedRat,项目名称:QGIS,代码行数:5,代码来源:test_qgspallabeling_canvas.py

示例8: setUpClass

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import setUpClass [as 别名]
 def setUpClass(cls):
     TestQgsPalLabeling.setUpClass()
     # the blue background (set via layer style) to match renderchecker's
     cls._BkgrdLayer = TestQgsPalLabeling.loadFeatureLayer('background')
     cls._CheckMismatch = 0  # mismatch expected for crosscheck
     cls._CheckGroup = ''
开发者ID:makandok,项目名称:QGIS,代码行数:8,代码来源:test_qgspallabeling_composer.py


注:本文中的test_qgspallabeling_base.TestQgsPalLabeling.setUpClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。