QTfrontend/model/hats.cpp
changeset 6616 f77bb02b669f
parent 6196 c16e84558f71
child 6700 e04da46ee43c
--- a/QTfrontend/model/hats.cpp	Mon Jan 30 23:20:28 2012 +0100
+++ b/QTfrontend/model/hats.cpp	Mon Jan 30 17:32:18 2012 -0500
@@ -26,29 +26,29 @@
 #include "HWDataManager.h"
 
 HatsModel::HatsModel(QObject* parent) :
-  QAbstractListModel(parent)
+    QAbstractListModel(parent)
 {
     HWDataManager & dataMgr = HWDataManager::instance();
 
     QPixmap hhpix = QPixmap(
-        dataMgr.findFileForRead("Graphics/Hedgehog/Idle.png")
-    ).copy(0, 0, 32, 32);
+                        dataMgr.findFileForRead("Graphics/Hedgehog/Idle.png")
+                    ).copy(0, 0, 32, 32);
 
     // my reserved hats
     QStringList hatsList = dataMgr.entryList(
-                                   "Graphics/Hats/Reserved",
-                                   QDir::Files,
-                                   QStringList(playerHash+"*.png")
-                               );
+                               "Graphics/Hats/Reserved",
+                               QDir::Files,
+                               QStringList(playerHash+"*.png")
+                           );
 
     int nReserved = hatsList.size();
 
     // regular hats
     hatsList.append(dataMgr.entryList(
-                                   "Graphics/Hats",
-                                   QDir::Files,
-                                   QStringList("*.png")
-                               )
+                        "Graphics/Hats",
+                        QDir::Files,
+                        QStringList("*.png")
+                    )
                    );
 
 
@@ -62,7 +62,7 @@
         str = str.remove(QRegExp("\\.png$"));
         QPixmap pix(
             dataMgr.findFileForRead(
-                "Graphics/Hats/" + QString(isReserved?"Reserved/":"") + str + 
+                "Graphics/Hats/" + QString(isReserved?"Reserved/":"") + str +
                 ".png"
             )
         );
@@ -89,7 +89,7 @@
 }
 
 QVariant HatsModel::headerData(int section,
-            Qt::Orientation orientation, int role) const
+                               Qt::Orientation orientation, int role) const
 {
     Q_UNUSED(section);
     Q_UNUSED(orientation);
@@ -118,8 +118,8 @@
                          int role) const
 {
     if (!index.isValid() || index.row() < 0
-        || index.row() >= hats.size()
-        || (role != Qt::DisplayRole && role != Qt::DecorationRole))
+            || index.row() >= hats.size()
+            || (role != Qt::DisplayRole && role != Qt::DecorationRole))
         return QVariant();
 
     if (role == Qt::DisplayRole)