OpendTect  6.3
visscenecoltab.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: Nanne Hemstra
8  Date: August 2008
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "visobject.h"
14 #include "coltabsequence.h"
15 
16 class FontData;
17 namespace osg { class Geode; }
18 
19 
20 namespace visBase
21 {
22 
23 class VisColorTab;
24 
27 public:
28  static SceneColTab* create()
30 
31  enum Pos { Left, Right, Top, Bottom };
32  void setPos( Pos pos );
33  Pos getPos() const { return pos_; }
34 
35  void setWindowSize(int winx, int winy);
36 
37  void setOrientation(bool horizontal);
38  bool getOrientation() const { return horizontal_; }
39 
40  void setAnnotFont(const FontData&);
41 
42  void setColTabSequence(const ColTab::Sequence&);
43  void setColTabMapper(const ColTab::Mapper&);
44  void setLegendColor(const Color&);
45 
46  bool turnOn(bool);
47  void setSize(int w,int h);
48  Geom::Size2D<int> getSize();
49 
50  virtual void setPixelDensity(float dpi);
51 
52 
53 protected:
54 
55  ~SceneColTab();
56  void updateDisplay();
57  void setPos(float x, float y);
58  void coltabChgCB( CallBacker* ) { updateDisplay(); }
59 
60  osg::Geode* osgcolorbar_;
65  int width_;
66  int height_;
67  float aspratio_;
68  int winx_;
69  int winy_;
71  int fontsize_;
72 
73 };
74 
75 } // class visBase
int width_
Definition: visscenecoltab.h:65
#define mExpClass(module)
Definition: commondefs.h:157
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:182
void turnOn(int flag)
Overrides the envirnonment variable.
ConstRefMan< ColTab::Mapper > mapper_
Definition: visscenecoltab.h:62
float pixeldensity_
Definition: visscenecoltab.h:70
float aspratio_
Definition: visscenecoltab.h:67
#define mODTextTranslationClass(clss)
Definition: uistring.h:37
A series of color control points able to give an (interpolated) color for every position [0...
Definition: coltabsequence.h:37
int winx_
Definition: visscenecoltab.h:68
bool horizontal_
Definition: visscenecoltab.h:64
Data needed to make an actual font.
Definition: fontdata.h:18
Maps data values to color sequence positions: [0,1].
Definition: coltabmapper.h:33
bool getOrientation() const
Definition: visscenecoltab.h:38
int height_
Definition: visscenecoltab.h:66
Pos getPos() const
Definition: visscenecoltab.h:33
Position.
Definition: commontypes.h:38
int fontsize_
Definition: visscenecoltab.h:71
Definition: visscenecoltab.h:31
Definition: visannot.h:40
Definition: visscenecoltab.h:25
static SceneColTab * create()
Definition: visscenecoltab.h:28
int winy_
Definition: visscenecoltab.h:69
Open Scene Graph.
Definition: visannot.h:26
void coltabChgCB(CallBacker *)
Definition: visscenecoltab.h:58
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:24
Pos pos_
Definition: visscenecoltab.h:63
#define mCreateDataObj(clss)
Definition: visdata.h:210
ConstRefMan< ColTab::Sequence > sequence_
Definition: visscenecoltab.h:61
Definition: visobject.h:67
osg::Geode * osgcolorbar_
Definition: visscenecoltab.h:60

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