Beispiel #1
0
 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('方向')
 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
Beispiel #3
0
    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,
 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
    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))
Beispiel #6
0
    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 )
Beispiel #7
0
 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)
Beispiel #8
0
 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('货币类型')
Beispiel #9
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('日期')
Beispiel #10
0
    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
Beispiel #11
0
    def __init__(self, parent: QTableView):
        QAbstractTableModel.__init__(self, parent)

        self.error = pd.Series()
Beispiel #12
0
 def __init__(self, parent, mylist, header, *args):
     QAbstractTableModel.__init__(self, parent, *args)
     self.mylist = mylist
     self.header = header
 def __init__(self, session_framesets_list):
     QAbstractTableModel.__init__(self)
     self._framesets_list = session_framesets_list
Beispiel #14
0
 def __init__(self, data):
     QAbstractTableModel.__init__(self)
     self._data = data
Beispiel #15
0
 def __init__(self, data, parent=None):
     QAbstractTableModel.__init__(self, parent)
     self._data = data
     self.header_data = ["Existing Site Files"]
Beispiel #16
0
    def __init__(self, parent):
        QAbstractTableModel.__init__(self, parent)

        self.antiMembers = []
        self.isChecked = []
Beispiel #17
0
 def __init__(self, nmatrix, parent=None):
     QAbstractTableModel.__init__(self, parent)
     self._matrix = nmatrix
Beispiel #18
0
 def __init__(self, list, parent=None):
     QAbstractTableModel.__init__(self, parent)
     self.headers = ['Filename']
     self.list = list
Beispiel #19
0
 def __init__(self, parent, header, data, *args):
     QAbstractTableModel.__init__(self, parent, *args)
     self.header = header
     self.data = data
 def __init__(self, internal_container, parent=None):
     QAbstractTableModel.__init__(self, parent)
     self._internal_container = internal_container
     self._object_attributes = []
Beispiel #21
0
    def __init__(self, parent: QTableView):
        QAbstractTableModel.__init__(self, parent)

        self.matrix = pd.DataFrame()
Beispiel #22
0
 def __init__(self, parent, model, *args):
     QAbstractTableModel.__init__(self, parent, *args)
     self.model = model
 def __init__(self, aItemList):
     QAbstractTableModel.__init__(self)
     self.aItemList = aItemList
     self.filteredAItemList = AmountList(list(aItemList.aItemList))
     self.setFilter(None)
     self.cachedFilter = None
Beispiel #24
0
 def __init__(self, headers, parent=None, *args):
     QAbstractTableModel.__init__(self, parent)
     self._headers = headers
     self._table_values = []
     self._current_geos = {}
     self._estimated_geos = {}
Beispiel #25
0
 def __init__(self, parent, mylist, header, *args):
     QAbstractTableModel.__init__(self, parent, *args)
     self.mylist = mylist
     self.header = header
Beispiel #26
0
 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
Beispiel #27
0
 def __init__(self, parent=None):
     QAbstractTableModel.__init__(self, parent)
     self._root_dir = ""
     self._files = []
 def __init__( self ):
     QAbstractTableModel.__init__( self )
     self._data_model = []
Beispiel #29
0
 def __init__(self, df=pd.DataFrame(), parent=None):
     QAbstractTableModel.__init__(self, parent)
     self.df = df
Beispiel #30
0
 def __init__(self):
     QAbstractTableModel.__init__(self)
     self.todoList = []
Beispiel #31
0
 def __init__(self, parent):
     QAbstractTableModel.__init__(self, parent)
     self._imdb = []
     self._headers = ["Id"]
     self._main = None
     self.rowSelected = None
Beispiel #32
0
    def __init__(self, parent, members):
        QAbstractTableModel.__init__(self, parent)

        self.members = members
        self.isChecked = [False] * len(self.members)
        self.checkedMembers = []
Beispiel #33
0
 def __init__(self, product, book, transaction_type):
     self.book_list = book
     self.product = product
     self.header = ["Size", "Price"]
     self.transaction_type = transaction_type
     QAbstractTableModel.__init__(self)
Beispiel #34
0
 def __init__(self, datain, parent=None, *args):
     QAbstractTableModel.__init__(self, parent, *args)
     self.arraydata = datain
     self.header_labels = ['Property', 'Value']
Beispiel #35
0
 def __init__(self, application_data: DataStorage, parent: QTableView):
     QAbstractTableModel.__init__(self, parent)
     self.app_data = application_data
     self.load_data()
     self.app_data.expr_data_changed.connect(self.load_data)
 def __init__(self, data=None):
     QAbstractTableModel.__init__(self)  # inherit from QAbstractModel
     self.load_data(data)
Beispiel #37
0
    def __init__(self, app_data: DataStorage, parent: QTableView):
        QAbstractTableModel.__init__(self, parent)
        self.app_data = app_data
        self.load_data()

        self.app_data.active_candidates_changed.connect(self.load_data)
 def __init__(self, data, parent=None):
     QAbstractTableModel.__init__(self, parent)
     self._data = data
Beispiel #39
0
    def __init__(self, app_data: DataStorage, parent: QTableView):
        QAbstractTableModel.__init__(self, parent)
        self.app_data = app_data
        self.load_data()

        self.app_data.reduced_space_dof_changed.connect(self.load_data)
Beispiel #40
0
 def __init__(self, headers, values):
     QAbstractTableModel.__init__(self)
     self.headers = headers
     self.values = tuple(values)
Beispiel #41
0
    def __init__(self, application_data: DataStorage, parent=None):
        QAbstractTableModel.__init__(self, parent)

        self.app_data = application_data
        self.load_data()
        self.app_data.reduced_doe_sampled_data_changed.connect(self.load_data)
Beispiel #42
0
 def __init__(self, dataframe, parent=None):
     QAbstractTableModel.__init__(self, parent)
     self.setDataFrame(
         dataframe if dataframe is not None else pd.DataFrame())
Beispiel #43
0
 def __init__(self, data, parent=None):
     QAbstractTableModel.__init__(self, parent)
     self._data = np.array(data)
     self._cols = data.shape[1]
     self.r, self.c = self._data.shape
	def __init__(self, fileb, config, colors):
		QAbstractTableModel.__init__(self)
		self.fileb = fileb
		self.config = config
		self.c_conf = colors
		self.updateConfig()
Beispiel #45
0
 def __init__(self, data: DataFrame, parent=None):
     QAbstractTableModel.__init__(self, parent)
     self._data: DataFrame = data
     self._headers = list(self._data)
Beispiel #46
0
 def __init__(self, datain, headerdata, parent=None, *args):
     QAbstractTableModel.__init__(self, parent, *args)
     self.arraydata = datain * 2
     self.headerdata = headerdata
Beispiel #47
0
 def __init__(self, parent=None):
     QAbstractTableModel.__init__(self, parent)
     self._item_identities = []
     self._headers = None
Beispiel #48
0
 def __init__(self, matrix, parent=None, *args):
     QAbstractTableModel.__init__(self, parent, *args)
     self.matrix = matrix
 def __init__(self, data, parent=None):
     QAbstractTableModel.__init__(self, parent)
     self._data = data.values
     self.header_data = data.columns
 def __init__(self, application_data: DataStorage, parent: QTableView):
     QAbstractTableModel.__init__(self, parent)
     self.app_data = application_data
     self.expr_data = self.app_data.expression_table_data
Beispiel #51
0
 def __init__(self, relation_obj):
     QAbstractTableModel.__init__(self)
     self.__data = relation_obj
     self.modified = False
     self.editable = True