2023-04-29 Fred Gleason <fredg@paravelsystems.com>

* Added a 'RDWidget::setBackgroundPixmap()' method.
	* Fixed a bug in the voice tracker in rdairplay(1) that caused the
	the track waveform areas to be painted solid black.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2023-04-29 13:20:54 -04:00
parent 8a679e2733
commit b18da6a1aa
11 changed files with 62 additions and 19 deletions

View File

@ -24041,3 +24041,7 @@
* Updated the package version to 4.0.0rc3. * Updated the package version to 4.0.0rc3.
* Updated the version of the 'rivwebpyapi' PyPI package to * Updated the version of the 'rivwebpyapi' PyPI package to
4.0.0rc3. 4.0.0rc3.
2023-04-29 Fred Gleason <fredg@paravelsystems.com>
* Added a 'RDWidget::setBackgroundPixmap()' method.
* Fixed a bug in the voice tracker in rdairplay(1) that caused the
the track waveform areas to be painted solid black.

View File

@ -21,6 +21,9 @@
## Use automake to process this into a Makefile.in ## Use automake to process this into a Makefile.in
install-exec-am: install-exec-am:
mkdir -p $(DESTDIR)@prefix@/share/pixmaps/rivendell
cp rdairplay_skin.png $(DESTDIR)@prefix@/share/pixmaps/rivendell
cp rdpanel_skin.png $(DESTDIR)@prefix@/share/pixmaps/rivendell
mkdir -p $(DESTDIR)@libexecdir@ mkdir -p $(DESTDIR)@libexecdir@
cp donut-spinner.gif $(DESTDIR)@libexecdir@ cp donut-spinner.gif $(DESTDIR)@libexecdir@
cp greencheckmark.png $(DESTDIR)@libexecdir@ cp greencheckmark.png $(DESTDIR)@libexecdir@
@ -192,6 +195,8 @@ install-exec-am:
./update_icons.sh ./update_icons.sh
uninstall-local: uninstall-local:
rm -f $(DESTDIR)@prefix@/share/pixmaps/rivendell/rdairplay_skin.png
rm -f $(DESTDIR)@prefix@/share/pixmaps/rivendell/rdpanel_skin.png
rm -f $(DESTDIR)@libexecdir@/donut-spinner.gif rm -f $(DESTDIR)@libexecdir@/donut-spinner.gif
rm -f $(DESTDIR)@libexecdir@/greencheckmark.png rm -f $(DESTDIR)@libexecdir@/greencheckmark.png
rm -f $(DESTDIR)@libexecdir@/redx.png rm -f $(DESTDIR)@libexecdir@/redx.png
@ -324,6 +329,8 @@ EXTRA_DIST = admin.xpm\
progressbar.gif\ progressbar.gif\
progressbar.xcf\ progressbar.xcf\
rdairplay_logo.png\ rdairplay_logo.png\
rdairplay_skin.png\
rdairplay_skin.xcf\
rdairplay_white_logo.png\ rdairplay_white_logo.png\
record.xpm\ record.xpm\
record2.xpm\ record2.xpm\
@ -455,6 +462,8 @@ EXTRA_DIST = admin.xpm\
rdlogmanager-512x512.xpm\ rdlogmanager-512x512.xpm\
rdlogmanager-64x64.xpm\ rdlogmanager-64x64.xpm\
rdlogmanager.ico\ rdlogmanager.ico\
rdpanel_skin.png\
rdpanel_skin.xcf\
rdpanel-128x128.png\ rdpanel-128x128.png\
rdpanel-16x16.png\ rdpanel-16x16.png\
rdpanel-22x22.png\ rdpanel-22x22.png\

BIN
icons/rdairplay_skin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

BIN
icons/rdairplay_skin.xcf Normal file

Binary file not shown.

BIN
icons/rdpanel_skin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

BIN
icons/rdpanel_skin.xcf Normal file

Binary file not shown.

View File

@ -2,7 +2,7 @@
// //
// Base class for Rivendell modal widgets. // Base class for Rivendell modal widgets.
// //
// (C) Copyright 2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2019-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -18,6 +18,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
#include <QPainter>
#include "rdwidget.h" #include "rdwidget.h"
RDWidget::RDWidget(QWidget *parent,Qt::WindowFlags f) RDWidget::RDWidget(QWidget *parent,Qt::WindowFlags f)
@ -32,3 +34,33 @@ RDWidget::RDWidget(RDConfig *config,QWidget *parent,Qt::WindowFlags f)
{ {
setFont(defaultFont()); setFont(defaultFont());
} }
QPixmap RDWidget::backgroundPixmap() const
{
return d_background_pixmap;
}
void RDWidget::setBackgroundPixmap(const QPixmap &pix)
{
d_background_pixmap=pix;
update();
}
void RDWidget::paintEvent(QPaintEvent *e)
{
int w=size().width();
int h=size().height();
if(!d_background_pixmap.isNull()) {
QPainter *p=new QPainter(this);
for(int i=0;i<h;i+=d_background_pixmap.height()) {
for(int j=0;j<w;j+=d_background_pixmap.width()) {
p->drawPixmap(j,i,d_background_pixmap);
}
}
delete p;
}
}

View File

@ -2,7 +2,7 @@
// //
// Base class for Rivendell widgets. // Base class for Rivendell widgets.
// //
// (C) Copyright 2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2019-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -21,7 +21,7 @@
#ifndef RDWIDGET_H #ifndef RDWIDGET_H
#define RDWIDGET_H #define RDWIDGET_H
#include <qwidget.h> #include <QWidget>
#include <rdfontengine.h> #include <rdfontengine.h>
@ -31,6 +31,14 @@ class RDWidget : public QWidget, public RDFontEngine
public: public:
RDWidget(QWidget *parent=0,Qt::WindowFlags f=0); RDWidget(QWidget *parent=0,Qt::WindowFlags f=0);
RDWidget(RDConfig *config,QWidget *parent=0,Qt::WindowFlags f=0); RDWidget(RDConfig *config,QWidget *parent=0,Qt::WindowFlags f=0);
QPixmap backgroundPixmap() const;
void setBackgroundPixmap(const QPixmap &pix);
protected:
void paintEvent(QPaintEvent *e);
private:
QPixmap d_background_pixmap;
}; };

View File

@ -171,12 +171,7 @@ MainWidget::MainWidget(RDConfig *config,QWidget *parent)
for(int i=0;i<RDAIRPLAY_LOG_QUANTITY;i++) { for(int i=0;i<RDAIRPLAY_LOG_QUANTITY;i++) {
air_op_mode[i]=RDAirPlayConf::Previous; air_op_mode[i]=RDAirPlayConf::Previous;
} }
bgmap=QPixmap(rda->airplayConf()->skinPath()); setBackgroundPixmap(QPixmap(rda->airplayConf()->skinPath()));
if(!bgmap.isNull()&&(bgmap.width()>=1024)&&(bgmap.height()>=738)) {
QPalette palette;
palette.setBrush(backgroundRole(),bgmap);
setPalette(palette);
}
// //
// Top Strip // Top Strip
@ -1800,7 +1795,7 @@ void MainWidget::resizeEvent(QResizeEvent *e)
{ {
int w=width(); int w=width();
int h=height(); int h=height();
// //
// Top Row // Top Row
// //
@ -1832,7 +1827,6 @@ void MainWidget::resizeEvent(QResizeEvent *e)
air_log_list[i]->setGeometry(550,140,w-560,h-215); air_log_list[i]->setGeometry(550,140,w-560,h-215);
} }
// //
// Bottom Button Row // Bottom Button Row
// //

View File

@ -42,7 +42,7 @@ RDCartDialog *panel_cart_dialog;
MainWidget::MainWidget(RDConfig *c,QWidget *parent) MainWidget::MainWidget(RDConfig *c,QWidget *parent)
: RDMainWindow("rdpanel",c) : RDMainWindow("rdpanel",c)
{ {
QPixmap panel_skin_pixmap; // QPixmap panel_skin_pixmap;
QString err_msg; QString err_msg;
// //
@ -82,13 +82,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
// //
// Allocate Global Resources // Allocate Global Resources
// //
panel_skin_pixmap=QPixmap(rda->panelConf()->skinPath()); setBackgroundPixmap(rda->panelConf()->skinPath());
if(!panel_skin_pixmap.isNull()&&(panel_skin_pixmap.width()>=1024)&&
(panel_skin_pixmap.height()>=738)) {
QPalette p=palette();
p.setBrush(backgroundRole(),panel_skin_pixmap);
setPalette(p);
}
// //
// CAE Connection // CAE Connection

View File

@ -414,6 +414,8 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/icons/hicolor/512x512/apps/rdpanel.png %{_datadir}/icons/hicolor/512x512/apps/rdpanel.png
%{_datadir}/pixmaps/rivendell/rdairplay_logo.png %{_datadir}/pixmaps/rivendell/rdairplay_logo.png
%{_datadir}/pixmaps/rivendell/rdairplay_white_logo.png %{_datadir}/pixmaps/rivendell/rdairplay_white_logo.png
%{_datadir}/pixmaps/rivendell/rdairplay_skin.png
%{_datadir}/pixmaps/rivendell/rdpanel_skin.png
%{_datadir}/X11/fvwm2/pixmaps/mini.rivendell.xpm %{_datadir}/X11/fvwm2/pixmaps/mini.rivendell.xpm
%{_datadir}/X11/fvwm2/pixmaps/rivendell.xpm %{_datadir}/X11/fvwm2/pixmaps/rivendell.xpm
%{_datadir}/applications/rivendell-rdadmin.desktop %{_datadir}/applications/rivendell-rdadmin.desktop