Changeset 47 in tspsg-svn for trunk/src/tspmodel.h


Ignore:
Timestamp:
Aug 2, 2009, 9:47:45 PM (15 years ago)
Author:
laleppa
Message:

+ Current file name is displayed in main application window header.

  • Created a method for prompt for unsaved changes to unify it throughout the code.
  • Some stylistic README changes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tspmodel.h

    r46 r47  
    3030{
    3131        Q_OBJECT
     32
    3233public:
    3334        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();
    3443        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);
    3845        bool setData(const QModelIndex &, const QVariant &, int);
    39         Qt::ItemFlags flags(const QModelIndex &) const;
    40         quint16 numCities() const;
    4146        void setNumCities(int);
    42         void clear();
    43         void loadTask(QString);
    44         bool saveTask(QString);
    45         void randomize();
     47
    4648signals:
    4749        void numCitiesChanged(int);
     50
    4851private:
    4952        QSettings *settings;
    5053        QVector<QVector<double> > table;
    5154        quint16 nCities;
     55        bool loadError(QDataStream::Status);
     56        bool loadZKT(QDataStream *);
     57        bool loadTSPT(QDataStream *);
    5258        int rand(int, int) const;
    53         bool loadError(QDataStream::Status);
    54         void loadZKT(QDataStream *);
    55         void loadTSPT(QDataStream *);
    5659};
    5760
Note: See TracChangeset for help on using the changeset viewer.