E:/dev/ssip2006/snake/ImageLabel.cpp

Go to the documentation of this file.
00001 #include <QtGui/QMouseEvent>
00002 
00003 #include "ImageLabel.h"
00004 #include "MainWindow.h"
00005 
00006 
00008 ImageLabel::ImageLabel(MainWindow* guiParent, QWidget * parent, Qt::WFlags f) 
00009 : QLabel(parent, f),
00010 m_guiParent(guiParent)
00011 {
00012 }
00013 
00015 ImageLabel::~ImageLabel(void)
00016 {
00017 }
00018 
00020 void ImageLabel::mousePressEvent(QMouseEvent* event)
00021 {
00022         m_guiParent->setULPt(event->x(),event->y());
00023         qDebug("mouse press event: %d/%d", m_guiParent->getULPt().x(), m_guiParent->getULPt().y());
00024 }
00025 
00027 void ImageLabel::mouseReleaseEvent(QMouseEvent * event)
00028 {
00029         m_guiParent->setLRPt(event->x(),event->y());
00030         qDebug("mouse release event: %d/%d", m_guiParent->getLRPt().x(), m_guiParent->getLRPt().y());
00031 }

Generated on Thu Jul 6 23:16:43 2006 for Snake Ballooning by  doxygen 1.4.7