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

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