OpendTect-6_4  6.4
uihistogramsel.h
Go to the documentation of this file.
1 #ifndef uihistogramsel_h
2 #define uihistogramsel_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Raman Singh
9  Date: May 2018
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "uitoolsmod.h"
15 #include "uigroup.h"
16 #include "uihistogramdisplay.h"
17 
18 
19 mExpClass(uiTools) uiHistogramSel : public uiGroup
20 {
21 public:
24  int an_id=0);
25  ~uiHistogramSel();
26 
27  int ID() const { return id_; }
28  void setID( int id ) { id_ = id; }
29 
30  void setEmpty();
31  bool setDataPackID(DataPack::ID,DataPackMgr::ID,
32  int version);
33  void setData(const Array2D<float>*);
34  void setData(const float*,int sz);
35  void setMarkValue(float,bool forx);
36 
37  const Interval<float>& getDataRange() const { return datarg_; }
38  void setDataRange(const Interval<float>&);
39  const Interval<float>& getSelRange() const { return cliprg_; }
40  void setSelRange(const Interval<float>&);
41 
42  uiHistogramDisplay& getDisplay() { return *histogramdisp_; }
43 
45 
46 protected:
47 
48  int id_;
51 
56 
59  int startpix_;
60  int stoppix_;
61 
62  bool mousedown_;
63 
64  virtual void drawAgain();
65  virtual void useClipRange() {}
66 
67  void init();
68  void drawText();
69  void drawLines();
70  bool changeLinePos(bool pressedonly=false);
71 
72  void mousePressed(CallBacker*);
73  void mouseMoved(CallBacker*);
74  void mouseReleased(CallBacker*);
75 
76  void histogramResized(CallBacker*);
77  void histDRChanged(CallBacker*);
78 };
79 
80 #endif
Definition: uigroup.h:54
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
int id_
Definition: uihistogramsel.h:48
FixedString Setup()
Definition: keystrs.h:116
int stoppix_
Definition: uihistogramsel.h:60
virtual void useClipRange()
Definition: uihistogramsel.h:65
int startpix_
Definition: uihistogramsel.h:59
uiTextItem * minvaltext_
Definition: uihistogramsel.h:54
void setID(int id)
Definition: uihistogramsel.h:28
uiTextItem * maxvaltext_
Definition: uihistogramsel.h:55
bool init()
uiLineItem * maxhandle_
Definition: uihistogramsel.h:53
int ID
Each Mgr has its own ID.
Definition: datapack.h:147
Handles an axis on a plot.
Definition: uiaxishandler.h:51
uiAxisHandler * xax_
Definition: uihistogramsel.h:50
Definition: uiparent.h:26
Definition: uihistogramsel.h:19
int ID
Definition: datapack.h:38
bool mousedown_
Definition: uihistogramsel.h:62
uiHistogramDisplay & getDisplay()
Definition: uihistogramsel.h:42
ID id() const
Definition: datapack.h:56
uiLineItem * minhandle_
Definition: uihistogramsel.h:52
Interval< float > datarg_
Definition: uihistogramsel.h:57
Notifier< uiHistogramSel > rangeChanged
Definition: uihistogramsel.h:44
Definition: uihistogramdisplay.h:26
Interval< float > cliprg_
Definition: uihistogramsel.h:58
uiHistogramDisplay * histogramdisp_
Definition: uihistogramsel.h:49
const ID id_
Definition: datapack.h:76
int ID() const
Definition: uihistogramsel.h:27
const Interval< float > & getDataRange() const
Definition: uihistogramsel.h:37
Definition: uigraphicsitemimpl.h:273
void setEmpty()
Definition: uigraphicsitemimpl.h:110
const Interval< float > & getSelRange() const
Definition: uihistogramsel.h:39

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