Use 'record' in debug messages instead of 'commit'. Make record also work when the...
[vng.git] / Logger_p.h
blobf68c79f087166c52dca610f67dbb9d431fd9d5a9
1 /*
2 * This file is part of the vng project
3 * Copyright (C) 2008 Thomas Zander <tzander@trolltech.com>
5 * This program 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.
10 * This program 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.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef LOGGER_P_H
20 #define LOGGER_P_H
22 #include "Logger.h"
23 #include <QProcess>
25 class NullDevice : public QIODevice
27 public:
28 virtual qint64 readData (char *data, qint64 maxlen) {
29 Q_UNUSED(data);
30 Q_UNUSED(maxlen);
31 return 0;
33 virtual qint64 writeData (const char *data, qint64 len) {
34 Q_UNUSED(data);
35 return len;
39 class LoggerPrivate : QObject
41 Q_OBJECT
42 public:
43 LoggerPrivate();
44 ~LoggerPrivate();
46 void insertPager();
47 void removePager();
48 bool startPager(const QString &program, const QStringList &arguments = QStringList());
50 Logger::Verbosity verbosity;
51 QTextStream dummy;
52 QTextStream standardOut;
53 QTextStream *pagerStream;
54 QProcess *pager;
55 bool colorPager;
57 private slots:
58 void pagerFinished();
61 #endif