BCESolve
bceloghandler.hpp
1// This file is part of the BCESolve library for games of incomplete
2// information
3// Copyright (C) 2022 Benjamin A. Brooks
4//
5// BCESolve free software: you can redistribute it and/or modify it
6// under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// BCESolve is distributed in the hope that it will be useful, but
11// WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13// General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program. If not, see
17// <http://www.gnu.org/licenses/>.
18//
19// Benjamin A. Brooks
20// ben@benjaminbrooks.net
21// Chicago, IL
22
23#ifndef BCELOGHANDLER_HPP
24#define BCELOGHANDLER_HPP
25
26#include<QTextEdit>
27#include<QVBoxLayout>
28#include <QObject>
29
31
37class BCELogHandler : public QObject {
38 Q_OBJECT;
39
40private:
41
43 QVBoxLayout *layout;
44
45public:
46
48 QTextEdit *logText;
49
52
53 logText = new QTextEdit();
54 layout = new QVBoxLayout();
55
56 // logText->setTextFormat(Qt::LogText);
57
58 layout->addWidget(logText);
59 }
60
62 QVBoxLayout* getLayout() const {
63 return layout;
64 }
65
66};
67
68#endif
Log tab for the BCEViewer.
Definition: bceloghandler.hpp:37
BCELogHandler()
Constructor.
Definition: bceloghandler.hpp:51
QVBoxLayout * layout
Layout for the log handler.
Definition: bceloghandler.hpp:38
QVBoxLayout * getLayout() const
Returns a pointer to the log handler's layout.
Definition: bceloghandler.hpp:62
QTextEdit * logText
Text edit contained in the log handler.
Definition: bceloghandler.hpp:48