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


Ignore:
Timestamp:
Dec 20, 2010, 9:53:45 PM (14 years ago)
Author:
laleppa
Message:

Converted file formatting to have spaces instead of tabs. No code changes...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tspmodel.h

    r116 r149  
    3737class CTSPModel: public QAbstractTableModel
    3838{
    39         Q_OBJECT
     39    Q_OBJECT
    4040
    4141public:
    42         CTSPModel(QObject *parent = 0);
    43         void clear();
    44         int columnCount(const QModelIndex &parent = QModelIndex()) const;
    45         QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
    46         Qt::ItemFlags flags(const QModelIndex &index) const;
    47         QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
    48         bool loadTask(const QString &fname);
    49         quint16 numCities() const;
    50         void randomize();
    51         int rowCount(const QModelIndex &parent = QModelIndex()) const;
    52         bool saveTask(const QString &fname);
    53         bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
    54         void setNumCities(int n);
     42    CTSPModel(QObject *parent = 0);
     43    void clear();
     44    int columnCount(const QModelIndex &parent = QModelIndex()) const;
     45    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
     46    Qt::ItemFlags flags(const QModelIndex &index) const;
     47    QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
     48    bool loadTask(const QString &fname);
     49    quint16 numCities() const;
     50    void randomize();
     51    int rowCount(const QModelIndex &parent = QModelIndex()) const;
     52    bool saveTask(const QString &fname);
     53    bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
     54    void setNumCities(int n);
    5555
    5656signals:
    57         /*!
    58         * \brief This signal is emitted whenever the number of cities in the task changes.
    59         *
    60         * \sa setNumCities()
    61         */
    62         void numCitiesChanged(int);
     57    /*!
     58    * \brief This signal is emitted whenever the number of cities in the task changes.
     59    *
     60    * \sa setNumCities()
     61    */
     62    void numCitiesChanged(int);
    6363
    6464private:
    65         QSettings *settings;
    66         QVector<QVector<double> > table;
    67         quint16 nCities;
    68         bool loadError(QDataStream::Status);
    69         bool loadTSPT(QDataStream *);
    70         bool loadZKT(QDataStream *);
    71         double rand(int, int) const;
     65    QSettings *settings;
     66    QVector<QVector<double> > table;
     67    quint16 nCities;
     68    bool loadError(QDataStream::Status);
     69    bool loadTSPT(QDataStream *);
     70    bool loadZKT(QDataStream *);
     71    double rand(int, int) const;
    7272};
    7373
Note: See TracChangeset for help on using the changeset viewer.