當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。