QTfrontend/mapContainer.cpp
changeset 168 679e9b8912f5
parent 164 92cff18a3ab6
child 169 a78d4a552500
--- a/QTfrontend/mapContainer.cpp	Tue Sep 26 11:53:12 2006 +0000
+++ b/QTfrontend/mapContainer.cpp	Tue Sep 26 17:50:14 2006 +0000
@@ -37,6 +37,8 @@
 #include <QBuffer>
 #include <QUuid>
 
+#include <QDebug>
+
 HWMapContainer::HWMapContainer(QWidget * parent) :
   QWidget(parent), mainLayout(this)
 {
@@ -44,11 +46,13 @@
   imageButt->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
   mainLayout.addWidget(imageButt);
   connect(imageButt, SIGNAL(clicked()), this, SLOT(changeImage()));
+  connect(&m_hwmap, SIGNAL(ImageReceived(const QImage)), this, SLOT(setImage(const QImage)));
   changeImage();
 }
 
 void HWMapContainer::setImage(const QImage newImage)
 {
+  qDebug() << "image received";
   // unfortunately QPixmap::fromImage doesn't work 
   // with this image in current (4.1.4) version of QT
   QByteArray ba;
@@ -65,9 +69,8 @@
 void HWMapContainer::changeImage()
 {
   m_seed = QUuid::createUuid().toString();
-  pMap=new HWMap();
-  connect(pMap, SIGNAL(ImageReceived(const QImage)), this, SLOT(setImage(const QImage)));
-  pMap->getImage(m_seed.toStdString());
+  //pMap=new HWMap();
+  m_hwmap.getImage(m_seed.toStdString());
 }
 
 QString HWMapContainer::getCurrentSeed() const