From dac44bc744a66eae63f85f0612221f869afcf9ce Mon Sep 17 00:00:00 2001 From: Marcus Eggenberger Date: Thu, 30 Oct 2008 20:06:40 +0100 Subject: [PATCH] lala missing added files (or something like that) --- src/qtui/debuglogwidget.cpp | 38 ++++++++++++++++ src/qtui/debuglogwidget.h | 39 ++++++++++++++++ src/qtui/ui/debuglogwidget.ui | 83 +++++++++++++++++++++++++++++++++++ 3 files changed, 160 insertions(+) create mode 100644 src/qtui/debuglogwidget.cpp create mode 100644 src/qtui/debuglogwidget.h create mode 100644 src/qtui/ui/debuglogwidget.ui diff --git a/src/qtui/debuglogwidget.cpp b/src/qtui/debuglogwidget.cpp new file mode 100644 index 00000000..15b1c5c3 --- /dev/null +++ b/src/qtui/debuglogwidget.cpp @@ -0,0 +1,38 @@ +/*************************************************************************** + * Copyright (C) 2005-08 by the Quassel Project * + * devel@quassel-irc.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) version 3. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include "debuglogwidget.h" + +#include "client.h" + +DebugLogWidget::DebugLogWidget(QWidget *parent) + : QWidget(parent) +{ + ui.setupUi(this); + setAttribute(Qt::WA_DeleteOnClose, true); + logUpdated(); + connect(Client::instance(), SIGNAL(logUpdated()), this, SLOT(logUpdated())); + ui.textEdit->setReadOnly(true); +} + +void DebugLogWidget::logUpdated() { + ui.textEdit->setPlainText(Client::debugLog()); +} + diff --git a/src/qtui/debuglogwidget.h b/src/qtui/debuglogwidget.h new file mode 100644 index 00000000..476a80af --- /dev/null +++ b/src/qtui/debuglogwidget.h @@ -0,0 +1,39 @@ +/*************************************************************************** + * Copyright (C) 2005-08 by the Quassel Project * + * devel@quassel-irc.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) version 3. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef DEBUGLOGWIDGET_H +#define DEBUGLOGWIDGET_H + +#include "ui_debuglogwidget.h" + +class DebugLogWidget : public QWidget { + Q_OBJECT + +public: + DebugLogWidget(QWidget *parent = 0); + +private slots: + void logUpdated(); + +private: + Ui::DebugLogWidget ui; +}; + +#endif //DEBUGLOGWIDGET_H diff --git a/src/qtui/ui/debuglogwidget.ui b/src/qtui/ui/debuglogwidget.ui new file mode 100644 index 00000000..fc853c55 --- /dev/null +++ b/src/qtui/ui/debuglogwidget.ui @@ -0,0 +1,83 @@ + + DebugLogWidget + + + + 0 + 0 + 400 + 300 + + + + Debug Log + + + + 0 + + + 0 + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Close + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + pushButton + clicked() + DebugLogWidget + close() + + + 217 + 284 + + + 179 + -16 + + + + + -- 2.20.1