QTfrontend/ui/widget/hatbutton.cpp
branchwebgl
changeset 9950 2759212a27de
parent 9738 18bb6d1fc9d9
child 9998 736015b847e3
--- a/QTfrontend/ui/widget/hatbutton.cpp	Fri Oct 11 17:43:13 2013 +0200
+++ b/QTfrontend/ui/widget/hatbutton.cpp	Sat Jan 04 23:55:54 2014 +0400
@@ -19,7 +19,6 @@
 #include <QDebug>
 
 #include "hatprompt.h"
-#include "DataManager.h"
 #include "HatModel.h"
 #include "hatbutton.h"
 
@@ -28,8 +27,13 @@
     setIconSize(QSize(32, 37));
     setFixedSize(44, 44);
 
-    m_hatModel = DataManager::instance().hatModel();
+    m_hatModel = 0;
     connect(this, SIGNAL(clicked()), this, SLOT(showPrompt()));
+}
+
+void HatButton::setModel(HatModel *model)
+{
+    m_hatModel = model;
 
     setCurrentIndex(0);
 }