Go to the documentation of this file.00001
00002
00003
00004
00005
00008
00009 #ifndef dragComponent_H_
00010 #define dragComponent_H_
00011
00012 #include "lgrGui.h"
00013 #include <QtCore/QPoint>
00014
00015 class QMouseEvent;
00016
00017 namespace MAKLogger
00018 {
00019
00021 class DT_DLL_LGRGUI DtDragComponent
00022 {
00023 public:
00024
00026 DtDragComponent();
00027
00029 virtual ~DtDragComponent();
00030
00032 void registerMousePress(const QMouseEvent& e);
00033
00035 void registerMouseRelease(const QMouseEvent& e);
00036
00038 void registerMouseMove(const QMouseEvent& e);
00039
00041 QPoint absolutePosition() const;
00042
00045 QPoint relativePosition() const;
00046
00048 QPoint relativeVelocity() const;
00049
00051 bool currentlyDragging() const;
00052
00053 protected:
00054 QPoint myFirstPosition;
00055 QPoint myLastPosition;
00056 QPoint myCurrentPosition;
00057
00058 bool myDownFlag;
00059 };
00060
00061 }
00062
00063 #endif