-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2023-04-29 Fred Gleason <[email protected]>
* 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 <[email protected]>
- Loading branch information
1 parent
8a679e2
commit b18da6a
Showing
11 changed files
with
62 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24041,3 +24041,7 @@ | |
* Updated the package version to 4.0.0rc3. | ||
* Updated the version of the 'rivwebpyapi' PyPI package to | ||
4.0.0rc3. | ||
2023-04-29 Fred Gleason <[email protected]> | ||
* 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
// | ||
// Base class for Rivendell modal widgets. | ||
// | ||
// (C) Copyright 2019 Fred Gleason <[email protected]> | ||
// (C) Copyright 2019-2023 Fred Gleason <[email protected]> | ||
// | ||
// 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 | ||
|
@@ -18,6 +18,8 @@ | |
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
// | ||
|
||
#include <QPainter> | ||
|
||
#include "rdwidget.h" | ||
|
||
RDWidget::RDWidget(QWidget *parent,Qt::WindowFlags f) | ||
|
@@ -32,3 +34,33 @@ RDWidget::RDWidget(RDConfig *config,QWidget *parent,Qt::WindowFlags f) | |
{ | ||
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
// | ||
// Base class for Rivendell widgets. | ||
// | ||
// (C) Copyright 2019 Fred Gleason <[email protected]> | ||
// (C) Copyright 2019-2023 Fred Gleason <[email protected]> | ||
// | ||
// 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 | ||
|
@@ -21,7 +21,7 @@ | |
#ifndef RDWIDGET_H | ||
#define RDWIDGET_H | ||
|
||
#include <qwidget.h> | ||
#include <QWidget> | ||
|
||
#include <rdfontengine.h> | ||
|
||
|
@@ -31,6 +31,14 @@ class RDWidget : public QWidget, public RDFontEngine | |
public: | ||
RDWidget(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; | ||
}; | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters