OpendTect-6_4  6.4
uiflatviewcontrol.h
Go to the documentation of this file.
1 #ifndef uiflatviewcontrol_h
2 #define uiflatviewcontrol_h
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: Bert
8  Date: Feb 2007
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "uiflatviewmod.h"
15 #include "uigroup.h"
16 #include "iopar.h"
17 #include "flatviewzoommgr.h"
18 
19 class uiFlatViewer;
20 class uiFlatViewPropDlg;
21 class uiTabStackDlg;
22 class MouseEventHandler;
23 namespace FlatView { class Viewer; }
24 
29 mExpClass(uiFlatView) uiFlatViewControl : public uiGroup
30 {
31 public:
32 
34 
35  void addViewer(uiFlatViewer&);
37  void removeViewer(uiFlatViewer&);
38 
39  TypeSet<uiWorldRect>getBoundingBoxes() const;
41  virtual void setNewView(Geom::Point2D<double> mousepos,
42  Geom::Size2D<double> newsize,
43  uiFlatViewer* vwr=0);
53  virtual void flip(bool hor);
55  virtual void doPropertiesDialog(int vieweridx=0);
56 
57  int getViewerIdx(const MouseEventHandler*,bool ofscene);
61 
62  Notifier<uiFlatViewControl> infoChanged; // CallBacker: CBCapsule<IOPar>
66 
67  static uiWorldRect getZoomOrPanRect(Geom::Point2D<double> mousepos,
69  const uiWorldRect& view,
70  const uiWorldRect& bbox);
78  const FlatView::ZoomMgr& zoomMgr() const { return zoommgr_; }
79  void reInitZooms();
80 
81 protected:
82 
84 
89 
91 
92  MouseEventHandler& mouseEventHandler(int vwridx,bool ofscene);
95 
96  virtual void finalPrepare() {}
97  virtual void onFinalise(CallBacker*);
98  virtual bool canReUseZoomSettings( Geom::Point2D<double>,
99  Geom::Size2D<double> ) const;
101  virtual void setNewWorldRect(uiFlatViewer&,uiWorldRect&);
105  virtual void updateZoomManager();
106 
107  virtual void dataChangeCB(CallBacker*);
108  virtual void rubBandCB(CallBacker*);
109  virtual void vwrAdded(CallBacker*) {}
110  virtual void handDragStarted(CallBacker*) {}
111  virtual void handDragging(CallBacker*) {}
112  virtual void handDragged(CallBacker*) {}
113  virtual void mouseMoveCB(CallBacker*);
114  virtual void keyPressCB(CallBacker*) {}
115  virtual void usrClickCB(CallBacker*);
116  virtual bool handleUserClick(int vwridx) { return false; }
117 
118  virtual void propDlgClosed(CallBacker*);
119  virtual void applyProperties(CallBacker* cb);
120  virtual void saveProperties(FlatView::Viewer&);
121 
122  void initZoom(CallBacker*);
123 
124 };
125 
126 #endif
Definition: uigroup.h:54
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
Notifier< uiFlatViewControl > zoomChanged
Definition: uiflatviewcontrol.h:64
uiFlatViewPropDlg * propdlg_
Definition: uiflatviewcontrol.h:90
virtual void vwrAdded(CallBacker *)
Definition: uiflatviewcontrol.h:109
Notifier< uiFlatViewControl > infoChanged
Definition: uiflatviewcontrol.h:62
virtual void handDragged(CallBacker *)
Definition: uiflatviewcontrol.h:112
ObjectSet< uiFlatViewer > vwrs_
Definition: uiflatviewcontrol.h:85
Notifier< uiFlatViewControl > viewerAdded
Definition: uiflatviewcontrol.h:63
Definition: uiparent.h:26
virtual void handDragging(CallBacker *)
Definition: uiflatviewcontrol.h:111
IOPar infopars_
Definition: uiflatviewcontrol.h:88
Flat Viewer using FlatView::Data and FlatView::Appearance.
Definition: flatview.h:324
Basic 2D sizes (width/height) class.
Definition: geometry.h:76
Set of (small) copyable elements.
Definition: commontypes.h:30
FlatView properties dialog box.
Definition: uiflatviewpropdlg.h:29
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
virtual void finalPrepare()
Definition: uiflatviewcontrol.h:96
virtual bool handleUserClick(int vwridx)
Definition: uiflatviewcontrol.h:116
FlatView::ZoomMgr zoommgr_
Definition: uiflatviewcontrol.h:86
bool haverubber_
Definition: uiflatviewcontrol.h:87
Definition: mouseevent.h:162
Tools to control uiFlatViewer(s).
Definition: uiflatviewcontrol.h:29
virtual void setViewToCustomZoomLevel(uiFlatViewer &)
Definition: uiflatviewcontrol.h:100
Notifier< uiFlatViewControl > rubberBandUsed
Definition: uiflatviewcontrol.h:65
Manages zoom factors. Will always provide a new zoom when forward() called, using fwdFac()...
Definition: flatviewzoommgr.h:26
virtual void handDragStarted(CallBacker *)
Definition: uiflatviewcontrol.h:110
virtual void keyPressCB(CallBacker *)
Definition: uiflatviewcontrol.h:114
Definition: uidlggroup.h:86
Definition: bitmap2rgb.h:18
Fulfills the FlatView::Viewer specifications using &#39;ui&#39; classes.
Definition: uiflatviewer.h:33
const FlatView::ZoomMgr & zoomMgr() const
Definition: uiflatviewcontrol.h:78

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