OpendTect-6_4  6.4
uirubberband.h
Go to the documentation of this file.
1 #ifndef uirubberband_h
2 #define uirubberband_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Nanne Hemstra
9  Date: November 2006
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uibasemod.h"
16 #include "uigeom.h"
17 
18 mFDQtclass(QMouseEvent)
19 mFDQtclass(QRubberBand)
20 mFDQtclass(QWidget)
21 
22 mExpClass(uiBase) uiRubberBand
23 {
24 public:
25  uiRubberBand(mQtclass(QWidget*) p)
26  : parent_(p)
27  , qrubberband_(0)
28  , aspectratio_(mUdf(float)) {}
29  ~uiRubberBand();
30 
31  void start(mQtclass(QMouseEvent*));
32  void extend(mQtclass(QMouseEvent*));
33  void stop(mQtclass(QMouseEvent*));
34 
35  uiPoint origin() const { return origin_; }
36  uiRect area() const { return area_; }
37 
38  void setAspectRatio( float ar ) { aspectratio_ = ar; }
39  float getAspectRatio() const { return aspectratio_; }
40 
41 protected:
42 
43  mQtclass(QRubberBand*) qrubberband_;
44  mQtclass(QWidget*) parent_;
45 
46  uiPoint origin_;
47  uiRect area_;
48 
49  float aspectratio_;
50 
51  void handleEv(mQtclass(QMouseEvent*),bool);
52 };
53 
54 #endif
#define mExpClass(module)
Definition: commondefs.h:160
mFDQtclass(QMouseEvent) mFDQtclass(QRubberBand) mFDQtclass(QWidget) class uiRubberBand
Definition: uirubberband.h:18
Definition: uigeom.h:42
#define mQtclass(cls)
Definition: commondefs.h:229
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019