OTB  6.1.0
Orfeo Toolbox
otbWrapperQtWidgetSimpleProgressReport.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbWrapperQtWidgetSimpleProgressReport_h
22 #define otbWrapperQtWidgetSimpleProgressReport_h
23 
24 #include <QtGui>
25 #ifndef Q_MOC_RUN // See: https://bugreports.qt-project.org/browse/QTBUG-22829 //tag=QT4-boost-compatibility
27 #include "itkProcessObject.h"
28 #include "itkQtProgressBar.h"
29 #endif //tag=QT4-boost-compatibility
30 
31 
32 namespace otb
33 {
34 namespace Wrapper
35 {
36 
43 class OTBQtWidget_EXPORT QtWidgetSimpleProgressReport : public QWidget
44 {
45  Q_OBJECT
46 public:
48  ~QtWidgetSimpleProgressReport() ITK_OVERRIDE;
49 
50  void SetApplication(Application::Pointer app);
51 
53 
54  void ProcessEvent( itk::Object * caller, const itk::EventObject & event );
55 
56 public slots:
57  void Init();
58  void ReportProcess();
59 
60  signals:
61  void AddNewProcessToReport();
62 
63 private:
64  QtWidgetSimpleProgressReport(const QtWidgetSimpleProgressReport&); //purposely not implemented
65  void operator=(const QtWidgetSimpleProgressReport&); //purposely not
66  //implemented
67 
70  QVBoxLayout * m_Layout;
71 
74  std::string m_CurrentDescription;
75 
77  QLabel * m_Label;
78 
79 };
80 
81 }
82 }
83 
84 #endif
itk::MemberCommand< QtWidgetSimpleProgressReport > AddProcessCommandType
Create a widget reporting the progress of the application process.