QML: Correct threading to load images
[mussorgsky] / src / qml / albumItem.py
1 # -*- coding: utf-8 -*-
2 import os
3 import sys
4 from PySide import QtCore
5 from PySide import QtGui
6 from PySide import QtDeclarative
7
8
9 class AlbumItem (QtCore.QObject):
10
11     def __init__ (self, title, artist, album_art):
12         QtCore.QObject.__init__(self)
13         self._title = title
14         self._artist = artist
15         self._album_art = album_art
16
17     def _title (self):
18         return self._title
19
20     def _artist (self):
21         return self._artist
22
23     def _album_art (self):
24         return self._album_art
25
26     @QtCore.Signal
27     def changed (self): pass
28
29     title = QtCore.Property (unicode, _title, notify=changed)
30     artist = QtCore.Property (unicode, _artist, notify=changed)
31     album_art = QtCore.Property (unicode, _album_art, notify=changed)
32