mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-12 02:55:18 -04:00
* Added CD-Image to Search ComboBox
* Added CD-Image extensions for Search Dialog and RemotDirModel * Added Type Column item to Search Dialog to show : Audio,Archive,CD-Image,Document,Picture,Program,Video * Added FileType for Program extension to RemoteDirModel git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@825 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c60cf84e95
commit
3d3f4bfec9
4 changed files with 99 additions and 37 deletions
|
@ -289,6 +289,18 @@ RemoteDirModel::RemoteDirModel(bool mode, QObject *parent)
|
|||
QIcon icon(":/images/FileTypeArchive.png");
|
||||
return icon;
|
||||
}
|
||||
else if (ext == "app" || ext == "bat" || ext == "cgi" || ext == "com"
|
||||
|| ext == "bin" || ext == "exe" || ext == "js" || ext == "pif"
|
||||
|| ext == "py" || ext == "pl" || ext == "sh" || ext == "vb" || ext == "ws")
|
||||
{
|
||||
return(QIcon(":/images/FileTypeProgram.png"));
|
||||
}
|
||||
else if (ext == "iso" || ext == "nrg" || ext == "mdf" )
|
||||
{
|
||||
//setIcon(0, QIcon(":/images/txtfile.png"));
|
||||
QIcon icon(":/images/FileTypeCDImage.png");
|
||||
return icon;
|
||||
}
|
||||
else if (ext == "txt" || ext == "cpp" || ext == "c" || ext == "h")
|
||||
{
|
||||
//setIcon(0, QIcon(":/images/txtfile.png"));
|
||||
|
@ -419,8 +431,21 @@ RemoteDirModel::RemoteDirModel(bool mode, QObject *parent)
|
|||
}
|
||||
} /* end of DisplayRole */
|
||||
return QVariant();
|
||||
|
||||
if (role == Qt::TextAlignmentRole)
|
||||
{
|
||||
if(coln == 1)
|
||||
{
|
||||
return int( Qt::AlignLeft | Qt::AlignVCenter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
|
||||
|
||||
QVariant RemoteDirModel::headerData(int section, Qt::Orientation orientation,
|
||||
int role) const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue