From 423670fc310b8c853c471a3c272db13e38edd8db Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 13 Oct 2018 03:18:29 +0200 Subject: Implement layout for CopyDialog Does nothing yet except close. This was harder than it should be: To keep a GridLayout expanding its cells vertically, you have to set the Alignment in the *parent* Layout. Took me a while to figure out... --- playerwidget.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'playerwidget.cpp') diff --git a/playerwidget.cpp b/playerwidget.cpp index 71c899b..cab33b9 100644 --- a/playerwidget.cpp +++ b/playerwidget.cpp @@ -206,6 +206,13 @@ void PlayerWidget::setupGui(QSplashScreen *splash){ curW->view()->addAction(deleteItemA); curW->view()->addAction(Helper::createSeparator(this)); } + // special case dates -> add copy to... + if(name == "dates"){ + QAction *copyToA = new QAction(QIcon::fromTheme("edit-copy"), tr("Copy to..."), this); + connect(copyToA, &QAction::triggered, datesView, &CollectionDatesView::copyTo); + curW->view()->addAction(copyToA); + curW->view()->addAction(Helper::createSeparator(this)); + } QAction *refreshA = new QAction(QIcon(":/refresh.png"), tr("Refresh view"), this); connect(refreshA, &QAction::triggered, [curW] { qApp->setOverrideCursor(Qt::BusyCursor); -- cgit v1.2.3-70-g09d2