Your obsession with keeping it down to one signal is somewhat unnatural -- there's no reason for it in this case.
If you really wish, don't forget you're using C++. You can pass type information at runtime through polymorphism.
class ImageOriginal : public QImage {
ImageOriginal(const QImage & img) : QImage(img) {}
};
class ImageYellowThreshold : public QImage {
ImageYellowThreshold(const QImage & img) : QImage(img) {}
};
class Sender : public QObject {
Q_OBJECT
public:
Q_SIGNAL void signal(const QImage &);
void test() {
QImage img;
emit signal(ImageOriginal(img));
};
class Receiver : public QObject {
Q_OBJECT
public:
Q_SLOT void slot(const QImage & image) {
if (dynamic_cast<ImageOriginal*>(&image)) {
// this is the original image
}
else if (dynamic_cast<ImageYellowThreshold*>(&image)) {
// this is the yellow threshold image
}
else {
// generic image
}
}
};