iRoCS Toolbox  1.1.0
ViewWidget.hh
Go to the documentation of this file.
1 /**************************************************************************
2  *
3  * This file belongs to the iRoCS Toolbox.
4  *
5  * Copyright (C) 2015 Thorsten Falk
6  *
7  * Image Analysis Lab, University of Freiburg, Germany
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  *
23  **************************************************************************/
24 
25 #ifndef VIEWWIDGET_HH
26 #define VIEWWIDGET_HH
27 
28 #ifdef HAVE_CONFIG_H
29 #include <config.hh>
30 #endif
31 
32 #include <QtGui/QWidget>
33 
34 #include <blitz/array.h>
35 #include <map>
36 
37 class MultiChannelModel;
38 class ChannelSpecs;
40 
41 class ViewWidget : public QWidget
42 {
43 
44 Q_OBJECT
45 
46 public:
47 
49 
50  ViewWidget(MultiChannelModel* model, QWidget* parent = 0,
51  Qt::WindowFlags f = 0);
52  virtual ~ViewWidget();
53 
54  virtual ViewWidget::ViewType viewType() const = 0;
55  virtual void addChannel(ChannelSpecs* channel) = 0;
56  virtual void removeChannel(ChannelSpecs* channel) = 0;
57 
58  bool snapToVoxelGrid() const;
59  bool showHelperLines() const;
60  blitz::TinyVector<double,3> positionUm() const;
61 
62  MultiChannelModel* model() const;
63 
64 signals:
65 
66  void positionChanged(const blitz::TinyVector<double,3>& positionUm);
67 
68 public slots:
69 
70 /*======================================================================*/
77 /*======================================================================*/
78  virtual void redraw();
79  virtual void setSnapToVoxelGrid(bool snap);
80  virtual void setShowHelperLines(bool show);
81  virtual void setPositionUm(const blitz::TinyVector<double,3>& positionUm);
82 
83 protected:
84 
86 
87 private:
88 
89  bool _snapToVoxelGrid, _showHelperLines;
90  blitz::TinyVector<double,3> _positionUm;
91 
92 };
93 
94 #endif
blitz::TinyVector< double, 3 > positionUm() const
MultiChannelModel * model() const
virtual void setSnapToVoxelGrid(bool snap)
virtual void removeChannel(ChannelSpecs *channel)=0
virtual ViewWidget::ViewType viewType() const =0
MultiChannelModel * p_model
Definition: ViewWidget.hh:85
void positionChanged(const blitz::TinyVector< double, 3 > &positionUm)
ViewWidget(MultiChannelModel *model, QWidget *parent=0, Qt::WindowFlags f=0)
bool showHelperLines() const
bool snapToVoxelGrid() const
virtual void setShowHelperLines(bool show)
virtual ~ViewWidget()
virtual void addChannel(ChannelSpecs *channel)=0
virtual void redraw()
This function can be implemented by ViewWidget instances to send update requests to the actual low le...
virtual void setPositionUm(const blitz::TinyVector< double, 3 > &positionUm)