OpendTect-6_4  6.4
uiflatviewer.h
Go to the documentation of this file.
1 #ifndef uiflatviewer_h
2 #define uiflatviewer_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 "flatview.h"
17 #include "threadwork.h"
18 #include "uiworld2ui.h"
19 
20 namespace FlatView { class uiAuxDataDisplay; }
21 
22 class AxesDrawer;
23 class MouseEventHandler;
24 class uiBitMapDisplay;
25 class uiFlatViewControl;
27 class uiGraphicsView;
28 
33 mExpClass(uiFlatView) uiFlatViewer : public uiGroup
34  , public FlatView::Viewer
35 {
36 public:
38  ~uiFlatViewer();
39 
40  void setInitialSize(const uiSize&);
41 
42  int getAnnotChoices(BufferStringSet&) const;
43  void setAnnotChoice(int);
44 
46  uiGraphicsView& rgbCanvas() { return *view_; }
47 
48  void setView(const uiWorldRect&);
49  void setViewToBoundingBox();
50  const uiWorldRect& curView() const { return wr_; }
52  StepInterval<double> posRange(bool forx1) const;
53  uiWorldRect boundingBox() const;
54 
55  const uiWorld2Ui& getWorld2Ui() const { return w2ui_; }
56  uiRect getViewRect(bool withextraborders=true) const;
59  uiBorder getAnnotBorder() const;
60  void setBoundingRect(const uiRect&);
65  void setExtraBorders(const uiSize& lt,const uiSize& rb);
66  void setExtraFactor( float f ) { extfac_ = f; }
69  void updateBitmapsOnResize( bool yn )
70  { updatebitmapsonresize_ = yn; }
76  { return updatebitmapsonresize_; }
77 
78  void handleChange(unsigned int);
79  void setSeisGeomidsToViewer(TypeSet<Pos::GeomID>&);
80 
81  FlatView::AuxData* createAuxData(const char* nm) const;
82  int nrAuxData() const;
83  FlatView::AuxData* getAuxData(int idx);
84  const FlatView::AuxData* getAuxData(int idx) const;
85  void addAuxData(FlatView::AuxData* a);
86  FlatView::AuxData* removeAuxData(FlatView::AuxData* a);
87  FlatView::AuxData* removeAuxData(int idx);
88  void reGenerate(FlatView::AuxData&);
89 
97 
98  uiFlatViewControl* control() { return control_; }
99 
100  //restrain the data ranges between the selected ranges
101  void setUseSelDataRanges(bool yn) { useseldataranges_ = yn; }
102  void setSelDataRanges(Interval<double>,Interval<double>);
103  const Interval<double>& getSelDataRange(bool forx) const
104  { return forx ? xseldatarange_ : yseldatarange_; }
105  static int bitMapZVal() { return 0; }
106  static int auxDataZVal() { return 100; }
107  static int annotZVal() { return 200; }
108 
109  const FlatPosData* getFlatPosData(bool iswva);
110 
111 protected:
112 
113 
120 
122 
126 
127  void updateCB(CallBacker*);
128  void updateAnnotCB(CallBacker*);
129  void updateBitmapCB(CallBacker*);
130  void updateAuxDataCB(CallBacker*);
131 
132  uiWorldRect getBoundingBox(bool wva) const;
133  void reSizeCB(CallBacker*);
134 
136  float extfac_;
137 
138  void updateTransforms();
139 
141  friend class uiFlatViewControl;
142 
146 
148 
149 public:
150  uiBitMapDisplay* bitmapDisp() { return bitmapdisp_; }
151 protected:
152  void rangeUpdatedCB(CallBacker*);
153 
154 };
155 
156 #endif
Class to provide coordinate conversion between a cartesian coordinate system (or any other transforme...
Definition: uiworld2ui.h:55
Definition: uigroup.h:54
void setUseSelDataRanges(bool yn)
Definition: uiflatviewer.h:101
#define mExpClass(module)
Definition: commondefs.h:160
Notifier< uiFlatViewer > dataChanged
new DataPack set
Definition: uiflatviewer.h:91
Class that represents non-bitmap data to be displayed in a flatviewer, such as markers, lines and more.
Definition: flatview.h:34
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
Definition: uigeom.h:42
AxesDrawer & axesdrawer_
Must be declared after canvas_.
Definition: uiflatviewer.h:115
Positioning of flat &#39;bulk&#39; data. Only the &#39;x1&#39; axis can be irregular.
Definition: flatposdata.h:26
uiWorld2Ui w2ui_
Definition: uiflatviewer.h:119
Notifier< uiFlatViewer > annotChanged
Annotation changed.
Definition: uiflatviewer.h:94
uiFlatViewControl * control_
Definition: uiflatviewer.h:140
Notifier< uiFlatViewer > dispParsChanged
Triggered with each bitmap update.
Definition: uiflatviewer.h:92
Interval< double > yseldatarange_
Definition: uiflatviewer.h:144
const uiWorld2Ui & getWorld2Ui() const
Definition: uiflatviewer.h:55
Definition: uiparent.h:26
Set of BufferString objects.
Definition: bufstringset.h:28
MouseEventHandler & getMouseEventHandler()
static int auxDataZVal()
Definition: uiflatviewer.h:106
Threads::Atomic< bool > updateauxdata_
Definition: uiflatviewer.h:125
bool updatebitmapsonresize_
Definition: uiflatviewer.h:135
Definition: uigeom.h:25
ObjectSet< FlatView::uiAuxDataDisplay > auxdata_
Definition: uiflatviewer.h:147
Notifier< uiFlatViewer > viewChanged
setView called
Definition: uiflatviewer.h:90
uiBitMapDisplay * bitmapDisp()
Definition: uiflatviewer.h:150
Definition: uigraphicsitem.h:157
bool useseldataranges_
Definition: uiflatviewer.h:145
uiFlatViewControl * control()
Definition: uiflatviewer.h:98
static int annotZVal()
Definition: uiflatviewer.h:107
static int bitMapZVal()
Definition: uiflatviewer.h:105
float extfac_
Definition: uiflatviewer.h:136
uiGraphicsView * view_
Definition: uiflatviewer.h:114
void setExtraFactor(float f)
Definition: uiflatviewer.h:66
uiWorldRect wr_
Definition: uiflatviewer.h:116
Interval< double > xseldatarange_
Definition: uiflatviewer.h:143
Definition: mouseevent.h:162
Tools to control uiFlatViewer(s).
Definition: uiflatviewcontrol.h:29
void updateBitmapsOnResize(bool yn)
Definition: uiflatviewer.h:69
const Interval< double > & getSelDataRange(bool forx) const
Definition: uiflatviewer.h:103
Definition: uigeom.h:78
const uiWorldRect & curView() const
Definition: uiflatviewer.h:50
Takes the flat-data from a FlatViewer and puts it into a uiGraphicsItem.
Definition: uibitmapdisplay.h:33
Axis drawer for flat viewers.
Definition: flatviewaxesdrawer.h:25
uiBitMapDisplay * bitmapdisp_
Definition: uiflatviewer.h:121
Definition: uigraphicsview.h:51
uiGraphicsView & rgbCanvas()
Definition: uiflatviewer.h:46
Threads::Atomic< bool > updatebitmap_
Definition: uiflatviewer.h:124
Definition: bitmap2rgb.h:18
Fulfills the FlatView::Viewer specifications using &#39;ui&#39; classes.
Definition: uiflatviewer.h:33
bool updatesBitmapsOnResize() const
Definition: uiflatviewer.h:75
uiGraphicsItemGroup * worldgroup_
Definition: uiflatviewer.h:118
Notifier< uiFlatViewer > dispPropChanged
Triggered with property dlg change.
Definition: uiflatviewer.h:95
Threads::Atomic< bool > updateannot_
Definition: uiflatviewer.h:123

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