X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=bak%2Finbox_model.py;fp=bak%2Finbox_model.py;h=e83d6326a4d1fd23858b7c9a17825a8b3cf48ab8;hb=d001770946053c4d60f9f9b9362f713287013079;hp=0000000000000000000000000000000000000000;hpb=3a76135cf3477fc8e8e0508ff8fd1026c21c6281;p=retroconv diff --git a/bak/inbox_model.py b/bak/inbox_model.py new file mode 100644 index 0000000..e83d632 --- /dev/null +++ b/bak/inbox_model.py @@ -0,0 +1,24 @@ +from PyQt4 import * +from PyQt4.QtCore import * +from PyQt4.QtGui import * +import sys + + +class InboxModel(QAbstractListModel): + def __init__(self, mlist): + QAbstractListModel.__init__(self) + + + self._items = mlist + + + def rowCount(self, parent = QModelIndex()): + return len(self._items) + + + + def data(self, index, role = Qt.DisplayRole): + if role == Qt.DisplayRole: + return QVariant(self._items[index.row()].getSenderName()) + else: + return QVariant()