2021-10-26 Fred Gleason <fredg@paravelsystems.com>

* Fixed a regression in rdairplay(1) that caused the 'shadow' of the
	Button Log events to fail to be reflected in the 'Main Log' Full Log
	widget.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2021-10-26 10:58:14 -04:00
parent a5f7a957a1
commit 8d49a3f8a5
6 changed files with 45 additions and 2 deletions

View File

@ -22532,3 +22532,7 @@
platform styling hints.
* Modified the marker readouts in rdlibrary(1) so as to better respect
platform styling hints.
2021-10-26 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in rdairplay(1) that caused the 'shadow' of the
Button Log events to fail to be reflected in the 'Main Log' Full Log
widget.

View File

@ -63,6 +63,7 @@ RDLogPlay::RDLogPlay(int id,RDEventPlayer *player,QObject *parent)
play_rescan_pos=0;
play_refreshable=false;
play_audition_preroll=rda->airplayConf()->auditionPreroll();
play_slot_quantity=1;
for(int i=0;i<LOGPLAY_MAX_PLAYS;i++) {
play_slot_id[i]=i;
}
@ -1403,6 +1404,18 @@ bool RDLogPlay::isRefreshable() const
}
void RDLogPlay::setSlotQuantity(int slot_quan)
{
if(slot_quan!=play_slot_quantity) {
play_slot_quantity=slot_quan;
QVector<int> roles;
roles.push_back(Qt::BackgroundRole);
emit dataChanged(createIndex(play_next_line,0),
createIndex(play_next_line+play_slot_quantity-1,columnCount()),roles);
}
}
void RDLogPlay::transTimerData()
{
int lines[TRANSPORT_QUANTITY];
@ -1846,7 +1859,8 @@ QColor RDLogPlay::rowBackgroundColor(int row,RDLogLine *ll) const
return LOG_ERROR_COLOR;
}
else {
if((play_next_line>=0)&&(play_next_line==row)) {
if((play_next_line>=0)&&(play_slot_quantity>0)&&
(row>=play_next_line)&&(row<(play_next_line+play_slot_quantity-1))) {
if(ll->evergreen()) {
return LOG_EVERGREEN_COLOR;
}
@ -2839,7 +2853,8 @@ void RDLogPlay::ChangeTransport()
emit transportChanged();
if(play_next_line>=0) {
emit dataChanged(createIndex(play_next_line,0),
createIndex(play_next_line+6,columnCount()));
createIndex(play_next_line+play_slot_quantity-1,
columnCount()));
}
}

View File

@ -110,6 +110,9 @@ class RDLogPlay : public RDLogModel
void resync();
bool isRefreshable() const;
public slots:
void setSlotQuantity(int slot_quan);
private slots:
void transTimerData();
void graceTimerData();
@ -253,6 +256,7 @@ class RDLogPlay : public RDLogModel
RDEventPlayer *play_event_player;
RDUnixSocket *play_pad_socket;
bool play_hours[24];
int play_slot_quantity;
};

View File

@ -32,6 +32,7 @@ ButtonLog::ButtonLog(RDLogPlay *log,int id,RDAirPlayConf *conf,bool allow_pause,
log_action_mode=RDAirPlayConf::Normal;
log_op_mode=RDAirPlayConf::LiveAssist;
log_pause_enabled=allow_pause;
log_slot_quantity=0;
//
// Set Mappings
@ -277,6 +278,12 @@ void ButtonLog::setActionMode(RDAirPlayConf::ActionMode mode,int *cartnum)
}
int ButtonLog::slotQuantity() const
{
return log_slot_quantity;
}
PieCounter *ButtonLog::pieCounterWidget() const
{
return log_pie_counter_widget;
@ -499,6 +506,7 @@ void ButtonLog::resizeEvent(QResizeEvent *e)
LOGLINEBOX_FULL_HEIGHT);
}
int slot_quantity=BUTTON_PLAY_BUTTONS;
QRect viewport=QRect(0,0,size().width(),size().height());
for(int i=BUTTON_PLAY_BUTTONS;i<BUTTON_TOTAL_BUTTONS;i++) {
log_line_box[i]->setGeometry(10+85,
@ -515,6 +523,13 @@ void ButtonLog::resizeEvent(QResizeEvent *e)
viewport.contains(log_start_button[i]->geometry());
log_line_box[i]->setVisible(visible);
log_start_button[i]->setVisible(visible);
if(visible) {
slot_quantity++;
}
}
if(slot_quantity!=log_slot_quantity) {
log_slot_quantity=slot_quantity;
emit slotQuantityChanged(log_slot_quantity);
}
}

View File

@ -48,6 +48,7 @@ class ButtonLog : public RDWidget
void setOpMode(RDAirPlayConf::OpMode mode);
RDAirPlayConf::ActionMode actionMode() const;
void setActionMode(RDAirPlayConf::ActionMode mode,int *cartnum=0);
int slotQuantity() const;
PieCounter *pieCounterWidget() const;
PostCounter *postCounterWidget() const;
StopCounter *stopCounterWidget() const;
@ -74,6 +75,7 @@ class ButtonLog : public RDWidget
signals:
void selectClicked(int id,int line,RDLogLine::Status);
void cartDropped(int id,int line,RDLogLine *ll);
void slotQuantityChanged(int slots);
private:
void UpdateEvents();
@ -85,6 +87,7 @@ class ButtonLog : public RDWidget
RDAirPlayConf::ActionMode log_action_mode;
LogLineBox *log_line_box[BUTTON_TOTAL_BUTTONS];
StartButton *log_start_button[BUTTON_TOTAL_BUTTONS];
int log_slot_quantity;
int log_line_counter;
EditEvent *log_event_edit;
bool log_pause_enabled;

View File

@ -698,6 +698,8 @@ MainWidget::MainWidget(RDConfig *config,QWidget *parent)
air_button_list->stopCounterWidget(),SLOT(tickCounter()));
connect(air_log[0],SIGNAL(nextStopChanged(QTime)),
air_button_list->stopCounterWidget(),SLOT(setTime(QTime)));
connect(air_button_list,SIGNAL(slotQuantityChanged(int)),
air_log[0],SLOT(setSlotQuantity(int)));
//
// Set Startup Mode