From ab80101c1eea4c114d01884deb1ac439da4fc25b Mon Sep 17 00:00:00 2001 From: allejok96 Date: Sat, 3 Oct 2020 23:01:52 +0200 Subject: [PATCH] Add insert/remove bar buttons in Song editor (fix #5602) --- data/themes/default/insert_bar.png | Bin 0 -> 545 bytes data/themes/default/remove_bar.png | Bin 0 -> 559 bytes include/SongEditor.h | 3 +++ src/gui/editors/SongEditor.cpp | 7 +++++++ 4 files changed, 10 insertions(+) create mode 100644 data/themes/default/insert_bar.png create mode 100644 data/themes/default/remove_bar.png diff --git a/data/themes/default/insert_bar.png b/data/themes/default/insert_bar.png new file mode 100644 index 0000000000000000000000000000000000000000..c7b7ddc790764bbfff9a416bb31e0bc74e58521a GIT binary patch literal 545 zcmV++0^a?JP)EX>4Tx04R}tkv&MmKpe$iQ>9WW4rUN>$WWauh)QwPDionYs1;guFuC*#nzSS- zE{=k0!NHHks)LKOt`4q(Aou~|}?mh0_0YbCFbgO3q&<)#6 zClgXOwf;?j{slqVm!4L_2fw?u3R9C_QX~QNzBtauC=l8OS`EkfK6aee2@re+u8fYq+5~1kNpEzt z=n*im4P0DzG<6TS+yRE3YKp12Qjn%lC;;zg^i4Tn@D>QKdA+swaryvcsH@ZsaBv8W z6)Ah&=iPnXz5RQp-QN#&d~&Fq?Nwp`000JJOGiWi000000Qp0^e*gdgM@d9MR5;6H zV4yN!{Qv*|f2tYA$jHb*jDe)6VWPH|M-3b`kkmvyC|&p;3TPIFER?v6E_s=S(pZJL jjApS+b^!}>5zPSrZEGkI|9N*T00000NkvXXu0mjf^FQcB literal 0 HcmV?d00001 diff --git a/data/themes/default/remove_bar.png b/data/themes/default/remove_bar.png new file mode 100644 index 0000000000000000000000000000000000000000..46845e5991cd0681691d368fb5d007eecf350f58 GIT binary patch literal 559 zcmV+~0?_@5P)EX>4Tx04R}tkv&MmKpe$iTSX}q2Q!Ft$WWauh>GZ@RVYG*P%E_RU~=gfG-*gu zTpR`0f`cE6RRhT)2yyBK+|nA zolJzBx-kgE(v zjs;YqL3aJ%fAG6ot1vO{B}EcI_lx6v3R-^Y&AJOM(_z?I(iR~x|eC+YRJ z7CQp^w}Ff6wx;X>mpj1VlOdb3D}`tV3kBf)jJ_!c4BP_YHLthUK29Hi40V;d0S*p< zks@WU`@Fliv$ucGwEFu2kl}K(fyyVU00006VoOIv00000008+zyMF)x010qNS#tmY z4c7nw4c7reD4Tcy002KpL_t(I%VS`mGGP4w|Nnog8OF%S$UuyNq^Mz{wwFf@95s;C xL_H+D%tDSPd|7dDxDXZrLo*#xzksDS002pJ7#&uIR?7eY002ovPDHLkV1iAR@p1qF literal 0 HcmV?d00001 diff --git a/include/SongEditor.h b/include/SongEditor.h index 7e0fe986a8c..a4394fc569c 100644 --- a/include/SongEditor.h +++ b/include/SongEditor.h @@ -210,6 +210,9 @@ protected slots: ComboBox * m_zoomingComboBox; ComboBox * m_snappingComboBox; QLabel* m_snapSizeLabel; + + QAction* m_insertBarAction; + QAction* m_removeBarAction; }; #endif diff --git a/src/gui/editors/SongEditor.cpp b/src/gui/editors/SongEditor.cpp index 492de0e0092..8829bedfd22 100644 --- a/src/gui/editors/SongEditor.cpp +++ b/src/gui/editors/SongEditor.cpp @@ -955,6 +955,13 @@ SongEditorWindow::SongEditorWindow(Song* song) : DropToolBar *timeLineToolBar = addDropToolBarToTop(tr("Timeline controls")); m_editor->m_timeLine->addToolButtons(timeLineToolBar); + DropToolBar *insertActionsToolBar = addDropToolBarToTop(tr("Bar insert controls")); + m_insertBarAction = new QAction(embed::getIconPixmap("insert_bar"), tr("Insert bar"), this); + m_removeBarAction = new QAction(embed::getIconPixmap("remove_bar"), tr("Remove bar"), this); + insertActionsToolBar->addAction( m_insertBarAction ); + insertActionsToolBar->addAction( m_removeBarAction ); + connect(m_insertBarAction, SIGNAL(triggered()), song, SLOT(insertBar())); + connect(m_removeBarAction, SIGNAL(triggered()), song, SLOT(removeBar())); DropToolBar *zoomToolBar = addDropToolBarToTop(tr("Zoom controls"));