OpenStructure
fft_panel.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2020 by the OpenStructure authors
5 // Copyright (C) 2003-2010 by the IPLT authors
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License as published by the Free
9 // Software Foundation; either version 3.0 of the License, or (at your option)
10 // any later version.
11 // This library is distributed in the hope that it will be useful, but WITHOUT
12 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14 // details.
15 //
16 // You should have received a copy of the GNU Lesser General Public License
17 // along with this library; if not, write to the Free Software Foundation, Inc.,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 //------------------------------------------------------------------------------
20 
21 #ifndef OST_FFT_PANEL_HH_
22 #define OST_FFT_PANEL_HH_
23 /*
24  Author: Andreas Schenk
25 */
26 
27 #ifndef Q_MOC_RUN
28 
29 #include <ost/gui/module_config.hh>
30 #include <ost/img/data_observer.hh>
32 
33 #endif
34 
35 namespace ost { namespace img { namespace gui {
36 
38 {
39 public:
41  virtual void ObserverRelease()
42  {
43  // Noop as parent takes care of this.
44  }
45 };
46 
48 {
49 Q_OBJECT
50 
51 public:
52  FFTPanel(const ImageHandle& parent_data, QWidget* parent);
53  virtual ~FFTPanel();
54  void SetFFTSize(unsigned int size);
55  unsigned int GetFFTSize();
56  virtual void ObserverUpdate();
57  virtual void SetData(const ImageHandle& parent_data);
58 
59 public slots:
60  void SetPosition(const Point& p);
62 
63 protected:
64  void update_fft();
65  unsigned int size_;
69 };
70 
71 }}} //ns
72 
73 #endif /*FFT_PANEL_HH_*/
Abstract base class of data observer.
Manage shared instances of images.
class encapsulating 1D to 3D point
Definition: point.hh:47
unsigned int GetFFTSize()
ImageHandle fft_data_
Definition: fft_panel.hh:67
ParentDataObserver parent_observer_
Definition: fft_panel.hh:68
FFTPanel(const ImageHandle &parent_data, QWidget *parent)
virtual void ObserverUpdate()
called upon data change, noop by default
virtual void SetData(const ImageHandle &parent_data)
unsigned int size_
Definition: fft_panel.hh:65
void SetFFTSize(unsigned int size)
void SetPosition(const Point &p)
ParentDataObserver(const ImageHandle &d)
Definition: fft_panel.hh:40
virtual void ObserverRelease()
Called if data is released from memory.
Definition: fft_panel.hh:41
#define DLLEXPORT_OST_GUI
Definition: base.dox:1