#ifndef IMAGEVIEW_H
#define IMAGEVIEW_H

#include <QLabel>
#include <QMouseEvent>
#include <QWheelEvent>
#include <QtDebug>

class ImageView : public QLabel {
  Q_OBJECT
public:
  explicit ImageView(QWidget *parent = nullptr);

  void mouseMoveEvent(QMouseEvent *ev);
  void mousePressEvent(QMouseEvent *ev);
  void wheelEvent(QWheelEvent *ev);

  int getX() { return this->x; }
  int getY() { return this->y; }

  void resizeEvent(QResizeEvent *event); // resize event

private:
  int x;
  int y;

signals:
  void mousePressed(Qt::MouseButton); // mouse preset emit - maybe use in future
  void mousePosition(int, int); // mouse position emit - maybe use in future
  void wheelEvent(int);         // wheel event for scaling
  void resized(); // resize event - for image resizing to fit window
};

#endif // IMAGEVIEW_H
