GraphModel: fix/improve normalize() function - remove bias before maximizing, also add some new slots for future use (which I plan to use for something neat in the future ;) )
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2006-2007 Andreas Brandmaier <andy/at/brandmaier/dot/de>
|
||||
* 2008 Paul Giblock <drfaygo/at/gmail/dot/com>
|
||||
*
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -24,8 +24,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _GRAPH_H
|
||||
#define _GRAPH_H
|
||||
#ifndef GRAPH_H
|
||||
#define GRAPH_H
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QPixmap>
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
{
|
||||
return m_graphStyle;
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline void setGraphStyle( graphStyle _s )
|
||||
{
|
||||
@@ -101,10 +101,10 @@ private:
|
||||
|
||||
QPixmap m_foreground;
|
||||
QColor m_graphColor;
|
||||
|
||||
|
||||
graphModel * m_graphModel;
|
||||
graphStyle m_graphStyle;
|
||||
|
||||
|
||||
bool m_mouseDown;
|
||||
int m_lastCursorX;
|
||||
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
virtual ~graphModel();
|
||||
|
||||
// TODO: saveSettings, loadSettings?
|
||||
|
||||
|
||||
inline float minValue() const
|
||||
{
|
||||
return( m_minValue );
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
{
|
||||
return( m_samples.count() );
|
||||
}
|
||||
|
||||
|
||||
inline const float * samples() const
|
||||
{
|
||||
return( m_samples.data() );
|
||||
@@ -160,10 +160,12 @@ public slots:
|
||||
void setWaveToSquare();
|
||||
void setWaveToNoise();
|
||||
QString setWaveToUser( );
|
||||
|
||||
|
||||
void smooth();
|
||||
void smoothNonCyclic();
|
||||
void normalize();
|
||||
void invert();
|
||||
void shiftPhase( int _deg );
|
||||
|
||||
signals:
|
||||
void lengthChanged();
|
||||
|
||||
Reference in New Issue
Block a user