otbWrapperQtWidgetChoiceParameter.h 2 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
#ifndef otbWrapperQtWidgetChoiceParameter_h
#define otbWrapperQtWidgetChoiceParameter_h
23

24
#include <QtWidgets>
25
#ifndef Q_MOC_RUN  // See: https://bugreports.qt-project.org/browse/QTBUG-22829  //tag=QT4-boost-compatibility
26
#include "otbWrapperChoiceParameter.h"
27
#include "otbWrapperQtWidgetParameterBase.h"
28
#endif //tag=QT4-boost-compatibility
29 30 31 32 33 34

namespace otb
{
namespace Wrapper
{

Julien Malik's avatar
Julien Malik committed
35
/** \class QtWidgetChoiceParameter
36
 * \brief
37 38
 *
 * \ingroup OTBQtWidget
39
 */
40
class OTBQtWidget_EXPORT QtWidgetChoiceParameter : public QtWidgetParameterBase
41 42 43
{
  Q_OBJECT
public:
44
  QtWidgetChoiceParameter(ChoiceParameter*, QtWidgetModel*);
45
  ~QtWidgetChoiceParameter() ITK_OVERRIDE;
46

47 48 49
protected slots:
  void SetValue( int value );

50 51 52
private:
  QtWidgetChoiceParameter(const QtWidgetChoiceParameter&); //purposely not implemented
  void operator=(const QtWidgetChoiceParameter&); //purposely not implemented
53

54
  void DoCreateWidget() ITK_OVERRIDE;
55

56
  void DoUpdateGUI() ITK_OVERRIDE;
57 58 59

  ChoiceParameter::Pointer m_ChoiceParam;

60 61 62 63 64 65 66
  QHBoxLayout*    m_MainHLayout;

  QComboBox*      m_ComboBox;
  QStackedWidget* m_StackWidget;

  QVBoxLayout*    m_VLayout;
  QGroupBox*      m_VLayoutGroup;
67 68 69 70

  typedef std::vector<QtWidgetParameterBase*> WidgetListType;
  typedef WidgetListType::iterator WidgetListIteratorType;
  WidgetListType m_WidgetList;
71
};
72 73 74

}
}
75 76

#endif