mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-10 21:18:19 +03:00
viewsdialog:provide paste action
This commit is contained in:
parent
c6aadab090
commit
ddd25a0215
@ -118,6 +118,7 @@ void Views::init()
|
||||
|
||||
m_pasteAction = new QAction(QIcon::fromTheme("edit-paste"), i18n("Paste"), m_view);
|
||||
m_pasteAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_V));
|
||||
connect(m_pasteAction, &QAction::triggered, this, &Views::pasteSelectedViews);
|
||||
|
||||
m_duplicateAction = new QAction(QIcon::fromTheme("edit-copy"), i18n("Duplicate Here"), m_view);
|
||||
m_duplicateAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_D));
|
||||
@ -225,6 +226,15 @@ void Views::copySelectedViews()
|
||||
m_handler->layoutsController()->templatesKeeper()->setClipboardContents(clipboardviews);
|
||||
}
|
||||
|
||||
void Views::pasteSelectedViews()
|
||||
{
|
||||
Data::ViewsTable clipboardviews = m_handler->layoutsController()->templatesKeeper()->clipboardContents();
|
||||
|
||||
for(int i=0; i<clipboardviews.rowCount(); ++i) {
|
||||
appendViewFromViewTemplate(clipboardviews[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void Views::duplicateSelectedViews()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
@ -86,6 +86,7 @@ public:
|
||||
public slots:
|
||||
void copySelectedViews();
|
||||
void duplicateSelectedViews();
|
||||
void pasteSelectedViews();
|
||||
void removeSelectedViews();
|
||||
|
||||
signals:
|
||||
|
Loading…
Reference in New Issue
Block a user