OpendTect-6_4  6.4
uidatapointset.h
Go to the documentation of this file.
1 #ifndef uidatapointset_h
2 #define uidatapointset_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: Feb 2008
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uiiomod.h"
16 #include "uidialog.h"
17 #include "datapointset.h"
18 #include "bufstringset.h"
19 #include "iopar.h"
20 
21 class uiTable;
22 class uiSpinBox;
23 class uiCheckBox;
24 class uiToolBar;
25 class uiIOObjSelDlg;
26 class uiStatsDisplayWin;
28 class uiDPSDispPropDlg;
29 class uiVariogramDisplay;
30 
33 namespace Stats { template <class T> class RunCalc; }
34 
46 public:
47 
48  typedef int TColID;
49  typedef int TRowID;
52 
53  mStruct(uiIo) Setup : public uiDialog::Setup
55  public:
56  Setup(const uiString& wintitl,bool ismodal=false);
57 
58  mDefSetupMemb(uiString,wintitle)
59  mDefSetupMemb(bool,isconst)
60  mDefSetupMemb(bool,canaddrow)
61  mDefSetupMemb(bool,directremove)
62  mDefSetupMemb(bool,allowretrieve)
63  mDefSetupMemb(int,initialmaxnrlines)
64 
65  };
66 
67 
69  const Setup&,
70  DataPointSetDisplayMgr* mgr=0);
71  ~uiDataPointSet();
72 
73  DataPointSet& pointSet() { return dps_; }
74  const DataPointSet& pointSet() const { return dps_; }
75 
76  bool is2D() const;
77  int size() const { return drowids_.size(); }
79 
80  void setZFactor( float f, const uiString& unnm )
81  { zfac_ = f; zunitnm_ = unnm; }
83 
84  uiTable* table() { return tbl_; }
85  uiToolBar* ioToolBar() { return iotb_; }
86  uiToolBar* dispToolBar() { return disptb_; }
87  uiToolBar* manipToolBar() { return maniptb_; }
88 
89  const char* userName(DRowID did) const;
90  Stats::RunCalc<float>& getRunCalc(DColID) const;
91 
92  IOPar& storePars() { return storepars_; }
93  const IOPar& storePars() const { return storepars_; }
95 
97 
101 
103  DataPointSet::DataRow& after) const
104  { before = beforechgdr_; after = afterchgdr_; }
105 
106  void setCurrent(DColID,DRowID);
107  void setCurrent(const DataPointSet::Pos&,DColID);
108 
109  // Note that groups start at 1!
110  // Thus bss.get(0) => group 1.
111  void setGroupNames( const BufferStringSet& bss )
112  { grpnames_ = bss; }
113  const BufferStringSet& groupNames() const { return grpnames_; }
114  const char* groupName(int) const;
115  void setGroupType( const char* nm )
116  { grptype_ = nm; }
117  const char* groupType() const { return grptype_; }
118 
119  DRowID dRowID(TRowID tid=-99) const;
120  TRowID tRowID(DRowID did=-99) const;
121  DColID dColID(TColID tid=-99) const;
122  TColID tColID(DColID did=-99) const;
123 
124  bool isSelectionValid(DRowID) const;
125  void addRow(const DataPointSet::DataRow&);
126 
127  void notifySelectedCell();
128  void reDoTable();
129  bool posDispTypeChgd() { return posdisptypechgd_; }
130 
131  int getSelectionGroupIdx(int selaareaid) const;
132 
133  const DataPointSetDisplayMgr* displayMgr() const { return dpsdispmgr_; }
135  { dpsdispmgr_ = dispmgr; }
136 
137  void calcSelectedness();
138  void setDisp(DataPointSetDisplayProp*);
139  void showXY(bool yn);
140  void showZ(bool yn);
141 
143 
144 protected:
145 
148  float zfac_;
153 
158  float eachrow_;
160  float percentage_;
161  TColID xcol_;
162  TColID ycol_;
163  TColID y2col_;
164  TColID sortcol_;
165  TColID statscol_;
171  bool showbids_;
173 
175 
176  static const char* sKeyMinDPPts()
177  { return "Minimum pts for Density Plot"; }
188  uiDPSDispPropDlg* dpsdisppropdlg_;
189 
190  void mkToolBars();
191 
192  // default returns current row/col
193  float getVal(DColID,DRowID,bool userunits) const;
194 
195  void calcIdxs();
196  void calcSortIdxs();
197  void redoAll();
198  void updColNames();
199  void fillPos(TRowID);
200  void fillData(TRowID);
201  void handleAxisColChg();
202  void removeHiddenRows();
203  bool saveOK();
204  bool doSave();
205  void setSortedCol(TColID);
206  void unSelXCol();
207 
208  void rowAddedCB(CallBacker*);
209  void initWin(CallBacker*);
210  void selXCol(CallBacker*);
211  void selYCol(CallBacker*);
212  void unSelYCol(CallBacker*);
213  void colStepL(CallBacker*);
214  void colStepR(CallBacker*);
215  void rowClicked(CallBacker*);
216  void selChg(CallBacker*);
217  void valChg(CallBacker*);
218  void eachChg(CallBacker*);
219  void toggleXYZ(CallBacker*);
220  void setSortCol(CallBacker*);
221  void showCrossPlot(CallBacker*);
222  void showStatsWin(CallBacker*);
223  void retrieve(CallBacker*);
224  void save(CallBacker*);
225  void manage(CallBacker*);
226  void delSelRows(CallBacker*);
227  void showStatusMsg(CallBacker*);
228  void closeNotify(CallBacker*);
229  void showSelPts(CallBacker*);
230  void removeSelPts(CallBacker*);
231  void addColumn(CallBacker*);
232  void removeColumn(CallBacker*);
233  void compVertVariogram(CallBacker*);
234  void chgPosDispType(CallBacker*);
235 
236  bool acceptOK(CallBacker*);
237  bool rejectOK(CallBacker*);
238  void showPtsInWorkSpace(CallBacker*);
239  void applClosingCB(CallBacker*);
240 
243  void xplotSelChg(CallBacker*);
244  void xplotRemReq(CallBacker*);
245  void xplotClose(CallBacker*);
246  void getXplotPos(DColID&,DRowID&) const;
247 
249  void statsClose(CallBacker*);
250  void showStats(DColID);
251 
252  bool isDisp(bool) const;
253  void handleSelRows();
254  void setStatsMarker(DRowID);
255  void handleGroupChg(DRowID);
256 
258 
259 private:
260 
261  int initVars();
262 
263 public:
264  float getValue( DColID did, DRowID rid ,
265  bool userunits ) const
266  { return getVal(did,rid,userunits); }
267  void setUnsavedChg( bool chg )
268  { unsavedchgs_ = chg; }
269  int nrPosCols() const;
270 };
271 
272 
273 #endif
Definition: uitoolbar.h:31
#define mExpClass(module)
Definition: commondefs.h:160
float getVal(int colid, int rid) const
bool unsavedchgs_
Definition: uidatapointset.h:169
description of properties of dialog.
Definition: uidialog.h:51
void setGroupNames(const BufferStringSet &bss)
Definition: uidatapointset.h:111
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
float eachrow_
Definition: uidatapointset.h:158
TypeSet< TRowID > trowids_
often -1
Definition: uidatapointset.h:155
uiTable * table()
Definition: uidatapointset.h:84
FixedString Setup()
Definition: keystrs.h:116
uiDataPointSetCrossPlotWin * xplotwin_
Definition: uidatapointset.h:242
Set of data points with group selection.
Definition: datapointset.h:48
bool showbids_
Definition: uidatapointset.h:171
TColID xcol_
Definition: uidatapointset.h:161
TColID ycol_
Definition: uidatapointset.h:162
DataPointSet::DataRow beforechgdr_
Definition: uidatapointset.h:167
const IOPar & storePars() const
Definition: uidatapointset.h:93
#define mStruct(module)
Definition: commondefs.h:165
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
DataPointSet & pointSet()
Definition: uidatapointset.h:73
TypeSet< TRowID > revsortidxs_
Definition: uidatapointset.h:157
uiToolBar * ioToolBar()
Definition: uidatapointset.h:85
TColID sortcol_
Definition: uidatapointset.h:164
int dispxytbid_
Definition: uidatapointset.h:185
void setDisplayMgr(DataPointSetDisplayMgr *dispmgr)
Definition: uidatapointset.h:134
int RowID
Definition: datapointset.h:52
int TRowID
Definition: uidatapointset.h:49
int ColID
Definition: datapointset.h:53
Definition: uitable.h:30
bool fillingtable_
Definition: uidatapointset.h:170
const DataPointSet & pointSet() const
Definition: uidatapointset.h:74
IOPar storepars_
Definition: uidatapointset.h:150
DataPointSet crossplotter.
Definition: uidatapointsetcrossplot.h:47
Definition: uistring.h:89
Definition: uiparent.h:26
uiToolBar * maniptb_
Definition: uidatapointset.h:181
Set of BufferString objects.
Definition: bufstringset.h:28
ObjectSet< uiVariogramDisplay > variodlgs_
Definition: uidatapointset.h:257
Real Coord3D-position storable in BinIDValueSet + trc nr.
Definition: datapointset.h:58
#define mDeclInstanceCreatedNotifierAccess(clss)
Definition: callback.h:450
void getChanges(DataPointSet::DataRow &before, DataPointSet::DataRow &after) const
Definition: uidatapointset.h:102
DataPointSet display manager.
Definition: dpsdispmgr.h:104
Definition: uidialog.h:42
TypeSet< DRowID > drowids_
Definition: uidatapointset.h:154
Definition: uiioobjseldlg.h:35
Set of pointers to objects.
Definition: commontypes.h:32
ObjectSet< Stats::RunCalc< float > > runcalcs_
Definition: uidatapointset.h:166
uiToolBar * disptb_
Definition: uidatapointset.h:180
float plotpercentage_
Definition: uidatapointset.h:159
Notifier< uiDataPointSet > valueChanged
Definition: uidatapointset.h:94
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
const DataPointSetDisplayMgr * displayMgr() const
Definition: uidatapointset.h:133
Notifier< uiDataPointSet > selPtsToBeShown
Definition: uidatapointset.h:96
bool posdisptypechgd_
Definition: uidatapointset.h:172
static const char * sKeyMinDPPts()
Definition: uidatapointset.h:176
bool posDispTypeChgd()
Definition: uidatapointset.h:129
float zfac_
Definition: uidatapointset.h:148
DataPointSet::RowID DRowID
Definition: uidatapointset.h:51
void setUnsavedChg(bool chg)
Definition: uidatapointset.h:267
DataPointSetDisplayMgr * dpsdispmgr_
Definition: uidatapointset.h:174
TColID statscol_
Definition: uidatapointset.h:165
CNotifier< uiDataPointSet, int > rowRemoved
Definition: uidatapointset.h:100
DataPointSet::ColID DColID
Definition: uidatapointset.h:50
Data Point Set Cross Plotter Main window.
Definition: uidatapointsetcrossplotwin.h:28
Interface for DataPointSet Displays.
Definition: dpsdispmgr.h:37
#define mDefSetupMemb(typ, memb)
Definition: commondefs.h:137
DataPointSet & dps_
Definition: uidatapointset.h:146
Notifier< uiDataPointSet > rowAdded
Definition: uidatapointset.h:98
uiToolBar * iotb_
Definition: uidatapointset.h:179
void setGroupType(const char *nm)
Definition: uidatapointset.h:115
Definition: uispinbox.h:24
int dispztbid_
Definition: uidatapointset.h:186
float percentage_
Definition: uidatapointset.h:160
Data point with group. Group 0 means &#39;inactive&#39;, it can never be selected.
Definition: datapointset.h:102
uiCheckBox * showbidsfld_
Definition: uidatapointset.h:183
uiIOObjSelDlg * curseldlg_
Definition: uidatapointset.h:187
int size() const
number of displayable rows
Definition: uidatapointset.h:77
TColID y2col_
Definition: uidatapointset.h:163
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
BufferString grptype_
Definition: uidatapointset.h:152
bool is2D(const PicksType &picks)
Definition: pickset.h:142
Edit DataPointSet.
Definition: uidatapointset.h:44
Definition: uivariogram.h:45
BufferStringSet grpnames_
Definition: uidatapointset.h:151
TypeSet< TRowID > sortidxs_
Definition: uidatapointset.h:156
Statistics.
Definition: array2dinterpol.h:28
CNotifier< uiDataPointSet, int > rowToBeRemoved
Definition: uidatapointset.h:99
Stats display main window. See uistatsdisplay.h for details.
Definition: uistatsdisplaywin.h:25
uiStatsDisplayWin * statswin_
Definition: uidatapointset.h:248
uiDPSDispPropDlg * dpsdisppropdlg_
Definition: uidatapointset.h:188
int TColID
Definition: uidatapointset.h:48
const BufferStringSet & groupNames() const
Definition: uidatapointset.h:113
uiSpinBox * percfld_
Definition: uidatapointset.h:182
int xplottbid_
Definition: uidatapointset.h:184
uiTable * tbl_
Definition: uidatapointset.h:178
Definition: uibutton.h:134
uiToolBar * manipToolBar()
Definition: uidatapointset.h:87
DataPointSet::DataRow afterchgdr_
Definition: uidatapointset.h:168
const char * groupType() const
Definition: uidatapointset.h:117
uiString zunitnm_
Definition: uidatapointset.h:149
Setup setup_
Definition: uidatapointset.h:147
void setZFactor(float f, const uiString &unnm)
Default is SI().zDomain().userFactor()
Definition: uidatapointset.h:80
IOPar & storePars()
Definition: uidatapointset.h:92
uiToolBar * dispToolBar()
Definition: uidatapointset.h:86
float getValue(DColID did, DRowID rid, bool userunits) const
Definition: uidatapointset.h:264

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