QTfrontend/ui/page/pageroomslist.cpp
changeset 6699 83dd3447a212
parent 6616 f77bb02b669f
child 6700 e04da46ee43c
equal deleted inserted replaced
6698:804e9076d136 6699:83dd3447a212
   304 
   304 
   305         // pick appropriate room icon and tooltip (game in progress yes/no; later maybe locked rooms etc.)
   305         // pick appropriate room icon and tooltip (game in progress yes/no; later maybe locked rooms etc.)
   306         if(list[i].compare("True"))
   306         if(list[i].compare("True"))
   307         {
   307         {
   308             item->setIcon(QIcon(":/res/iconTime.png"));// game is in lobby
   308             item->setIcon(QIcon(":/res/iconTime.png"));// game is in lobby
   309             item->setToolTip(tr("This game is in lobby.\nYou may join and start playing once the game starts."));
   309             item->setToolTip(tr("Waiting..."));
       
   310             item->setWhatsThis(tr("This game is in lobby: you may join and start playing once the game starts."));
   310         }
   311         }
   311         else
   312         else
   312         {
   313         {
   313             item->setIcon(QIcon(":/res/iconDamage.png"));// game has started
   314             item->setIcon(QIcon(":/res/iconDamage.png"));// game has started
   314             item->setToolTip(tr("This game is in progress.\nYou may join and spectate now but you'll have to wait for the game to end to start playing."));
   315             item->setToolTip(tr("In progress..."));
       
   316             item->setWhatsThis(tr("This game is in progress: you may join and spectate now but you'll have to wait for the game to end to start playing."));
   315         }
   317         }
   316 
   318 
   317         roomsList->setItem(r, 0, item);
   319         roomsList->setItem(r, 0, item);
   318 
   320 
   319         item = new QTableWidgetItem(list[i + 2]); // number of clients
   321         item = new QTableWidgetItem(list[i + 2]); // number of clients
   320         item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
   322         item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
   321         item->setTextAlignment(Qt::AlignCenter);
   323         item->setTextAlignment(Qt::AlignCenter);
   322         item->setToolTip(tr("There are %1 clients connected to this room.", "", list[i + 2].toInt()).arg(list[i + 2]));
   324         item->setWhatsThis(tr("There are %1 clients connected to this room.", "", list[i + 2].toInt()).arg(list[i + 2]));
   323         roomsList->setItem(r, 1, item);
   325         roomsList->setItem(r, 1, item);
   324 
   326 
   325         item = new QTableWidgetItem(list[i + 3]); // number of teams
   327         item = new QTableWidgetItem(list[i + 3]); // number of teams
   326         item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
   328         item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
   327         item->setTextAlignment(Qt::AlignCenter);
   329         item->setTextAlignment(Qt::AlignCenter);
   328         item->setToolTip(tr("There are %1 teams participating in this room.", "", list[i + 3].toInt()).arg(list[i + 3]));
   330         item->setWhatsThis(tr("There are %1 teams participating in this room.", "", list[i + 3].toInt()).arg(list[i + 3]));
   329         //Should we highlight "full" games? Might get misinterpreted
   331         //Should we highlight "full" games? Might get misinterpreted
   330         //if(list[i + 3].toInt() >= cMaxTeams)
   332         //if(list[i + 3].toInt() >= cMaxTeams)
   331         //    item->setForeground(red);
   333         //    item->setForeground(red);
   332         roomsList->setItem(r, 2, item);
   334         roomsList->setItem(r, 2, item);
   333 
   335 
   334         item = new QTableWidgetItem(list[i + 4].left(15)); // name of host
   336         item = new QTableWidgetItem(list[i + 4].left(15)); // name of host
   335         item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
   337         item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
   336         item->setToolTip(tr("%1 is the host. He may adjust settings and start the game.").arg(list[i + 4]));
   338         item->setWhatsThis(tr("%1 is the host. He may adjust settings and start the game.").arg(list[i + 4]));
   337         roomsList->setItem(r, 3, item);
   339         roomsList->setItem(r, 3, item);
   338 
   340 
   339         if(list[i + 5] == "+rnd+")
   341         if(list[i + 5] == "+rnd+")
   340         {
   342         {
   341             item = new QTableWidgetItem(tr("Random Map")); // selected map (is randomized)
   343             item = new QTableWidgetItem(tr("Random Map")); // selected map (is randomized)
   366 //               item->setIcon(QIcon(":/res/mapCustom.png"));
   368 //               item->setIcon(QIcon(":/res/mapCustom.png"));
   367             }
   369             }
   368         }
   370         }
   369 
   371 
   370         item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
   372         item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
   371         item->setToolTip(tr("Games may be played on precreated or randomized maps."));
   373         item->setWhatsThis(tr("Games may be played on precreated or randomized maps."));
   372         roomsList->setItem(r, 4, item);
   374         roomsList->setItem(r, 4, item);
   373 
   375 
   374         item = new QTableWidgetItem(list[i + 6].left(24)); // selected game scheme
   376         item = new QTableWidgetItem(list[i + 6].left(24)); // selected game scheme
   375         item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
   377         item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
   376         item->setToolTip(tr("The Game Scheme defines general options and preferences like Round Time, Sudden Death or Vampirism."));
   378         item->setWhatsThis(tr("The Game Scheme defines general options and preferences like Round Time, Sudden Death or Vampirism."));
   377         roomsList->setItem(r, 5, item);
   379         roomsList->setItem(r, 5, item);
   378 
   380 
   379         item = new QTableWidgetItem(list[i + 7].left(24)); // selected weapon scheme
   381         item = new QTableWidgetItem(list[i + 7].left(24)); // selected weapon scheme
   380         item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
   382         item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
   381         item->setToolTip(tr("The Weapon Scheme defines available weapons and their ammunition count."));
   383         item->setWhatsThis(tr("The Weapon Scheme defines available weapons and their ammunition count."));
   382         roomsList->setItem(r, 6, item);
   384         roomsList->setItem(r, 6, item);
   383 
   385 
   384         if(!list[i + 1].compare(selection) && !selection.isEmpty())
   386         if(!list[i + 1].compare(selection) && !selection.isEmpty())
   385             roomsList->selectionModel()->setCurrentIndex(roomsList->model()->index(r, 0), QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);
   387             roomsList->selectionModel()->setCurrentIndex(roomsList->model()->index(r, 0), QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);
   386     }
   388     }