QTfrontend/hwconsts.cpp.in
changeset 7130 fcab1fd02bc6
parent 6958 8230a516ba93
child 7258 722e8a0d89dc
equal deleted inserted replaced
7128:574b385ce7df 7130:fcab1fd02bc6
    13  *
    13  *
    14  * You should have received a copy of the GNU General Public License
    14  * You should have received a copy of the GNU General Public License
    15  * along with this program; if not, write to the Free Software
    15  * along with this program; if not, write to the Free Software
    16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
    16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
    17  */
    17  */
       
    18 
       
    19 #include <QStandardItemModel>
    18 
    20 
    19 #include "hwconsts.h"
    21 #include "hwconsts.h"
    20 
    22 
    21 QString * cProtoVer = new QString("${HEDGEWARS_PROTO_VER}");
    23 QString * cProtoVer = new QString("${HEDGEWARS_PROTO_VER}");
    22 QString * cDataDir = new QString("${HEDGEWARS_DATADIR}");
    24 QString * cDataDir = new QString("${HEDGEWARS_DATADIR}");
    68 bool haveServer = ${HAVE_NETSERVER};
    70 bool haveServer = ${HAVE_NETSERVER};
    69 bool isDevBuild = ${HW_DEV};
    71 bool isDevBuild = ${HW_DEV};
    70 
    72 
    71 int season = SEASON_NONE;
    73 int season = SEASON_NONE;
    72 int years_since_foundation = 0;
    74 int years_since_foundation = 0;
       
    75 
       
    76 QStandardItemModel * colorsModel;
       
    77 
       
    78 void hwConstsInit()
       
    79 {
       
    80     colorsModel = new QStandardItemModel();
       
    81 
       
    82     int i = 0;
       
    83     while(colors[i])
       
    84     {
       
    85         QStandardItem * item = new QStandardItem();
       
    86         item->setData(QColor(colors[i]));
       
    87         colorsModel->appendRow(item);
       
    88         ++i;
       
    89     }
       
    90 }