mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-17 16:11:12 +02:00
2021-03-11 Fred Gleason <fredg@paravelsystems.com>
* Added a 'RDWaveFactory' class. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
48
lib/rdwavefactory.h
Normal file
48
lib/rdwavefactory.h
Normal file
@@ -0,0 +1,48 @@
|
||||
// rdwavefactory.h
|
||||
//
|
||||
// Factory for generating audio waveform pixmaps
|
||||
//
|
||||
// (C) Copyright 2021 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
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public
|
||||
// License along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#ifndef RDWAVEFACTORY_H
|
||||
#define RDWAVEFACTORY_H
|
||||
|
||||
#include <QList>
|
||||
#include <QPixmap>
|
||||
|
||||
class RDWaveFactory
|
||||
{
|
||||
public:
|
||||
enum TrackMode {SingleTrack=0,MultiTrack=1};
|
||||
RDWaveFactory(TrackMode mode);
|
||||
TrackMode trackMode() const;
|
||||
unsigned cartNumber() const;
|
||||
int cutNumber() const;
|
||||
QPixmap generate(int height,int x_shrink,int gain);
|
||||
bool setCut(QString *err_msg,unsigned cartnum,int cutnum);
|
||||
|
||||
private:
|
||||
TrackMode d_track_mode;
|
||||
unsigned d_cart_number;
|
||||
int d_cut_number;
|
||||
QList<uint16_t> d_energy;
|
||||
unsigned d_channels;
|
||||
unsigned d_energy_channels;
|
||||
};
|
||||
|
||||
|
||||
#endif // RDWAVEFACTORY_H
|
Reference in New Issue
Block a user