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


Python QDialog.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PyQt4.QtGui import QDialog [as 别名]
# 或者: from PyQt4.QtGui.QDialog import __init__ [as 别名]
def __init__(self, logger, parent=None):
        QDialog.__init__(self, parent)
        uic.loadUi(os.path.join(os.path.dirname(__file__), "res/create_layer.ui"), self)
        self.__logger = logger
        for lid, layer in QgsMapLayerRegistry.instance().mapLayers().iteritems():
            logging.info('layer name: {}'.format(layer.name()))
            if layer.type() == QgsMapLayer.VectorLayer and layer.customProperty("projected_layer") is None:
                if layer.geometryType() == QGis.Line:
                    self.geometryLayer.addItem(layer.name(), layer.id())
                self.dataLayer.addItem(layer.name(), layer.id())

        if self.dataLayer.count():
            self.__set_data_layer(self.dataLayer.currentIndex())

        if self.geometryLayer.count():
            self.__set_geometry_layer(self.geometryLayer.currentIndex())

        self.dataLayer.currentIndexChanged.connect(self.__set_data_layer)
        self.geometryLayer.currentIndexChanged.connect(self.__set_geometry_layer) 
开发者ID:Oslandia,项目名称:albion,代码行数:21,代码来源:create_layer_widget.py

示例2: __init__

# 需要导入模块: from PyQt4.QtGui import QDialog [as 别名]
# 或者: from PyQt4.QtGui.QDialog import __init__ [as 别名]
def __init__(self, text, unit = None, minimum = None, maximum = None, parent = None):
        """
        Initialization of the CfgSpinBox class (used for int values).
        @param text: text string associated with the SpinBox
        @param minimum: min value (int)
        @param minimum: max value (int)
        """
        QWidget.__init__(self, parent)
        
        self.spinbox = QSpinBox(parent)
        if unit is not None:
            self.setUnit(unit)

        self.setSpec({'minimum': minimum, 'maximum': maximum, 'comment': ''})

        self.label = QLabel(text, parent)
        self.layout = QHBoxLayout(parent);
        
        self.spinbox.setMinimumWidth(200) #Provide better alignment with other items
        self.layout.addWidget(self.label)
        self.layout.addStretch()
        self.layout.addWidget(self.spinbox)
        self.setLayout(self.layout) 
开发者ID:cnc-club,项目名称:dxf2gcode,代码行数:25,代码来源:configwindow.py

示例3: __init__

# 需要导入模块: from PyQt4.QtGui import QDialog [as 别名]
# 或者: from PyQt4.QtGui.QDialog import __init__ [as 别名]
def __init__(self, parent):
        QDialog.__init__(self, parent)
        self.folder = downloaddir
        self.setupUi(self)
        self.folderButton.clicked.connect(self.changeFolder)
        self.labelFolder.setText(downloaddir) 
开发者ID:ksharindam,项目名称:quartz-browser,代码行数:8,代码来源:main.py

示例4: __init__

# 需要导入模块: from PyQt4.QtGui import QDialog [as 别名]
# 或者: from PyQt4.QtGui.QDialog import __init__ [as 别名]
def __init__(self, parent):
        QDialog.__init__(self, parent)
        Ui_TextItemEditor.__init__(self)
        self.setupUi(self)
        self.itemName = "Value"
        # Create an empty model for the list's data
        self._model = QStandardItemModel(self.list_view) 
开发者ID:quasoft,项目名称:adblockradio,代码行数:9,代码来源:dlg_text_item_editor.py

示例5: __init__

# 需要导入模块: from PyQt4.QtGui import QDialog [as 别名]
# 或者: from PyQt4.QtGui.QDialog import __init__ [as 别名]
def __init__(self, parent):
        QDialog.__init__(self, parent)
        self.setupUi(self)
        self.resize(920, self.height()) 
开发者ID:wondie,项目名称:batch_gps_importer,代码行数:6,代码来源:help_starter.py

示例6: __init__

# 需要导入模块: from PyQt4.QtGui import QDialog [as 别名]
# 或者: from PyQt4.QtGui.QDialog import __init__ [as 别名]
def __init__( self, parent ): 
        QDialog.__init__( self, parent ) 
        self.setupUi( self )
        self.setModal( True )
        self.expressionBuilderWidget.loadRecent( 'fieldcalc' )
        self.buttonBox.button( QDialogButtonBox.Ok ).setEnabled( False )
        self.expression = ''
        self.expressionBuilderWidget.expressionParsed.connect( self.expressionChanged ) 
开发者ID:gacarrillor,项目名称:AutoFields,代码行数:10,代码来源:ExpressionBuilderDialog.py

示例7: __init__

# 需要导入模块: from PyQt4.QtGui import QDialog [as 别名]
# 或者: from PyQt4.QtGui.QDialog import __init__ [as 别名]
def __init__(self, parent = None):
        """
        Constructor
        """
        QDialog.__init__(self, parent)
        self.setupUi(self) 
开发者ID:54BayMax,项目名称:BeltaGo,代码行数:8,代码来源:info.py


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