LogTextEdit.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
3
4
This file is part of the TerraLib - a Framework for building GIS enabled
5
applications.
6
7
TerraLib is free software: you can redistribute it and/or modify
8
it under the terms of the GNU Lesser General Public License as published by
9
the Free Software Foundation, either version 3 of the License,
10
or (at your option) any later version.
11
12
TerraLib is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU Lesser General Public License for more details.
16
17
You should have received a copy of the GNU Lesser General Public License
18
along with TerraLib. See COPYING. If not, write to
19
TerraLib Team at <terralib-team@terralib.org>.
20
*/
21
22
/*!
23
\file terralib/qt/widgets/ceditor/LogTextEdit.h
24
25
\brief A TextEdit that can be used to watch a log file.
26
*/
27
28
#ifndef __TERRALIB_QTWIDGETS_LOG_LOGTEXTEDIT_H__
29
#define __TERRALIB_QTWIDGETS_LOG_LOGTEXTEDIT_H__
30
31
// TerraLib
32
#include "../Config.h"
33
#include "../../../core/filesystem/FileWatcher.h"
34
35
// STL
36
#include <memory>
37
38
// QT
39
#include <QPlainTextEdit>
40
41
namespace
te
42
{
43
44
namespace
qt
45
{
46
namespace
widgets
47
{
48
class
TEQTWIDGETSEXPORT
LogTextEdit
:
public
QPlainTextEdit
49
{
50
Q_OBJECT
51
public
:
52
LogTextEdit
(QWidget *parent = 0,
const
QString& fileName =
""
);
53
~LogTextEdit
();
54
55
public
slots
:
56
void
findAll
(
const
QString &str);
57
58
private
slots
:
59
void
textReady
();
60
void
read
();
61
62
signals:
63
void
textPending
();
64
65
private
:
66
QFile
m_file
;
67
std::unique_ptr<te::core::FileWatcher>
m_watcher
;
68
qint64
m_pos
;
69
};
70
}
// end namespace widgets
71
}
// end namespace qt
72
}
// end namespace te
73
#endif //__TERRALIB_QTWIDGETS_LOG_LOGTEXTEDIT_H__
te::qt::widgets::LogTextEdit::m_pos
qint64 m_pos
Definition:
LogTextEdit.h:68
te::qt::widgets::LogTextEdit::findAll
void findAll(const QString &str)
te
TerraLib.
Definition:
AddressGeocodingOp.h:52
TEQTWIDGETSEXPORT
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition:
Config.h:63
te::qt::widgets::LogTextEdit::~LogTextEdit
~LogTextEdit()
te::qt::widgets::LogTextEdit::LogTextEdit
LogTextEdit(QWidget *parent=0, const QString &fileName="")
te::qt::widgets::LogTextEdit::m_file
QFile m_file
Definition:
LogTextEdit.h:66
te::qt::widgets::LogTextEdit::m_watcher
std::unique_ptr< te::core::FileWatcher > m_watcher
Definition:
LogTextEdit.h:67
te::qt::widgets::LogTextEdit::textPending
void textPending()
slots
#define slots
Definition:
VirtualMachine.h:48
te::qt::widgets::LogTextEdit::textReady
void textReady()
te::qt::widgets::LogTextEdit
Definition:
LogTextEdit.h:49
te::qt::widgets::LogTextEdit::read
void read()
git_release
src
terralib
qt
widgets
log
LogTextEdit.h
Generated on Wed Feb 2 2022 10:37:59 for TerraLib by
1.8.20