Tulip  4.6.0
Better Visualization Through Research
library/tulip-gui/include/tulip/DragHandle.h
00001 /*
00002  *
00003  * This file is part of Tulip (www.tulip-software.org)
00004  *
00005  * Authors: David Auber and the Tulip development Team
00006  * from LaBRI, University of Bordeaux
00007  *
00008  * Tulip is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation, either version 3
00011  * of the License, or (at your option) any later version.
00012  *
00013  * Tulip is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016  * See the GNU General Public License for more details.
00017  *
00018  */
00019 ///@cond DOXYGEN_HIDDEN
00020 
00021 
00022 #ifndef _DRAGHANDLE_H
00023 #define _DRAGHANDLE_H
00024 
00025 #include <QLabel>
00026 
00027 namespace tlp {
00028 
00029 class WorkspacePanel;
00030 
00031 class DragHandle : public QLabel {
00032   Q_OBJECT
00033 public:
00034   explicit DragHandle(QWidget* parent = NULL, Qt::WindowFlags f = 0);
00035   virtual void mousePressEvent(QMouseEvent* ev);
00036   virtual void mouseReleaseEvent(QMouseEvent* ev);
00037   virtual void mouseMoveEvent(QMouseEvent* ev);
00038 
00039   void setPanel(tlp::WorkspacePanel* panel);
00040 
00041 private:
00042   tlp::WorkspacePanel* _panel;
00043   bool _pressed;
00044   QPoint _clickPosition;
00045 };
00046 
00047 }
00048 #endif //_DRAGHANDLE_H
00049 ///@endcond
 All Classes Files Functions Variables Enumerations Enumerator Properties