ome-qtwidgets 5.2.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

NavigationDock2D.h
1 /*
2 * #%L
3 * OME-QTWIDGETS C++ library for display of OME-Files pixel data and metadata.
4 * %%
5 * Copyright © 2014 - 2015 Open Microscopy Environment:
6 * - Massachusetts Institute of Technology
7 * - National Institutes of Health
8 * - University of Dundee
9 * - Board of Regents of the University of Wisconsin-Madison
10 * - Glencoe Software, Inc.
11 * %%
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions are met:
14 *
15 * 1. Redistributions of source code must retain the above copyright notice,
16 * this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
18 * this list of conditions and the following disclaimer in the documentation
19 * and/or other materials provided with the distribution.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
25 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
32 *
33 * The views and conclusions contained in the software and documentation are
34 * those of the authors and should not be interpreted as representing official
35 * policies, either expressed or implied, of any organization.
36 * #L%
37 */
38
39 #ifndef OME_QTWIDGETS_NAVIGATIONDOCK2D_H
40 #define OME_QTWIDGETS_NAVIGATIONDOCK2D_H
41
42 #include <ome/files/FormatReader.h>
43
44 #include <ome/compat/memory.h>
45
46 #include <ome/qtwidgets/glm.h>
47 #include <ome/qtwidgets/GLWindow.h>
48 #include <ome/qtwidgets/gl/Image2D.h>
49 #include <ome/qtwidgets/gl/Grid2D.h>
50 #include <ome/qtwidgets/gl/Axis2D.h>
51
52 #include <QtWidgets/QDockWidget>
53 #include <QtWidgets/QLabel>
54 #include <QtWidgets/QSlider>
55 #include <QtWidgets/QSpinBox>
56
57 namespace ome
58 {
59 namespace qtwidgets
60 {
61
68 class NavigationDock2D : public QDockWidget
69 {
70 Q_OBJECT
71
72 public:
73
81 NavigationDock2D(QWidget *parent = 0);
82
84 ~NavigationDock2D();
85
93 void
94 setReader(ome::compat::shared_ptr<ome::files::FormatReader> reader,
95 ome::files::dimension_size_type series = 0,
96 ome::files::dimension_size_type plane = 0);
97
103 ome::files::dimension_size_type
104 plane() const;
105
106 public slots:
112 void
113 setPlane(ome::files::dimension_size_type plane);
114
115 signals:
121 void
122 planeChanged(ome::files::dimension_size_type plane);
123
124 private slots:
130 void
131 sliderChangedPlane(int plane);
132
138 void
139 spinBoxChangedPlane(int plane);
140
146 void
147 sliderChangedDimension(int dim);
148
154 void
155 spinBoxChangedDimension(int dim);
156
157 private:
159 ome::compat::shared_ptr<ome::files::FormatReader> reader;
161 ome::files::dimension_size_type series;
163 ome::files::dimension_size_type currentPlane;
164
166 QLabel *labels[7];
168 QSlider *sliders[7];
170 QSpinBox *spinboxes[7];
171 };
172
173 }
174 }
175
176 #endif // OME_QTWIDGETS_NAVIGATIONDOCK2D_H
177
178 /*
179 * Local Variables:
180 * mode:C++
181 * End:
182 */
memory.h
ome::qtwidgets::NavigationDock2D::spinBoxChangedDimension
void spinBoxChangedDimension(int dim)
Update the current plane number (from dimension spinbox).
Definition: NavigationDock2D.cpp:305
ome::qtwidgets::NavigationDock2D::plane
ome::files::dimension_size_type plane() const
Get the current plane for the series.
Definition: NavigationDock2D.cpp:255
ome::files::dimension_size_type
std::size_t dimension_size_type
ome::qtwidgets::NavigationDock2D::setPlane
void setPlane(ome::files::dimension_size_type plane)
Set the current plane for the series.
Definition: NavigationDock2D.cpp:216
ome::qtwidgets::NavigationDock2D::NavigationDock2D
NavigationDock2D(QWidget *parent=0)
Create a 2D navigation view.
Definition: NavigationDock2D.cpp:88
ome::qtwidgets::NavigationDock2D::~NavigationDock2D
~NavigationDock2D()
Destructor.
Definition: NavigationDock2D.cpp:134
ome::qtwidgets::NavigationDock2D::sliderChangedPlane
void sliderChangedPlane(int plane)
Update the current plane number (from slider).
Definition: NavigationDock2D.cpp:261
ome::qtwidgets::NavigationDock2D::setReader
void setReader(ome::compat::shared_ptr< ome::files::FormatReader > reader, ome::files::dimension_size_type series=0, ome::files::dimension_size_type plane=0)
Set reader, including current series and plane position.
Definition: NavigationDock2D.cpp:139
ome
ome::qtwidgets::NavigationDock2D::spinboxes
QSpinBox * spinboxes[7]
Numeric entries [NZTCmZmTmC].
Definition: NavigationDock2D.h:170
ome::qtwidgets::NavigationDock2D::reader
ome::compat::shared_ptr< ome::files::FormatReader > reader
The image reader.
Definition: NavigationDock2D.h:159
ome::qtwidgets::NavigationDock2D::sliders
QSlider * sliders[7]
Sliders [NZTCmZmTmC].
Definition: NavigationDock2D.h:168
ome::qtwidgets::NavigationDock2D::labels
QLabel * labels[7]
Slider labels [NZTCmZmTmC].
Definition: NavigationDock2D.h:166
ome::qtwidgets::NavigationDock2D::spinBoxChangedPlane
void spinBoxChangedPlane(int plane)
Update the current plane number (from spinbox).
Definition: NavigationDock2D.cpp:267
ome::qtwidgets::NavigationDock2D::planeChanged
void planeChanged(ome::files::dimension_size_type plane)
Signal change of plane.
ome::qtwidgets::NavigationDock2D::series
ome::files::dimension_size_type series
The image series.
Definition: NavigationDock2D.h:161
ome::qtwidgets::NavigationDock2D
2D dock widget for plane nagivation.
Definition: NavigationDock2D.h:68
ome::qtwidgets::NavigationDock2D::currentPlane
ome::files::dimension_size_type currentPlane
The image plane.
Definition: NavigationDock2D.h:163
ome::qtwidgets::NavigationDock2D::sliderChangedDimension
void sliderChangedDimension(int dim)
Update the current plane number (from dimension slider).
Definition: NavigationDock2D.cpp:273