Cute Chess
0.1
Main Page
Namespaces
Classes
Files
File List
projects
gui
src
plaintextlog.h
1
/*
2
This file is part of Cute Chess.
3
Copyright (C) 2008-2018 Cute Chess authors
4
5
Cute Chess is free software: you can redistribute it and/or modify
6
it 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
Cute Chess is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with Cute Chess. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef PLAIN_TEXT_LOG_H
20
#define PLAIN_TEXT_LOG_H
21
22
#include <QPlainTextEdit>
23
24
class
QContextMenuEvent
;
25
class
QAction
;
26
30
class
PlainTextLog
:
public
QPlainTextEdit
31
{
32
Q_OBJECT
33
34
public
:
36
PlainTextLog
(
QWidget
* parent =
nullptr
);
41
PlainTextLog
(
const
QString
& text,
QWidget
* parent =
nullptr
);
42
43
public
slots:
45
void
saveLogToFile
(
const
QString
& fileName);
46
47
protected
:
48
// Inherited from QPlainTextEdit
49
virtual
void
contextMenuEvent(
QContextMenuEvent
* event);
50
51
};
52
53
#endif // PLAIN_TEXT_LOG_H
54
QWidget
PlainTextLog
Widget that is used to display log messages in plain text.
Definition:
plaintextlog.h:30
QPlainTextEdit
QContextMenuEvent
QString
PlainTextLog::PlainTextLog
PlainTextLog(QWidget *parent=nullptr)
Definition:
plaintextlog.cpp:28
QAction
PlainTextLog::saveLogToFile
void saveLogToFile(const QString &fileName)
Definition:
plaintextlog.cpp:63
Generated by
1.8.11