QTfrontend/game.cpp
changeset 7006 6af78154dc62
parent 6952 7f70f37bbf08
child 7090 63d09a846444
equal deleted inserted replaced
6852:9e724f4863a3 7006:6af78154dc62
     1 /*
     1 /*
     2  * Hedgewars, a free turn based strategy game
     2  * Hedgewars, a free turn based strategy game
     3  * Copyright (c) 2005-2012 Andrey Korotaev <unC0Rr@gmail.com>
     3  * Copyright (c) 2004-2012 Andrey Korotaev <unC0Rr@gmail.com>
     4  *
     4  *
     5  * This program is free software; you can redistribute it and/or modify
     5  * This program is free software; you can redistribute it and/or modify
     6  * it under the terms of the GNU General Public License as published by
     6  * it under the terms of the GNU General Public License as published by
     7  * the Free Software Foundation; version 2 of the License
     7  * the Free Software Foundation; version 2 of the License
     8  *
     8  *
   113 }
   113 }
   114 
   114 
   115 void HWGame::SendQuickConfig()
   115 void HWGame::SendQuickConfig()
   116 {
   116 {
   117     QByteArray teamscfg;
   117     QByteArray teamscfg;
       
   118     ThemeModel * themeModel = DataManager::instance().themeModel();
   118 
   119 
   119     HWProto::addStringToBuffer(teamscfg, "TL");
   120     HWProto::addStringToBuffer(teamscfg, "TL");
   120     HWProto::addStringToBuffer(teamscfg, QString("etheme %1")
   121     HWProto::addStringToBuffer(teamscfg, QString("etheme %1")
   121                                .arg((themesModel->rowCount() > 0) ? themesModel->index(rand() % themesModel->rowCount()).data().toString() : "steel"));
   122                                .arg((themeModel->rowCount() > 0) ? themeModel->index(rand() % themeModel->rowCount()).data().toString() : "steel"));
   122     HWProto::addStringToBuffer(teamscfg, "eseed " + QUuid::createUuid().toString());
   123     HWProto::addStringToBuffer(teamscfg, "eseed " + QUuid::createUuid().toString());
   123 
   124 
   124     HWTeam team1;
   125     HWTeam team1;
   125     team1.setDifficulty(0);
   126     team1.setDifficulty(0);
   126     team1.setColor(QColor(colors[0]));
   127     team1.setColor(QColor(colors[0]));