GUI: Add Clear-button to log view.
This commit is contained in:
parent
7f3825d922
commit
8bf8dd4bf7
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -50,6 +50,12 @@ protected slots:
|
|||
*/
|
||||
void CloseButtonClicked();
|
||||
|
||||
/**
|
||||
* @brief Called when clear button is clicked.
|
||||
*
|
||||
*/
|
||||
void ClearButtonClicked();
|
||||
|
||||
private:
|
||||
Ui::LogView mUI;
|
||||
};
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in New Issue