Skip to content

Commit

Permalink
[chore] Add generics methods for models
Browse files Browse the repository at this point in the history
  • Loading branch information
Kastakin committed Dec 5, 2023
1 parent e39cd8a commit d0b61c3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/python/pyes/viewmodels/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import re
import string
from itertools import permutations
from typing import Any

import pandas as pd
from commands import ComponentsCellEdit, SpeciesCellEdit
Expand Down Expand Up @@ -126,6 +127,12 @@ def rowCount(self, index=QModelIndex()):
def columnCount(self, index=QModelIndex()):
return self._data.columns.size

def data(self, index, role: Qt.ItemDataRole = Qt.ItemDataRole.DisplayRole):
raise NotImplementedError()

def setData(self, index: QModelIndex, value: Any, role) -> bool:
raise NotImplementedError


class ConcentrationsModel(GenericModel):
def __init__(self, data: pd.DataFrame, undo_stack: QUndoStack):
Expand Down

0 comments on commit d0b61c3

Please sign in to comment.