OpendTect-6_4  6.4
uiobjectitemviewwin.h
Go to the documentation of this file.
1 #ifndef uiobjectitemviewwin_h
2 #define uiobjectitemviewwin_h
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: Bruno
8  Date: May 2011
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "uitoolsmod.h"
15 #include "uimainwin.h"
16 #include "uigroup.h"
17 #include "uiobjectitemview.h"
18 #include "scaler.h"
19 #include "uistring.h"
20 
21 class uiCheckBox;
22 class uiObjectItem;
23 class uiObjectItemView;
27 class uiSlider;
28 class uiToolBar;
29 class uiToolButton;
31 class uiAxisHandler;
32 class uiBorder;
33 
40 public:
41 
42  mExpClass(uiTools) Setup
43  {
44  public:
45 
46  Setup(const char* title)
47  : wintitle_(title)
48  , startwidth_(400)
49  , startheight_(600)
50  , infoheight_(50)
51  , layoutpos_(0,0)
52  {}
53 
54  mDefSetupMemb(BufferString,wintitle)
55  mDefSetupMemb(int,startwidth)
56  mDefSetupMemb(int,startheight)
57  mDefSetupMemb(int,infoheight)
58  mDefSetupMemb(uiPoint,layoutpos)
59  };
60 
62 
63 
64  int nrItems() const { return mainviewer_->nrItems(); }
65  uiObjectItemView* mainViewer() { return mainviewer_; }
66 
67  void addObject(uiObject* grp,uiObject* infogrp=0);
68  void addGroup(uiGroup* grp,uiGroup* infogrp=0);
69 
70  void removeObject(uiObject*);
71  void removeGroup(uiGroup*);
72 
73  void insertObject(int idx,uiObject*,uiObject* info=0);
74  void insertGroup(int idx,uiGroup*,uiGroup* info=0);
75 
76  void removeAllItems();
77 
78  virtual void fillPar(IOPar&) const;
79  virtual void usePar(const IOPar&);
80 
81  static const char* sKeyHZoomVal() { return "Horizontal Zoom Value"; }
82  static const char* sKeyVZoomVal() { return "Vertical Zoom Value"; }
83 
84 protected:
85 
87 
89 
94 
98 
99  float hslval_;
100  float vslval_;
104 
105  void init();
106  void makeSliders();
107  void setUpView();
108  virtual void reSizeItems();
109  virtual void scaleVal(float&,bool,bool);
110 
111  void addItem(uiObjectItem* itm,uiObjectItem* infoitm=0);
112  void insertItem(int idx,uiObjectItem*,uiObjectItem* info=0);
113 
114  void reSizeCB(CallBacker*);
115  void fitToScreen(CallBacker*);
116  void reSizeSld(CallBacker*);
117  void rubBandCB(CallBacker*);
118  void scrollBarCB(CallBacker*);
119 };
120 
121 
124 public:
125 
127 
128  void addItem(uiObjectItem*,uiObjectItem* coupleditm);
129  virtual void addItem( uiObjectItem* itm, int stretch=1 )
130  { return uiObjectItemView::addItem(itm,stretch); }
131  void insertItem(uiObjectItem*,uiObjectItem* cplitm,int idx);
132  virtual void insertItem(uiObjectItem* itm,int pos,int st=1)
133  { return uiObjectItemView::insertItem(itm,pos,st); }
134 
135  void removeItem(uiObjectItem* itm);
136  void updateItemsPos();
137  void reSizeItems();
138 
139  void removeItemByCouple(uiObjectItem* coupleditem);
140 
141 protected:
143 };
144 
145 
146 
149 public :
151 
152  virtual uiToolBar* toolBar() { return toolbar_;}
153 
154  void setRubberBandingOn(bool);
155  void changeStatus();
156 
157 protected:
158 
163 
164  void setToolButtons();
165  void stateCB(CallBacker*);
166  void keyPressedCB(CallBacker*);
167 };
168 
169 
172 public:
174 
175  void setZRange(Interval<float>);
176  uiAxisHandler* getAxis() const { return zax_; }
177 
178 protected:
179 
184 
185  void setAxisRelations();
186  void plotAxis(CallBacker*);
187 };
188 
189 
190 #endif
Definition: uigroup.h:54
Definition: uitoolbar.h:31
#define mExpClass(module)
Definition: commondefs.h:160
User interface main window.
Definition: uimainwin.h:36
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
uiToolButton * manipdrawbut_
Definition: uiobjectitemviewwin.h:161
virtual void insertItem(uiObjectItem *, int pos, int stretch=1)
Definition of a mouse cursor, can be either a predefined shape (from the enum, or a file...
Definition: mousecursor.h:26
Definition: uislider.h:42
uiSize screensz_
Definition: uiobjectitemviewwin.h:102
Definition: uigraphicsscene.h:133
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Embeds some uiObjects in a uiGraphicsView following a horizontal layout. Objects can be dynamically r...
Definition: uiobjectitemview.h:27
float vslval_
Definition: uiobjectitemviewwin.h:100
uiGraphicsObjectScene * scene_
Definition: uiobjectitemviewwin.h:181
ObjectSet< uiObjectItem > coupleditems_
Definition: uiobjectitemviewwin.h:142
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
bool init()
Definition: uiobjectitemviewwin.h:147
uiSlider * horsliderfld_
Definition: uiobjectitemviewwin.h:91
uiObjectItemView & mainviewer_
Definition: uiobjectitemviewwin.h:159
Handles an axis on a plot.
Definition: uiaxishandler.h:51
virtual void addItem(uiObjectItem *itm, int stretch=1)
Definition: uiobjectitemviewwin.h:129
A uiMainWin that holds embedded uiObjects and controls.
Definition: uiobjectitemviewwin.h:38
int nrItems() const
Definition: uiobjectitemviewwin.h:64
The base class for most UI elements.
Definition: uiobj.h:38
uiToolButton * fittoscreenbut_
Definition: uiobjectitemviewwin.h:92
Definition: uiparent.h:26
Setup(const char *title)
Definition: uiobjectitemviewwin.h:46
uiBorder border_
Definition: uiobjectitemviewwin.h:183
Definition: uigeom.h:25
virtual void insertItem(uiObjectItem *itm, int pos, int st=1)
Definition: uiobjectitemviewwin.h:132
uiObjectItemView * mainViewer()
Definition: uiobjectitemviewwin.h:65
Definition: uiobjectitemviewwin.h:42
uiAxisHandler * getAxis() const
Definition: uiobjectitemviewwin.h:176
uiCheckBox * zoomratiofld_
Definition: uiobjectitemviewwin.h:93
Definition: uiobjectitemviewwin.h:122
static const char * sKeyVZoomVal()
Definition: uiobjectitemviewwin.h:82
Definition: uigraphicsitemimpl.h:52
bool fittoscreen_
Definition: uiobjectitemviewwin.h:103
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
#define mDefSetupMemb(typ, memb)
Definition: commondefs.h:137
static const char * sKeyHZoomVal()
Definition: uiobjectitemviewwin.h:81
uiToolBar * toolbar_
Definition: uiobjectitemviewwin.h:160
uiObjectItemView & viewer_
Definition: uiobjectitemviewwin.h:180
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
int startheight_
Definition: uiobjectitemviewwin.h:96
uiObjectItemView * mainviewer_
Definition: uiobjectitemviewwin.h:86
Definition: uigeom.h:78
virtual void addItem(uiObjectItem *, int stretch=1)
uiParent const uiString & title
pops a selector box to select a new font
Definition: uifont.h:27
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
int startwidth_
Definition: uiobjectitemviewwin.h:95
float hslval_
Definition: uiobjectitemviewwin.h:99
Definition: uitoolbutton.h:22
uiSlider * versliderfld_
Definition: uiobjectitemviewwin.h:90
MouseCursor cursor_
Definition: uiobjectitemviewwin.h:162
LinScaler scaler_
Definition: uiobjectitemviewwin.h:101
virtual uiToolBar * toolBar()
Definition: uiobjectitemviewwin.h:152
uiAxisHandler * zax_
Definition: uiobjectitemviewwin.h:182
int infoheight_
Definition: uiobjectitemviewwin.h:97
Definition: uibutton.h:134
uiObjectItemViewInfoBar * infobar_
Definition: uiobjectitemviewwin.h:88
Definition: uiobjectitemviewwin.h:170
Linear scaling.
Definition: scaler.h:55

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