dragComponent.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
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

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)