Changeset 21 in tspsg-svn for trunk/src/tspmodel.cpp
- Timestamp:
- Jun 22, 2009, 1:37:12 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 1 *.idb 2 *.ini 2 3 *.ncb 3 4 *.pdb
-
- Property svn:ignore
-
trunk/src/tspmodel.cpp
r19 r21 23 23 24 24 #include <QtGui> 25 #include "defines.h" 25 26 #include "tspmodel.h" 26 27 27 28 CTSPModel::CTSPModel(QObject *parent) 28 : QAbstractTableModel(parent), randMin(1), randMax(10),nCities(0)29 : QAbstractTableModel(parent), nCities(0) 29 30 { 31 settings = new QSettings(INI_FILE,QSettings::IniFormat); 30 32 } 31 33 … … 115 117 void CTSPModel::setNumCities(int n) 116 118 { 119 int randMin = settings->value("MinCost",DEF_RAND_MIN).toInt(); 120 int randMax = settings->value("MaxCost",DEF_RAND_MAX).toInt(); 117 121 if (n == nCities) 118 122 return; … … 140 144 void CTSPModel::randomize() 141 145 { 146 int randMin = settings->value("MinCost",DEF_RAND_MIN).toInt(); 147 int randMax = settings->value("MaxCost",DEF_RAND_MAX).toInt(); 142 148 for (int r = 0; r < nCities; r++) 143 149 for (int c = 0; c < nCities; c++)
Note: See TracChangeset
for help on using the changeset viewer.