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


Python Qt.LeftDockWidgetArea方法代码示例

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


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

示例1: run

# 需要导入模块: from qgis.PyQt.QtCore import Qt [as 别名]
# 或者: from qgis.PyQt.QtCore.Qt import LeftDockWidgetArea [as 别名]
def run(self):
        """Run method that loads and starts the plugin"""

        if not self.pluginIsActive:
            self.pluginIsActive = True

            # show the dockwidget
            # TODO: fix to allow choice of dock location
            self.iface.addDockWidget(Qt.LeftDockWidgetArea, self.dockwidget)
            self.dockwidget.show()
            #self.setupLayer('')
            if not QgsProject.instance().mapLayers():
                self.canvas.setCenter(QgsPointXY(0,0))
                self.canvas.zoomScale(70000000.00)
            self.mapRefreshed(force=True)
            self.canvas.extentsChanged.connect(self.mapChanged)
            self.canvas.setMapTool(self.mapSelectionTool)
            self.setCompareKey('')

        else:
            # toggle show/hide the widget
            if self.dockwidget.isVisible():
                self.dockwidget.hide()
            else:
                self.dockwidget.show() 
开发者ID:enricofer,项目名称:go2mapillary,代码行数:27,代码来源:mapillary_explorer.py

示例2: __export_raster_collar

# 需要导入模块: from qgis.PyQt.QtCore import Qt [as 别名]
# 或者: from qgis.PyQt.QtCore.Qt import LeftDockWidgetArea [as 别名]
def __export_raster_collar(self):
        ret = ExportRasterCollarDialog(self.project).exec_()

    #def __log_strati_clicked(self):
    #    # @todo switch behavior when in section view -> ortho
    #    self.__click_tool = QgsMapToolEmitPoint(self.__iface.mapCanvas())
    #    self.__iface.mapCanvas().setMapTool(self.__click_tool)
    #    self.__click_tool.canvasClicked.connect(self.__map_log_clicked)

    #def __map_log_clicked(self, point, button):
    #    self.__click_tool.setParent(None)
    #    self.__click_tool = None

    #    if self.project is None:
    #        self.__log_strati and self.__log_strati.setParent(None)
    #        self.__log_strati = None
    #        return

    #    if self.__log_strati is None:
    #        self.__log_strati = QDockWidget("Stratigraphic Log")
    #        self.__log_strati.setWidget(BoreHoleWindow(self.project))
    #        self.__iface.addDockWidget(Qt.LeftDockWidgetArea, self.__log_strati)
    #        self.__iface.mainWindow().tabifyDockWidget(
    #            self.__iface.mainWindow().findChild(QDockWidget, "Layers"),
    #            self.__log_strati,
    #        )

    #    res = self.project.closest_hole_id(point.x(), point.y())
    #    if res:
    #        self.__log_strati.widget().scene.set_current_id(res)
    #        self.__log_strati.show()
    #        self.__log_strati.raise_() 
开发者ID:Oslandia,项目名称:albion,代码行数:34,代码来源:plugin.py

示例3: showComplexDock

# 需要导入模块: from qgis.PyQt.QtCore import Qt [as 别名]
# 或者: from qgis.PyQt.QtCore.Qt import LeftDockWidgetArea [as 别名]
def showComplexDock(self):
        """
        Shows the Manage Complex features Dock
        """
        if self.complexWindow:
            self.iface.removeDockWidget(self.complexWindow)
        else:
            self.complexWindow = ComplexWindow(self.iface)
        self.iface.addDockWidget(Qt.LeftDockWidgetArea, self.complexWindow) 
开发者ID:dsgoficial,项目名称:DsgTools,代码行数:11,代码来源:toolBoxesGuiManager.py

示例4: initGui

# 需要导入模块: from qgis.PyQt.QtCore import Qt [as 别名]
# 或者: from qgis.PyQt.QtCore.Qt import LeftDockWidgetArea [as 别名]
def initGui(self):
        """Initalise the Plugin-UI"""
        if not pyratImport:
            iface.messageBar().pushMessage("PyRAT not found!",
                                           level=Qgis.Critical)
            return

        if 'PyRAT' not in [action.text() for action in
                           iface.mainWindow().menuBar().actions()]:
            self.pyratMenu = iface.mainWindow().menuBar().addMenu('PyRAT')
        else:
            self.pyratMenu = [action.menu() for action in
                              iface.mainWindow().menuBar().actions() if
                              action.text() == 'PyRAT'][0]

        action = QAction("Layer2PyRAT", iface.mainWindow())
        action.triggered.connect(PyRATBridge.layerToPyrat)
        self.pyratMenu.addAction(action)

        action = QAction("PyRAT2Layer", iface.mainWindow())
        action.triggered.connect(PyRATBridge.pyratToLayer)
        self.pyratMenu.addAction(action)

        action = QAction("Cleanup PyRAT", iface.mainWindow())
        action.triggered.connect(PyRATBridge.clearPyRAT)
        self.pyratMenu.addAction(action)

        action = QAction("Show PyRAT GUI", iface.mainWindow())
        action.triggered.connect(self.showPyrat)
        self.pyratMenu.addAction(action)

        self.pyratMenu.addSeparator()

        # Init PyRAT-Tools, adapted from pyrat.viewer for qgis
        from inspect import getmembers, isclass

        modules = [pyrat.load, pyrat.save, pyrat.transform, pyrat.filter,
                   pyrat.polar, pyrat.insar, pyrat.plugins, pyrat.viewer]

        for current_module in modules:
            modules = getmembers(current_module, isclass)
            for mod in modules:
                if issubclass(mod[1], pyrat.Worker):
                    plugin = mod[1]
                    if(hasattr(plugin, 'gui') and
                       plugin.gui['entry'] != "Python console"):
                        self.addMenuEntry(plugin)

        self.pyratLayerTree = QDockWidget("PyRAT Layers", iface.mainWindow())
        PyRATBridge.layerTreeWidget = LayerTreeWidget(
                parent=self.pyratLayerTree,
                viewer=ViewerToQGISInterface)
        self.pyratLayerTree.setObjectName("PyRAT Layers")
        self.pyratLayerTree.setWidget(PyRATBridge.layerTreeWidget)
        iface.addDockWidget(Qt.LeftDockWidgetArea, self.pyratLayerTree) 
开发者ID:birgander2,项目名称:PyRAT,代码行数:57,代码来源:mainPlugin.py


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