Commit 83a5dacc authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

show copy action as toolbutton, too

parent de780067
...@@ -61,6 +61,12 @@ public: ...@@ -61,6 +61,12 @@ public:
event->accept(); event->accept();
} }
// access to copy action for outside tool buttons etc.
QAction *copyAction()
{
return m_copyAction;
}
private Q_SLOTS: private Q_SLOTS:
void slotCopySelected() void slotCopySelected()
{ {
...@@ -184,6 +190,10 @@ KateOutputView::KateOutputView(KateMainWindow *mainWindow, QWidget *parent) ...@@ -184,6 +190,10 @@ KateOutputView::KateOutputView(KateMainWindow *mainWindow, QWidget *parent)
m_messagesTreeView->expandAll(); m_messagesTreeView->expandAll();
}); });
// copy button
auto copy = new QToolButton(this);
copy->setDefaultAction(m_messagesTreeView->copyAction());
// clear button // clear button
auto clear = new QToolButton(this); auto clear = new QToolButton(this);
clear->setIcon(QIcon::fromTheme(QStringLiteral("edit-clear-history"))); clear->setIcon(QIcon::fromTheme(QStringLiteral("edit-clear-history")));
...@@ -193,8 +203,10 @@ KateOutputView::KateOutputView(KateMainWindow *mainWindow, QWidget *parent) ...@@ -193,8 +203,10 @@ KateOutputView::KateOutputView(KateMainWindow *mainWindow, QWidget *parent)
}); });
// setup top horizontal layout // setup top horizontal layout
// tried toolbar, has bad spacing
QHBoxLayout *hLayout = new QHBoxLayout(); QHBoxLayout *hLayout = new QHBoxLayout();
hLayout->addWidget(&m_filterLine); hLayout->addWidget(&m_filterLine);
hLayout->addWidget(copy);
hLayout->addWidget(clear); hLayout->addWidget(clear);
hLayout->setStretch(0, 1); hLayout->setStretch(0, 1);
......
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