OpendTect-6_4  6.4
uistratreftree.h
Go to the documentation of this file.
1 #ifndef uistratreftree_h
2 #define uistratreftree_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: June 2007
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uistratmod.h"
16 #include "callback.h"
17 #include "ranges.h"
18 #include "stratunitref.h"
19 #include "uistring.h"
20 
21 class uiPixmap;
22 class uiParent;
23 class uiTreeView;
24 class uiTreeViewItem;
25 namespace Strat {
26  class RefTree;
27  class NodeUnitRef;
28 }
29 
30 
35 public:
36 
38  ~uiStratRefTree();
39 
40  void setTree();
41  void setTree(Strat::RefTree&,bool force =false);
42  void setName(const char*);
43  const char* name() const;
44 
45  const Strat::RefTree* tree() const { return tree_; }
46 
47  uiTreeView* treeView() { return lv_; }
48  const uiTreeView* treeView() const { return lv_; }
49  uiTreeViewItem* getLVItFromFullCode(const char*) const;
50  void expand(bool) const;
51  void makeTreeEditable(bool) const;
52  void handleMenu(uiTreeViewItem*);
53  void updateUnitsPixmaps();
54  void updateLithoCol();
55  void moveUnit(bool);
56  bool canMoveUnit(bool);
57 
58  bool anyChg() const { return anychange_; }
59  void setNoChg() { anychange_ = false; }
60 
61  void setEntranceDefaultTimes();
62  bool haveTimes() const;
63 
64 protected:
65 
67 
69  bool anychange_;
70 
71  void rClickCB(CallBacker*);
72  void mousePressedCB(CallBacker*);
73 
74  void insertSubUnit(uiTreeViewItem*);
75  void subdivideUnit(uiTreeViewItem*);
76  void updateUnitProperties(uiTreeViewItem*);
77  void removeUnit(uiTreeViewItem*);
78  void assignLevelBoundary(uiTreeViewItem*);
79  bool isLeaved(uiTreeViewItem*) const;
80 
81  void setUnitLvl(const char*);
82 
83  BufferString getFullCodeFromLVIt(const uiTreeViewItem*) const;
84  void insertUnitInLVIT(uiTreeViewItem*,int,
85  const Strat::UnitRef&) const;
86 
87  void addNode(uiTreeViewItem*,const Strat::NodeUnitRef&,bool);
88  uiPixmap* createUnitPixmap(const Color&) const;
89  //becomes yours!
90  Strat::NodeUnitRef* replaceUnit(Strat::NodeUnitRef&,bool byleaved);
91  void addLithologies(Strat::LeavedUnitRef&,
92  const TypeSet<int>&);
93 
94  void setNodesDefaultTimes(const Strat::NodeUnitRef&);
95  void getAvailableTime(const Strat::NodeUnitRef&,
96  Interval<float>&) const;
97  void ensureUnitTimeOK(Strat::NodeUnitRef&);
98  int getChildIdxFromTime(const Strat::NodeUnitRef&,
99  float) const;
100 
101  friend class uiStratDispToTree;
102 };
103 
104 
105 #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
UnitRef for units containing Leaf units only.
Definition: stratunitref.h:199
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
bool anychange_
Definition: uistratreftree.h:69
const Strat::RefTree * tree() const
Definition: uistratreftree.h:45
Definition: uiparent.h:26
Definition: uitreeview.h:201
uiTreeView * lv_
Definition: uistratreftree.h:68
UnitRef for units containing other units only.
Definition: stratunitref.h:118
void setNoChg()
Definition: uistratreftree.h:59
Definition: uitreeview.h:33
Reference data for a stratigraphic unit.
Definition: stratunitref.h:38
Off-screen pixel-based paint device.
Definition: uipixmap.h:34
uiTreeView * treeView()
Definition: uistratreftree.h:47
const uiTreeView * treeView() const
Definition: uistratreftree.h:48
Stratigraphy.
Definition: stratlevel.h:26
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Tree of UnitRef&#39;s.
Definition: stratreftree.h:29
Strat::RefTree * tree_
Definition: uistratreftree.h:66
bool anyChg() const
Definition: uistratreftree.h:58
Definition: uistratdispdata.h:193
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
Displays a Strat::RefTree.
Definition: uistratreftree.h:33

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