Ignore:
Timestamp:
02/26/14 07:49:16 (16 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, enter/10, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1, releng/10.1.1, releng/10.1.2
Children:
8538c35
Parents:
50a696a
Message:

Add a quick application type identification when looking at just the short app listing through a small icon in the corner.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-softwaremanager/mainUI.cpp

    r32be23f refbe467  
    753753  QVBoxLayout *reclayout = new QVBoxLayout; 
    754754  QStringList recList = PBI->getRecommendations(); 
    755   //info.clear(); info << "name" << "shortdescription" << "icon"; 
     755  info.clear(); info << "name" << "shortdescription" << "icon" << "type"; 
    756756  for(int i=0; i<recList.length(); i++){ 
    757757    QStringList data = PBI->AppInfo(recList[i],info); 
    758758    if(!data.isEmpty()){ 
    759759      LargeItemWidget *item = new LargeItemWidget(recList[i],data[0],data[1],data[2]); 
     760      //Set the type icon 
     761      item->setType(data[3].toLower()); 
    760762      connect(item,SIGNAL(appClicked(QString)),this,SLOT(slotGoToApp(QString)) ); 
    761763      reclayout->addWidget(item); 
     
    814816  apps.sort(); 
    815817  QVBoxLayout *applayout = new QVBoxLayout; 
    816   QStringList info; info << "name" << "shortdescription" << "icon"; 
     818  QStringList info; info << "name" << "shortdescription" << "icon" << "type"; 
    817819  for(int i=0; i<apps.length(); i++){ 
    818820    QStringList data = PBI->AppInfo(apps[i],info); 
     
    821823      if(data[1].size()>100){ data[1] = data[1].left(100).append("..."); } 
    822824      LargeItemWidget *item = new LargeItemWidget(apps[i],data[0],data[1],data[2]); 
     825      item->setType(data[3].toLower()); 
    823826      connect(item,SIGNAL(appClicked(QString)),this,SLOT(slotGoToApp(QString)) ); 
    824827      applayout->addWidget(item);  
     
    10051008    clearScrollArea(ui->scroll_bsearch_best); 
    10061009    QVBoxLayout *layout = new QVBoxLayout; 
    1007     QStringList info; info << "name" << "shortdescription" << "icon"; 
     1010    QStringList info; info << "name" << "shortdescription" << "icon" << "type"; 
    10081011    for(int i=0; i<best.length(); i++){ 
    10091012      QStringList data = PBI->AppInfo(best[i],info); 
     
    10121015        if(data[1].size()>100){ data[1] = data[1].left(100).append("..."); } 
    10131016        LargeItemWidget *item = new LargeItemWidget(best[i],data[0],data[1],data[2]); 
     1017        item->setType(data[3].toLower()); 
    10141018        connect(item,SIGNAL(appClicked(QString)),this,SLOT(slotGoToApp(QString)) ); 
    10151019        layout->addWidget(item);  
     
    10321036          if(data[1].size()>100){ data[1] = data[1].left(100).append("..."); } 
    10331037          LargeItemWidget *item = new LargeItemWidget(rest[i],data[0],data[1],data[2]); 
     1038          item->setType(data[3].toLower()); 
    10341039          connect(item,SIGNAL(appClicked(QString)),this,SLOT(slotGoToApp(QString)) ); 
    10351040          layout2->addWidget(item);  
Note: See TracChangeset for help on using the changeset viewer.