OpendTect-6_4  6.4
uiodmain.h
Go to the documentation of this file.
1 #ifndef uiodmain_h
2 #define uiodmain_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 "uimainwin.h"
16 #include "multiid.h"
17 
18 class CtxtIOObj;
19 class IOObj;
20 class ODSession;
21 class Timer;
22 class uiMain;
23 class uiDockWin;
24 class uiODApplMgr;
25 class uiODMain;
26 class uiODMenuMgr;
27 class uiODSceneMgr;
28 class uiODViewer2DMgr;
29 class uiToolBar;
30 class uiVisColTabEd;
31 
32 
35 
36 
43 public:
44 
45  uiODMain(uiMain&);
46  ~uiODMain();
47 
48  bool go();
49  void exit();
50 
51  uiODApplMgr& applMgr() { return *applmgr_; }
52  uiODMenuMgr& menuMgr() { return *menumgr_; }
53  uiODSceneMgr& sceneMgr() { return *scenemgr_; }
54  uiODViewer2DMgr& viewer2DMgr() { return *viewer2dmgr_; }
55  uiVisColTabEd& colTabEd() { return *ctabed_; }
56  uiToolBar* colTabToolBar() { return ctabtb_; }
57 
61  IOPar& sessionPars();
62 
65  uiString getProgramName();
66 
67  bool askStore(bool& askedanything,
68  const uiString& actiontype);
71  bool askStoreAttribs(bool,bool& askedanything);
74  bool hasSessionChanged();
76  void saveSession();
77  void restoreSession();
78  void autoSession();
79  bool isRestoringSession() { return restoringsess_; }
80  void setProgramName(const char*);
81  //Default is "OpendTect"
82  void forceExit();
83 
84 protected:
85 
96  uiDockWin* ctabwin_;
98 
100  bool failed_;
101 
102  virtual bool closeOK();
103  void afterSurveyChgCB(CallBacker*);
104  void handleStartupSession();
105  void restoreSession(const IOObj*);
106  void closeApplication();
107 
108 private:
109 
110  mGlobal(uiODMain) friend int ODMain(int,char**);
111 
112  bool ensureGoodDataDir();
113  bool ensureGoodSurveySetup();
114  bool buildUI();
115  void initScene();
116 
117  CtxtIOObj* getUserSessionIOData(bool);
118  bool updateSession();
119  void doRestoreSession();
120 
121  Timer& sesstimer_;
122  Timer& memtimer_;
123  Timer& newsurvinittimer_;
124  bool neednewsurvinit_;
125  void sessTimerCB(CallBacker*);
126  void memTimerCB(CallBacker*);
127  void newSurvInitTimerCB(CallBacker*);
128 
129  uiString getProgramString() const;
130  void translateText();
131 
132 public:
133 
134  bool sceneMgrAvailable() const { return scenemgr_; }
135  bool menuMgrAvailable() const { return menumgr_; }
136  bool viewer2DMgrAvailable() const { return viewer2dmgr_; }
137  void updateCaption();
138 
139 };
140 
141 #endif
bool isRestoringSession()
Definition: uiodmain.h:79
Definition: uitoolbar.h:31
#define mExpClass(module)
Definition: commondefs.h:160
User interface main window.
Definition: uimainwin.h:36
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
Notifier< uiODMain > sessionSave
Put data in pars.
Definition: uiodmain.h:58
uiODViewer2DMgr * viewer2dmgr_
Definition: uiodmain.h:89
Definition: ioobj.h:58
uiODMenuMgr & menuMgr()
Definition: uiodmain.h:52
uiODSceneMgr * scenemgr_
Definition: uiodmain.h:88
Application level manager - ties part servers together.
Definition: uiodapplmgr.h:55
OpendTect application top level object.
Definition: uiodmain.h:41
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
#define mGlobal(module)
Definition: commondefs.h:163
uiToolBar * ctabtb_
Definition: uiodmain.h:91
Notifier< uiODMain > sessionRestoreEarly
Get data from pars, before vis.
Definition: uiodmain.h:59
Definition: uiviscoltabed.h:25
Definition: uistring.h:89
Holds an IOObjCtxt plus a pointer to an IOObj and/or an IOPar.
Definition: ctxtioobj.h:142
ODSession * cursession_
Definition: uiodmain.h:93
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
MultiID cursessid_
Definition: uiodmain.h:99
Definition: uiodviewer2dmgr.h:34
Manages the scenes and the corresponding trees.
Definition: uiodscenemgr.h:47
ODSession & lastsession_
Definition: uiodmain.h:94
uiODSceneMgr & sceneMgr()
Definition: uiodmain.h:53
uiODMenuMgr * menumgr_
Definition: uiodmain.h:87
bool failed_
Definition: uiodmain.h:100
Notifier< uiODMain > sessionRestore
Get data from pars.
Definition: uiodmain.h:60
uiVisColTabEd & colTabEd()
Definition: uiodmain.h:55
uiToolBar * colTabToolBar()
Definition: uiodmain.h:56
uiMain & uiapp_
Definition: uiodmain.h:92
uiVisColTabEd * ctabed_
Definition: uiodmain.h:90
bool menuMgrAvailable() const
Definition: uiodmain.h:135
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
BufferString programname_
Definition: uiodmain.h:97
Definition: uimain.h:30
uiODMain * ODMainWin()
Top-level access for plugins.
uiODViewer2DMgr & viewer2DMgr()
Definition: uiodmain.h:54
uiDockWin * ctabwin_
Definition: uiodmain.h:96
uiODApplMgr * applmgr_
Definition: uiodmain.h:86
Notifier< uiODMain > justBeforeGo
Scenes inited, auto-plugins loaded.
Definition: uiodmain.h:64
bool viewer2DMgrAvailable() const
Definition: uiodmain.h:136
bool restoringsess_
Definition: uiodmain.h:95
uiODApplMgr & applMgr()
Definition: uiodmain.h:51
Timer class.
Definition: timer.h:25
dTect session save/restore
Definition: odsession.h:23
The OpendTect menu manager.
Definition: uiodmenumgr.h:37
Compound key consisting of ints.
Definition: multiid.h:25

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