|
|
@ -262,6 +262,9 @@ QImage* UBLibraryController::createThumbnail(UBLibElement* pElement) |
|
|
|
|
|
|
|
|
|
|
|
QImage* UBLibraryController::thumbnailForFile(UBLibElement* pElement) |
|
|
|
QImage* UBLibraryController::thumbnailForFile(UBLibElement* pElement) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
if (pElement->path().toString().contains("uniboardTool://")) |
|
|
|
|
|
|
|
return &UBToolsManager::manager()->iconFromToolId(pElement->path().toString()).toImage(); |
|
|
|
|
|
|
|
|
|
|
|
QString thumbnailPath = UBFileSystemUtils::thumbnailPath(pElement->path().toLocalFile()); |
|
|
|
QString thumbnailPath = UBFileSystemUtils::thumbnailPath(pElement->path().toLocalFile()); |
|
|
|
|
|
|
|
|
|
|
|
if (!thumbnailPath.length()) |
|
|
|
if (!thumbnailPath.length()) |
|
|
@ -490,7 +493,7 @@ void UBLibraryController::persistFavoriteList() |
|
|
|
foreach(UBLibElement* eachElement, mFavoriteList) |
|
|
|
foreach(UBLibElement* eachElement, mFavoriteList) |
|
|
|
{ |
|
|
|
{ |
|
|
|
out << (quint32)eachElement->type(); |
|
|
|
out << (quint32)eachElement->type(); |
|
|
|
out << eachElement->path(); |
|
|
|
out << eachElement->path().toString(); |
|
|
|
out << eachElement->information(); |
|
|
|
out << eachElement->information(); |
|
|
|
out << eachElement->name(); |
|
|
|
out << eachElement->name(); |
|
|
|
out << eachElement->extension(); |
|
|
|
out << eachElement->extension(); |
|
|
@ -517,7 +520,7 @@ void UBLibraryController::readFavoriteList() |
|
|
|
|
|
|
|
|
|
|
|
in >> type >> path >> info >> name >> extension; |
|
|
|
in >> type >> path >> info >> name >> extension; |
|
|
|
|
|
|
|
|
|
|
|
UBLibElement* eachElement = new UBLibElement((eUBLibElementType)type, path, name); |
|
|
|
UBLibElement* eachElement = new UBLibElement((eUBLibElementType)type, QUrl(path), name); |
|
|
|
eachElement->setInformation(info); |
|
|
|
eachElement->setInformation(info); |
|
|
|
eachElement->setExtension(extension); |
|
|
|
eachElement->setExtension(extension); |
|
|
|
eachElement->setThumbnail(thumbnailForFile(eachElement)); |
|
|
|
eachElement->setThumbnail(thumbnailForFile(eachElement)); |
|
|
|