QTfrontend/model/roomslistmodel.cpp
branch0.9.21
changeset 10745 fab746a3597e
parent 10741 7fababf10b60
child 11046 47a8c19ecb60
equal deleted inserted replaced
10743:1d16c5414fee 10745:fab746a3597e
   112         const QIcon roomBusyIconRed(":/res/iconDamageLockR.png");
   112         const QIcon roomBusyIconRed(":/res/iconDamageLockR.png");
   113         const QIcon roomWaitingIcon(":/res/iconTime.png");
   113         const QIcon roomWaitingIcon(":/res/iconTime.png");
   114         const QIcon roomWaitingIconGreen(":/res/iconTimeLockG.png");
   114         const QIcon roomWaitingIconGreen(":/res/iconTimeLockG.png");
   115         const QIcon roomWaitingIconRed(":/res/iconTimeLockR.png");
   115         const QIcon roomWaitingIconRed(":/res/iconTimeLockR.png");
   116 
   116 
   117         QString flags = m_data.at(row).at(0);
   117         QString flags = m_data.at(row).at(StateColumn);
   118 
   118 
   119         if (flags.contains("g"))
   119         if (flags.contains("g"))
   120         {
   120         {
   121             if (flags.contains("j"))
   121             if (flags.contains("j"))
   122                 return QVariant(roomBusyIconRed);
   122                 return QVariant(roomBusyIconRed);
   138 
   138 
   139     QString content = m_data.at(row).at(column);
   139     QString content = m_data.at(row).at(column);
   140 
   140 
   141     if (role == Qt::DisplayRole)
   141     if (role == Qt::DisplayRole)
   142     {
   142     {
   143         // supply in progress flag as bool
       
   144         if (column == 0)
       
   145             return QVariant(QString(!content.isEmpty()));
       
   146 
       
   147         // display room names
   143         // display room names
   148         if (column == 5)
   144         if (column == 5)
   149         {
   145         {
   150             // special names
   146             // special names
   151             if (content[0] == '+')
   147             if (content[0] == '+')