OTB  6.7.0
Orfeo Toolbox
otbQtLogOutput.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 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 otbQtLogOutput_h
22 #define otbQtLogOutput_h
23 
24 #include <QtWidgets>
25 #include "itkStdStreamLogOutput.h"
26 //#include "itkObjectFactory.h"
27 //#include "itkProcessObject.h"
28 
29 #include "OTBQtWidgetExport.h"
30 
31 namespace otb
32 {
33 
42 class OTBQtWidget_EXPORT QtLogOutput : public QObject, public itk::LogOutput
43 {
44 Q_OBJECT
45 public:
46  typedef QtLogOutput Self;
50 
51  itkTypeMacro(QtLogOutput, itk::LogOutput);
52 
53  itkNewMacro(QtLogOutput);
54 
56  void Flush() override;
57 
59  void Write(double timestamp) override;
60 
62  void Write(std::string const &content) override;
63 
65  void Write(std::string const &content, double timestamp) override;
66 
67 signals:
68  void NewContentLog(QString);
69 
70 protected:
72  QtLogOutput();
73 
75  ~QtLogOutput() override;
76 
77  void PrintSelf(std::ostream &os, itk::Indent indent) const override;
78 };
79 
80 }
81 
82 #endif
itk::LogOutput Superclass
QtLogOutput Self
OTBApplicationEngine_EXPORT void Write(const std::string &filename, Application::Pointer application)
itk::SmartPointer< Self > Pointer
Class that get log output and launch an event when received.
itk::SmartPointer< const Self > ConstPointer