Receptacle
 All Classes Files Functions Variables Pages
log_text.h
1 /*
2 
3 Copyright 2014 William Wedler
4 
5 This file is part of Receptacle
6 
7 Receptacle 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, or
10 (at your option) any later version.
11 
12 Receptacle 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 Receptacle. If not, see <http://www.gnu.org/licenses/>.
19 
20 */
21 
22 
23 /*
24  * Example code: A Browser for QDebug Log Output
25  * http://qt-project.org/wiki/Browser_for_QDebug_output
26  *
27  */
28 #ifndef LOG_TEXT_H
29 #define LOG_TEXT_H
30 
31 #include <QPlainTextEdit>
32 #include <QVBoxLayout>
33 #include <QSizePolicy>
34 #include <QFileDialog>
35 #include <QDir>
36 #include <QFile>
37 #include <QMessageBox>
38 #include <QTextStream>
39 #include <QCloseEvent>
40 #include <QKeyEvent>
41 
42 class LogText : public QPlainTextEdit{
43 public:
44  LogText(QWidget *parent=0);
45  QPlainTextEdit* text_area();
46 public slots:
47  bool save_to_file(QString fname);
48  void appendText(QString str);
49 };
50 
51 #endif // LOG_TEXT_H
Definition: log_text.h:42