Mercurial > hg > vamp-live-host
comparison host/ImageAction.cpp @ 13:47b0a143db39
...
author | cannam |
---|---|
date | Tue, 12 Dec 2006 10:38:55 +0000 |
parents | c1669af82d6e |
children |
comparison
equal
deleted
inserted
replaced
12:faec23aecc74 | 13:47b0a143db39 |
---|---|
2 | 2 |
3 #include "ImageAction.h" | 3 #include "ImageAction.h" |
4 #include "ImageWindow.h" | 4 #include "ImageWindow.h" |
5 | 5 |
6 #include <iostream> | 6 #include <iostream> |
7 | |
8 QString | |
9 ImageAction::m_currentImage; | |
7 | 10 |
8 ImageAction::ImageAction(QString imageName) : | 11 ImageAction::ImageAction(QString imageName) : |
9 m_imageName(imageName) | 12 m_imageName(imageName) |
10 { | 13 { |
11 connect(this, SIGNAL(showImage(QString)), | 14 connect(this, SIGNAL(showImage(QString)), |
23 } | 26 } |
24 | 27 |
25 void | 28 void |
26 ImageAction::fire() | 29 ImageAction::fire() |
27 { | 30 { |
31 if (m_currentImage == m_imageName) return; | |
28 std::cerr << "ImageAction(\"" << getName().toStdString() << "\")::fire" | 32 std::cerr << "ImageAction(\"" << getName().toStdString() << "\")::fire" |
29 << std::endl; | 33 << std::endl; |
34 m_currentImage = m_imageName; | |
30 emit showImage(m_imageName); | 35 emit showImage(m_imageName); |
31 } | 36 } |
32 | 37 |