UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
seismic_area.hpp
1 /* seismic_area.hpp */
2 /* $Id$ */
3 #ifndef __seismic_area_hpp
4 #define __seismic_area_hpp
5 //------------------------------------------------------------------------------------------
6 
7 #include <QPen>
8 #include <QFont>
9 
10 #include <zq4/zqb_natgroup.hpp>
11 #include <zq4/zqb_svoptions.hpp>
12 #include <zq4/zd_seismic_set.hpp>
13 
14 class QPaintDevice;
15 
17 namespace hds
18 {
21  {
22  public:
23 
26  {
29 
31  CoordAxisVisMode(int i_hwId,
32  const QPen &i_scalePen,
33  const QFont &i_scaleFont,
34  const QPen &i_titlePen,
35  const QFont &i_titleFont);
36 
37  int hwId;
39  QPen scalePen;
40  QFont scaleFont;
41  QPen titlePen;
42  QFont titleFont;
43  };
44 
45  //------------------------------------------------------------------------------------------
46 
49  {
53  };
54 
56  enum ShowMode
57  {
62  };
63 
64  //------------------------------------------------------------------------------------------
65 
67  struct ViewOptions
68  {
71  bDrawTimeGrid = false;
72  bAutoTimeTickStep = true;
73  timeTickStep = 300.;
74  showMode =
78 
79  // painting
80  timeScalePen.setColor(Qt::blue);
81  timeTitlePen.setColor(Qt::blue);
82  };
83 
84  //------------------------------------------------------------------------------------------
85 
88 
90  int showMode;
91 
93  bool bDrawTimeGrid;
94 
97 
99  double timeTickStep;
100 
101 
103  QPen timeScalePen, timeTitlePen;
104  QFont timeScaleFont, timeTitleFont;
105  };
106 
108  SeismicArea();
109 
111  virtual ~SeismicArea();
112 
113 
115  virtual void attachData(ZdSeismicSet &seis_set) = 0;
116 
118  virtual void detachData() = 0;
119 
121  virtual ZdSeismicSet* data() {return NULL;}
122 
123 
128  virtual void redraw(bool repaint_flag = true) = 0;
129 
130 
132  virtual ViewOptions& options() {return m_options;}
133 
134 
136  virtual void addCoordAxis(const CoordAxisVisMode &axis) {/* Nothing to do. */ (void)axis;}
137 
139  virtual void removeCoordAxes() {/* Nothing to do. */}
140 
142  virtual size_t coordAxesNum() const {return 0;}
143 
146  virtual bool getCoordAxisVisMode(size_t id, CoordAxisVisMode &axis_vis_mode) const
147  {(void)id; (void)axis_vis_mode; return false;}
148 
151  virtual bool setCoordAxisVisMode(size_t id, const CoordAxisVisMode &axis_vis_mode)
152  {(void)id; (void)axis_vis_mode; return false;}
153 
154 
156  virtual void setInteractiveMode(int imode)
157  {m_interactive_mode = imode;}
158 
160  virtual int interactiveMode() const
161  {return m_interactive_mode;}
162 
163 
164 
166  const ZqbNatGroup &getTimeNaturalGroup() const {return m_time_ng;}
167 
170 
172  const ZqbNatGroup &getCoordNaturalGroup() const {return m_coord_ng;}
173 
176 
177 
179  bool loadDefaults(const QString &fname);
180 
182  bool saveDefaults(const QString &fname) const;
183 
184 
185  protected:
186 
189 
192 
194  int m_interactive_mode;
195  };
196 };
197 
198 #endif /* seismic_area.hpp */
virtual void addCoordAxis(const CoordAxisVisMode &axis)
Definition: seismic_area.hpp:136
const ZqbNatGroup & getTimeNaturalGroup() const
Definition: seismic_area.hpp:166
ZqbNatGroup & getTimeNaturalGroup()
Definition: seismic_area.hpp:169
const ZqbNatGroup & getCoordNaturalGroup() const
Definition: seismic_area.hpp:172
double timeTickStep
Definition: seismic_area.hpp:99
Definition: seismic_area.hpp:52
ZqbNatGroup m_coord_ng
Definition: seismic_area.hpp:188
Definition: zqb_natgroup.hpp:35
virtual void redraw(bool repaint_flag=true)=0
ShowMode
Definition: seismic_area.hpp:56
QPen titlePen
Definition: seismic_area.hpp:41
QFont titleFont
Definition: seismic_area.hpp:42
Definition: seismic_area.hpp:51
ZqbNatGroup m_time_ng
Definition: seismic_area.hpp:188
Definition: seismic_area.hpp:58
virtual bool setCoordAxisVisMode(size_t id, const CoordAxisVisMode &axis_vis_mode)
Definition: seismic_area.hpp:151
QFont scaleFont
Definition: seismic_area.hpp:40
ViewOptions()
Definition: seismic_area.hpp:70
virtual void detachData()=0
Definition: zqb_svoptions.hpp:139
virtual void removeCoordAxes()
Definition: seismic_area.hpp:139
ZqbSVOptions svOptions
Definition: seismic_area.hpp:82
Definition: seismic_area.hpp:50
Definition: seismic_area.hpp:61
virtual int interactiveMode() const
Definition: seismic_area.hpp:160
bool saveDefaults(const QString &fname) const
virtual void attachData(ZdSeismicSet &seis_set)=0
Definition: seismic_area.hpp:60
virtual ZdSeismicSet * data()
Definition: seismic_area.hpp:121
Definition: seismic_area.hpp:59
Definition: seismic_area.hpp:20
Definition: seismic_area.hpp:25
virtual bool getCoordAxisVisMode(size_t id, CoordAxisVisMode &axis_vis_mode) const
Definition: seismic_area.hpp:146
int showMode
Definition: seismic_area.hpp:90
virtual void setInteractiveMode(int imode)
Definition: seismic_area.hpp:156
virtual ViewOptions & options()
Definition: seismic_area.hpp:132
InteractiveMode
Definition: seismic_area.hpp:48
ZqbNatGroup & getCoordNaturalGroup()
Definition: seismic_area.hpp:175
int hwId
Definition: seismic_area.hpp:37
ViewOptions m_options
Definition: seismic_area.hpp:191
Definition: seismic_area.hpp:67
QPen scalePen
Definition: seismic_area.hpp:39
Definition: zd_seismic_set.hpp:17
virtual ~SeismicArea()
virtual size_t coordAxesNum() const
Definition: seismic_area.hpp:142
bool loadDefaults(const QString &fname)
bool bAutoTimeTickStep
Definition: seismic_area.hpp:96