Skip to content
Snippets Groups Projects
Commit d7508ae8 authored by Sacha Percot-Tétu's avatar Sacha Percot-Tétu
Browse files

Added class ImgOutput

ImgOutput is used to output an imagein::Image result to the user.
parent 5a9fb43e
No related branches found
No related tags found
No related merge requests found
#include "ImgOutput.h"
#include "ImgWidget.h"
using namespace std;
ImgOutput::ImgOutput(const imagein::Image& image) : Output(""), _img(new imagein::Image(image)) {
}
ImgOutput::ImgOutput(string name, const imagein::Image& image) : Output(name), _img(new imagein::Image(image)) {
}
QWidget* ImgOutput::getWidget() {
return new ImgWidget(_img, _name);
}
ImgOutput* ImgOutput::clone() const {
return new ImgOutput(*this);
}
\ No newline at end of file
#ifndef EIIMAGE_IMGOUTPUT_H
#define EIIMAGE_IMGOUTPUT_H
#include <vector>
#include <string>
#include "Image.h"
#include "Output.h"
class QWidget;
class ImgOutput : public Output {
public:
ImgOutput(const imagein::Image& image);
ImgOutput(std::string name, const imagein::Image& image);
virtual QWidget* getWidget();
ImgOutput* clone() const;
private:
imagein::Image* _img;
};
#endif //!EIIMAGE_IMGOUTPUT_H
\ No newline at end of file
#include "Image.h"
#include <QWidget>
#include <string>
class ImgWidget : public QWidget {
public:
ImgWidget(imagein::Image* img_, std::string name_) : img(img_), name(name_) {}
imagein::Image* img;
std::string name;
};
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment