From 8bf8dd4bf70200a7cd92d436b443e969d36381e4 Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Fri, 16 Jul 2010 18:35:51 +0300 Subject: [PATCH] GUI: Add Clear-button to log view. --- gui/logview.cpp | 7 +++++++ gui/logview.h | 6 ++++++ gui/logview.ui | 7 +++++++ 3 files changed, 20 insertions(+) diff --git a/gui/logview.cpp b/gui/logview.cpp index 97fa7b0ab..94baae276 100644 --- a/gui/logview.cpp +++ b/gui/logview.cpp @@ -20,10 +20,12 @@ LogView::LogView(QWidget *parent) { + Q_UNUSED(parent); mUI.setupUi(this); setWindowFlags(Qt::Tool); connect(mUI.mCloseButton, SIGNAL(clicked()), this, SLOT(CloseButtonClicked())); + connect(mUI.mClearButton, SIGNAL(clicked()), this, SLOT(ClearButtonClicked())); } void LogView::AppendLine(const QString &line) @@ -35,3 +37,8 @@ void LogView::CloseButtonClicked() { close(); } + +void LogView::ClearButtonClicked() +{ + mUI.mLogEdit->clear(); +} diff --git a/gui/logview.h b/gui/logview.h index b0631c250..3923616db 100644 --- a/gui/logview.h +++ b/gui/logview.h @@ -50,6 +50,12 @@ protected slots: */ void CloseButtonClicked(); + /** + * @brief Called when clear button is clicked. + * + */ + void ClearButtonClicked(); + private: Ui::LogView mUI; }; diff --git a/gui/logview.ui b/gui/logview.ui index 90367ea71..642e34436 100644 --- a/gui/logview.ui +++ b/gui/logview.ui @@ -42,6 +42,13 @@ + + + + Clear + + +