Commit 552fb2cd authored by con's avatar con Committed by Eike Ziller
Browse files

Register action for clear output pane.

Change-Id: Ib148d37a92dcaa2da9def7895ced6ede8ed1d0a3
Reviewed-on: http://codereview.qt.nokia.com/620

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent e58e0c52
......@@ -104,7 +104,6 @@ void OutputPaneManager::updateStatusButtons(bool visible)
OutputPaneManager::OutputPaneManager(QWidget *parent) :
QWidget(parent),
m_widgetComboBox(new QComboBox),
m_clearButton(new QToolButton),
m_closeButton(new QToolButton),
m_minMaxAction(0),
m_minMaxButton(new QToolButton),
......@@ -120,9 +119,10 @@ OutputPaneManager::OutputPaneManager(QWidget *parent) :
setWindowTitle(tr("Output"));
connect(m_widgetComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(changePage()));
m_clearButton->setIcon(QIcon(QLatin1String(Constants::ICON_CLEAN_PANE)));
m_clearButton->setToolTip(tr("Clear"));
connect(m_clearButton, SIGNAL(clicked()), this, SLOT(clearPage()));
m_clearAction = new QAction(this);
m_clearAction->setIcon(QIcon(QLatin1String(Constants::ICON_CLEAN_PANE)));
m_clearAction->setText(tr("Clear"));
connect(m_clearAction, SIGNAL(triggered()), this, SLOT(clearPage()));
m_nextAction = new QAction(this);
m_nextAction->setIcon(QIcon(QLatin1String(Constants::ICON_NEXT)));
......@@ -149,6 +149,7 @@ OutputPaneManager::OutputPaneManager(QWidget *parent) :
toolLayout->setMargin(0);
toolLayout->setSpacing(0);
toolLayout->addWidget(m_widgetComboBox);
m_clearButton = new QToolButton;
toolLayout->addWidget(m_clearButton);
m_prevToolButton = new QToolButton;
toolLayout->addWidget(m_prevToolButton);
......@@ -204,6 +205,10 @@ void OutputPaneManager::init()
Core::Command *cmd;
cmd = am->registerAction(m_clearAction, "Coreplugin.OutputPane.clear", globalcontext);
m_clearButton->setDefaultAction(cmd->action());
mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup");
cmd = am->registerAction(m_prevAction, "Coreplugin.OutputPane.previtem", globalcontext);
cmd->setDefaultKeySequence(QKeySequence("Shift+F6"));
m_prevToolButton->setDefaultAction(cmd->action());
......
......@@ -101,6 +101,7 @@ private:
void ensurePageVisible(int idx);
int findIndexForPage(IOutputPane *out);
QComboBox *m_widgetComboBox;
QAction *m_clearAction;
QToolButton *m_clearButton;
QToolButton *m_closeButton;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment