OpendTect-6_4  6.4
uidirectionalplot.h
Go to the documentation of this file.
1 #ifndef uidirectionalplot_h
2 #define uidirectionalplot_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: Mar 2009
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uitoolsmod.h"
16 #include "uitoolsmod.h"
17 #include "uigraphicsview.h"
18 #include "statdirdata.h"
19 #include "draw.h"
20 
21 class uiTextItem;
22 class uiLineItem;
23 class uiCircleItem;
24 class uiColTabItem;
25 class uiCurvedItem;
26 class uiMarkerItem;
27 class uiGraphicsItem;
29 namespace ColTab { class Sequence; }
30 
43 public:
44 
45  mStruct(uiTools) Setup
46  {
47  enum Type { Rose, Scatter, Vals };
48  Setup( Type t=Rose )
49  : type_(t)
50  , circlels_(OD::LineStyle::Solid)
51  , sectorls_(OD::LineStyle::Solid)
52  , equils_(OD::LineStyle::Dot)
53  , markstyle_(MarkerStyle2D::Circle)
54  , hlmarkstyle_(MarkerStyle2D::Square,4,
55  Color::Green())
56  , docount_(false)
57  , curissel_(true)
58  , valcolor_(true)
59  , clipratio_(0.02)
60  , prefsize_(400,400) {}
61 
62  mDefSetupMemb(Type,type)
66  mDefSetupMemb(MarkerStyle2D,markstyle)
67  mDefSetupMemb(MarkerStyle2D,hlmarkstyle) // Highlight marker style
68  mDefSetupMemb(bool,curissel) // Must clicked sector become selected?
69  mDefSetupMemb(bool,docount) // Show count rather than val_ (Vals)
70  mDefSetupMemb(bool,valcolor) // Use val_ to color (Rose)
71  mDefSetupMemb(float,clipratio) // Vals
72  mDefSetupMemb(BufferString,hdrannot)
73  mDefSetupMemb(BufferString,nameforpos)
74  mDefSetupMemb(BufferString,nameforval)
75  mDefSetupMemb(uiSize,prefsize)
76  };
77 
80 
81  void setData(const Stats::DirectionalData&);
82  void setData(const float*,int);
83  Stats::DirectionalData::Setup& dataSetup() { return data_.setup_; }
84 
85  Setup& setup() { return setup_; }
86  const Stats::DirectionalData& data() const { return data_; }
87 
88  int nrSectors() const { return data().size(); }
89  int size() const { return nrSectors(); }
90  float angle( int s ) const { return data_.angle(s); }
91 
93  int curSector() const { return cursector_; }
94  int selSector() const { return selsector_; }
95  void setSelectedSector( int i )
96  { selsector_ = i; }
97 
98  void setColTab(const char* nm);
99  void showColTabItem(bool);
100  void showScaleItem(bool);
101 
102  void setNrEquicircles(int);
103  void getMousePosInfo(int& count,float& angle,
104  float& pos);
105 
106  void setHighlighted(const TypeSet<int>&);
107  void setHighlighted(int);
108 
109 protected:
110 
114 
115  bool isempty_;
120  int radius_;
124 
142 
143  void mouseRelease(CallBacker*);
144  void reSized(CallBacker*);
145 
146  void gatherInfo();
147  void draw();
148  void drawGrid();
149  void drawData();
150  void drawScatter();
151  void drawVals();
152  void drawRose();
153  void drawSelection();
154  uiCurvedItem* drawSectorPart(int,Interval<float>,Color);
155  void drawSectorParts(bool);
156 
157  void drawAnnot();
158  void drawDirAnnot();
159  void drawHeader();
160  void drawScale();
161  void drawColTab();
162 
163  uiPoint dataUIPos(float r,float ang) const;
164  uiPoint usrUIPos(float r,float ang) const;
165 
166 };
167 
168 #endif
#define mExpClass(module)
Definition: commondefs.h:160
uiGraphicsItemGroup & curveitems_
Definition: uidirectionalplot.h:134
uiMarkerItem * scalestartptitem_
Definition: uidirectionalplot.h:136
Setup & setup()
Definition: uidirectionalplot.h:85
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
FixedString Setup()
Definition: keystrs.h:116
A circle of data.
Definition: statdirdata.h:55
int curSector() const
Definition: uidirectionalplot.h:93
static Color Green()
Definition: color.h:80
const ColTab::Sequence * colseq_
Definition: uidirectionalplot.h:123
#define mStruct(module)
Definition: commondefs.h:165
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Definition: draw.h:64
Maps from [0,1] -> Color.
Definition: coltabsequence.h:37
int selsector_
Definition: uidirectionalplot.h:122
uiGraphicsItemGroup & sectorlines_
Definition: uidirectionalplot.h:125
uiCurvedItem * selsectoritem_
Definition: uidirectionalplot.h:127
Definition: draw.h:60
Definition: draw.h:118
int cursector_
Definition: uidirectionalplot.h:121
Definition: uigraphicsitemimpl.h:408
uiColTabItem * coltabitm_
Definition: uidirectionalplot.h:141
uiPoint center_
Definition: uidirectionalplot.h:119
Definition: draw.h:122
uiTextItem * scalestopitm_
Definition: uidirectionalplot.h:140
Stats::DirectionalData data_
Definition: uidirectionalplot.h:112
int size() const
Definition: uidirectionalplot.h:89
Definition: uiparent.h:26
Definition: uigraphicsitemimpl.h:337
int radius_
Definition: uidirectionalplot.h:120
bool isempty_
Definition: uidirectionalplot.h:115
ObjectSet< uiLineItem > dirlnitms_
Definition: uidirectionalplot.h:132
uiTextItem * scaleannotitm_
Definition: uidirectionalplot.h:138
Definition: uigeom.h:25
uiCircleItem * outercircleitm_
Definition: uidirectionalplot.h:126
TypeSet< int > highlightidxs_
Definition: uidirectionalplot.h:113
float angle(int s) const
Definition: uidirectionalplot.h:90
Definition: uigraphicsitem.h:157
int maxcount_
Definition: uidirectionalplot.h:118
ObjectSet< uiCircleItem > equicircles_
Definition: uidirectionalplot.h:130
Definition: statdirdata.h:59
Definition: draw.h:122
ObjectSet< uiTextItem > dirtxtitms_
Definition: uidirectionalplot.h:131
Interval< float > valrg_
Definition: uidirectionalplot.h:117
#define mDefSetupMemb(typ, memb)
Definition: commondefs.h:137
int selSector() const
Definition: uidirectionalplot.h:94
uiTextItem * hdrannotitm1_
Definition: uidirectionalplot.h:128
Definition: uigraphicsitemimpl.h:98
Type
Definition: angles.h:27
Definition: uigraphicscoltab.h:26
uiCurvedItem * scalearcitm_
Definition: uidirectionalplot.h:137
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Stats::DirectionalData::Setup & dataSetup()
Definition: uidirectionalplot.h:83
const Stats::DirectionalData & data() const
Definition: uidirectionalplot.h:86
Interval< float > posrg_
Definition: uidirectionalplot.h:116
uiGraphicsItemGroup & markeritems_
Definition: uidirectionalplot.h:133
Setup setup_
Definition: uidirectionalplot.h:111
Definition: uigraphicsview.h:51
Color Table
Definition: coltab.h:22
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
Definition: uigraphicsitemimpl.h:273
int nrSectors() const
Definition: uidirectionalplot.h:88
Definition: draw.h:64
creates a directional plot: Rose diagrams and more.
Definition: uidirectionalplot.h:41
uiLineItem * scalelineitm_
Definition: uidirectionalplot.h:135
void setSelectedSector(int i)
Definition: uidirectionalplot.h:95
Definition: uigraphicsitemimpl.h:110
uiTextItem * hdrannotitm2_
Definition: uidirectionalplot.h:129
uiTextItem * scalestartitm_
Definition: uidirectionalplot.h:139
Notifier< uiDirectionalPlot > sectorPicked
Definition: uidirectionalplot.h:92

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