GUI: Add Clear-button to log view.

This commit is contained in:
Kimmo Varis 2010-07-16 18:35:51 +03:00
parent 7f3825d922
commit 8bf8dd4bf7
3 changed files with 20 additions and 0 deletions

View File

@ -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();
}

View File

@ -50,6 +50,12 @@ protected slots:
*/
void CloseButtonClicked();
/**
* @brief Called when clear button is clicked.
*
*/
void ClearButtonClicked();
private:
Ui::LogView mUI;
};

View File

@ -42,6 +42,13 @@
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="mClearButton">
<property name="text">
<string>Clear</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mCloseButton">
<property name="text">