Exemplo n.º 1
0
 def __init__(self):
     self.db_cache_file_name = ''
     self.db_labels_file_name = ''
     self.db_active = False
     self.lock = thread_utils.EnhRLock(stackinfo_skip_lines=1)
     self.depth = 0
     self.db_conn = None
Exemplo n.º 2
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()
Exemplo n.º 3
0
 def __init__(self, parent, columns: List[TableModelColumn],
              columns_movable, filtering_sorting):
     AttrsProtected.__init__(self)
     QAbstractItemModel.__init__(self, parent)
     self.parent_widget = parent
     self._columns = columns
     self._col_idx_by_name: Dict[str, int] = {}
     self._rebuild_column_index()
     self.view: Optional[QAbstractItemView] = None
     self.columns_movable = columns_movable
     self.initial_sorting_column_name = ''
     self.initial_sorting_order = Qt.AscendingOrder
     self.proxy_model: Optional[ColumnedSortFilterProxyModel] = None
     self.data_lock = thread_utils.EnhRLock()
     if filtering_sorting:
         self.enable_filter_proxy_model(self)
Exemplo n.º 4
0
    def __init__(self, db_cache_file_name):
        self.db_cache_file_name = db_cache_file_name
        self.db_active = False
        self.lock = thread_utils.EnhRLock(stackinfo_skip_lines=1)
        self.depth = 0

        self.db_conn = None
        try:
            self.db_conn = sqlite3.connect(self.db_cache_file_name)
            self.create_structures()
            self.db_active = True
        except Exception as e:
            logging.exception('SQLite initialization error')
        finally:
            if self.db_conn:
                self.db_conn.close()
            self.db_conn = None