コード例 #1
1
ファイル: CookieModel.py プロジェクト: thesecondson577/eric
 def headerData(self, section, orientation, role):
     """
     Public method to get header data from the model.
     
     @param section section number (integer)
     @param orientation orientation (Qt.Orientation)
     @param role role of the data to retrieve (integer)
     @return requested data
     """
     if role == Qt.SizeHintRole:
         fm = QFontMetrics(QFont())
         height = fm.height() + fm.height() // 3
         width = \
             fm.width(self.headerData(section, orientation, Qt.DisplayRole))
         return QSize(width, height)
     
     if orientation == Qt.Horizontal:
         if role == Qt.DisplayRole:
             try:
                 return self.__headers[section]
             except IndexError:
                 return None
         
         return None
     
     return QAbstractTableModel.headerData(self, section, orientation, role)
コード例 #2
1
ファイル: models.py プロジェクト: Acbarakat/MtGCubeViz
 def headerData(self, section, orientation, role = Qt.DisplayRole):
     if role == Qt.DisplayRole:
         if orientation == Qt.Horizontal:
             return str(self.h_header[section])
         elif orientation == Qt.Vertical:
             return str(self.v_header[section])
     return QAbstractTableModel.headerData(self, section, orientation, role)
コード例 #3
0
 def __init__(self, objects=None, properties=None, isRowObjects=True, isDynamic=True, templateObject=None, parent=None):
     QAbstractTableModel.__init__(self, parent)
     self.objects = objects if (objects is not None) else []
     self.properties = properties if (properties is not None) else []
     self.isRowObjects = isRowObjects
     self.isDynamic = isDynamic
     self.templateObject = templateObject
コード例 #4
0
ファイル: qtsrecordview.py プロジェクト: waterdiviner/AppOps
 def __init__(self):
     QAbstractTableModel.__init__(self)
     pyqtbus = QtsRMQReceiversPyQtBus()
     pyqtbus.EOnRecord.connect(self.on_record, Qt.QueuedConnection)
     self.items = dict()
     self.key_row_dict = dict()
     self.header_name = list()
     self.header_name.append('帐户')
     self.header_name.append('策略ID')
     self.header_name.append('父订单ID')
     self.header_name.append('订单ID')
     self.header_name.append('算法ID')
     self.header_name.append('算法订单ID')
     self.header_name.append('市场')
     self.header_name.append('品种')
     self.header_name.append('证券代码')
     self.header_name.append('交易行为')
     self.header_name.append('状态')
     self.header_name.append('下单价格')
     self.header_name.append('成交价格')
     self.header_name.append('下单量')
     self.header_name.append('成交量')
     self.header_name.append('下单时间')
     self.header_name.append('成交时间')
     self.header_name.append('属性')
     self.header_name.append('是否撤单')
     self.header_name.append('用户ID')
     self.header_name.append('父交易行为')
     self.header_name.append('前状态')
     self.header_name.append('方向')
コード例 #5
0
ファイル: listModel.py プロジェクト: ilastik/ilastik
    def __init__(self, elements=None, parent=None):
        '''
        Common interface for the labelListModel, the boxListModel, and the cropListModel
        see concrete implementations for details

        :param elements:
        :param parent:
        '''
        QAbstractTableModel.__init__(self, parent)

        if elements is None:
            elements = []
        self._elements = list(elements)
        self._selectionModel = QItemSelectionModel(self)

        def onSelectionChanged(selected, deselected):


            if selected:
                ind = selected[0].indexes()
                if len(ind)>0:
                    self.elementSelected.emit(ind[0].row())

        self._selectionModel.selectionChanged.connect(onSelectionChanged)

        self._allowRemove = True
        self._toolTipSuffixes = {}

        self.unremovable_rows=[] #rows in this list cannot be removed from the gui,
コード例 #6
0
 def __init__(self, parent):
     QAbstractTableModel.__init__(self, parent)
     self._data = None
     self._subs = [None]
     self._videos = [None]
     self._headers = [_("Videofile"), _("Subtitle")]
     self._main = None
     self.rowsSelected = None
コード例 #7
0
    def __init__(self, headers, parent=None, *args):
        QAbstractTableModel.__init__(self, parent)
        self._anchor_positions = []
        self._headers = headers
        self._latest_known_anchor_positions = {}

        self._green_brush = QBrush(QColor(200, 255, 200))
        self._red_brush = QBrush(QColor(255, 200, 200))
コード例 #8
0
    def __init__(self, parent, columns: List[TableModelColumn],
                 columns_movable, filtering_sorting):
        AttrsProtected.__init__(self)
        ColumnedItemModelMixin.__init__(self, parent, columns, columns_movable)
        QAbstractTableModel.__init__(self, parent)

        if filtering_sorting:
            self.enable_filter_proxy_model(self)
        self.data_lock = thread_utils.EnhRLock()
コード例 #9
0
ファイル: models.py プロジェクト: Acbarakat/MtGCubeViz
    def __init__(self, cubeFile, cubeDB, parent=None, *args, **kwargs):
        QAbstractTableModel.__init__(self, parent, *args, **kwargs)
        
        self._cubeFile = cubeFile
        self._cubeData = None
        self._cubeDB   = cubeDB

        self.manager = QNetworkAccessManager( parent=self )
        self.manager.finished.connect( self.downloadFinished )
コード例 #10
0
 def __init__(self, parent, data, header):
     """
     :param parent: parent
     :param data: list of videos
     :param header: list of strings representing column header names
     """
     QAbstractTableModel.__init__(self, parent)
     self.data = data
     self.header = header
     print(data, header)
コード例 #11
0
ファイル: mainWindow.py プロジェクト: evgs89/mvsremont
 def __init__(self, parent):
     QAbstractTableModel.__init__(self)
     self.gui = parent
     self.__delta = timedelta(days = 14)
     self.type = 'Все'
     self.state = 'Все'
     self.colLabels = ['ID', 'Сер. №', 'Тип', 'Снято', 'План. установка', 'Причина', 'В цеху', 'Работы', 'На складе']
     self.filterDateChange()
     self.refreshTimeoutChange()
     self.updated = self.refreshData()
コード例 #12
0
    def __init__(self, datain, headerdata, parent=None, *args):
        QAbstractTableModel.__init__(self, parent, *args)

        self.arraydata = []
        # Loop to convert all dates to strings to be displayed in table
        for i in range(len(datain)):
            self.arraydata.append(list(datain[i]))
            self.arraydata[i][2] = self.arraydata[i][2].strftime("%d/%m/%Y")

        self.headerdata = headerdata
コード例 #13
0
 def __init__(self, die, prefix, lowlevel, hex):
     QAbstractTableModel.__init__(self)
     self.prefix = prefix
     self.lowlevel = lowlevel
     self.hex = hex
     self.die = die
     self.attributes = die.attributes
     self.keys = list(die.attributes.keys())
     self.headers = _ll_headers if self.lowlevel else _noll_headers
     self.meta_count = _meta_count if lowlevel else 0
コード例 #14
0
 def set_socios_table_model_search(self, model: QAbstractTableModel,
                                   search_str: str, check_socio: bool):
     self.ui.tableView.setModel(model)
     self.ui.tableView.setColumnWidth(0, 250)
     model.refresh_data_search(search_str, check_socio)
     self.ui.lineEdit.setText(search_str)
     self.ui.checkBox.setChecked(check_socio)
     self.ui.lineEdit.installEventFilter(self)
     self.ui.checkBox.installEventFilter(self)
     self.main_window.set_change_button_text_icon(check_socio,
                                                  self.ui.inactiveButton)
コード例 #15
0
 def __init__(self,
              data_in,
              header_data,
              display_header,
              container: Container,
              parent=None):
     QAbstractTableModel.__init__(self, parent)
     self.array_data = data_in
     self.header_data = header_data
     self.display_header = display_header
     self.container = container
コード例 #16
0
    def __init__(self, data, header, parent=None):

        QAbstractTableModel.__init__(self, parent)
        self._data = data
        self._header = header
        self.non_class_filterable_object_list = []
        #self.non_class_filterable_object_list = ["Size in pixels"]
        self.class_filterable_object_list = []
        self.function_list = [
            "INCLUDE", "NOT INCLUDE", "<", "<=", ">", ">=", "=", "(", ")"
        ]
        self.query_results = data
コード例 #17
0
 def __init__(self, file_path=None, dataframe=None):
     QAbstractTableModel.__init__(self)
     self.path = None if file_path is None else Path(file_path).absolute()
     self.headers = None
     self._data = None
     self.date_set = False
     if dataframe is not None:
         self._data = dataframe
         self.head = True
     else:
         self._data = self.load_file()
         self.head = PandasModel(dataframe=self._data.loc[:5, :].copy())
コード例 #18
0
ファイル: pysimlab.py プロジェクト: eb4890/pysimlab
 def __init__(self, data=None):
     QAbstractTableModel.__init__(self)
     self.nda_data = data
     shape = data.shape
     if len(shape) == 2:
         x,y = shape
         self.column_count = x
         self.row_count =  y
     if len(shape) ==1 :
         x, = shape
         self.column_count =  x
         self.row_count =  1
コード例 #19
0
 def __init__(self, model, orderMode):
     QAbstractTableModel.__init__(self)
     self.model = model
     self.currow = 0
     self.internalrow = 0
     self.initiallist = np.arange(len(self.model.data))
     self.validlist = None
     self.sortedlist = None
     self.orderMode = orderMode  # Original=0, Sorted=1, Random=2
     self.onListChange()
     self.model.filterchange.connect(self.onListChange)
     self.model.sortchange.connect(self.onListChange)
コード例 #20
0
    def __init__(self, c1, c2, key, parent=None):
        QAbstractTableModel.__init__(self, parent)

        self._c1 = c1
        self._c2 = c2

        self.selectedKey = key
        self.refKey = key
        self.headers = [
            key, (os.path.basename(c1.path), c1),
            (os.path.basename(c2.path), c2), "Diff"
        ]
コード例 #21
0
ファイル: params.py プロジェクト: SSGoveia/FragScape
 def __init__(self,fsModel):
     self.parser_name = "Params"
     self.fsModel = fsModel
     self.workspace = None
     self.outputDir = None
     self.tmpDir = None
     #self.dataClipFlag = True
     self.projectFile = ""
     self.save_tmp = True
     self.crs = defaultCrs
     self.fields = [self.WORKSPACE,self.PROJECT,self.CRS]
     QAbstractTableModel.__init__(self)
コード例 #22
0
ファイル: csv_options.py プロジェクト: daleathan/moneyguru
 def __init__(self, model, view):
     QAbstractTableModel.__init__(self)
     self.model = model
     self.view = view
     self.view.setModel(self)
     self._lastClickedColumn = 0
     self.columnMenu = QMenu()
     for index, fieldId in enumerate(FIELD_ORDER):
         fieldName = FIELD_NAMES[fieldId]
         action = self.columnMenu.addAction(fieldName)
         action.setData(index)
         action.triggered.connect(self.columnMenuItemClicked)
     self.view.horizontalHeader().sectionClicked.connect(self.tableSectionClicked)
コード例 #23
0
ファイル: die.py プロジェクト: maismallfish/dwex
 def __init__(self, die, prefix, lowlevel, hex, regnames):
     QAbstractTableModel.__init__(self)
     self.prefix = prefix
     self.lowlevel = lowlevel
     self.hex = hex
     self.regnames = regnames
     self.die = die
     self.attributes = die.attributes
     self.keys = list(die.attributes.keys())
     self.headers = _ll_headers if self.lowlevel else _noll_headers
     self.meta_count = _meta_count if lowlevel else 0
     self.arch = die.dwarfinfo.config.machine_arch
     self.regnamelist = _REG_NAME_MAP.get(self.arch)
コード例 #24
0
    def __init__(self, data: DataFrame):
        """
        Constructor / Instantiating the class

        Parameters
        ----------
        data        : DataFrame
                      data to be displayed in table

        """
        Assertor.assert_data_types([data], [DataFrame])
        QAbstractTableModel.__init__(self)
        self._data = data
コード例 #25
0
 def __init__(self, table: QTableView, ignore_file_type: bool,
              display_average_adus: bool):
     """
     Constructor for empty fits file table model
     :param table:                   The table view for which this is the data model
     :param ignore_file_type:        Flag whether file types are being ignored
     :param display_average_adus:    Flag whether the "display ADUs" option is on
     """
     QAbstractTableModel.__init__(self)
     self._files_list: [FileDescriptor] = []
     self._ignore_file_type = ignore_file_type
     self._table = table
     self._display_average_adus = display_average_adus
コード例 #26
0
 def __init__(self, parent, mnemonic_word_list, dictionary_words):
     QAbstractTableModel.__init__(self, parent)
     self.parent = parent
     self.dictionary_words = dictionary_words
     self.mnemonic_word_list = mnemonic_word_list
     self.words_count = 24
     self.read_only = False
     self.columns = [
         "#",
         'Word',
         '#',
         'Word'
     ]
コード例 #27
0
 def __init__(self,
              objects=None,
              properties=None,
              isRowObjects=True,
              isDynamic=True,
              templateObject=None,
              parent=None):
     QAbstractTableModel.__init__(self, parent)
     self.objects = objects if (objects is not None) else []
     self.properties = properties if (properties is not None) else []
     self.isRowObjects = isRowObjects
     self.isDynamic = isDynamic
     self.templateObject = templateObject
コード例 #28
0
	def __init__(self, parent, atc_pov, acft_callsign, atc_callsign, xfr=None):
		QAbstractTableModel.__init__(self, parent)
		self.atc_pov = atc_pov
		self.acft_callsign = acft_callsign
		self.data_authority = atc_callsign
		self.initiator = xfr # Transferring ATC, or None if initiated by ACFT
		self.messages = []
		self.connect_time = now()
		self.disconnect_time = None
		self.transferred_to = None
		self.expecting = False # True if either party is expecting an answer
		self.timed_out = False # True if other party took too long to answer
		self.problems = {} # int msg index -> str problem to resolve
コード例 #29
0
ファイル: Metodos.py プロジェクト: Cuadernin/ResumenDataFrame
 def __init__(self):  #constructor
     super(panda, self).__init__()
     QAbstractTableModel.__init__(self)
     self.ui = DialogoP()
     self.ui.setupUi(self)
     self.ui.abrir.triggered.connect(self.abrir)
     self.ui.acerca.triggered.connect(self.acerca)
     self.ui.btn_salir.clicked.connect(self.salir)
     self.ui.btn_calcular.clicked.connect(self.calcular)
     self.ui.btn_graficar.clicked.connect(self.graficar)
     self.df = ''
     self.valor = ''
     self.show()
コード例 #30
0
ファイル: VertexList.py プロジェクト: arnobaer/Tachy2GIS
 def __init__(self, vertices=[], parent=None, *args):
     QAbstractTableModel.__init__(self, parent, *args)
     self.columnCount = len(T2G_Vertex().fields())
     self.vertices = vertices
     self.colors = []
     self.shapes = []
     self.anchorPoints = []
     self.anchorIndex = QgsSpatialIndex()
     self.selected = None
     self.maxIndex = None
     self.updateThread = QThread()
     self.anchorUpdater = None
     self.layer = None
コード例 #31
0
 def __init__(self,
              application_data: DataStorage,
              mode: str = 'input',
              parent=None):
     QAbstractTableModel.__init__(self, parent)
     self.app_data = application_data
     if mode == 'input':
         self.variable_data = self.app_data.input_table_data
         self.data_changed_signal = self.app_data.input_alias_data_changed
     elif mode == 'output':
         self.variable_data = self.app_data.output_table_data
         self.data_changed_signal = self.app_data.output_alias_data_changed
     else:
         raise ValueError("Invalid table mode.")
コード例 #32
0
ファイル: csv_options.py プロジェクト: tautonic/moneyguru
 def __init__(self, model, view):
     QAbstractTableModel.__init__(self)
     self.model = model
     self.view = view
     self.view.setModel(self)
     self._lastClickedColumn = 0
     self.columnMenu = QMenu()
     for index, fieldId in enumerate(FIELD_ORDER):
         fieldName = FIELD_NAMES[fieldId]
         action = self.columnMenu.addAction(fieldName)
         action.setData(index)
         action.triggered.connect(self.columnMenuItemClicked)
     self.view.horizontalHeader().sectionClicked.connect(
         self.tableSectionClicked)
コード例 #33
0
    def __init__(self,
                 clazz: Type,
                 headers: list = None,
                 cell_alignments: list = None,
                 table_data: list = None,
                 parent: QTableView = None):

        QAbstractTableModel.__init__(self, parent)
        self.clazz = clazz
        self.table_data = table_data or []
        self.headers = headers or self.headers_by_entity()
        self.cell_alignments = cell_alignments or []
        log.info('{} table_headers={}'.format(clazz.__class__.__name__,
                                              '|'.join(self.headers)))
コード例 #34
0
ファイル: qtsaccountview.py プロジェクト: waterdiviner/AppOps
 def __init__(self):
     QAbstractTableModel.__init__(self)
     pyqtbus = QtsRMQReceiversPyQtBus()
     pyqtbus.EOnAccount.connect(self.on_account, Qt.QueuedConnection)
     self.items = dict()
     self.key_row_dict = dict()
     self.header_name = list()
     self.header_name.append('市场')
     self.header_name.append('品种')
     self.header_name.append('帐户')
     self.header_name.append('总资金')
     self.header_name.append('可用资金')
     self.header_name.append('冻结资金')
     self.header_name.append('日期')
     self.header_name.append('货币类型')
コード例 #35
0
ファイル: qtsaccountview.py プロジェクト: waterdiviner/AppOps
 def __init__(self):
     QAbstractTableModel.__init__(self)
     pyqtbus = QtsRMQReceiversPyQtBus()
     pyqtbus.EOnAccount.connect(self.on_account, Qt.QueuedConnection)
     self.items = dict()
     self.key_row_dict = dict()
     self.header_name = list()
     self.header_name.append('市场')
     self.header_name.append('品种')
     self.header_name.append('帐户')
     self.header_name.append('总资金')
     self.header_name.append('可用资金')
     self.header_name.append('冻结资金')
     self.header_name.append('日期')
     self.header_name.append('货币类型')
コード例 #36
0
 def __init__(self, application_data: DataStorage, parent=None):
     QAbstractTableModel.__init__(self, parent)
     self.app_data = application_data
     self.load_data()
     self.app_data.simulation_info_changed.connect(self.load_data)
     self.info_headers = ['Property', 'Quantity']
     self.headers_map = {'components': "Components",
                         'therm_method': "Thermodynamic model",
                         'blocks': "Blocks",
                         'streams': "Streams",
                         'reactions': "Reactions",
                         'sens_analysis': "Sensitivity Analysis",
                         'calculators': "Calculators",
                         'optimizations': "Optimizations",
                         'design_specs': "Design Specifications"}
コード例 #37
0
    def __init__(self, data_model: DataModel, preferences: Preferences,
                 dirty_reporting_method: Callable,
                 validity_reporting_method: Callable):
        QAbstractTableModel.__init__(self)
        self._dirty_reporting_method = dirty_reporting_method
        self._validity_reporting_method = validity_reporting_method
        self._data_model: DataModel = data_model
        self._preferences: Preferences = preferences

        self._cell_validity = [[
            True for _row in range(self.columnCount(QModelIndex()))
        ] for _col in range(self.rowCount(QModelIndex()))]

        # Check validity of all cells on loading in case bad data were saved
        self.prevalidate_all_cells()
コード例 #38
0
 def __init__(self,
              only_numbers: bool = False,
              parent: QWidget = None,
              *args) -> None:
     """
     Initialize the object
     :param only_numbers: show only number rows and don't display type column
     """
     # noinspection PyArgumentList
     QAbstractTableModel.__init__(self, parent, *args)
     self.__only_numbers = only_numbers
     self.__data_list: List[PropertyImportData] = list()
     self.__header_labels = ["Property"
                             ] if only_numbers else ["Property", "Type"]
     self.logger = QGISLogHandler(self.__class__.__name__)
コード例 #39
0
    def __init__(self,
                 dataframe: pd.DataFrame,
                 pair_info: dict = None,
                 parent=None):
        QAbstractTableModel.__init__(self, parent)

        self._data = dataframe

        if pair_info is None:
            # if no dictionary is defined, create a default
            pair_info = {}
            for header in self._data.columns.values:
                pair_info[header] = {'alias': 'Select alias', 'status': False}

        self._pair_info = pair_info
コード例 #40
0
ファイル: model.py プロジェクト: yoshitomimaehara/pireal
    def flags(self, index):
        """ Método reimplementado.
        Permite la edición en el modelo """

        flags = QAbstractTableModel.flags(self, index)
        if self.editable:
            flags |= Qt.ItemIsEditable
        return flags
コード例 #41
0
 def __init__(self):
     QAbstractTableModel.__init__(self)
     pyqtbus = QtsRMQReceiversPyQtBus()
     pyqtbus.EOnPosition.connect(self.on_position, Qt.QueuedConnection)
     self.items = dict()
     self.key_row_dict = dict()
     self.header_name = list()
     self.header_name.append('帐户')
     self.header_name.append('市场')
     self.header_name.append('品种')
     self.header_name.append('证券代码')
     self.header_name.append('类型')
     self.header_name.append('总仓位')
     self.header_name.append('可用仓位')
     self.header_name.append('冻结仓位')
     self.header_name.append('费用')
     self.header_name.append('仓位级别')
     self.header_name.append('可申赎仓位')
     self.header_name.append('今仓')
     self.header_name.append('日期')
コード例 #42
0
 def flags(self, index):
     flags = QAbstractTableModel.flags(self, index)
     if not index.isValid():
         return flags
     prop = self.getProperty(index)
     if prop is None:
         return flags
     flags |= Qt.ItemIsEnabled
     flags |= Qt.ItemIsSelectable
     mode = prop.get('mode', "Read/Write")
     if "Write" in mode:
         flags |= Qt.ItemIsEditable
     return flags
コード例 #43
0
ファイル: E5NetworkMonitor.py プロジェクト: Darriall/eric
 def headerData(self, section, orientation, role=Qt.DisplayRole):
     """
     Public method to get header data from the model.
     
     @param section section number (integer)
     @param orientation orientation (Qt.Orientation)
     @param role role of the data to retrieve (integer)
     @return requested data
     """
     if orientation == Qt.Horizontal and role == Qt.DisplayRole:
         return self.__headerData[section]
     
     return QAbstractTableModel.headerData(self, section, orientation, role)
コード例 #44
0
ファイル: table.py プロジェクト: ajoros/ves
    def __init__(self, table=[[]], headers=[], colors=[], parent=None):
        """Initialization method for the PalettedTableModel. This portion
        of the code will execute every time a PalettedTableModel object
        is instantiated

        Parameters
        ----------
        Args:
            table: list
                A nested table containing the data abstracted in the
                QAbstractTableModel. Indexed as [row][column]
            headers: list
                A list containing hex color codes (or some other matplotlib
                accepted value) to define the row colors
            parent: None
                The object from which the instantiated object inherits

        Notes
        -----
        All attributes on this model were required to be set as public
        attributes (in the Python world, i.e. no leading _ to the name).
        This allows for access to the table data and color values regardless
        of whether or not the object is instantiated in __main__.

        """
        # Default parent to self
        if parent is None:
            parent = self

        # For Qt
        super(PalettedTableModel, self).__init__()

        QAbstractTableModel.__init__(self, parent)

        # Set up the table, table headers, and colors properties
        self.table = table
        self.headers = headers
        self.colors = colors
コード例 #45
0
ファイル: HistoryModel.py プロジェクト: pycom/EricShort
 def headerData(self, section, orientation, role=Qt.DisplayRole):
     """
     Public method to get the header data.
     
     @param section section number (integer)
     @param orientation header orientation (Qt.Orientation)
     @param role data role (integer)
     @return header data
     """
     if orientation == Qt.Horizontal and role == Qt.DisplayRole:
         try:
             return self.__headers[section]
         except IndexError:
             pass
     return QAbstractTableModel.headerData(self, section, orientation, role)
コード例 #46
0
    def flags(self, index):
        '''
        function:: flags(index)
        :param index:
        :rtype:         return

        '''
        defaultFlags = QAbstractTableModel.flags(self, index)

        if index.isValid():
            return Qt.ItemIsEditable | Qt.ItemIsDragEnabled | \
                Qt.ItemIsDropEnabled | defaultFlags

        else:
            return Qt.ItemIsDropEnabled | defaultFlags
コード例 #47
0
 def headerData( self, section, orientation, role=QtCore.Qt.DisplayRole ):
     if role == QtCore.Qt.DisplayRole and orientation == QtCore.Qt.Horizontal:
         return self.COLUMNS[section]
     return QAbstractTableModel.headerData( self, section, orientation, role )
コード例 #48
0
ファイル: imdblistview.py プロジェクト: fizyk20/subdownloader
 def __init__(self, parent):
     QAbstractTableModel.__init__(self, parent)
     self._imdb = []
     self._headers = ["Id"]
     self._main = None
     self.rowSelected = None
コード例 #49
0
 def flags(self, index):
     flags = QAbstractTableModel.flags(self, index)
     if index.isValid():
         if index.row() == 0:
             flags |= Qt.ItemIsDropEnabled
     return flags
コード例 #50
0
	def __init__(self, fileb, config, colors):
		QAbstractTableModel.__init__(self)
		self.fileb = fileb
		self.config = config
		self.c_conf = colors
		self.updateConfig()
コード例 #51
0
ファイル: MyQt.py プロジェクト: IlanHindy/AI-Learn
 def __init__(self, matrix, parent=None, *args):
     QAbstractTableModel.__init__(self, parent, *args)
     self.matrix = matrix
コード例 #52
0
ファイル: IdaPluginManager.py プロジェクト: hugsy/stuff
 def __init__(self, rows_data_list, header_list, parent=None, *args):
     QAbstractTableModel.__init__(self, parent, *args)
     self.rows = rows_data_list
     self.headers = header_list
     return
コード例 #53
0
ファイル: pdfxgui.py プロジェクト: metachris/pdfx-gui
 def __init__(self, datain, headerdata, parent=None, *args):
     QAbstractTableModel.__init__(self, parent, *args)
     self.arraydata = datain * 2
     self.headerdata = headerdata
コード例 #54
0
ファイル: gro_model.py プロジェクト: hovo1990/GROM
 def flags(self, index):
     if not index.isValid():
         return Qt.ItemIsEnabled
     return Qt.ItemFlags(
         QAbstractTableModel.flags(self, index) |
         Qt.ItemIsEditable)
コード例 #55
0
ファイル: SCNR.py プロジェクト: sdickreuter/lock-in-spectrum
 def __init__(self, nmatrix, parent=None):
     QAbstractTableModel.__init__(self, parent)
     self._matrix = nmatrix
コード例 #56
0
ファイル: model.py プロジェクト: yoshitomimaehara/pireal
 def __init__(self, relation_obj):
     QAbstractTableModel.__init__(self)
     self.__data = relation_obj
     self.modified = False
     self.editable = True
コード例 #57
0
ファイル: tableview.py プロジェクト: maxscheurer/pycontact
 def __init__(self, parent, mylist, header, *args):
     QAbstractTableModel.__init__(self, parent, *args)
     self.mylist = mylist
     self.header = header
コード例 #58
0
ファイル: playlist.py プロジェクト: petrushev/txplaya
 def headerData(self, section, orientation, role=Qt.DisplayRole):
     if orientation == Qt.Horizontal and role==Qt.DisplayRole:
         return self.infoKeys[section]
     return QAbstractTableModel.headerData(self, section, orientation, role)
コード例 #59
0
 def __init__(self, internal_container, parent=None):
     QAbstractTableModel.__init__(self, parent)
     self._internal_container = internal_container
     self._object_attributes = []