diff -r 574b385ce7df -r fcab1fd02bc6 QTfrontend/hwconsts.cpp.in --- a/QTfrontend/hwconsts.cpp.in Sat May 26 16:50:51 2012 -0400 +++ b/QTfrontend/hwconsts.cpp.in Sun May 27 23:42:43 2012 +0400 @@ -16,6 +16,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ +#include + #include "hwconsts.h" QString * cProtoVer = new QString("${HEDGEWARS_PROTO_VER}"); @@ -70,3 +72,19 @@ int season = SEASON_NONE; int years_since_foundation = 0; + +QStandardItemModel * colorsModel; + +void hwConstsInit() +{ + colorsModel = new QStandardItemModel(); + + int i = 0; + while(colors[i]) + { + QStandardItem * item = new QStandardItem(); + item->setData(QColor(colors[i])); + colorsModel->appendRow(item); + ++i; + } +}