mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-20 23:03:04 +02:00
2025-04-26 Fred Gleason <fredg@paravelsystems.com>
* Cleaned up compiler warnings in 'rdairplay/'. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
868e0fb559
commit
0a1844d19e
@ -24988,3 +24988,5 @@
|
||||
* Cleaned up compiler warnings in 'importers/'.
|
||||
2025-04-26 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Cleaned up compiler warnings in 'rdadmin/'.
|
||||
2025-04-26 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Cleaned up compiler warnings in 'rdairplay/'.
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// The button log widget for RDAirPlay
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2025 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -72,24 +72,14 @@ ButtonLog::ButtonLog(RDLogPlay *log,int id,RDAirPlayConf *conf,bool allow_pause,
|
||||
QSignalMapper *mapper=new QSignalMapper(this);
|
||||
connect(mapper,SIGNAL(mapped(int)),
|
||||
this,SLOT(startButton(int)));
|
||||
for(int i=0;i<BUTTON_PLAY_BUTTONS;i++) {
|
||||
for(int i=0;i<BUTTON_TOTAL_BUTTONS;i++) {
|
||||
log_line_box[i]=new LogLineBox(conf,this);
|
||||
log_line_box[i]->setMode(LogLineBox::Full);
|
||||
log_line_box[i]->setAcceptDrops(rda->station()->enableDragdrop());
|
||||
log_line_box[i]->setAllowDrags(rda->station()->enableDragdrop());
|
||||
connect(log_line_box[i],SIGNAL(doubleClicked(int)),
|
||||
this,SLOT(boxDoubleClickedData(int)));
|
||||
connect(log_line_box[i],SIGNAL(cartDropped(int,RDLogLine *)),
|
||||
this,SLOT(cartDroppedData(int,RDLogLine *)));
|
||||
log_start_button[i]=new StartButton(allow_pause,this);
|
||||
mapper->setMapping(log_start_button[i],i);
|
||||
connect(log_start_button[i],SIGNAL(clicked()),
|
||||
mapper,SLOT(map()));
|
||||
}
|
||||
|
||||
for(int i=BUTTON_PLAY_BUTTONS;i<BUTTON_TOTAL_BUTTONS;i++) {
|
||||
log_line_box[i]=new LogLineBox(conf,this);
|
||||
log_line_box[i]->setMode(LogLineBox::Half);
|
||||
if(i<BUTTON_PLAY_BUTTONS) {
|
||||
log_line_box[i]->setMode(LogLineBox::Full);
|
||||
}
|
||||
else {
|
||||
log_line_box[i]->setMode(LogLineBox::Half);
|
||||
}
|
||||
log_line_box[i]->setAcceptDrops(rda->station()->enableDragdrop());
|
||||
log_line_box[i]->setAllowDrags(rda->station()->enableDragdrop());
|
||||
connect(log_line_box[i],SIGNAL(doubleClicked(int)),
|
||||
@ -716,8 +706,7 @@ void ButtonLog::UpdateButtons()
|
||||
}
|
||||
}
|
||||
else {
|
||||
log_start_button[i]->
|
||||
setMode(StartButton::Disabled,logline->cartType());
|
||||
log_start_button[i]->setMode(StartButton::Disabled,RDCart::All);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// On Air Playout Utility for Rivendell.
|
||||
//
|
||||
// (C) Copyright 2002-2022 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2025 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -835,7 +835,7 @@ void LogLineBox::mouseMoveEvent(QMouseEvent *e)
|
||||
line_group_label->palette().
|
||||
color(QPalette::Foreground));
|
||||
drag->setMimeData(cd);
|
||||
drag->setPixmap(*(line_icon_label->pixmap()));
|
||||
drag->setPixmap(line_icon_label->pixmap((Qt::ReturnByValueConstant)0));
|
||||
drag->exec();
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Message Widget for RDAirPlay Rivendell
|
||||
//
|
||||
// (C) Copyright 2024 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2024-2025 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -168,7 +168,7 @@ void MessageWidget::resizeEvent(QResizeEvent *e)
|
||||
QFont MessageWidget::MessageFont(QString str) const
|
||||
{
|
||||
for(int i=(MESSAGE_FONT_QUANTITY-1);i>=0;i--) {
|
||||
if(d_message_metrics[i]->width(str)<MESSAGE_WIDGET_WIDTH) {
|
||||
if(d_message_metrics[i]->horizontalAdvance(str)<MESSAGE_WIDGET_WIDTH) {
|
||||
return d_message_fonts[i];
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// The mode display widget for RDAirPlay in Rivendell
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2025 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -101,10 +101,10 @@ void ModeDisplay::WriteMap()
|
||||
p->setPen(QColor(Qt::color1));
|
||||
p->setFont(subLabelFont());
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().
|
||||
width(tr("Operating Mode")))/2,
|
||||
horizontalAdvance(tr("Operating Mode")))/2,
|
||||
22,tr("Operating Mode"));
|
||||
p->setFont(bannerFont());
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().width(tr("LiveAssist")))/2,
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().horizontalAdvance(tr("LiveAssist")))/2,
|
||||
48,tr("LiveAssist"));
|
||||
setPalette(live_assist_color);
|
||||
break;
|
||||
@ -115,10 +115,10 @@ void ModeDisplay::WriteMap()
|
||||
p->setPen(QColor(Qt::color1));
|
||||
p->setFont(subLabelFont());
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().
|
||||
width(tr("Operating Mode")))/2,
|
||||
horizontalAdvance(tr("Operating Mode")))/2,
|
||||
22,tr("Operating Mode"));
|
||||
p->setFont(bannerFont());
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().width(tr("Automatic")))/2,
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().horizontalAdvance(tr("Automatic")))/2,
|
||||
48,tr("Automatic"));
|
||||
setPalette(auto_color);
|
||||
break;
|
||||
@ -129,10 +129,10 @@ void ModeDisplay::WriteMap()
|
||||
p->setPen(QColor(Qt::color1));
|
||||
p->setFont(subLabelFont());
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().
|
||||
width(tr("Operating Mode")))/2,
|
||||
horizontalAdvance(tr("Operating Mode")))/2,
|
||||
22,tr("Operating Mode"));
|
||||
p->setFont(bannerFont());
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().width(tr("Manual")))/2,
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().horizontalAdvance(tr("Manual")))/2,
|
||||
48,tr("Manual"));
|
||||
setPalette(manual_color);
|
||||
break;
|
||||
@ -149,10 +149,10 @@ void ModeDisplay::WriteMap()
|
||||
p->setPen(QColor(Qt::color1));
|
||||
p->setFont(subLabelFont());
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().
|
||||
width(tr("Operating Mode")))/2,
|
||||
horizontalAdvance(tr("Operating Mode")))/2,
|
||||
12,tr("Operating Mode"));
|
||||
p->setFont(bannerFont());
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().width(tr("LiveAssist")))/2,
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().horizontalAdvance(tr("LiveAssist")))/2,
|
||||
38,tr("LiveAssist"));
|
||||
setPalette(live_assist_color);
|
||||
break;
|
||||
@ -163,10 +163,10 @@ void ModeDisplay::WriteMap()
|
||||
p->setPen(QColor(Qt::color1));
|
||||
p->setFont(subLabelFont());
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().
|
||||
width(tr("Operating Mode")))/2,
|
||||
horizontalAdvance(tr("Operating Mode")))/2,
|
||||
12,tr("Operating Mode"));
|
||||
p->setFont(bannerFont());
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().width(tr("Automatic")))/2,
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().horizontalAdvance(tr("Automatic")))/2,
|
||||
39,tr("Automatic"));
|
||||
setPalette(auto_color);
|
||||
break;
|
||||
@ -177,10 +177,10 @@ void ModeDisplay::WriteMap()
|
||||
p->setPen(QColor(Qt::color1));
|
||||
p->setFont(subLabelFont());
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().
|
||||
width(tr("Operating Mode")))/2,
|
||||
horizontalAdvance(tr("Operating Mode")))/2,
|
||||
12,tr("Operating Mode"));
|
||||
p->setFont(bannerFont());
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().width(tr("Manual")))/2,
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().horizontalAdvance(tr("Manual")))/2,
|
||||
38,tr("Manual"));
|
||||
setPalette(manual_color);
|
||||
break;
|
||||
@ -192,7 +192,7 @@ void ModeDisplay::WriteMap()
|
||||
str=tr("A1")+": "+RDAirPlayConf::logModeText(mode_mode[1]);
|
||||
p->drawText(10,sizeHint().height()-2-5,str);
|
||||
str=tr("A2")+": "+RDAirPlayConf::logModeText(mode_mode[2]);
|
||||
p->drawText(sizeHint().width()-p->fontMetrics().width(str)-10,sizeHint().height()-2-5,str);
|
||||
p->drawText(sizeHint().width()-p->fontMetrics().horizontalAdvance(str)-10,sizeHint().height()-2-5,str);
|
||||
}
|
||||
p->end();
|
||||
delete p;
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// The post counter widget for Rivendell
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2025 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -169,10 +169,10 @@ void PostCounter::UpdateDisplay()
|
||||
p->setPen(QColor(text_color));
|
||||
p->setFont(subLabelFont());
|
||||
p->drawText((size().width()-2-p->
|
||||
fontMetrics().width(point))/2,32,point);
|
||||
fontMetrics().horizontalAdvance(point))/2,32,point);
|
||||
p->setFont(bannerFont());
|
||||
p->drawText((size().width()-2-p->
|
||||
fontMetrics().width(state))/2,58,state);
|
||||
fontMetrics().horizontalAdvance(state))/2,58,state);
|
||||
p->end();
|
||||
delete p;
|
||||
setIcon(pix);
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// The On Air Playout Utility for Rivendell.
|
||||
//
|
||||
// (C) Copyright 2002-2024 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2025 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -1854,13 +1854,11 @@ void MainWidget::resizeEvent(QResizeEvent *e)
|
||||
|
||||
void MainWidget::wheelEvent(QWheelEvent *e)
|
||||
{
|
||||
if((air_panel!=NULL)&&(e->orientation()==Qt::Vertical)) {
|
||||
if(e->delta()>0) {
|
||||
air_panel->soundPanelWidget()->panelDown();
|
||||
}
|
||||
if(e->delta()<0) {
|
||||
air_panel->soundPanelWidget()->panelUp();
|
||||
}
|
||||
if(e->angleDelta().y()>0) {
|
||||
air_panel->soundPanelWidget()->panelDown();
|
||||
}
|
||||
if(e->angleDelta().y()<0) {
|
||||
air_panel->soundPanelWidget()->panelUp();
|
||||
}
|
||||
e->accept();
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// The Start Button for RDAirPlay Rivendell
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2025 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -178,19 +178,19 @@ void StartButton::paintEvent(QPaintEvent *e)
|
||||
if(start_mode!=StartButton::Disabled) {
|
||||
p->setPen(QColor(Qt::color1));
|
||||
p->setFont(labelFont());
|
||||
p->drawText((w-p->fontMetrics().width(start_title))/2,
|
||||
p->drawText((w-p->fontMetrics().horizontalAdvance(start_title))/2,
|
||||
22,start_title);
|
||||
p->drawLine(10,24,70,24);
|
||||
if(!start_time.isNull()) {
|
||||
p->drawText((w-p->fontMetrics().width(rda->timeString(start_time)))/2,40,
|
||||
p->drawText((w-p->fontMetrics().horizontalAdvance(rda->timeString(start_time)))/2,40,
|
||||
rda->timeString(start_time));
|
||||
}
|
||||
else {
|
||||
p->drawText((w-p->fontMetrics().width("--:--:--"))/2,
|
||||
p->drawText((w-p->fontMetrics().horizontalAdvance("--:--:--"))/2,
|
||||
40,"--:--:--");
|
||||
}
|
||||
p->setFont(bigLabelFont());
|
||||
p->drawText((w-p->fontMetrics().width(start_port))/2,70,start_port);
|
||||
p->drawText((w-p->fontMetrics().horizontalAdvance(start_port))/2,70,start_port);
|
||||
}
|
||||
p->end();
|
||||
delete p;
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// The stop counter widget for Rivendell
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2025 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -123,7 +123,7 @@ void StopCounter::UpdateTime()
|
||||
QPalette::Background));
|
||||
p->setPen(QColor(text_color));
|
||||
p->setFont(subLabelFont());
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().width(stop_text))/2,32,
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().horizontalAdvance(stop_text))/2,32,
|
||||
stop_text);
|
||||
p->setFont(bannerFont());
|
||||
if (msecs < 0){
|
||||
@ -137,12 +137,12 @@ void StopCounter::UpdateTime()
|
||||
if(stop_running) {
|
||||
// text=rda->timeString(QTime(0,0,1).addMSecs(msecs));
|
||||
text=QTime(0,0,1).addMSecs(msecs).toString("hh:mm:ss");
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().width(text))/2,59,
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().horizontalAdvance(text))/2,59,
|
||||
text);
|
||||
}
|
||||
else {
|
||||
p->drawText((sizeHint().width()-2-p->
|
||||
fontMetrics().width(tr("Stopped")))/2,59,
|
||||
fontMetrics().horizontalAdvance(tr("Stopped")))/2,59,
|
||||
tr("Stopped"));
|
||||
}
|
||||
p->end();
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// A wall-clock widget with date.
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2025 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -113,9 +113,9 @@ void WallClock::tickClock()
|
||||
p.setPen(QColor(text_color));
|
||||
}
|
||||
p.setFont(subLabelFont());
|
||||
p.drawText((size().width()-2-p.fontMetrics().width(date))/2,22,date);
|
||||
p.drawText((size().width()-2-p.fontMetrics().horizontalAdvance(date))/2,22,date);
|
||||
p.setFont(bannerFont());
|
||||
p.drawText((size().width()-2-p.fontMetrics().width(accum))/2,48,accum);
|
||||
p.drawText((size().width()-2-p.fontMetrics().horizontalAdvance(accum))/2,48,accum);
|
||||
p.end();
|
||||
setIcon(*pix);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user