diff --git a/ChangeLog b/ChangeLog index ad94f9a4..b4547d40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19214,3 +19214,10 @@ 2019-10-21 Fred Gleason * Fixed the font used for labels in the 'Edit RDLogEdit' dialog in rdadmin(1). +2019-10-21 Fred Gleason + * Added an 'RDLOGEDIT.WAVEFORM_CAPTION' field to the database. + * Incremented the database version to 311. + * Added a 'WaveForm Caption' control to the 'Edit RDLogEdit' dialog + in rdadmin(1). + * Implemented the 'WaveForm Caption' setting in the Voicetracker + dialog in rdlogedit(1). diff --git a/docs/tables/rd_logedit.txt b/docs/tables/rd_logedit.txt index 2121ec7d..a7d969c8 100644 --- a/docs/tables/rd_logedit.txt +++ b/docs/tables/rd_logedit.txt @@ -16,6 +16,7 @@ ENABLE_SECOND_START enum('N','Y') DEFAULT_CHANNELS int(10) unsigned MAXLENGTH int(11) Max record length, in sec TAIL_PREROLL int(10) unsigned +WAVEFORM_CAPTION varchar(64) START_CART int(10) unsigned END_CART int(10) unsigned REC_START_CART int(10) unsigned diff --git a/lib/dbversion.h b/lib/dbversion.h index fe18f340..24b722ff 100644 --- a/lib/dbversion.h +++ b/lib/dbversion.h @@ -24,7 +24,7 @@ /* * Current Database Version */ -#define RD_VERSION_DATABASE 310 +#define RD_VERSION_DATABASE 311 #endif // DBVERSION_H diff --git a/lib/rdlogedit_conf.cpp b/lib/rdlogedit_conf.cpp index da090d6e..fe1a4273 100644 --- a/lib/rdlogedit_conf.cpp +++ b/lib/rdlogedit_conf.cpp @@ -185,6 +185,19 @@ void RDLogeditConf::setTailPreroll(unsigned length) const } +QString RDLogeditConf::waveformCaption() const +{ + return RDGetSqlValue("RDLOGEDIT","STATION",lib_station,"WAVEFORM_CAPTION"). + toString(); +} + + +void RDLogeditConf::setWaveformCaption(const QString &str) +{ + SetRow("WAVEFORM_CAPTION",str); +} + + unsigned RDLogeditConf::startCart() const { return RDGetSqlValue("RDLOGEDIT","STATION",lib_station,"START_CART").toUInt(); @@ -340,6 +353,19 @@ void RDLogeditConf::SetRow(const QString ¶m,unsigned value) const } +void RDLogeditConf::SetRow(const QString ¶m,const QString &value) const +{ + RDSqlQuery *q; + QString sql; + + sql=QString("update RDLOGEDIT set ")+ + param+"=\""+RDEscapeString(value)+"\" where "+ + "STATION=\""+RDEscapeString(lib_station)+"\"", + q=new RDSqlQuery(sql); + delete q; +} + + void RDLogeditConf::SetRow(const QString ¶m,bool value) const { RDSqlQuery *q; diff --git a/lib/rdlogedit_conf.h b/lib/rdlogedit_conf.h index 814f8a10..6c0e6d45 100644 --- a/lib/rdlogedit_conf.h +++ b/lib/rdlogedit_conf.h @@ -53,6 +53,8 @@ class RDLogeditConf void setMaxLength(unsigned length) const; unsigned tailPreroll() const; void setTailPreroll(unsigned length) const; + QString waveformCaption() const; + void setWaveformCaption(const QString &str); unsigned startCart() const; void setStartCart(unsigned cartnum) const; unsigned endCart() const; @@ -73,6 +75,7 @@ class RDLogeditConf void SetRow(const QString ¶m,int value) const; void SetRow(const QString ¶m,unsigned value) const; void SetRow(const QString ¶m,bool value) const; + void SetRow(const QString ¶m,const QString &value) const; QString lib_station; }; diff --git a/rdadmin/edit_rdlogedit.cpp b/rdadmin/edit_rdlogedit.cpp index c13838c2..e0c7f13f 100644 --- a/rdadmin/edit_rdlogedit.cpp +++ b/rdadmin/edit_rdlogedit.cpp @@ -180,20 +180,32 @@ EditRDLogedit::EditRDLogedit(RDStation *station,RDStation *cae_station, QIntValidator *validator=new QIntValidator(this); validator->setRange(1,999999); + // + // Waveform Caption + // + lib_waveform_caption_edit=new QLineEdit(this); + lib_waveform_caption_edit->setGeometry(180,268,sizeHint().width()-190,19); + lib_waveform_caption_edit->setValidator(validator); + QLabel *lib_waveform_caption_label= + new QLabel(lib_waveform_caption_edit,tr("WaveForm Caption:"),this); + lib_waveform_caption_label->setFont(labelFont()); + lib_waveform_caption_label->setGeometry(25,268,150,19); + lib_waveform_caption_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); + // // Play Start Cart // lib_startcart_edit=new QLineEdit(this); - lib_startcart_edit->setGeometry(180,268,70,19); + lib_startcart_edit->setGeometry(180,290,70,19); lib_startcart_edit->setValidator(validator); QLabel *lib_startcart_label= new QLabel(lib_startcart_edit,tr("Play &Start Cart:"),this); lib_startcart_label->setFont(labelFont()); - lib_startcart_label->setGeometry(25,268,150,19); + lib_startcart_label->setGeometry(25,290,150,19); lib_startcart_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); QPushButton *button=new QPushButton(this); button->setFont(subButtonFont()); - button->setGeometry(260,266,55,23); + button->setGeometry(260,288,55,23); button->setText(tr("Select")); connect(button,SIGNAL(clicked()),this,SLOT(selectStartData())); @@ -201,16 +213,16 @@ EditRDLogedit::EditRDLogedit(RDStation *station,RDStation *cae_station, // Play End Cart // lib_endcart_edit=new QLineEdit(this); - lib_endcart_edit->setGeometry(180,292,70,19); + lib_endcart_edit->setGeometry(180,314,70,19); lib_endcart_edit->setValidator(validator); QLabel *lib_endcart_label= new QLabel(lib_endcart_edit,tr("Play &End Cart:"),this); lib_endcart_label->setFont(labelFont()); - lib_endcart_label->setGeometry(25,292,150,19); + lib_endcart_label->setGeometry(25,314,150,19); lib_endcart_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); button=new QPushButton(this); button->setFont(subButtonFont()); - button->setGeometry(260,290,55,23); + button->setGeometry(260,310,55,23); button->setText(tr("Select")); connect(button,SIGNAL(clicked()),this,SLOT(selectEndData())); @@ -218,16 +230,16 @@ EditRDLogedit::EditRDLogedit(RDStation *station,RDStation *cae_station, // Record Start Cart // lib_recstartcart_edit=new QLineEdit(this); - lib_recstartcart_edit->setGeometry(180,316,70,19); + lib_recstartcart_edit->setGeometry(180,338,70,19); lib_recstartcart_edit->setValidator(validator); QLabel *lib_recstartcart_label= new QLabel(lib_recstartcart_edit,tr("&Record Start Cart:"),this); lib_recstartcart_label->setFont(labelFont()); - lib_recstartcart_label->setGeometry(25,316,150,19); + lib_recstartcart_label->setGeometry(25,338,150,19); lib_recstartcart_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); button=new QPushButton(this); button->setFont(subButtonFont()); - button->setGeometry(260,314,55,23); + button->setGeometry(260,336,55,23); button->setText(tr("Select")); connect(button,SIGNAL(clicked()),this,SLOT(selectRecordStartData())); @@ -235,16 +247,16 @@ EditRDLogedit::EditRDLogedit(RDStation *station,RDStation *cae_station, // Record End Cart // lib_recendcart_edit=new QLineEdit(this); - lib_recendcart_edit->setGeometry(180,340,70,19); + lib_recendcart_edit->setGeometry(180,362,70,19); lib_recendcart_edit->setValidator(validator); QLabel *lib_recendcart_label= new QLabel(lib_recendcart_edit,tr("Re&cord End Cart:"),this); lib_recendcart_label->setFont(labelFont()); - lib_recendcart_label->setGeometry(25,340,150,19); + lib_recendcart_label->setGeometry(25,362,150,19); lib_recendcart_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); button=new QPushButton(this); button->setFont(subButtonFont()); - button->setGeometry(260,338,55,23); + button->setGeometry(260,360,55,23); button->setText(tr("Select")); connect(button,SIGNAL(clicked()),this,SLOT(selectRecordEndData())); @@ -252,21 +264,21 @@ EditRDLogedit::EditRDLogedit(RDStation *station,RDStation *cae_station, // Default Channels // lib_channels_box=new QComboBox(this); - lib_channels_box->setGeometry(180,364,60,19); + lib_channels_box->setGeometry(180,386,60,19); QLabel *lib_channels_label=new QLabel(lib_channels_box,tr("&Channels:"),this); lib_channels_label->setFont(labelFont()); - lib_channels_label->setGeometry(25,364,150,19); + lib_channels_label->setGeometry(25,386,150,19); lib_channels_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Default Transition Type // lib_default_transtype_box=new QComboBox(this); - lib_default_transtype_box->setGeometry(180,388,100,19); + lib_default_transtype_box->setGeometry(180,410,100,19); QLabel *lib_default_transtype_label= new QLabel(lib_default_transtype_box,tr("Default Transition:"),this); lib_default_transtype_label->setFont(labelFont()); - lib_default_transtype_label->setGeometry(25,388,150,19); + lib_default_transtype_label->setGeometry(25,410,150,19); lib_default_transtype_label-> setAlignment(Qt::AlignRight|Qt::AlignVCenter); lib_default_transtype_box->insertItem(tr("Play")); @@ -317,6 +329,7 @@ EditRDLogedit::EditRDLogedit(RDStation *station,RDStation *cae_station, lib_maxlength_time->setTime(QTime().addMSecs(lib_lib->maxLength())); lib_threshold_spin->setValue(lib_lib->trimThreshold()/100); lib_normalization_spin->setValue(lib_lib->ripperLevel()/100); + lib_waveform_caption_edit->setText(lib_lib->waveformCaption()); unsigned cart=lib_lib->startCart(); if(cart>0) { lib_startcart_edit->setText(QString().sprintf("%06u",cart)); @@ -371,7 +384,7 @@ EditRDLogedit::~EditRDLogedit() QSize EditRDLogedit::sizeHint() const { - return QSize(395,478); + return QSize(395,500); } @@ -440,6 +453,7 @@ void EditRDLogedit::okData() lib_lib->setTrimThreshold(lib_threshold_spin->value()*100); lib_lib->setRipperLevel(lib_normalization_spin->value()*100); lib_lib->setTailPreroll(lib_preroll_spin->value()); + lib_lib->setWaveformCaption(lib_waveform_caption_edit->text()); if(lib_startcart_edit->text().isEmpty()) { lib_lib->setStartCart(0); } diff --git a/rdadmin/edit_rdlogedit.h b/rdadmin/edit_rdlogedit.h index fd50fc6c..294b9798 100644 --- a/rdadmin/edit_rdlogedit.h +++ b/rdadmin/edit_rdlogedit.h @@ -62,6 +62,7 @@ class EditRDLogedit : public RDDialog QSpinBox *lib_threshold_spin; QSpinBox *lib_normalization_spin; Q3TimeEdit *lib_maxlength_time; + QLineEdit *lib_waveform_caption_edit; QLineEdit *lib_startcart_edit; QLineEdit *lib_endcart_edit; QLineEdit *lib_recstartcart_edit; @@ -72,4 +73,4 @@ class EditRDLogedit : public RDDialog }; -#endif +#endif // EDIT_RDLOGEDIT_H diff --git a/rdadmin/rdadmin_cs.ts b/rdadmin/rdadmin_cs.ts index 3b646b3a..df1df5ea 100644 --- a/rdadmin/rdadmin_cs.ts +++ b/rdadmin/rdadmin_cs.ts @@ -3183,6 +3183,10 @@ nastaveném pro běh služby CAE pro naplnění databáze se zdroji zvuku.Output Výstup + + WaveForm Caption: + + EditRDPanel diff --git a/rdadmin/rdadmin_de.ts b/rdadmin/rdadmin_de.ts index 2895c4cf..c11fa9c4 100644 --- a/rdadmin/rdadmin_de.ts +++ b/rdadmin/rdadmin_de.ts @@ -3083,6 +3083,10 @@ configured to run the CAE service in order to populate the audio resources datab Output Ausgang + + WaveForm Caption: + + EditRDPanel diff --git a/rdadmin/rdadmin_es.ts b/rdadmin/rdadmin_es.ts index 1fc4c2ef..252447f6 100644 --- a/rdadmin/rdadmin_es.ts +++ b/rdadmin/rdadmin_es.ts @@ -3171,6 +3171,10 @@ computador para obtener los recursos de audio de dicho equipo. Output Salida + + WaveForm Caption: + + EditRDPanel diff --git a/rdadmin/rdadmin_fr.ts b/rdadmin/rdadmin_fr.ts index 3f435b23..3010d1ce 100644 --- a/rdadmin/rdadmin_fr.ts +++ b/rdadmin/rdadmin_fr.ts @@ -2505,6 +2505,10 @@ configured to run the CAE service in order to populate the audio resources datab Output + + WaveForm Caption: + + EditRDPanel diff --git a/rdadmin/rdadmin_nb.ts b/rdadmin/rdadmin_nb.ts index d6004944..e3dc4b57 100644 --- a/rdadmin/rdadmin_nb.ts +++ b/rdadmin/rdadmin_nb.ts @@ -3011,6 +3011,10 @@ configured to run the CAE service in order to populate the audio resources datab Output Utgang + + WaveForm Caption: + + EditRDPanel diff --git a/rdadmin/rdadmin_nn.ts b/rdadmin/rdadmin_nn.ts index d6004944..e3dc4b57 100644 --- a/rdadmin/rdadmin_nn.ts +++ b/rdadmin/rdadmin_nn.ts @@ -3011,6 +3011,10 @@ configured to run the CAE service in order to populate the audio resources datab Output Utgang + + WaveForm Caption: + + EditRDPanel diff --git a/rdadmin/rdadmin_pt_BR.ts b/rdadmin/rdadmin_pt_BR.ts index 1dbf552d..c4d5229a 100644 --- a/rdadmin/rdadmin_pt_BR.ts +++ b/rdadmin/rdadmin_pt_BR.ts @@ -3059,6 +3059,10 @@ configured to run the CAE service in order to populate the audio resources datab Output Saída + + WaveForm Caption: + + EditRDPanel diff --git a/rdlogedit/voice_tracker.cpp b/rdlogedit/voice_tracker.cpp index ed2c5aec..35379276 100644 --- a/rdlogedit/voice_tracker.cpp +++ b/rdlogedit/voice_tracker.cpp @@ -3124,8 +3124,8 @@ void VoiceTracker::DrawTrackMap(int trackno) } } wpg[0]->setPen(TRACKER_TEXT_COLOR); - wpg[0]->drawText(5,14,edit_logline[0]->title()+" - "+ - edit_logline[0]->artist()); + wpg[0]->drawText(5,14,edit_logline[0]-> + resolveWildcards(rda->logeditConf()->waveformCaption())); wpg[0]->end(); } break; @@ -3392,8 +3392,8 @@ void VoiceTracker::DrawTrackMap(int trackno) DrawRubberBand(wpg[2],2); } wpg[2]->setPen(TRACKER_TEXT_COLOR); - wpg[2]->drawText(5,14,edit_logline[2]->title()+" - "+ - edit_logline[2]->artist()); + wpg[2]->drawText(5,14,edit_logline[2]-> + resolveWildcards(rda->logeditConf()->waveformCaption())); if(track_recording && (edit_deck[2]->state()==RDPlayDeck::Playing || edit_deck[2]->state()==RDPlayDeck::Stopping)) { int talk_len=edit_logline[2]->talkLength(); diff --git a/utils/rddbmgr/revertschema.cpp b/utils/rddbmgr/revertschema.cpp index 3dfc7890..cd33ed83 100644 --- a/utils/rddbmgr/revertschema.cpp +++ b/utils/rddbmgr/revertschema.cpp @@ -40,6 +40,15 @@ bool MainObject::RevertSchema(int cur_schema,int set_schema,QString *err_msg) // NEW SCHEMA REVERSIONS GO HERE... + // + // Revert 311 + // + if((cur_schema==311)&&(set_schemacur_schema)) { + sql=QString("alter table RDLOGEDIT add column ")+ + "WAVEFORM_CAPTION varchar(64) not null default '%t - %a' "+ + "after TAIL_PREROLL"; + if(!RDSqlQuery::apply(sql,err_msg)) { + return false; + } + + WriteSchemaVersion(++cur_schema); + } + // NEW SCHEMA UPDATES GO HERE... //