diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/host/ImageAction.cpp	Mon Nov 27 11:03:52 2006 +0000
@@ -0,0 +1,32 @@
+/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+
+#include "ImageAction.h"
+#include "ImageWindow.h"
+
+#include <iostream>
+
+ImageAction::ImageAction(QString imageName) :
+    m_imageName(imageName)
+{
+    connect(this, SIGNAL(showImage(QString)),
+            ImageWindow::getInstance(), SLOT(showImage(QString)));
+}
+
+ImageAction::~ImageAction()
+{
+}
+
+QString
+ImageAction::getName() const
+{
+    return QString("image: %1").arg(m_imageName);
+}
+
+void
+ImageAction::fire()
+{
+    std::cerr << "ImageAction(\"" << getName().toStdString() << "\"::fire"
+              << std::endl;
+    emit showImage(m_imageName);
+}
+