OpendTect-6_4  6.4
uisurvey.h
Go to the documentation of this file.
1 #ifndef uisurvey_h
2 #define uisurvey_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Nanne Hemstra
9  Date: June 2001
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uiiomod.h"
16 #include "uidialog.h"
17 #include "bufstring.h"
18 
19 class BufferStringSet;
20 class SurveyInfo;
21 class uiButton;
22 class uiLabel;
23 class uiLineEdit;
24 class uiListBox;
25 class uiSurveyMap;
26 class uiSurvInfoProvider;
27 class uiTextEdit;
28 
29 
32 mExpClass(uiIo) uiSurvey : public uiDialog
34 
35 public:
37  ~uiSurvey();
38 
39  static void getSurveyList(BufferStringSet&,const char* dataroot=0,
40  const char* excludenm=0);
41 
42  static bool survTypeOKForUser(bool is2d);
45 
47  struct Util
48  {
49  Util( const char* pixmap, const uiString& tooltip,
50  const CallBack& cb )
51  : cb_(cb)
52  , pixmap_(pixmap)
53  , tooltip_(tooltip) {}
54 
58  };
59  static void add(const Util&);
60 
61  SurveyInfo* curSurvInfo() { return cursurvinfo_; }
62  const SurveyInfo* curSurvInfo() const { return cursurvinfo_; }
63 
64  const char* selectedSurveyName() const;
65  bool freshSurveySelected() const
66  { return freshsurveyselected_; }
67  bool hasSurveys() const;
68  bool currentSurvRemoved() const { return cursurvremoved_; }
69 
70 protected:
71 
81 
84  uiButton* editbut_;
85  uiButton* rmbut_;
89  bool parschanged_;
92 
93  bool acceptOK(CallBacker*);
94  bool rejectOK(CallBacker*);
95  void newButPushed(CallBacker*);
96  void rmButPushed(CallBacker*);
97  void editButPushed(CallBacker*);
98  void copyButPushed(CallBacker*);
99  void importButPushed(CallBacker*);
100  void exportButPushed(CallBacker*);
101  void dataRootPushed(CallBacker*);
102  void dataRootInfoCB(CallBacker*);
103  void odSettsButPush(CallBacker*);
104  void utilButPush(CallBacker*);
105  void selChange(CallBacker*);
106  void updateInfo( CallBacker* ) { putToScreen(); }
107 
108  void updateSurveyNames();
109  void readSurvInfoFromFile();
110  void setCurrentSurvInfo(SurveyInfo*,bool updscreen=true);
111  void updateDataRootLabel();
112  void updateSurvList();
113  void putToScreen();
114  bool writeSettingsSurveyFile();
115  bool writeSurvInfoFileIfCommentChanged();
116  bool rootDirWritable() const;
117  bool doSurvInfoDialog(bool isnew);
118  void updateDataRootInSettings();
119  void rollbackNewSurvey(const uiString&);
120 
121 private:
122  void fillLeftGroup(uiGroup*);
123  void fillRightGroup(uiGroup*);
124 };
125 
126 #endif
uiSurvInfoProvider * impsip_
Definition: uisurvey.h:78
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
Definition: uitextedit.h:74
The main survey selection dialog.
Definition: uisurvey.h:32
BufferStringSet surveydirs_
Definition: uisurvey.h:80
uiButton * editbut_
Definition: uisurvey.h:84
uiTextEdit * infofld_
Definition: uisurvey.h:87
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
SurveyInfo * curSurvInfo()
Definition: uisurvey.h:61
const BufferString orgdataroot_
Definition: uisurvey.h:73
Definition: uistring.h:89
Definition: uiparent.h:26
ObjectSet< uiButton > utilbuts_
Definition: uisurvey.h:86
Holds survey general information.
Definition: survinfo.h:45
Util(const char *pixmap, const uiString &tooltip, const CallBack &cb)
Definition: uisurvey.h:49
Set of BufferString objects.
Definition: bufstringset.h:28
uiSurveyMap * survmap_
Definition: uisurvey.h:76
uiButton * rmbut_
Definition: uisurvey.h:85
Definition: uidialog.h:42
List Box.
Definition: uilistbox.h:75
Definition: uisip.h:51
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
uiListBox * dirfld_
Definition: uisurvey.h:83
bool currentSurvRemoved() const
Definition: uisurvey.h:68
BufferString dataroot_
Definition: uisurvey.h:74
Definition: uisurvmap.h:82
BufferString initialsurveyname_
Definition: uisurvey.h:75
uiString tooltip_
Definition: uisurvey.h:57
&#39;Menu&#39; item on window. First is always &#39;X,Y <-> I/C&#39;
Definition: uisurvey.h:47
uiTextEdit * notesfld_
Definition: uisurvey.h:88
BufferString pixmap_
Definition: uisurvey.h:56
BufferStringSet surveynames_
Definition: uisurvey.h:79
IOPar * impiop_
Definition: uisurvey.h:77
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
uiLineEdit * datarootlbl_
Definition: uisurvey.h:82
Definition: uilabel.h:24
SurveyInfo * cursurvinfo_
Definition: uisurvey.h:72
bool parschanged_
of initial survey only
Definition: uisurvey.h:89
void updateInfo(CallBacker *)
Definition: uisurvey.h:106
bool freshsurveyselected_
Definition: uisurvey.h:91
Definition: uilineedit.h:51
const SurveyInfo * curSurvInfo() const
Definition: uisurvey.h:62
CallBacks object-oriented (object + method).
Definition: callback.h:57
bool freshSurveySelected() const
Definition: uisurvey.h:65
bool cursurvremoved_
Definition: uisurvey.h:90
CallBack cb_
Definition: uisurvey.h:55

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