OpendTect-6_4  6.4
uiioobjinserter.h
Go to the documentation of this file.
1 #ifndef uiioobjinserter_h
2 #define uiioobjinserter_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: July 2014
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uiiomod.h"
16 #include "factory.h"
17 #include "transl.h"
18 
19 class uiButton;
20 class uiParent;
21 class uiToolButtonSetup;
22 
23 
32 {
33 public:
34 
36  : objectInserted(this)
37  , transl_(trl) {}
38  virtual ~uiIOObjInserter() {}
39 
40  mDefineFactoryInClasswKW( uiIOObjInserter, factory, factoryName() )
41 
42  const char* name() const { return transl_.userName(); }
43  const char* factoryName() const { return transl_.getDisplayName(); }
44 
45  static bool allDisabled();
46  bool isDisabled() const;
47 
48  static bool isPresent(const TranslatorGroup&);
49  static bool isPresent( const Translator& t )
50  { return factory().hasName(t.getDisplayName()); }
51 
52  static void addInsertersToDlg(uiParent*,CtxtIOObj&,
55  static uiIOObjInserter* create( const Translator& t )
56  { return factory().create(t.getDisplayName()); }
57 
58  virtual uiToolButtonSetup* getButtonSetup() const = 0;
59  bool hasTranslator( const Translator& trl ) const
60  { return &transl_ == &trl; }
61 
64 
65 protected:
66 
68 
69 };
70 
71 
72 #endif
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
mDefineFactoryInClasswKW(uiIOObjInserter, factory, factoryName()) const char *name() const
Definition: uiioobjinserter.h:40
virtual ~uiIOObjInserter()
Definition: uiioobjinserter.h:38
Definition: uiparent.h:26
static bool isPresent(const Translator &t)
Definition: uiioobjinserter.h:49
Holds an IOObjCtxt plus a pointer to an IOObj and/or an IOPar.
Definition: ctxtioobj.h:142
uiIOObjInserter(const Translator &trl)
Definition: uiioobjinserter.h:35
const char * factoryName() const
Definition: uiioobjinserter.h:43
Definition: uitoolbutton.h:76
Group of Translators. Has a static factory.
Definition: transl.h:56
inserts a new object into the OD data store.
Definition: uiioobjinserter.h:31
static uiIOObjInserter * create(const Translator &t)
Definition: uiioobjinserter.h:55
I/O Interpreter class for a certain object type.
Definition: transl.h:123
bool hasTranslator(const Translator &trl) const
Definition: uiioobjinserter.h:59
const Translator & transl_
Definition: uiioobjinserter.h:67
const char * getDisplayName() const
"username [group]"
Notifier< uiIOObjInserter > objectInserted
pass a CBCapsule<MultiID> in trigger(),
Definition: uiioobjinserter.h:62

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