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


Python QColorDialog.lstrip方法代码示例

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


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

示例1: MagneticDeclination

# 需要导入模块: from qgis.PyQt.QtWidgets import QColorDialog [as 别名]
# 或者: from qgis.PyQt.QtWidgets.QColorDialog import lstrip [as 别名]

#.........这里部分代码省略.........
        return action


    def initGui(self):
        """Create the menu entries and toolbar icons inside the QGIS GUI."""
        icon_path = self.plugin_dir + "/img/icon.png"
        self.add_action(
            icon_path,
            text=self.tr(u'Magnetic Declination'),
            callback=self.run,
            parent=self.iface.mainWindow())


    def unload(self):
        """Removes the plugin menu item and icon from QGIS GUI."""
        for action in self.actions:
            self.iface.removePluginMenu(
                self.tr(u'&Magnetic Declination'),
                action)
            self.iface.removeToolBarIcon(action)
        # remove the toolbar
        del self.toolbar


    def run(self):
        """Run method that performs all the real work"""
        self.dlg.declination_lineEdit.setText(str(""))
        self.dlg.heading_lineEdit.setText(str(""))
        self.canvasCRS = self.iface.mapCanvas().mapSettings().destinationCrs()
        self.pluginCRS = QgsCoordinateReferenceSystem(4326)
        #
        #COLOR RESET
        self.NameColor = self.dlg.color_lineEdit.text()
        value = self.NameColor.lstrip('#')
        R1 = value[0:2]
        G2 = value[2:4]
        B3 = value[4:6]
        self.red = int(R1, 16)
        self.green = int(G2, 16)
        self.blue = int(B3, 16)
        #
        #OTHER RESET
        self.calcSense = 0
        self.SenseFromMap = 0
        #
        self.dlg.show()
        #
        feetmet = self.dlg.meter_radioButton.isChecked()
        magtrue = self.dlg.toMagnetic_radioButton.isChecked()
        #
        if feetmet == 0:
            self.simple_Feet
        else:
            self.simple_Meter
        #
        if magtrue == 0:
            self.simple_ToTrue
        else:
            self.simple_ToMag


        # Run the dialog event loop
        result = self.dlg.exec_()
        # See if OK was pressed
        if result:
            pass
开发者ID:Hacked-Crew,项目名称:Magnetic-Declination,代码行数:70,代码来源:Magnetic_declination.py


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