mvdQuicklookViewManipulator.h 4.58 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/*
 * Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
 *
 * This file is part of Orfeo Toolbox
 *
 *     https://www.orfeo-toolbox.org/
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
20 21


22 23
#ifndef mvdQuicklookViewManipulator_h
#define mvdQuicklookViewManipulator_h
24 25 26 27

//
// Configuration include.
//// Included at first position before any other ones.
28
#include "ConfigureMonteverdi.h"
29

30 31 32 33

/*****************************************************************************/
/* INCLUDE SECTION                                                           */

34 35 36
//
// Qt includes (sorted by alphabetic order)
//// Must be included before system/custom includes.
37
#include <QtWidgets>
38 39 40 41 42 43 44 45 46

//
// System includes (sorted by alphabetic order)

//
// ITK includes (sorted by alphabetic order)

//
// OTB includes (sorted by alphabetic order)
47
#include "OTBMonteverdiGUIExport.h"
48 49
//
// Monteverdi includes (sorted by alphabetic order)
50
#include "mvdImageViewManipulator.h"
51

52 53 54 55

/*****************************************************************************/
/* PRE-DECLARATION SECTION                                                   */

56 57 58 59 60 61 62 63 64 65 66
//
// External classes pre-declaration.
namespace
{
}

namespace mvd
{
//
// Internal classes pre-declaration.

67 68 69 70 71 72 73

/*****************************************************************************/
/* CLASS DEFINITION SECTION                                                  */

/**
 * \class QuicklookViewManipulator
 *
74
 * \ingroup OTBMonteverdiGUI
75
 *
76
 *  \brief TODO.
77
 */
78
class OTBMonteverdiGUI_EXPORT QuicklookViewManipulator :
79
    public ImageViewManipulator
80
{
81 82 83

  /*-[ QOBJECT SECTION ]-----------------------------------------------------*/

84 85
  Q_OBJECT;

86 87
  /*-[ PUBLIC SECTION ]------------------------------------------------------*/

88 89 90 91
//
// Public methods.
public:

92
  /** \brief Constructor. */
93 94
#if USE_VIEW_SETTINGS_SIDE_EFFECT
  QuicklookViewManipulator( const otb::ViewSettings::Pointer& viewSettings,
95
                            QObject* p =NULL );
96
#else // USE_VIEW_SETTINGS_SIDE_EFFECT
97
  QuicklookViewManipulator( QObject* p =NULL );
98
#endif // USE_VIEW_SETTINGS_SIDE_EFFECT
99

100
  /** \brief Destructor. */
101
  ~QuicklookViewManipulator() ITK_OVERRIDE;
102

103
  //
104 105
  // ImageViewManipulator overloads.

106
  ZoomType GetFixedZoomType() const ITK_OVERRIDE;
107

108
  
109 110
    void
    SetupRenderingContext(
111
      AbstractImageViewRenderer::RenderingContext * const ) const ITK_OVERRIDE;
112

113

114
  void MousePressEvent( QMouseEvent* event ) ITK_OVERRIDE;
115

116
  void MouseMoveEvent( QMouseEvent* event ) ITK_OVERRIDE;
117 118 119 120 121

  // virtual void MousePressEvent( QMouseEvent* event );

  // virtual void MouseReleaseEvent( QMouseEvent* event );

122
  void MouseDoubleClickEvent( QMouseEvent * ) ITK_OVERRIDE {};
123

124
  void WheelEvent( QWheelEvent* event) ITK_OVERRIDE;
125

126
  void ResizeEvent( QResizeEvent * event ) ITK_OVERRIDE;
127

128
  void KeyPressEvent( QKeyEvent* event ) ITK_OVERRIDE;
129

130
  void KeyReleaseEvent( QKeyEvent* event ) ITK_OVERRIDE;
131

132
  /*-[ PUBLIC SLOTS SECTION ]-----------------------------------------------**/
133 134 135 136 137

//
// Public SLOTS.
public slots:

138 139 140 141 142 143 144 145
  /*-[ SIGNALS SECTION ]-----------------------------------------------------*/

//
// Signals.
signals:

  /*-[ PROTECTED SECTION ]---------------------------------------------------*/

146 147 148
//
// Protected methods.
protected:
149

150 151 152 153
//
// Protected attributes.
protected:

154 155
  /*-[ PRIVATE SECTION ]-----------------------------------------------------*/

156 157 158 159 160 161 162 163 164 165 166
//
// Private types.
private:

//
// Private methods.
private:

//
// Private attributes.
private:
167 168 169 170 171
  /**
   */
  PointType m_RoiOrigin;
  /**
   */
172 173 174 175
  SpacingType m_RoiSpacing;
  /**
   */
  SizeType m_RoiSize;
176 177 178

  /*-[ PRIVATE SLOTS SECTION ]-----------------------------------------------*/

179
//
180
// Slots.
181
private slots:
182 183
  /**
   */
184 185
  void OnRoiChanged( const PointType& origin,
                     const SizeType& size,
186 187
                     const SpacingType& spacing,
                     const PointType& center );
188 189 190 191
};

} // end namespace 'mvd'

192 193 194 195 196 197 198
/*****************************************************************************/
/* INLINE SECTION                                                            */

namespace mvd
{
} // end namespace 'mvd'

199
#endif // mvdQuicklookViewManipulator_h