1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-16 19:31:02 +01:00

Add a button to clear the python console. Thanks Chris Gell

This commit is contained in:
David Sansome 2011-07-10 16:43:37 +00:00
parent 255428b3b9
commit e942ec11d3
3 changed files with 13 additions and 0 deletions

View File

@ -35,6 +35,7 @@ PythonConsole::PythonConsole(QWidget *parent)
{
ui_->setupUi(this);
connect(ui_->modules, SIGNAL(currentIndexChanged(int)), SLOT(ModuleChanged(int)));
connect(ui_->clearConsoleButton, SIGNAL(clicked()),SLOT(ClearConsole()));
}
PythonConsole::~PythonConsole() {
@ -67,3 +68,7 @@ void PythonConsole::ModuleChanged(int row) {
layout()->addWidget(widget_);
}
void PythonConsole::ClearConsole() {
widget_->clear();
}

View File

@ -42,6 +42,7 @@ protected:
private slots:
void ModuleChanged(int row);
void ClearConsole();
private:
Ui_PythonConsole* ui_;

View File

@ -33,6 +33,13 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="clearConsoleButton">
<property name="text">
<string>Clear Console</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>