//-*-c++-*-
#ifndef MOUSEOBJECT_H
#define MOUSEOBJECT_H

#include <qcursor.h>

#include "MouseInterface.h"
///
class MouseRotXRotY:public MouseInterface
{
 public:
  MouseRotXRotY(){}
  ~MouseRotXRotY(){}
  int x,y;
  void mPressEvent(GlGraphWidget *,QMouseEvent *);
  void mReleaseEvent(GlGraphWidget *,QMouseEvent *);
  void mMoveEvent(GlGraphWidget *,QMouseEvent *);
  void mPaint(GlGraphWidget *);
  void keyPressEvent (GlGraphWidget *, QKeyEvent *){}
  void keyReleaseEvent(GlGraphWidget *, QKeyEvent *){}
  void wheelEvent(GlGraphWidget *, QWheelEvent *){}
};
///
class MouseZoomRotZ:public MouseInterface
{
 public:
  MouseZoomRotZ(){}
  ~MouseZoomRotZ(){}
  int x,y;
  void mPressEvent(GlGraphWidget *,QMouseEvent *);
  void mReleaseEvent(GlGraphWidget *,QMouseEvent *);
  void mMoveEvent(GlGraphWidget *,QMouseEvent *);
  void mPaint(GlGraphWidget *);
  void keyPressEvent (GlGraphWidget *, QKeyEvent *){}
  void keyReleaseEvent(GlGraphWidget *, QKeyEvent *){}
  void wheelEvent(GlGraphWidget *, QWheelEvent *){}
};
///
class MouseMove:public MouseInterface
{
 public:
  int x,y;
  MouseMove(){}
  ~MouseMove(){}
  void mPressEvent(GlGraphWidget *,QMouseEvent *);
  void mReleaseEvent(GlGraphWidget *,QMouseEvent *);
  void mMoveEvent(GlGraphWidget *,QMouseEvent *);
  void mPaint(GlGraphWidget *);
  void keyPressEvent (GlGraphWidget *, QKeyEvent *){}
  void keyReleaseEvent(GlGraphWidget *, QKeyEvent *){}
  void wheelEvent(GlGraphWidget *, QWheelEvent *){}
};
///
class MouseSelect:public MouseInterface
{
 public:
  MouseSelect(){}
  ~MouseSelect(){}
  void mPressEvent(GlGraphWidget *,QMouseEvent *);
  void mReleaseEvent(GlGraphWidget *,QMouseEvent *);
  void mMoveEvent(GlGraphWidget *,QMouseEvent *);
  void mPaint(GlGraphWidget *);
  void keyPressEvent (GlGraphWidget *, QKeyEvent *){}
  void keyReleaseEvent(GlGraphWidget *, QKeyEvent *){}
  void wheelEvent(GlGraphWidget *, QWheelEvent *){}
};
///
class MouseDel:public MouseInterface
{
public:
  MouseDel(){}
  ~MouseDel(){}
  void mPressEvent(GlGraphWidget *,QMouseEvent *);
  void mReleaseEvent(GlGraphWidget *,QMouseEvent *);
  void mMoveEvent(GlGraphWidget *,QMouseEvent *);
  void mPaint(GlGraphWidget *);
  void keyPressEvent (GlGraphWidget *, QKeyEvent *){}
  void keyReleaseEvent(GlGraphWidget *, QKeyEvent *){}
  void wheelEvent(GlGraphWidget *, QWheelEvent *){}
};

///
class MouseDelSelection:public MouseInterface
{
public:
  MouseDelSelection(){}
  ~MouseDelSelection(){}
  void mPressEvent(GlGraphWidget *,QMouseEvent *);
  void mReleaseEvent(GlGraphWidget *,QMouseEvent *);
  void mMoveEvent(GlGraphWidget *,QMouseEvent *);
  void mPaint(GlGraphWidget *);
  void keyPressEvent (GlGraphWidget *, QKeyEvent *){}
  void keyReleaseEvent(GlGraphWidget *, QKeyEvent *){}
  void wheelEvent(GlGraphWidget *, QWheelEvent *){}
};

class MouseGraphNavigate: public MouseInterface
{
private:
  MouseInterface *currentMouse;
  MouseZoomRotZ mouseZoomRotZ;
  MouseRotXRotY mouseRotXRotY;
  MouseMove mouseMove;
  
public:
  MouseGraphNavigate();
  ~MouseGraphNavigate();
  void mPressEvent(GlGraphWidget *,QMouseEvent *);
  void mReleaseEvent(GlGraphWidget *,QMouseEvent *);
  void mMoveEvent(GlGraphWidget *,QMouseEvent *);
  void mPaint(GlGraphWidget *);
  void keyPressEvent (GlGraphWidget *, QKeyEvent *);
  void keyReleaseEvent(GlGraphWidget *, QKeyEvent *);
  void wheelEvent(GlGraphWidget *, QWheelEvent *);
};

class Mouse2D: public MouseInterface
{
private:
  MouseInterface *currentMouse;
  MouseSelect mouseSelect;
  MouseMove mouseMove;
  QCursor oldCursor;
  bool controlCursorSet;
public:
  Mouse2D();
  ~Mouse2D();
  void mPressEvent(GlGraphWidget *,QMouseEvent *);
  void mReleaseEvent(GlGraphWidget *,QMouseEvent *);
  void mMoveEvent(GlGraphWidget *,QMouseEvent *);
  void mPaint(GlGraphWidget *);
  void keyPressEvent (GlGraphWidget *, QKeyEvent *);
  void keyReleaseEvent(GlGraphWidget *, QKeyEvent *);
  void wheelEvent(GlGraphWidget *, QWheelEvent *);
};

#endif
