本文整理匯總了Python中PyQt4.QtCore.QAbstractTableModel方法的典型用法代碼示例。如果您正苦於以下問題:Python QtCore.QAbstractTableModel方法的具體用法?Python QtCore.QAbstractTableModel怎麽用?Python QtCore.QAbstractTableModel使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PyQt4.QtCore
的用法示例。
在下文中一共展示了QtCore.QAbstractTableModel方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: from PyQt4 import QtCore [as 別名]
# 或者: from PyQt4.QtCore import QAbstractTableModel [as 別名]
def __init__(self, controller, scripts = [[]], headers = [], parent = None):
QtCore.QAbstractTableModel.__init__(self, parent)
self.__headers = headers
self.__scripts = scripts
self.__controller = controller
示例2: __init__
# 需要導入模塊: from PyQt4 import QtCore [as 別名]
# 或者: from PyQt4.QtCore import QAbstractTableModel [as 別名]
def __init__(self, hosts = [[]], headers = [], parent = None):
QtCore.QAbstractTableModel.__init__(self, parent)
self.__headers = headers
self.__hosts = hosts
示例3: __init__
# 需要導入模塊: from PyQt4 import QtCore [as 別名]
# 或者: from PyQt4.QtCore import QAbstractTableModel [as 別名]
def __init__(self, controller, processes = [[]], headers = [], parent = None):
QtCore.QAbstractTableModel.__init__(self, parent)
self.__headers = headers
self.__processes = processes
self.__controller = controller
示例4: __init__
# 需要導入模塊: from PyQt4 import QtCore [as 別名]
# 或者: from PyQt4.QtCore import QAbstractTableModel [as 別名]
def __init__(self, services = [[]], headers = [], parent = None):
QtCore.QAbstractTableModel.__init__(self, parent)
self.__headers = headers
self.__services = services
示例5: __init__
# 需要導入模塊: from PyQt4 import QtCore [as 別名]
# 或者: from PyQt4.QtCore import QAbstractTableModel [as 別名]
def __init__(self, session, query, columns, parent = None):
QtCore.QAbstractTableModel.__init__(self, parent)
self.session = session
self.query = session.query(query)
self.columns = columns
self.results = None
self.count = None
self.sort = None
self.filter = None
self.refresh()
示例6: headerData
# 需要導入模塊: from PyQt4 import QtCore [as 別名]
# 或者: from PyQt4.QtCore import QAbstractTableModel [as 別名]
def headerData(self, col, Qt_Orientation, int_role=None):
if int_role == QtCore.Qt.DisplayRole and Qt_Orientation == QtCore.Qt.Horizontal:
return self.columns[col][0]
return QtCore.QAbstractTableModel.headerData(self, col, Qt_Orientation, int_role)
示例7: __init__
# 需要導入模塊: from PyQt4 import QtCore [as 別名]
# 或者: from PyQt4.QtCore import QAbstractTableModel [as 別名]
def __init__(self, parent = None, *args):
QtCore.QAbstractTableModel.__init__(self, parent, *args)
self.data_store = []
self.header_vals = ["File Name", "Label", "Color", "Bins", "Style"]
self.default_colors = ["red", "blue", "green", "black"]
示例8: headerData
# 需要導入模塊: from PyQt4 import QtCore [as 別名]
# 或者: from PyQt4.QtCore import QAbstractTableModel [as 別名]
def headerData(self, p_int, Qt_Orientation, int_role=None):
if int_role == QtCore.Qt.DisplayRole and Qt_Orientation == QtCore.Qt.Horizontal:
return self.header_vals[p_int]
return QtCore.QAbstractTableModel.headerData(self, p_int, Qt_Orientation, int_role)