adds seperator for large numbers to lobby infos

This commit is contained in:
doitux
2009-06-17 21:34:07 +00:00
parent eefbd9e79f
commit fdb5bb10be
2 changed files with 11 additions and 7 deletions
@@ -176,8 +176,8 @@ void gameLobbyDialogImpl::createGame()
hideShowGameDescription(TRUE); hideShowGameDescription(TRUE);
label_SmallBlind->setText(QString::number(gameData.firstSmallBlind)); label_SmallBlind->setText(QString("%L1").arg(gameData.firstSmallBlind));
label_StartCash->setText(QString::number(gameData.startMoney)); label_StartCash->setText(QString("%L1").arg(gameData.startMoney));
label_MaximumNumberOfPlayers->setText(QString::number(gameData.maxNumberOfPlayers)); label_MaximumNumberOfPlayers->setText(QString::number(gameData.maxNumberOfPlayers));
updateDialogBlinds(gameData); updateDialogBlinds(gameData);
@@ -247,6 +247,10 @@ void gameLobbyDialogImpl::refresh(int actionID) {
if (actionID == MSG_NET_GAME_CLIENT_START) if (actionID == MSG_NET_GAME_CLIENT_START)
{ {
myGameListModel->clear(); myGameListModel->clear();
myGameListSelectionModel->clear();
myGameListSelectionModel->clearSelection();
myGameListSortFilterProxyModel->clear();
QStringList headerList; QStringList headerList;
headerList << tr("Game") << tr("Players") << tr("State") << tr("Private"); headerList << tr("Game") << tr("Players") << tr("State") << tr("Private");
myGameListModel->setHorizontalHeaderLabels(headerList); myGameListModel->setHorizontalHeaderLabels(headerList);
@@ -283,8 +287,8 @@ void gameLobbyDialogImpl::gameSelected(const QModelIndex &index, const QModelInd
GameInfo info(mySession->getClientGameInfo(myGameListModel->item(myGameListSortFilterProxyModel->mapToSource(index).row(), 0)->data(Qt::UserRole).toUInt())); GameInfo info(mySession->getClientGameInfo(myGameListModel->item(myGameListSortFilterProxyModel->mapToSource(index).row(), 0)->data(Qt::UserRole).toUInt()));
hideShowGameDescription(TRUE); hideShowGameDescription(TRUE);
label_SmallBlind->setText(QString::number(info.data.firstSmallBlind)); label_SmallBlind->setText(QString("%L1").arg(info.data.firstSmallBlind));
label_StartCash->setText(QString::number(info.data.startMoney)); label_StartCash->setText(QString("%L1").arg(info.data.startMoney));
label_MaximumNumberOfPlayers->setText(QString::number(info.data.maxNumberOfPlayers)); label_MaximumNumberOfPlayers->setText(QString::number(info.data.maxNumberOfPlayers));
updateDialogBlinds(info.data); updateDialogBlinds(info.data);
@@ -771,7 +775,7 @@ void gameLobbyDialogImpl::updateDialogBlinds(const GameData &gameData) {
QString blindsListString; QString blindsListString;
std::list<int>::const_iterator it1; std::list<int>::const_iterator it1;
for(it1= gameData.manualBlindsList.begin(); it1 != gameData.manualBlindsList.end(); it1++) { for(it1= gameData.manualBlindsList.begin(); it1 != gameData.manualBlindsList.end(); it1++) {
blindsListString.append(QString::number(*it1,10)).append(", "); blindsListString.append(QString("%L1").arg(*it1)).append(", ");
} }
blindsListString.remove(blindsListString.length()-2,2); blindsListString.remove(blindsListString.length()-2,2);
label_blindsList->setText(blindsListString); label_blindsList->setText(blindsListString);
@@ -126,7 +126,6 @@ private:
bool inGame; bool inGame;
QString myAppDataPath; QString myAppDataPath;
int keyUpCounter;
QMessageBox *waitStartGameMsgBox; QMessageBox *waitStartGameMsgBox;
QTimer *waitStartGameMsgBoxTimer; QTimer *waitStartGameMsgBoxTimer;
QTimer *blinkingButtonAnimationTimer; QTimer *blinkingButtonAnimationTimer;
@@ -134,6 +133,7 @@ private:
QColor defaultStartButtonColor; QColor defaultStartButtonColor;
QColor defaultStartButtonTextColor; QColor defaultStartButtonTextColor;
LobbyChat *myChat; LobbyChat *myChat;
int keyUpCounter;
QStandardItemModel *myGameListModel; QStandardItemModel *myGameListModel;
QItemSelectionModel *myGameListSelectionModel; QItemSelectionModel *myGameListSelectionModel;
MyGameListSortFilterProxyModel *myGameListSortFilterProxyModel; MyGameListSortFilterProxyModel *myGameListSortFilterProxyModel;