aboutsummaryrefslogtreecommitdiffstats
path: root/ablist.py
diff options
context:
space:
mode:
authorEddy Pedroni <eddy@0xf7.com>2021-12-22 17:06:53 +0100
committerEddy Pedroni <eddy@0xf7.com>2021-12-22 17:10:08 +0100
commit59b13af09a5e35ea1364eb1031be4ce9410f6f03 (patch)
treeac2cd68dd28541d38fec91041c7c4175dbd6731e /ablist.py
parentb2772136b6d1813150bf7a2e0a0a98085db6af0b (diff)
Added MVP Qt implementation, known issues tracking, removed old files
Diffstat (limited to 'ablist.py')
-rw-r--r--ablist.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/ablist.py b/ablist.py
deleted file mode 100644
index f37905b..0000000
--- a/ablist.py
+++ /dev/null
@@ -1,22 +0,0 @@
-
-def hhmmss(ms):
- # s = 1000
- # m = 60000
- # h = 360000
- h, r = divmod(ms, 36000)
- m, r = divmod(r, 60000)
- s, _ = divmod(r, 1000)
- return ("%d:%02d:%02d" % (h,m,s)) if h else ("%d:%02d" % (m,s))
-
-class AbListModel(QAbstractListModel):
- def __init__(self, *args, **kwargs):
- super(AbListModel, self).__init__(*args, **kwargs)
- self.abList = list()
-
- def data(self, index, role):
- if role == Qt.DisplayRole:
- ab = self.abList[index.row()]
- return f"{hhmmss(ab[0])} - {hhmmss(ab[1])}"
-
- def rowCount(self, index):
- return len(self.abList)