OpendTect  6.3
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 ________________________________________________________________________
10 
11 -*/
12 
13 #include "uibasemod.h"
14 #include "uigeom.h"
15 
16 mFDQtclass(QMouseEvent)
17 mFDQtclass(QRubberBand)
18 mFDQtclass(QWidget)
19 
20 mExpClass(uiBase) uiRubberBand
21 {
22 public:
23  uiRubberBand(mQtclass(QWidget*) p)
24  : parent_(p)
25  , qrubberband_(0)
26  , aspectratio_(mUdf(float)) {}
27  ~uiRubberBand();
28 
29  void start(mQtclass(QMouseEvent*));
30  void extend(mQtclass(QMouseEvent*));
31  void stop(mQtclass(QMouseEvent*));
32 
33  uiPoint origin() const { return origin_; }
34  uiRect area() const { return area_; }
35 
36  void setAspectRatio( float ar ) { aspectratio_ = ar; }
37  float getAspectRatio() const { return aspectratio_; }
38 
39 protected:
40 
41  mQtclass(QRubberBand*) qrubberband_;
42  mQtclass(QWidget*) parent_;
43 
44  uiPoint origin_;
45  uiRect area_;
46 
47  float aspectratio_;
48 
49  void handleEv(mQtclass(QMouseEvent*),bool);
50 };
#define mExpClass(module)
Definition: commondefs.h:157
mFDQtclass(QMouseEvent) mFDQtclass(QRubberBand) mFDQtclass(QWidget) class uiRubberBand
Definition: uirubberband.h:16
Definition: uigeom.h:40
#define mQtclass(cls)
Definition: commondefs.h:232
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:270

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