OpendTect-6_4  6.4
uiodscenemgr.h
Go to the documentation of this file.
1 #ifndef uiodscenemgr_h
2 #define uiodscenemgr_h
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: A.H. Bril
8  Date: Dec 2003
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "uiodmainmod.h"
15 #include "uiodapplmgr.h"
16 #include "uisettings.h"
17 
18 #include "datapack.h"
19 #include "emposid.h"
20 #include "flatview.h"
21 #include "uivispartserv.h"
22 
23 class BufferStringSet;
24 class Timer;
25 class ZAxisTransform;
26 class uiDockWin;
27 class uiFlatViewWin;
28 class uiMdiArea;
29 class uiMdiAreaWindow;
31 class uiODTreeTop;
32 class ui3DViewer;
33 class uiTreeFactorySet;
34 class uiTreeItem;
35 class uiTreeView;
36 class uiWindowGrabber;
37 namespace Pick { class Set; }
38 namespace Geometry { class RandomLineSet; }
39 
40 
49 public:
50 
51  void cleanUp(bool startnew=true);
52  int nrScenes() { return scenes_.size(); }
53  int addScene(bool maximized,ZAxisTransform* =0,
54  const uiString& nm=uiString::emptyString());
56  void setSceneName(int sceneid,const uiString&);
57  uiString getSceneName(int sceneid) const;
61 
62  void getScenePars(IOPar&);
63  void useScenePars(const IOPar&);
64  void setSceneProperties();
65 
66  void setToViewMode(bool yn=true);
67  void setToWorkMode(uiVisPartServer::WorkMode wm);
68  void viewModeChg(CallBacker* cb=0);
69  void actMode(CallBacker* cb=0);
70  void viewMode(CallBacker* cb=0);
71  bool inViewMode() const;
73 
74  void pageUpDownPressed(CallBacker*);
75 
76  void updateStatusBar();
77  void setStereoType(int);
78  int getStereoType() const;
79 
80  void tile();
81  void tileHorizontal();
82  void tileVertical();
83  void cascade();
84  void layoutScenes();
85 
86  void toHomePos(CallBacker*);
87  void saveHomePos(CallBacker*);
88  void viewAll(CallBacker*);
89  void align(CallBacker*);
90  void showRotAxis(CallBacker*);
91  void viewX(CallBacker*);
92  void viewY(CallBacker*);
93  void viewZ(CallBacker*);
94  void viewInl(CallBacker*);
95  void viewCrl(CallBacker*);
96  void switchCameraType(CallBacker*);
97  void mkSnapshot(CallBacker*);
98  void soloMode(CallBacker*);
99  void doDirectionalLight(CallBacker*);
100 
101  void setZoomValue(float);
102  void zoomChanged(CallBacker*);
103  void anyWheelStart(CallBacker*);
104  void anyWheelStop(CallBacker*);
105  void hWheelMoved(CallBacker*);
106  void vWheelMoved(CallBacker*);
107  void dWheelMoved(CallBacker*);
108 
109  int askSelectScene() const; // returns sceneid
110  const ui3DViewer* get3DViewer(int sceneid) const;
111  ui3DViewer* get3DViewer(int sceneid);
112  void get3DViewers(ObjectSet<ui3DViewer>&);
113  void getSceneNames(uiStringSet&,int& act) const;
114  void setActiveScene(int idx);
115  void getActiveSceneName(BufferString&) const;
116  int getActiveSceneID() const;
118 
119  uiODTreeTop* getTreeItemMgr(const uiTreeView*) const;
120  uiODTreeTop* getTreeItemMgr(int sceneid) const;
121 
122  void displayIn2DViewer(int visid,int attribid,
123  bool wva);
124  void remove2DViewer(int visid);
125 
126  void updateTrees();
127  void rebuildTrees();
128  void setItemInfo(int visid);
129  void updateSelectedTreeItem();
130  void updateItemToolbar(int visid);
131  int getIDFromName(const char*) const;
132  void disabRightClick( bool yn );
133  void disabTrees( bool yn );
134 
135  void getLoadedPickSetIDs(TypeSet<MultiID>&,bool poly,
136  int scnid=-1) const;
137  void getLoadedEMIDs(TypeSet<EM::ObjectID>&,
138  const char* emtypestr=0,
139  int sceneid=-1) const;
140  // if sceneid==-1, then all scenes
141  int addEMItem(const EM::ObjectID&,int sceneid=-1);
142  int addPickSetItem(const MultiID&,int sceneid=-1);
143  int addPickSetItem(Pick::Set&,int sceneid=-1);
144  int addRandomLineItem(int rlid,int sceneid=-1);
145  int addWellItem(const MultiID&,int sceneid=-1);
146  int add2DLineItem(Pos::GeomID,int sceneid=-1);
147  int add2DLineItem(const MultiID&,int sceneid=-1);
148  int add2DLineItem(Pos::GeomID,int sceneid,
149  bool withdata);
150  int addInlCrlItem(OD::SliceType,int nr,
151  int sceneid=-1);
152  int addZSliceItem(const TrcKeyZSampling&,
153  int sceneid=-1);
154  int addZSliceItem(const TrcKeyZSampling&,
155  const Attrib::SelSpec&,
156  int sceneid=-1);
157  int addZSliceItem(DataPack::ID,
158  const Attrib::SelSpec&,
160  int sceneid=-1);
161  int addDisplayTreeItem(uiODDisplayTreeItem*,
162  int sceneid=-1);
163 
164  void removeTreeItem(int displayid);
165  uiTreeItem* findItem(int displayid);
166  void findItems(const char*,ObjectSet<uiTreeItem>&);
167  void findItems(const char*,ObjectSet<uiTreeItem>&,
168  int sceneid);
169 
171  uiTreeView* getTree(int sceneid);
172 
173  static int cNameColumn() { return 0; }
174  static int cColorColumn() { return 1; }
175  void setViewSelectMode(int);
176 
177  float getHeadOnLightIntensity(int) const;
178  void setHeadOnLightIntensity(int,float);
179 
180  void translateText();
181 
182  static uiString sElements() { return tr("Elements"); }
183 
184 protected:
185 
187  ~uiODSceneMgr();
188  void initMenuMgrDepObjs();
189 
190  void afterFinalise(CallBacker*);
191 
194  void mdiAreaChanged(CallBacker*);
195 
196  int vwridx_;
199 
200  inline uiODApplMgr& applMgr() { return appl_.applMgr(); }
201  inline uiVisPartServer& visServ() { return *applMgr().visServer(); }
202 
204  {
205  public:
206  Scene(uiMdiArea*);
207  ~Scene();
208 
209  uiDockWin* dw_;
211  uiMdiAreaWindow* mdiwin_;
214  };
215 
217  Scene& mkNewScene();
218  void removeScene(Scene& scene);
219  void removeSceneCB(CallBacker*);
220  void initTree(Scene&,int);
221  Scene* getScene(int sceneid);
222  const Scene* getScene(int sceneid) const;
223  void newSceneUpdated(CallBacker*);
224  void gtLoadedEMIDs(const Scene*,
226  const char* emtypestr) const;
227  void gtLoadedEMIDs(const uiTreeItem*,
229  const char* emtypestr) const;
230  void gtLoadedPickSetIDs(const Scene&,
231  TypeSet<MultiID>&, bool poly) const;
232  void gtLoadedPickSetIDs(const uiTreeItem&,
233  TypeSet<MultiID>&,bool poly) const;
234 
236  void tileTimerCB(CallBacker*);
237 
238  void font3DChanged(CallBacker*);
239 
240  friend class uiODMain;
241 
242  void resetStatusBar(int id=-1);
243 };
244 
249 public:
250  mDefaultFactoryInstantiation2Param( uiSettingsGroup,
252  uiParent*,Settings&,
253  "Mouse interaction",
254  mToUiStringTodo(sFactoryKeyword()));
255 
257 
258 private:
259  bool acceptOK();
260  virtual HelpKey helpKey() const;
261 
265 
269 };
270 
271 #endif
CNotifier< uiODSceneMgr, int > treeAdded
Definition: uiodscenemgr.h:60
#define mExpClass(module)
Definition: commondefs.h:160
od_int32 ObjectID
Definition: emposid.h:24
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
Definition: uiodscenemgr.h:203
CNotifier< uiODSceneMgr, int > sceneClosed
Definition: uiodscenemgr.h:58
static uiString sElements()
Definition: uiodscenemgr.h:182
static int cColorColumn()
Definition: uiodscenemgr.h:174
uiTreeFactorySet * treeItemFactorySet()
Definition: uiodscenemgr.h:170
Application level manager - ties part servers together.
Definition: uiodapplmgr.h:55
OpendTect application top level object.
Definition: uiodmain.h:41
Notifier< uiODSceneMgr > activeSceneChanged
Definition: uiodscenemgr.h:117
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
The Visualization Part Server.
Definition: uivispartserv.h:60
mODTextTranslationClass(uiODSceneMgr) public int nrScenes()
Definition: uiodscenemgr.h:52
uiODMain & appl_
Definition: uiodscenemgr.h:192
BufferString initialkeybinding_
Definition: uiodscenemgr.h:266
static const uiString & emptyString()
Definition: uistring.h:109
Definition: uimdiarea.h:65
Definition: uistring.h:89
Definition: uioddisplaytreeitem.h:24
Definition: uiparent.h:26
uiODTreeTop * itemmanager_
Definition: uiodscenemgr.h:213
Set of BufferString objects.
Definition: bufstringset.h:28
Definition: helpview.h:49
int ID
Definition: datapack.h:38
Definition: uiodscenemgr.h:247
Set of picks with something in common.
Definition: pickset.h:31
CNotifier< uiODSceneMgr, int > treeToBeAdded
Definition: uiodscenemgr.h:59
ObjectSet< Scene > scenes_
Definition: uiodscenemgr.h:216
Notifier< uiODSceneMgr > viewModeChanged
Definition: uiodscenemgr.h:72
Definition: uiwindowgrabber.h:62
int vwridx_
Definition: uiodscenemgr.h:196
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Variable Density (=color-bar driven) parameters.
Definition: flatview.h:205
ui3DViewer * vwr3d_
Definition: uiodscenemgr.h:212
Manages the scenes and the corresponding trees.
Definition: uiodscenemgr.h:47
static int cNameColumn()
Definition: uiodscenemgr.h:173
Definition: ui3dviewer.h:29
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
General Input Element.
Definition: uigeninput.h:58
Definition: uiodtreeitem.h:50
Timer * tiletimer_
Definition: uiodscenemgr.h:235
uiTreeView * lv_
Definition: uiodscenemgr.h:210
Settings class holds the user settings. It is an IOPar.
Definition: settings.h:34
uiVisPartServer & visServ()
Definition: uiodscenemgr.h:201
bool initialmousewheelreversal_
Definition: uiodscenemgr.h:268
Definition: uitreeview.h:33
WorkMode
Definition: uivispartserv.h:326
uiGenInput * trackpadzoomspeedfld_
Definition: uiodscenemgr.h:264
Index_Type GeomID
Definition: commontypes.h:52
float initialzoomfactor_
Definition: uiodscenemgr.h:267
uiGenInput * wheeldirectionfld_
Definition: uiodscenemgr.h:263
uiDockWin * dw_
Definition: uiodscenemgr.h:209
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
SliceType
OpendTect flat slice types.
Definition: oduicommon.h:32
uiTreeFactorySet * tifs_
Definition: uiodscenemgr.h:197
uiGenInput * keybindingfld_
Definition: uiodscenemgr.h:262
Definition: picklocation.h:21
Definition: uisettings.h:63
uiMdiAreaWindow * mdiwin_
Definition: uiodscenemgr.h:211
Specifies an attribute selection (ID or output number of NN).
Definition: attribsel.h:45
Definition: uistring.h:218
uiWindowGrabber * wingrabber_
Definition: uiodscenemgr.h:198
uiODApplMgr & applMgr()
Definition: uiodmain.h:51
Timer class.
Definition: timer.h:25
Base class for windows containing one or more uiFlatViewer(s).
Definition: uiflatviewwin.h:31
#define mDefaultFactoryInstantiation2Param(baseclss, clss, parclss1, parclss2, keywrd, usernm)
Definition: factory.h:309
Base class for z-axis transforms.
Definition: zaxistransform.h:37
#define mToUiStringTodo(i)
Definition: uistring.h:303
Definition: uitreeitemmanager.h:287
uiODApplMgr & applMgr()
Definition: uiodscenemgr.h:200
Definition: uitreeitemmanager.h:34
Definition: arraytesselator.h:21
Compound key consisting of ints.
Definition: multiid.h:25
uiMdiArea * mdiarea_
Definition: uiodscenemgr.h:193

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