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


Python QItemDelegate.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PyQt4.QtGui import QItemDelegate [as 别名]
# 或者: from PyQt4.QtGui.QItemDelegate import __init__ [as 别名]
 def __init__(self, parent, itemsDict, column):
     """
     Constructor
     """
     QItemDelegate.__init__(self, parent)
     self.itemsDict = itemsDict
     self.column = column
开发者ID:lcoandrade,项目名称:DsgTools,代码行数:9,代码来源:manageComplex.py

示例2: __init__

# 需要导入模块: from PyQt4.QtGui import QItemDelegate [as 别名]
# 或者: from PyQt4.QtGui.QItemDelegate import __init__ [as 别名]
 def __init__(self, min, max, *args):
     """
     min and max are the limits that the spin box can scroll to/accept.
     """
     QItemDelegate.__init__(self, *args)
     self.min = min
     self.max = max
开发者ID:bbreslauer,项目名称:PySciPlot,代码行数:9,代码来源:Delegates.py

示例3: __init__

# 需要导入模块: from PyQt4.QtGui import QItemDelegate [as 别名]
# 或者: from PyQt4.QtGui.QItemDelegate import __init__ [as 别名]
 def __init__(self, distObjects, parent=None):
     """Init TracepointModel
     """
     QAbstractTableModel.__init__(self, parent)
     QItemDelegate.__init__(self, parent)
     self.tracepoints = []
     self.distObjects = distObjects
     self.connector = distObjects.gdb_connector
开发者ID:gledr,项目名称:ricodebug,代码行数:10,代码来源:tracepointmodel.py

示例4: __init__

# 需要导入模块: from PyQt4.QtGui import QItemDelegate [as 别名]
# 或者: from PyQt4.QtGui.QItemDelegate import __init__ [as 别名]
    def __init__(self, columns=(), parent=None):
        """ Construtor.

        @param columns sequence of column numbers for LCD widgets
        @param parent ancestor object
        """
        QItemDelegate.__init__(self, parent)
        self.columns = columns
开发者ID:InfiniteAlpha,项目名称:profitpy,代码行数:10,代码来源:accountsummary.py

示例5: __init__

# 需要导入模块: from PyQt4.QtGui import QItemDelegate [as 别名]
# 或者: from PyQt4.QtGui.QItemDelegate import __init__ [as 别名]
    def __init__(self, parent_view):
        """
        @param parent_view (QAbstractItemView): parent view for this item editor
        """
        QItemDelegate.__init__(self, parent_view)
        self.parent_view = parent_view

        # List of database connection names. Used for populating the editor for a db_connection_hook
        self.known_db_connection_names = []
开发者ID:christianurich,项目名称:VIBe2UrbanSim,代码行数:11,代码来源:xml_item_delegate.py

示例6: __init__

# 需要导入模块: from PyQt4.QtGui import QItemDelegate [as 别名]
# 或者: from PyQt4.QtGui.QItemDelegate import __init__ [as 别名]
    def __init__(self, parent=None, editable=True, **kwargs):
        """:param parent: the parent object for the delegate
        :param editable: a boolean indicating if the field associated to the delegate
        is editable

        """
        QItemDelegate.__init__(self, parent)
        self.editable = editable
        self.kwargs = kwargs
        self._font_metrics = QtGui.QFontMetrics(QtGui.QApplication.font())
        self._height = self._font_metrics.lineSpacing() + 10
        self._width = self._font_metrics.averageCharWidth() * 20
开发者ID:kurtraschke,项目名称:camelot,代码行数:14,代码来源:customdelegate.py

示例7: __init__

# 需要导入模块: from PyQt4.QtGui import QItemDelegate [as 别名]
# 或者: from PyQt4.QtGui.QItemDelegate import __init__ [as 别名]
    def __init__(self, role, pixmap_on, pixmap_off, text_on, text_off, style_on, style_off, parent=None):
        QItemDelegate.__init__(self, parent)
        self.pixmap_on = pixmap_on
        self.pixmap_off = pixmap_off
        self.text_on = text_on
        self.text_off = text_off
        self.style_on = style_on
        self.style_off = style_off
        self.role = role

        self.icon = QIcon()
        self.icon.addPixmap(pixmap_on, QIcon.Normal, QIcon.On)
        self.icon.addPixmap(pixmap_off, QIcon.Normal, QIcon.Off)
开发者ID:maximerobin,项目名称:Ufwi,代码行数:15,代码来源:genericdelegates.py

示例8: __init__

# 需要导入模块: from PyQt4.QtGui import QItemDelegate [as 别名]
# 或者: from PyQt4.QtGui.QItemDelegate import __init__ [as 别名]
    def __init__(self, data, options, parent=None):
        """
        Initializes STRTypeDelegate and QItemDelegate.
        :param spatial_unit: The current spatial unit.
        :param type: Object
        :param parent: The parent of the item delegate.
        :type parent: QWidget
        """
        QItemDelegate.__init__(self, parent)
        self.data = data
        self.options = options

        self._view = parent
开发者ID:gltn,项目名称:stdm,代码行数:15,代码来源:generic_delegate.py

示例9: __init__

# 需要导入模块: from PyQt4.QtGui import QItemDelegate [as 别名]
# 或者: from PyQt4.QtGui.QItemDelegate import __init__ [as 别名]
    def __init__(self, spatial_unit, parent=None):
        """
        Initializes STRTypeDelegate and QItemDelegate.
        :param spatial_unit: The current spatial unit.
        :param type: Object
        :param parent: The parent of the item delegate.
        :type parent: QWidget
        """
        QItemDelegate.__init__(self, parent)

        self.curr_profile = current_profile()

        self.social_tenure = self.curr_profile.social_tenure
        self.spatial_unit = spatial_unit
开发者ID:gltn,项目名称:stdm,代码行数:16,代码来源:str_helpers.py

示例10: __init__

# 需要导入模块: from PyQt4.QtGui import QItemDelegate [as 别名]
# 或者: from PyQt4.QtGui.QItemDelegate import __init__ [as 别名]
 def __init__(self, parent, width, height):
     QItemDelegate.__init__(self, parent)
     
     self.itemWidth = width
     self.itemHeight = height
     self.checkedIcon = None
     self.partiallyCheckedIcon = None
     self.uncheckedIcon = None
     self.pixmapUnckecked = QPixmap(self.itemWidth, self.itemHeight)
     self.drawPixmapForUnckecked()
     self.pixmapCkecked = QPixmap(self.itemWidth, self.itemHeight)
     self.drawPixmapForCkecked()
     self.pixmapPartiallyChecked = QPixmap(self.itemWidth, self.itemHeight)
     self.drawPixmapForPartiallyChecked()
开发者ID:bheuer,项目名称:ilastik,代码行数:16,代码来源:featureTableWidget.py

示例11: __init__

# 需要导入模块: from PyQt4.QtGui import QItemDelegate [as 别名]
# 或者: from PyQt4.QtGui.QItemDelegate import __init__ [as 别名]
 def __init__(self, parent, itemslist=["a", "b", "c"], db=""):
     QItemDelegate.__init__(self, parent)
     # itemslist = ["a", "b", "c"]
     self.itemslist = itemslist
     self.parent = parent
     self.db = db
开发者ID:iefan,项目名称:randstudent,代码行数:8,代码来源:randstudent6.py

示例12: __init__

# 需要导入模块: from PyQt4.QtGui import QItemDelegate [as 别名]
# 或者: from PyQt4.QtGui.QItemDelegate import __init__ [as 别名]
 def __init__(self, field_types, parent=None):
     QItemDelegate.__init__(self, parent)
     self.fieldTypes = field_types
开发者ID:Geoneer,项目名称:QGIS,代码行数:5,代码来源:dlg_create_table.py

示例13: __init__

# 需要导入模块: from PyQt4.QtGui import QItemDelegate [as 别名]
# 或者: from PyQt4.QtGui.QItemDelegate import __init__ [as 别名]
 def __init__(self, parent=None, inplace=False):
     QItemDelegate.__init__(self, parent)
     self.inplace = inplace
开发者ID:cheesinglee,项目名称:spyder,代码行数:5,代码来源:dicteditor.py

示例14: __init__

# 需要导入模块: from PyQt4.QtGui import QItemDelegate [as 别名]
# 或者: from PyQt4.QtGui.QItemDelegate import __init__ [as 别名]
    def __init__(self, treeview, parent=None):

        QItemDelegate.__init__(self, parent)
        self.m_view = treeview
开发者ID:maximerobin,项目名称:Ufwi,代码行数:6,代码来源:pages_list.py

示例15: __init__

# 需要导入模块: from PyQt4.QtGui import QItemDelegate [as 别名]
# 或者: from PyQt4.QtGui.QItemDelegate import __init__ [as 别名]
 def __init__(self, config):
     QItemDelegate.__init__(self)
     self.setOneLine(config.oneLinePlaylist)
开发者ID:tarmack,项目名称:Pythagora,代码行数:5,代码来源:CurrentPlaylistForm.py


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