Changeset 47 in tspsg-svn for trunk/src/tspmodel.h
- Timestamp:
- Aug 2, 2009, 9:47:45 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tspmodel.h
r46 r47 30 30 { 31 31 Q_OBJECT 32 32 33 public: 33 34 CTSPModel(QObject *parent = 0); 35 void clear(); 36 int columnCount(const QModelIndex &) const; 37 QVariant data(const QModelIndex &, int) const; 38 Qt::ItemFlags flags(const QModelIndex &) const; 39 QVariant headerData(int, Qt::Orientation, int) const; 40 bool loadTask(QString); 41 quint16 numCities() const; 42 void randomize(); 34 43 int rowCount(const QModelIndex &) const; 35 int columnCount(const QModelIndex &) const; 36 QVariant headerData(int, Qt::Orientation, int) const; 37 QVariant data(const QModelIndex &, int) const; 44 bool saveTask(QString); 38 45 bool setData(const QModelIndex &, const QVariant &, int); 39 Qt::ItemFlags flags(const QModelIndex &) const;40 quint16 numCities() const;41 46 void setNumCities(int); 42 void clear(); 43 void loadTask(QString); 44 bool saveTask(QString); 45 void randomize(); 47 46 48 signals: 47 49 void numCitiesChanged(int); 50 48 51 private: 49 52 QSettings *settings; 50 53 QVector<QVector<double> > table; 51 54 quint16 nCities; 55 bool loadError(QDataStream::Status); 56 bool loadZKT(QDataStream *); 57 bool loadTSPT(QDataStream *); 52 58 int rand(int, int) const; 53 bool loadError(QDataStream::Status);54 void loadZKT(QDataStream *);55 void loadTSPT(QDataStream *);56 59 }; 57 60
Note: See TracChangeset
for help on using the changeset viewer.