From a4a8c0545802e01b1db848ce4238647525c8f1ce Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Sun, 21 Mar 2021 12:06:45 -0400 Subject: [PATCH] 2021-03-21 Fred Gleason * Added a 'Goto' section to 'RDMarkerDialog', with 'Cursor', 'Home' and 'End' buttons. Signed-off-by: Fred Gleason --- ChangeLog | 3 +++ lib/librd_cs.ts | 16 ++++++++++++++++ lib/librd_de.ts | 16 ++++++++++++++++ lib/librd_es.ts | 16 ++++++++++++++++ lib/librd_fr.ts | 16 ++++++++++++++++ lib/librd_nb.ts | 16 ++++++++++++++++ lib/librd_nn.ts | 16 ++++++++++++++++ lib/librd_pt_BR.ts | 16 ++++++++++++++++ lib/rdmarkerdialog.cpp | 43 +++++++++++++++++++++++++++++++----------- lib/rdmarkerdialog.h | 5 +++++ lib/rdmarkerview.cpp | 20 ++++++++++++++++++++ lib/rdmarkerview.h | 3 +++ 12 files changed, 175 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 76cb00cf..3514ff21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21309,3 +21309,6 @@ 2021-03-21 Fred Gleason * Modified the marker readouts to show a yellow background when the parent markers have been selected. +2021-03-21 Fred Gleason + * Added a 'Goto' section to 'RDMarkerDialog', with 'Cursor', + 'Home' and 'End' buttons. diff --git a/lib/librd_cs.ts b/lib/librd_cs.ts index d59867b0..ec213d87 100644 --- a/lib/librd_cs.ts +++ b/lib/librd_cs.ts @@ -3600,6 +3600,22 @@ Out Unable to open cut in audio player! + + Goto + Přejít na + + + Cursor + Ukazovátko + + + Home + Domov + + + End + Konec + RDMarkerPlayer diff --git a/lib/librd_de.ts b/lib/librd_de.ts index 818cdcf9..6f5a4100 100644 --- a/lib/librd_de.ts +++ b/lib/librd_de.ts @@ -3589,6 +3589,22 @@ Out Unable to open cut in audio player! + + Goto + Gehe zu + + + Cursor + Cursor + + + Home + Home + + + End + Ende + RDMarkerPlayer diff --git a/lib/librd_es.ts b/lib/librd_es.ts index d433a45e..28b53026 100644 --- a/lib/librd_es.ts +++ b/lib/librd_es.ts @@ -3576,6 +3576,22 @@ Todo Unable to open cut in audio player! + + Goto + Ir a + + + Cursor + Cursor + + + Home + Principio + + + End + Final + RDMarkerPlayer diff --git a/lib/librd_fr.ts b/lib/librd_fr.ts index 0c756750..9fbcf5d9 100644 --- a/lib/librd_fr.ts +++ b/lib/librd_fr.ts @@ -2982,6 +2982,22 @@ Out Unable to open cut in audio player! + + Goto + + + + Cursor + + + + Home + + + + End + Fin + RDMarkerPlayer diff --git a/lib/librd_nb.ts b/lib/librd_nb.ts index 274ad5cb..69067067 100644 --- a/lib/librd_nb.ts +++ b/lib/librd_nb.ts @@ -3539,6 +3539,22 @@ ut Unable to open cut in audio player! + + Goto + Gå til + + + Cursor + Markør + + + Home + Heim + + + End + Slutten + RDMarkerPlayer diff --git a/lib/librd_nn.ts b/lib/librd_nn.ts index 274ad5cb..69067067 100644 --- a/lib/librd_nn.ts +++ b/lib/librd_nn.ts @@ -3539,6 +3539,22 @@ ut Unable to open cut in audio player! + + Goto + Gå til + + + Cursor + Markør + + + Home + Heim + + + End + Slutten + RDMarkerPlayer diff --git a/lib/librd_pt_BR.ts b/lib/librd_pt_BR.ts index 4d8eb51c..c0eb1623 100644 --- a/lib/librd_pt_BR.ts +++ b/lib/librd_pt_BR.ts @@ -3579,6 +3579,22 @@ Mínimo Unable to open cut in audio player! + + Goto + Ir Até + + + Cursor + Cursor + + + Home + Casa + + + End + Fim + RDMarkerPlayer diff --git a/lib/rdmarkerdialog.cpp b/lib/rdmarkerdialog.cpp index 53f8fedd..e5afee80 100644 --- a/lib/rdmarkerdialog.cpp +++ b/lib/rdmarkerdialog.cpp @@ -72,6 +72,28 @@ RDMarkerDialog::RDMarkerDialog(const QString &caption,int card,int port, connect(d_time_fullout_button,SIGNAL(clicked()), d_marker_view,SLOT(setMaximumShrinkFactor())); + // + // Goto Buttons + // + d_goto_group=new QGroupBox(tr("Goto"),this); + d_goto_group->setFont(labelFont()); + + d_goto_cursor_button=new QPushButton(tr("Cursor"),d_goto_group); + d_goto_cursor_button->setFont(buttonFont()); + connect(d_goto_cursor_button,SIGNAL(clicked()), + d_marker_view,SLOT(gotoCursor())); + + d_goto_home_button=new QPushButton(tr("Home"),d_goto_group); + d_goto_home_button->setFont(buttonFont()); + connect(d_goto_home_button,SIGNAL(clicked()), + d_marker_view,SLOT(gotoHome())); + + d_goto_end_button=new QPushButton(tr("End"),d_goto_group); + d_goto_end_button->setFont(buttonFont()); + connect(d_goto_end_button,SIGNAL(clicked()), + d_marker_view,SLOT(gotoEnd())); + + /************************************************************************** * Transport Section **************************************************************************/ @@ -322,38 +344,32 @@ void RDMarkerDialog::resizeEvent(QResizeEvent *e) // d_cut_readout->setGeometry(2, 2+d_marker_view->sizeHint().height(), - //30+RDMARKERDIALOG_WAVEFORM_HEIGHT+94, d_cut_readout->sizeHint().width(), d_cut_readout->sizeHint().height()); d_talk_readout->setGeometry(2+1*(d_talk_readout->sizeHint().width()-2), 2+d_marker_view->sizeHint().height(), - //30+RDMARKERDIALOG_WAVEFORM_HEIGHT+94, d_talk_readout->sizeHint().width(), d_talk_readout->sizeHint().height()); d_segue_readout->setGeometry(2+2*(d_segue_readout->sizeHint().width()-2), 2+d_marker_view->sizeHint().height(), - //30+RDMARKERDIALOG_WAVEFORM_HEIGHT+94, d_segue_readout->sizeHint().width(), d_segue_readout->sizeHint().height()); d_hook_readout->setGeometry(2+3*(d_hook_readout->sizeHint().width()-2), 2+d_marker_view->sizeHint().height(), - //30+RDMARKERDIALOG_WAVEFORM_HEIGHT+94, d_hook_readout->sizeHint().width(), d_hook_readout->sizeHint().height()); d_fadeup_readout->setGeometry(2, d_marker_view->sizeHint().height()-2+ - //30+RDMARKERDIALOG_WAVEFORM_HEIGHT+90+ d_hook_readout->sizeHint().height(), 2*d_fadeup_readout->sizeHint().width()-2, d_fadeup_readout->sizeHint().height()); d_fadedown_readout->setGeometry(2*d_fadedown_readout->sizeHint().width()-2, d_marker_view->sizeHint().height()-2+ - //30+RDMARKERDIALOG_WAVEFORM_HEIGHT+90+ d_hook_readout->sizeHint().height(), 2*d_fadedown_readout->sizeHint().width()-2, d_fadedown_readout->sizeHint().height()); @@ -366,11 +382,16 @@ void RDMarkerDialog::resizeEvent(QResizeEvent *e) 2+d_marker_view->sizeHint().height(), d_player->sizeHint().width(), d_player->sizeHint().height()); - /* - d_player->setGeometry(2,2+d_marker_view->sizeHint().height(), - d_player->sizeHint().width(), - d_player->sizeHint().height()); - */ + + d_goto_group->setGeometry(10, + 2+d_marker_view->sizeHint().height()+ + d_player->sizeHint().height()+5, + 90*3, + 80); + d_goto_cursor_button->setGeometry(5,25,80,50); + d_goto_home_button->setGeometry(95,25,80,50); + d_goto_end_button->setGeometry(185,25,80,50); + d_ok_button->setGeometry(w-180,h-60,80,50); d_cancel_button->setGeometry(w-90,h-60,80,50); } diff --git a/lib/rdmarkerdialog.h b/lib/rdmarkerdialog.h index 86f47fd0..cb029f3f 100644 --- a/lib/rdmarkerdialog.h +++ b/lib/rdmarkerdialog.h @@ -104,6 +104,11 @@ class RDMarkerDialog : public RDDialog RDMarkerReadout *d_segue_readout; RDMarkerReadout *d_hook_readout; + QGroupBox *d_goto_group; + QPushButton *d_goto_cursor_button; + QPushButton *d_goto_home_button; + QPushButton *d_goto_end_button; + QPushButton *d_ok_button; QPushButton *d_cancel_button; unsigned d_cart_number; diff --git a/lib/rdmarkerview.cpp b/lib/rdmarkerview.cpp index cf49a056..c574e63a 100644 --- a/lib/rdmarkerview.cpp +++ b/lib/rdmarkerview.cpp @@ -610,6 +610,26 @@ void RDMarkerView::setCursorPosition(unsigned msec) } +void RDMarkerView::gotoCursor() +{ + d_view->horizontalScrollBar()-> + setValue(d_cursor->pos().x()-d_view->width()/2); +} + + +void RDMarkerView::gotoHome() +{ + d_view->horizontalScrollBar()->setValue(0); +} + + +void RDMarkerView::gotoEnd() +{ + d_view->horizontalScrollBar()-> + setValue(d_view->horizontalScrollBar()->maximum()); +} + + void RDMarkerView::save() { QString sql; diff --git a/lib/rdmarkerview.h b/lib/rdmarkerview.h index b3b0ca3c..a246721c 100644 --- a/lib/rdmarkerview.h +++ b/lib/rdmarkerview.h @@ -110,6 +110,9 @@ class RDMarkerView : public QWidget void setMaximumShrinkFactor(); bool setCut(QString *err_msg,unsigned cartnum,int cutnum); void setCursorPosition(unsigned msec); + void gotoCursor(); + void gotoHome(); + void gotoEnd(); void save(); void clear();