diff options
Diffstat (limited to 'src/gui/widgets/VUMeter.cpp')
-rw-r--r-- | src/gui/widgets/VUMeter.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/src/gui/widgets/VUMeter.cpp b/src/gui/widgets/VUMeter.cpp index ae9fe84..1a6d90d 100644 --- a/src/gui/widgets/VUMeter.cpp +++ b/src/gui/widgets/VUMeter.cpp @@ -29,18 +29,18 @@ #include "base/AudioLevel.h" #include "gui/general/GUIPalette.h" #include "gui/rulers/VelocityColour.h" -#include <qbrush.h> -#include <qcolor.h> -#include <qlabel.h> -#include <qpainter.h> -#include <qtimer.h> -#include <qwidget.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqlabel.h> +#include <tqpainter.h> +#include <tqtimer.h> +#include <tqwidget.h> namespace Rosegarden { -VUMeter::VUMeter(QWidget *parent, +VUMeter::VUMeter(TQWidget *parent, VUMeterType type, bool stereo, bool hasRecord, @@ -48,7 +48,7 @@ VUMeter::VUMeter(QWidget *parent, int height, VUAlignment alignment, const char *name): - QLabel(parent, name), + TQLabel(parent, name), m_originalHeight(height), m_active(true), m_type(type), @@ -92,28 +92,28 @@ VUMeter::VUMeter(QWidget *parent, // Always init the left fall timer // - m_fallTimerLeft = new QTimer(); + m_fallTimerLeft = new TQTimer(); - connect(m_fallTimerLeft, SIGNAL(timeout()), - this, SLOT(slotReduceLevelLeft())); + connect(m_fallTimerLeft, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotReduceLevelLeft())); if (m_showPeakLevel) { - m_peakTimerLeft = new QTimer(); + m_peakTimerLeft = new TQTimer(); - connect(m_peakTimerLeft, SIGNAL(timeout()), - this, SLOT(slotStopShowingPeakLeft())); + connect(m_peakTimerLeft, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotStopShowingPeakLeft())); } if (stereo) { - m_fallTimerRight = new QTimer(); + m_fallTimerRight = new TQTimer(); - connect(m_fallTimerRight, SIGNAL(timeout()), - this, SLOT(slotReduceLevelRight())); + connect(m_fallTimerRight, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotReduceLevelRight())); if (m_showPeakLevel) { - m_peakTimerRight = new QTimer(); - connect(m_peakTimerRight, SIGNAL(timeout()), - this, SLOT(slotStopShowingPeakRight())); + m_peakTimerRight = new TQTimer(); + connect(m_peakTimerRight, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotStopShowingPeakRight())); } } @@ -133,22 +133,22 @@ VUMeter::VUMeter(QWidget *parent, red = AudioLevel::dB_to_fader( 0.0, max, AudioLevel::ShortFader); orange = AudioLevel::dB_to_fader( -2.0, max, AudioLevel::ShortFader); green = AudioLevel::dB_to_fader( -10.0, max, AudioLevel::ShortFader); - m_background = QColor(50, 50, 50); + m_background = TQColor(50, 50, 50); } else if (m_type == AudioPeakHoldLong) { red = AudioLevel::dB_to_fader( 0.0, max, AudioLevel::LongFader); orange = AudioLevel::dB_to_fader( -2.0, max, AudioLevel::LongFader); green = AudioLevel::dB_to_fader( -10.0, max, AudioLevel::LongFader); - m_background = QColor(50, 50, 50); + m_background = TQColor(50, 50, 50); } else if (m_type == AudioPeakHoldIEC) { red = AudioLevel::dB_to_fader( -0.1, max, AudioLevel::IEC268Meter); orange = AudioLevel::dB_to_fader( -6.0, max, AudioLevel::IEC268Meter); green = AudioLevel::dB_to_fader( -10.0, max, AudioLevel::IEC268Meter); - m_background = QColor(50, 50, 50); + m_background = TQColor(50, 50, 50); } else if (m_type == AudioPeakHoldIECLong) { red = AudioLevel::dB_to_fader( 0.0, max, AudioLevel::IEC268LongMeter); orange = AudioLevel::dB_to_fader( -6.0, max, AudioLevel::IEC268LongMeter); green = AudioLevel::dB_to_fader( -10.0, max, AudioLevel::IEC268LongMeter); - m_background = QColor(50, 50, 50); + m_background = TQColor(50, 50, 50); } else { red = max * 92 / 100; orange = max * 60 / 100; @@ -315,16 +315,16 @@ VUMeter::setLevel(double leftLevel, double rightLevel, bool record) } if (m_active) { - QPainter paint(this); + TQPainter paint(this); drawMeterLevel(&paint); } } void -VUMeter::paintEvent(QPaintEvent *e) +VUMeter::paintEvent(TQPaintEvent *e) { // RG_DEBUG << "VUMeter::paintEvent - height = " << height() << endl; - QPainter paint(this); + TQPainter paint(this); if (m_type == VUMeter::AudioPeakHoldShort || m_type == VUMeter::AudioPeakHoldLong || @@ -368,7 +368,7 @@ VUMeter::paintEvent(QPaintEvent *e) } void -VUMeter::drawColouredBar(QPainter *paint, int channel, +VUMeter::drawColouredBar(TQPainter *paint, int channel, int x, int y, int w, int h) { if (m_type == AudioPeakHoldLong || @@ -384,14 +384,14 @@ VUMeter::drawColouredBar(QPainter *paint, int channel, if (m_alignment == Vertical) { if (h > loud) { paint->setPen(m_velocityColour->getLoudColour()); - paint->setBrush(QBrush(m_velocityColour->getLoudColour(), + paint->setBrush(TQBrush(m_velocityColour->getLoudColour(), style)); paint->drawRect(x, y, w, h - loud); } } else { if (w > loud) { paint->setPen(m_velocityColour->getLoudColour()); - paint->setBrush(QBrush(m_velocityColour->getLoudColour(), + paint->setBrush(TQBrush(m_velocityColour->getLoudColour(), style)); paint->drawRect(x + loud, y, w - loud, h); } @@ -400,7 +400,7 @@ VUMeter::drawColouredBar(QPainter *paint, int channel, if (m_alignment == Vertical) { if (h > medium) { paint->setPen(m_velocityColour->getMediumColour()); - paint->setBrush(QBrush(m_velocityColour->getMediumColour(), + paint->setBrush(TQBrush(m_velocityColour->getMediumColour(), style)); paint->drawRect(x, y + (h > loud ? (h - loud) : 0), w, std::min(h - medium, loud - medium)); @@ -408,7 +408,7 @@ VUMeter::drawColouredBar(QPainter *paint, int channel, } else { if (w > medium) { paint->setPen(m_velocityColour->getMediumColour()); - paint->setBrush(QBrush(m_velocityColour->getMediumColour(), + paint->setBrush(TQBrush(m_velocityColour->getMediumColour(), style)); paint->drawRect(x + medium, y, std::min(w - medium, loud - medium), h); @@ -417,13 +417,13 @@ VUMeter::drawColouredBar(QPainter *paint, int channel, if (m_alignment == Vertical) { paint->setPen(m_velocityColour->getQuietColour()); - paint->setBrush(QBrush(m_velocityColour->getQuietColour(), + paint->setBrush(TQBrush(m_velocityColour->getQuietColour(), style)); paint->drawRect(x, y + (h > medium ? (h - medium) : 0), w, std::min(h, medium)); } else { paint->setPen(m_velocityColour->getQuietColour()); - paint->setBrush(QBrush(m_velocityColour->getQuietColour(), + paint->setBrush(TQBrush(m_velocityColour->getQuietColour(), style)); paint->drawRect(x, y, std::min(w, medium), h); } @@ -432,14 +432,14 @@ VUMeter::drawColouredBar(QPainter *paint, int channel, if (channel == 0) { - QColor mixedColour = m_velocityColour->getColour(m_levelLeft); + TQColor mixedColour = m_velocityColour->getColour(m_levelLeft); paint->setPen(mixedColour); paint->setBrush(mixedColour); } else { - QColor mixedColour = m_velocityColour->getColour(m_levelRight); + TQColor mixedColour = m_velocityColour->getColour(m_levelRight); paint->setPen(mixedColour); paint->setBrush(mixedColour); @@ -452,7 +452,7 @@ VUMeter::drawColouredBar(QPainter *paint, int channel, } void -VUMeter::drawMeterLevel(QPainter* paint) +VUMeter::drawMeterLevel(TQPainter* paint) { int medium = m_velocityColour->getMediumKnee(), loud = m_velocityColour->getLoudKnee(); @@ -639,7 +639,7 @@ VUMeter::slotReduceLevelRight() meterStop(); } - QPainter paint(this); + TQPainter paint(this); drawMeterLevel(&paint); } @@ -674,7 +674,7 @@ VUMeter::slotReduceLevelLeft() meterStop(); } - QPainter paint(this); + TQPainter paint(this); drawMeterLevel(&paint); } |