Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
label.cpp
Go to the documentation of this file.
1 #include <QFileInfo>
2 
3 #include "label.h"
4 
5 Label::Label( QString filePath, QWidget *parent ) : QLabel( parent ), filePath( filePath ), m_pixmap( QPixmap(
6  filePath ) ) {
7 }
8 
9 void Label::mousePressEvent( QMouseEvent* ) {
10  QFileInfo info( filePath );
11 
12  emit Image( m_pixmap, info.fileName( ) );
13 }
void mousePressEvent(QMouseEvent *)
Definition: label.cpp:9
QPixmap m_pixmap
Definition: label.h:12
void Image(const QPixmap &, const QString &)
Label(QString filePath, QWidget *parent=0)
Definition: label.cpp:5
QString filePath
Definition: label.h:11