GUI: Add Clear-button to log view.
This commit is contained in:
parent
7f3825d922
commit
8bf8dd4bf7
|
@ -20,10 +20,12 @@
|
||||||
|
|
||||||
LogView::LogView(QWidget *parent)
|
LogView::LogView(QWidget *parent)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(parent);
|
||||||
mUI.setupUi(this);
|
mUI.setupUi(this);
|
||||||
setWindowFlags(Qt::Tool);
|
setWindowFlags(Qt::Tool);
|
||||||
|
|
||||||
connect(mUI.mCloseButton, SIGNAL(clicked()), this, SLOT(CloseButtonClicked()));
|
connect(mUI.mCloseButton, SIGNAL(clicked()), this, SLOT(CloseButtonClicked()));
|
||||||
|
connect(mUI.mClearButton, SIGNAL(clicked()), this, SLOT(ClearButtonClicked()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void LogView::AppendLine(const QString &line)
|
void LogView::AppendLine(const QString &line)
|
||||||
|
@ -35,3 +37,8 @@ void LogView::CloseButtonClicked()
|
||||||
{
|
{
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LogView::ClearButtonClicked()
|
||||||
|
{
|
||||||
|
mUI.mLogEdit->clear();
|
||||||
|
}
|
||||||
|
|
|
@ -50,6 +50,12 @@ protected slots:
|
||||||
*/
|
*/
|
||||||
void CloseButtonClicked();
|
void CloseButtonClicked();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Called when clear button is clicked.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void ClearButtonClicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::LogView mUI;
|
Ui::LogView mUI;
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,6 +42,13 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="mClearButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Clear</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="mCloseButton">
|
<widget class="QPushButton" name="mCloseButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
Loading…
Reference in New Issue