OpendTect  6.6
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  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "uiiomod.h"
15 #include "factory.h"
16 #include "transl.h"
17 
18 class uiButton;
19 class uiParent;
20 class uiToolButtonSetup;
21 
22 
31 {
32 public:
33 
35  virtual ~uiIOObjInserter();
36 
37  mDefineFactoryInClasswKW( uiIOObjInserter, factory, factoryName() )
38 
39  const char* name() const { return transl_.userName(); }
40  const char* factoryName() const { return transl_.getDisplayName(); }
41 
42  static bool allDisabled();
43  bool isDisabled() const;
44 
45  static bool isPresent(const TranslatorGroup&);
46  static bool isPresent( const Translator& t )
47  { return factory().hasName(t.getDisplayName()); }
48 
55  const BufferStringSet& trnotallowed);
56  static uiIOObjInserter* create( const Translator& t )
57  { return factory().create(t.getDisplayName()); }
58 
59  virtual uiToolButtonSetup* getButtonSetup() const = 0;
60  bool hasTranslator( const Translator& trl ) const
61  { return &transl_ == &trl; }
62 
65  void setIOObjCtxt(const IOObjContext&);
67 
68 protected:
69 
71 
72 };
73 
74 
uiIOObjInserter::isDisabled
bool isDisabled() const
uiIOObjInserter::transl_
const Translator & transl_
Definition: uiioobjinserter.h:70
uiIOObjInserter::isPresent
static bool isPresent(const Translator &t)
Definition: uiioobjinserter.h:46
factory.h
uiIOObjInserter::allDisabled
static bool allDisabled()
uiIOObjInserter::isPresent
static bool isPresent(const TranslatorGroup &)
ObjectSet< uiIOObjInserter >
BufferStringSet
Set of BufferString objects.
Definition: bufstringset.h:26
CtxtIOObj
Holds an IOObjCtxt plus a pointer to an IOObj and/or an IOPar.
Definition: ctxtioobj.h:146
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
CallBacker
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:185
uiIOObjInserter::uiIOObjInserter
uiIOObjInserter(const Translator &)
uiIOObjInserter::setIOObjCtxt
void setIOObjCtxt(const IOObjContext &)
uiIOObjInserter::create
static uiIOObjInserter * create(const Translator &t)
Definition: uiioobjinserter.h:56
uiIOObjInserter::hasTranslator
bool hasTranslator(const Translator &trl) const
Definition: uiioobjinserter.h:60
IOObjContext
Holds the context for selecting and/or creating IOObjs.
Definition: ctxtioobj.h:62
uiIOObjInserter::factoryName
const char * factoryName() const
Definition: uiioobjinserter.h:40
Notifier< uiIOObjInserter >
Translator::getDisplayName
const char * getDisplayName() const
"username [group]"
TranslatorGroup
Group of Translators. Has a static factory.
Definition: transl.h:56
uiIOObjInserter::~uiIOObjInserter
virtual ~uiIOObjInserter()
uiIOObjInserter::getButtonSetup
virtual uiToolButtonSetup * getButtonSetup() const =0
uiIOObjInserter
inserts a new object into the OD data store.
Definition: uiioobjinserter.h:31
uiIOObjInserter::mDefineFactoryInClasswKW
mDefineFactoryInClasswKW(uiIOObjInserter, factory, factoryName()) const char *name() const
Definition: uiioobjinserter.h:37
uiIOObjInserter::objectInserted
Notifier< uiIOObjInserter > objectInserted
pass a CBCapsule<MultiID> in trigger(),
Definition: uiioobjinserter.h:63
uiToolButtonSetup
Definition: uitoolbutton.h:90
Translator
I/O Interpreter class for a certain object type.
Definition: transl.h:123
transl.h
uiParent
Definition: uiparent.h:26
uiIOObjInserter::addInsertersToDlg
static void addInsertersToDlg(uiParent *, CtxtIOObj &, ObjectSet< uiIOObjInserter > &, ObjectSet< uiButton > &, const BufferStringSet &trnotallowed)
uiIOObjInserter::addInsertersToDlg
static void addInsertersToDlg(uiParent *, CtxtIOObj &, ObjectSet< uiIOObjInserter > &, ObjectSet< uiButton > &)
uiIOObjInserter::getIOObjCtxt
IOObjContext * getIOObjCtxt() const

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