mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-08-16 08:34:12 +02:00
2019-10-21 Fred Gleason <fredg@paravelsystems.com>
* 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).
This commit is contained in:
parent
9709016091
commit
ec0e79090c
@ -19214,3 +19214,10 @@
|
||||
2019-10-21 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed the font used for labels in the 'Edit RDLogEdit' dialog
|
||||
in rdadmin(1).
|
||||
2019-10-21 Fred Gleason <fredg@paravelsystems.com>
|
||||
* 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).
|
||||
|
@ -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
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* Current Database Version
|
||||
*/
|
||||
#define RD_VERSION_DATABASE 310
|
||||
#define RD_VERSION_DATABASE 311
|
||||
|
||||
|
||||
#endif // DBVERSION_H
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -3183,6 +3183,10 @@ nastaveném pro běh služby CAE pro naplnění databáze se zdroji zvuku.</tran
|
||||
<source>Output</source>
|
||||
<translation type="unfinished">Výstup</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>WaveForm Caption:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditRDPanel</name>
|
||||
|
@ -3083,6 +3083,10 @@ configured to run the CAE service in order to populate the audio resources datab
|
||||
<source>Output</source>
|
||||
<translation type="unfinished">Ausgang</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>WaveForm Caption:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditRDPanel</name>
|
||||
|
@ -3171,6 +3171,10 @@ computador para obtener los recursos de audio de dicho equipo.</translation>
|
||||
<source>Output</source>
|
||||
<translation type="unfinished">Salida</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>WaveForm Caption:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditRDPanel</name>
|
||||
|
@ -2505,6 +2505,10 @@ configured to run the CAE service in order to populate the audio resources datab
|
||||
<source>Output</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>WaveForm Caption:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditRDPanel</name>
|
||||
|
@ -3011,6 +3011,10 @@ configured to run the CAE service in order to populate the audio resources datab
|
||||
<source>Output</source>
|
||||
<translation type="unfinished">Utgang</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>WaveForm Caption:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditRDPanel</name>
|
||||
|
@ -3011,6 +3011,10 @@ configured to run the CAE service in order to populate the audio resources datab
|
||||
<source>Output</source>
|
||||
<translation type="unfinished">Utgang</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>WaveForm Caption:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditRDPanel</name>
|
||||
|
@ -3059,6 +3059,10 @@ configured to run the CAE service in order to populate the audio resources datab
|
||||
<source>Output</source>
|
||||
<translation type="unfinished">Saída</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>WaveForm Caption:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditRDPanel</name>
|
||||
|
@ -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();
|
||||
|
@ -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_schema<cur_schema)) {
|
||||
DropColumn("RDLOGEDIT","WAVEFORM_CAPTION");
|
||||
|
||||
WriteSchemaVersion(--cur_schema);
|
||||
}
|
||||
|
||||
//
|
||||
// Revert 310
|
||||
//
|
||||
|
@ -158,6 +158,7 @@ void MainObject::InitializeSchemaMap() {
|
||||
global_version_map["2.19"]=275;
|
||||
global_version_map["3.0"]=308;
|
||||
global_version_map["3.1"]=310;
|
||||
global_version_map["3.2"]=311;
|
||||
}
|
||||
|
||||
|
||||
|
@ -9846,6 +9846,17 @@ bool MainObject::UpdateSchema(int cur_schema,int set_schema,QString *err_msg)
|
||||
WriteSchemaVersion(++cur_schema);
|
||||
}
|
||||
|
||||
if((cur_schema<311)&&(set_schema>cur_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...
|
||||
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user