comparison host/ImageAction.cpp @ 7:b30fcffc5000

* Better organisation of action classes; support for AND-type rules
author cannam
date Mon, 27 Nov 2006 11:03:52 +0000
parents
children c1669af82d6e
comparison
equal deleted inserted replaced
6:b046af03c719 7:b30fcffc5000
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3 #include "ImageAction.h"
4 #include "ImageWindow.h"
5
6 #include <iostream>
7
8 ImageAction::ImageAction(QString imageName) :
9 m_imageName(imageName)
10 {
11 connect(this, SIGNAL(showImage(QString)),
12 ImageWindow::getInstance(), SLOT(showImage(QString)));
13 }
14
15 ImageAction::~ImageAction()
16 {
17 }
18
19 QString
20 ImageAction::getName() const
21 {
22 return QString("image: %1").arg(m_imageName);
23 }
24
25 void
26 ImageAction::fire()
27 {
28 std::cerr << "ImageAction(\"" << getName().toStdString() << "\"::fire"
29 << std::endl;
30 emit showImage(m_imageName);
31 }
32