OpendTect-6_4  6.4
uiioobjseldlg.h
Go to the documentation of this file.
1 #ifndef uiioobjseldlg_h
2 #define uiioobjseldlg_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H. Bril
9  Date: April 2001
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uiiomod.h"
16 #include "uidialog.h"
17 #include "uiioobjselgrp.h"
18 
24 public:
25 
27  : uiDialog(p,s) {}
28 
29  virtual const IOObj* ioObj() const = 0;
30 
31  virtual uiIOObjSelGrp* selGrp() { return 0; }
32 };
33 
34 
37 public:
38 
40  {
41  public:
43  : titletext_(titletxt)
44  , multisel_(false)
45  , allowsetsurvdefault_(true)
46  , withwriteopts_(true)
47  , withinserters_(true) {}
48 
49  mDefSetupMemb(uiString,titletext)
50  mDefSetupMemb(bool,multisel)
51  mDefSetupMemb(bool,allowsetsurvdefault)
52  mDefSetupMemb(bool,withwriteopts)
53  mDefSetupMemb(bool,withinserters)
54  };
55 
57  const uiString& titletxt=uiString::emptyString());
58  uiIOObjSelDlg(uiParent*,const Setup&,const CtxtIOObj&);
59 
60  int nrChosen() const { return selgrp_->nrChosen(); }
61  const MultiID& chosenID(int i=0) const { return selgrp_->chosenID(i); }
62  void getChosen( TypeSet<MultiID>& ids ) const
63  { selgrp_->getChosen( ids ); }
64  void getChosen( BufferStringSet& nms ) const
65  { selgrp_->getChosen( nms ); }
66  void chooseAll( bool yn=true ) { selgrp_->chooseAll( yn ); }
67 
68  const IOObj* ioObj() const;
69 
70  uiIOObjSelGrp* selGrp() { return selgrp_; }
71  bool fillPar( IOPar& i ) const {return selgrp_->fillPar(i);}
72  void usePar( const IOPar& i ) { selgrp_->usePar(i); }
73 
74  void setSurveyDefaultSubsel(const char*);
75  bool isForRead();
76 
77 protected:
78 
80  { return selgrp_->updateCtxtIOObj(); }
81  void statusMsgCB(CallBacker*);
82 
83  Setup setup_;
85 
86 private:
87 
88  void init(const CtxtIOObj&);
89  static uiString selTxt(bool forread);
90 
91 };
92 
93 
94 #endif
#define mExpClass(module)
Definition: commondefs.h:160
description of properties of dialog.
Definition: uidialog.h:51
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
Definition: ioobj.h:58
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Dialog letting the user select an object. It returns an IOObj* after successful go().
Definition: uiioobjseldlg.h:22
void getChosen(TypeSet< MultiID > &ids) const
Definition: uiioobjseldlg.h:62
bool init()
static const uiString & emptyString()
Definition: uistring.h:109
Definition: uistring.h:89
Definition: uiparent.h:26
Setup setup_
Definition: uiioobjseldlg.h:83
bool fillPar(IOPar &i) const
Definition: uiioobjseldlg.h:71
Set of BufferString objects.
Definition: bufstringset.h:28
Holds an IOObjCtxt plus a pointer to an IOObj and/or an IOPar.
Definition: ctxtioobj.h:142
Definition: uidialog.h:42
Definition: uiioobjseldlg.h:35
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
int nrChosen() const
Definition: uiioobjseldlg.h:60
Setup(const uiString &titletxt=uiString::emptyString())
Definition: uiioobjseldlg.h:42
#define mDefSetupMemb(typ, memb)
Definition: commondefs.h:137
bool acceptOK(CallBacker *)
confirm accept
Definition: uiioobjseldlg.h:79
uiIOObjRetDlg(uiParent *p, const Setup &s)
Definition: uiioobjseldlg.h:26
Definition: uiioobjseldlg.h:39
uiIOObjSelGrp * selGrp()
Definition: uiioobjseldlg.h:70
void getChosen(BufferStringSet &nms) const
Definition: uiioobjseldlg.h:64
const MultiID & chosenID(int i=0) const
Definition: uiioobjseldlg.h:61
uiIOObjSelGrp * selgrp_
Definition: uiioobjseldlg.h:84
void usePar(const IOPar &i)
Definition: uiioobjseldlg.h:72
Basic group for letting the user select an object.
Definition: uiioobjselgrp.h:46
void chooseAll(bool yn=true)
Definition: uiioobjseldlg.h:66
Compound key consisting of ints.
Definition: multiid.h:25
virtual uiIOObjSelGrp * selGrp()
Definition: uiioobjseldlg.h:31

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