zoomableimageoptpanel.hpp 1.04 KB
Newer Older
1 2 3 4 5 6 7 8
#ifndef CVVISUAL_ZOOMABLE_IMAGE_OPT_PANEL
#define CVVISUAL_ZOOMABLE_IMAGE_OPT_PANEL

#include <QLabel>
#include <QString>
#include <QWidget>
#include <QDoubleSpinBox>

Maksim Shabunin's avatar
Maksim Shabunin committed
9
#include "opencv2/core.hpp"
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 47 48 49 50 51 52 53 54 55
#include "zoomableimage.hpp"
#include "util.hpp"

namespace cvv
{
namespace qtutil
{

/*
 * @brief This Widget shows some Infos about the given cv::Mat from the given
 * ZoomabelImage
 * and has some Options for zooming
 */
class ZoomableOptPanel : public QWidget
{

	Q_OBJECT

      public:
	/**
	 * @brief the constructor
	 * @param image the ZoomableImage which will be connected
	 * @param parent the parent Widget
	 */
	ZoomableOptPanel(const ZoomableImage &zoomIm,
			 bool showHideButton=true,QWidget *parent = nullptr);

      public
slots:
	void updateMat(cv::Mat mat);
	void updateConvertStatus(const cv::Mat &,ImageConversionResult result);
	void setZoom(QRectF, qreal);

      private:
	QDoubleSpinBox *zoomSpin_;
	QLabel *labelConvert_;
	QLabel *labelDim_;
	QLabel *labelType_;
	QLabel *labelChannel_;
	QLabel *labelSize_;
	QLabel *labelDepth_;
};
}
}

#endif