2021-03-12 Fred Gleason <fredg@paravelsystems.com>

* Added a 'RDMarkerView' class.
	* Added a 'RDMarkerDialog' class.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2021-03-12 11:08:45 -05:00
parent f2b8f6ddba
commit e5631a1b5f
20 changed files with 955 additions and 8 deletions

View File

@@ -46,9 +46,12 @@ AudioCart::AudioCart(AudioControls *controls,RDCart *cart,QString *path,
rdcart_profile_rip=profile_rip;
rdcart_modification_allowed=rda->user()->editAudio()&&cart->owner().isEmpty();
rdcart_use_weighting=true;
//
// Dialogs
//
rdcart_marker_dialog=new RDMarkerDialog("RDLibrary",this);
QColor system_button_text_color = palette().buttonText().color();
@@ -183,6 +186,12 @@ AudioCart::AudioCart(AudioControls *controls,RDCart *cart,QString *path,
}
AudioCart::~AudioCart()
{
delete rdcart_marker_dialog;
}
QSize AudioCart::sizeHint() const
{
return QSize(640,290);
@@ -416,6 +425,29 @@ void AudioCart::extEditorCutData()
}
void AudioCart::editCutData()
{
QModelIndex row=SingleSelectedLine();
if(!row.isValid()) {
return;
}
QString cutname=rdcart_cut_model->cutName(row);
if(!RDAudioExists(cutname)) {
QMessageBox::information(this,"RDLibrary",
tr("No audio is present in the cut!"));
return;
}
if(rdcart_marker_dialog->exec(RDCut::cartNumber(cutname),RDCut::cutNumber(cutname))) {
emit cartDataChanged();
rdcart_cart->updateLength(rdcart_controls->enforce_length_box->isChecked(),
QTime().msecsTo(rdcart_controls->
forced_length_edit->time()));
rdcart_cut_model->refresh(row);
}
}
/*
void AudioCart::editCutData()
{
QModelIndex row=SingleSelectedLine();
@@ -443,7 +475,7 @@ void AudioCart::editCutData()
}
delete edit;
}
*/
void AudioCart::recordCutData()
{