QTfrontend/model/HatModel.h
branchhedgeroid
changeset 15515 7030706266df
parent 11046 47a8c19ecb60
--- a/QTfrontend/model/HatModel.h	Sun Oct 28 15:18:26 2012 +0100
+++ b/QTfrontend/model/HatModel.h	Fri Dec 06 22:20:53 2019 +0100
@@ -1,6 +1,6 @@
 /*
  * Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2012 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2015 Andrey Korotaev <unC0Rr@gmail.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -13,7 +13,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
 /**
@@ -24,30 +24,22 @@
 #ifndef HEDGEWARS_HATMODEL_H
 #define HEDGEWARS_HATMODEL_H
 
-#include <QAbstractListModel>
+#include <QStandardItemModel>
 #include <QStringList>
 #include <QVector>
 #include <QPair>
 #include <QIcon>
 
-class HatModel : public QAbstractListModel
+class HatModel : public QStandardItemModel
 {
         Q_OBJECT
 
     public:
         HatModel(QObject *parent = 0);
 
-        QVariant headerData(int section, Qt::Orientation orientation, int role) const;
-        int rowCount(const QModelIndex & parent) const;
-        //int columnCount(const QModelIndex & parent) const;
-
     public slots:
         /// Reloads hats using the DataManager.
         void loadHats();
-
-        QVariant data(const QModelIndex &index, int role) const;
-    protected:
-        QVector<QPair<QString, QIcon> > hats;
 };
 
 #endif // HEDGEWARS_HATMODEL_H