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

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