Added beginning of skinchooser.

Drop your skins into ~/.xmms2/clients/promoe/skins
This commit is contained in:
Tobias Rundstrom 2006-02-27 00:10:46 -03:00
parent 18f87d65d5
commit 4e46089c01
8 changed files with 169 additions and 3 deletions

View file

@ -100,6 +100,24 @@ Skin::setSkin (QString name)
emit skinChanged(this);
}
QPixmap
Skin::getPixmap (QString f, QDir dir)
{
/* check for files in zip and check if file exists */
dir.setFilter (QDir::Files);
QFileInfoList list = dir.entryInfoList();
for (int i = 0; i < list.size(); ++i) {
QFileInfo fileInfo = list.at(i);
if (fileInfo.fileName().toLower() == f) {
return QPixmap (fileInfo.filePath());
}
}
return QPixmap (0,0);
}
QPixmap *
Skin::getPixmap (string file)