image_view.hpp 1.04 KB
Newer Older
1 2 3 4 5 6
#ifndef CVVISUAL_IMAGE_VIEW_HPP
#define CVVISUAL_IMAGE_VIEW_HPP

#include <QString>
#include <QWidget>

Maksim Shabunin's avatar
Maksim Shabunin committed
7
#include <opencv2/core.hpp>
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46

#include "../qtutil/zoomableimage.hpp"
#include "../util/observer_ptr.hpp"

namespace cvv
{
namespace view
{

/**
 * @brief Shows one image.
 */
class ImageView : public QWidget
{
	Q_OBJECT

signals:

	/**
	 * @brief update left Footer.
	 * Signal to update the left side of the footer with newText.
	 * @param newText to update the footer with.
	 */
	void updateLeftFooter(const QString &newText);

	/**
	 * @brief update right Footer.
	 * Signal to update the right side of the footer with newText.
	 * @param newText to update the footer with.
	 */
	void updateRightFoooter(const QString &newText);

      public:
	/**
	 * @brief Constructor.
	 * @param image to show.
	 * @param parent of this QWidget.
	 **/
	ImageView(const cv::Mat &image, QWidget *parent = nullptr);
Maksim Shabunin's avatar
Maksim Shabunin committed
47

48 49 50 51
	/**
	 * @brief Shows the full image.
	 */
	void showFullImage();
Maksim Shabunin's avatar
Maksim Shabunin committed
52

53 54 55 56 57 58 59
      private:
	util::ObserverPtr<qtutil::ZoomableImage> image;
};
}
} // namespaces

#endif