def __init__(self, persondata, headerdata, parent=None): QAbstractTableModel.__init__(self, parent) self.persondata = persondata self.headerdata = headerdata self._genderFormatter = LookupFormatter(CheckGender) self._mStatFormatter = LookupFormatter(CheckMaritalStatus) self._ageFormatter = DoBFormatter()
def __init__(self, parent, header, type_mappings, table_view, isEditable=True, validationfunction=lambda x: [True, None], initial_data=None): self.header = header self.matrix = initial_data if initial_data else [] self.type_mappings = type_mappings self.view = table_view self.isEditable = isEditable self.validation = validationfunction self.valList = [[True, None]] * len( self.matrix) if initial_data else [] self.father = parent self.tableName = self.father.findChild( QLabel, "label_" + self.view.objectName()) if self.tableName is not None: self.tableName = self.tableName.text() QAbstractTableModel.__init__(self, self.view) self.fixTableSizes()
def __init__(self, datain, parent=None, *args): QAbstractTableModel.__init__(self, parent, *args) self.datasets = datain # Column names as tuples with json name in [0], pretty name in [1] # Note that the columns with json names set to to INVALID aren't loaded # into the shell, but shown from a widget. colname_tuples = [ ('category', QtWidgets.QApplication.translate('LDMPPlugin', 'Category')), ('title', QtWidgets.QApplication.translate('LDMPPlugin', 'Title')), ('Units/Description', QtWidgets.QApplication.translate('LDMPPlugin', 'Units')), ('Spatial Resolution', QtWidgets.QApplication.translate('LDMPPlugin', 'Resolution')), ('Start year', QtWidgets.QApplication.translate('LDMPPlugin', 'Start year')), ('End year', QtWidgets.QApplication.translate('LDMPPlugin', 'End year')), ('Extent', QtWidgets.QApplication.translate('LDMPPlugin', 'Extent')), ('INVALID', QtWidgets.QApplication.translate('LDMPPlugin', 'Details')) ] self.colnames_pretty = [x[1] for x in colname_tuples] self.colnames_json = [x[0] for x in colname_tuples]
def __init__(self, colCount, headerNames, parent=None, *args): QAbstractTableModel.__init__(self) self.colCount = colCount # data is a list of rows # each row contains the columns self.data = [] self.headerNames = headerNames
def __init__(self, questionnairedata, headerdata, parent=None): QAbstractTableModel.__init__(self, parent) self.questdata = questionnairedata self.headerdata = headerdata self._wkformatter = WorksiteFormatter() self._enumformatter = InvestigatorFormatter() self._respformatter = RespondentFormatter()
def __init__(self, initdata, headerdata, parent=None, attribute_names=None, raw_values=None, row_ids=None): QAbstractTableModel.__init__(self, parent) self._initData = initdata self._headerdata = headerdata self._attribute_names = attribute_names self._raw_values = raw_values self._row_ids = row_ids
def __init__(self, datain, parent=None, *args): QAbstractTableModel.__init__(self, parent, *args) self.classes = datain # Column names as tuples with json name in [0], pretty name in [1] # Note that the columns with json names set to to INVALID aren't loaded # into the shell, but shown from a widget. colname_tuples = [('Initial_Code', tr_lc_setup.tr('Input code')), ('Initial_Label', tr_lc_setup.tr('Input class')), ('Final_Label', tr_lc_setup.tr('Output class'))] self.colnames_json = [x[0] for x in colname_tuples] self.colnames_pretty = [x[1] for x in colname_tuples]
def __init__(self, datain, parent=None, *args): QAbstractTableModel.__init__(self, parent, *args) self.classes = datain # Column names as tuples with json name in [0], pretty name in [1] # Note that the columns with json names set to to INVALID aren't loaded # into the shell, but shown from a widget. colname_tuples = [('Initial_Code', QtWidgets.QApplication.translate('DlgCalculateLCSetAggregation', 'Input code')), ('Initial_Label', QtWidgets.QApplication.translate('DlgCalculateLCSetAggregation', 'Input class')), ('Final_Label', QtWidgets.QApplication.translate('DlgCalculateLCSetAggregation', 'Output class'))] self.colnames_json = [x[0] for x in colname_tuples] self.colnames_pretty = [x[1] for x in colname_tuples]
def __init__(self, datain, parent=None, *args): QAbstractTableModel.__init__(self, parent, *args) self.jobs = datain # Column names as tuples with json name in [0], pretty name in [1] # Note that the columns with json names set to to INVALID aren't loaded # into the shell, but shown from a widget. colname_tuples = [('task_name', self.tr('Task name')), ('script_name', self.tr('Job')), ('start_date', self.tr('Start time')), ('end_date', self.tr('End time')), ('id', self.tr('ID')), ('status', self.tr('Status')), ('INVALID', self.tr('Details'))] self.colnames_pretty = [x[1] for x in colname_tuples] self.colnames_json = [x[0] for x in colname_tuples]
def __init__(self, data, headers, parent=None): """ Initialise TableModel :param data: table data :param data: 2d array :param headers: list of headers :param headers: list :param parent: None :param parent: None """ QAbstractTableModel.__init__(self, parent) self.arraydata = data self.header = headers
def __init__(self, datain, parent=None, *args): QAbstractTableModel.__init__(self, parent, *args) self.datasets = datain # Column names as tuples with json name in [0], pretty name in [1] # Note that the columns with json names set to to INVALID aren't loaded # into the shell, but shown from a widget. colname_tuples = [('category', self.tr('Category')), ('title', self.tr('Title')), ('Units', self.tr('Units')), ('Spatial Resolution', self.tr('Resolution')), ('Start year', self.tr('Start year')), ('End year', self.tr('End year')), ('extent_lat', self.tr('Extent (lat)')), ('extent_lon', self.tr('Extent (lon)')), ('INVALID', self.tr('Details'))] self.colnames_pretty = [x[1] for x in colname_tuples] self.colnames_json = [x[0] for x in colname_tuples]
def __init__(self, header=None, data=None, parent=None): QAbstractTableModel.__init__(self, parent) self._header = header if header else [] self.resdata = data if data else []
def headerData(self, section, orientation, role=Qt.DisplayRole): if role == Qt.DisplayRole and orientation == Qt.Horizontal: return self.colnames_pretty[section] return QAbstractTableModel.headerData(self, section, orientation, role)
def __init__(self, list, headers = [], ids = [], parent = None): QAbstractTableModel.__init__(self, parent) self.list = list self.headers = headers self.ids = ids
def __init__(self, parent, mylist, header, *args): QAbstractTableModel.__init__(self, parent, *args) self.mylist = mylist self.header = header
def __init__(self, enumdata, headerdata, parent=None): QAbstractTableModel.__init__(self, parent) self.enumdata = enumdata self.headerdata = headerdata
def __init__(self, data, parent = None, *args): QAbstractTableModel.__init__(self, parent, *args) self.data = data
def __init__(self, initdata, headerdata, parent=None): QAbstractTableModel.__init__(self, parent) self._initData = initdata self._headerdata = headerdata
def __init__(self, data, parent=None, *args): QAbstractTableModel.__init__(self, parent, *args) self.data = data
def __init__(self, dataset, header, parent=None): QAbstractTableModel.__init__(self, parent) self.dataset = dataset self.header = header
def __init__(self, departmentdata, headerdata, parent=None): QAbstractTableModel.__init__(self, parent) self.dptdata = departmentdata self.headerdata = headerdata
def __init__(self, parent=None, *args): QAbstractTableModel.__init__(self, parent, *args) # Lista metadanych warstwy (lista słowników) self.files_meta = []