diff options
Diffstat (limited to 'src/waveform')
32 files changed, 93 insertions, 82 deletions
diff --git a/src/waveform/renderers/waveformwidgetrenderer.cpp b/src/waveform/renderers/waveformwidgetrenderer.cpp index bd181fdf0f..638912feef 100644 --- a/src/waveform/renderers/waveformwidgetrenderer.cpp +++ b/src/waveform/renderers/waveformwidgetrenderer.cpp @@ -14,34 +14,33 @@ const double WaveformWidgetRenderer::s_waveformMaxZoom = 10.0; const double WaveformWidgetRenderer::s_waveformDefaultZoom = 3.0; const double WaveformWidgetRenderer::s_defaultPlayMarkerPosition = 0.5; -WaveformWidgetRenderer::WaveformWidgetRenderer(const char* group) - : m_group(group), - m_orientation(Qt::Horizontal), - m_height(-1), - m_width(-1), - m_devicePixelRatio(1.0f), - - m_firstDisplayedPosition(0.0), - m_lastDisplayedPosition(0.0), - m_trackPixelCount(0.0), - - m_zoomFactor(1.0), - m_visualSamplePerPixel(1.0), - m_audioSamplePerPixel(1.0), - m_alphaBeatGrid(90), - // Really create some to manage those; - m_visualPlayPosition(NULL), - m_playPos(-1), - m_playPosVSample(0), - m_pRateRatioCO(NULL), - m_rateRatio(1.0), - m_pGainControlObject(NULL), - m_gain(1.0), - m_pTrackSamplesControlObject(NULL), - m_trackSamples(0.0), - m_scaleFactor(1.0), - m_playMarkerPosition(s_defaultPlayMarkerPosition) { - +WaveformWidgetRenderer::WaveformWidgetRenderer(const QString& group) + : m_group(group), + m_orientation(Qt::Horizontal), + m_height(-1), + m_width(-1), + m_devicePixelRatio(1.0f), + + m_firstDisplayedPosition(0.0), + m_lastDisplayedPosition(0.0), + m_trackPixelCount(0.0), + + m_zoomFactor(1.0), + m_visualSamplePerPixel(1.0), + m_audioSamplePerPixel(1.0), + m_alphaBeatGrid(90), + // Really create some to manage those; + m_visualPlayPosition(NULL), + m_playPos(-1), + m_playPosVSample(0), + m_pRateRatioCO(NULL), + m_rateRatio(1.0), + m_pGainControlObject(NULL), + m_gain(1.0), + m_pTrackSamplesControlObject(NULL), + m_trackSamples(0.0), + m_scaleFactor(1.0), + m_playMarkerPosition(s_defaultPlayMarkerPosition) { //qDebug() << "WaveformWidgetRenderer"; #ifdef WAVEFORMWIDGETRENDERER_DEBUG diff --git a/src/waveform/renderers/waveformwidgetrenderer.h b/src/waveform/renderers/waveformwidgetrenderer.h index 6e7ef4b042..c2cdfdacd8 100644 --- a/src/waveform/renderers/waveformwidgetrenderer.h +++ b/src/waveform/renderers/waveformwidgetrenderer.h @@ -28,7 +28,7 @@ class WaveformWidgetRenderer { static const double s_defaultPlayMarkerPosition; public: - explicit WaveformWidgetRenderer(const char* group); + explicit WaveformWidgetRenderer(const QString& group); virtual ~WaveformWidgetRenderer(); bool init(); @@ -38,8 +38,12 @@ class WaveformWidgetRenderer { void onPreRender(VSyncThread* vsyncThread); void draw(QPainter* painter, QPaintEvent* event); - inline const char* getGroup() const { return m_group;} - const TrackPointer getTrackInfo() const { return m_pTrack;} + const QString& getGroup() const { + return m_group; + } + const TrackPointer getTrackInfo() const { + return m_pTrack; + } /// Get cue mark at a point on the waveform widget. WaveformMarkPointer getCueMarkAtPoint(QPoint point) const; @@ -112,7 +116,7 @@ class WaveformWidgetRenderer { } protected: - const char* m_group; + const QString m_group; TrackPointer m_pTrack; QList<WaveformRendererAbstract*> m_rendererStack; Qt::Orientation m_orientation; diff --git a/src/waveform/widgets/emptywaveformwidget.cpp b/src/waveform/widgets/emptywaveformwidget.cpp index f249f4ef38..dc29af33b1 100644 --- a/src/waveform/widgets/emptywaveformwidget.cpp +++ b/src/waveform/widgets/emptywaveformwidget.cpp @@ -5,7 +5,7 @@ #include "waveform/renderers/waveformwidgetrenderer.h" #include "waveform/renderers/waveformrenderbackground.h" -EmptyWaveformWidget::EmptyWaveformWidget(const char* group, QWidget* parent) +EmptyWaveformWidget::EmptyWaveformWidget(const QString& group, QWidget* parent) : QWidget(parent), WaveformWidgetAbstract(group) { //Empty means just a background ;) diff --git a/src/waveform/widgets/emptywaveformwidget.h b/src/waveform/widgets/emptywaveformwidget.h index 614dda843b..c9056554fe 100644 --- a/src/waveform/widgets/emptywaveformwidget.h +++ b/src/waveform/widgets/emptywaveformwidget.h @@ -27,7 +27,7 @@ class EmptyWaveformWidget : public QWidget, public WaveformWidgetAbstract { virtual mixxx::Duration render(); private: - EmptyWaveformWidget(const char* group, QWidget* parent); + EmptyWaveformWidget(const QString& group, QWidget* parent); friend class WaveformWidgetFactory; }; diff --git a/src/waveform/widgets/glrgbwaveformwidget.cpp b/src/waveform/widgets/glrgbwaveformwidget.cpp index 13a3464656..6f1857b0a6 100644 --- a/src/waveform/widgets/glrgbwaveformwidget.cpp +++ b/src/waveform/widgets/glrgbwaveformwidget.cpp @@ -12,10 +12,9 @@ #include "util/performancetimer.h" -GLRGBWaveformWidget::GLRGBWaveformWidget(const char* group, QWidget* parent) +GLRGBWaveformWidget::GLRGBWaveformWidget(const QString& group, QWidget* parent) : QGLWidget(parent, SharedGLContext::getWidget()), WaveformWidgetAbstract(group) { - qDebug() << "Created QGLWidget. Context" << "Valid:" << context()->isValid() << "Sharing:" << context()->isSharing(); diff --git a/src/waveform/widgets/glrgbwaveformwidget.h b/src/waveform/widgets/glrgbwaveformwidget.h index 0cfbc5efac..d479c22d95 100644 --- a/src/waveform/widgets/glrgbwaveformwidget.h +++ b/src/waveform/widgets/glrgbwaveformwidget.h @@ -8,7 +8,7 @@ class GLRGBWaveformWidget : public QGLWidget, public WaveformWidgetAbstract { Q_OBJECT public: - GLRGBWaveformWidget(const char* group, QWidget* parent); + GLRGBWaveformWidget(const QString& group, QWidget* parent); virtual ~GLRGBWaveformWidget(); virtual WaveformWidgetType::Type getType() const { return WaveformWidgetType::GLRGBWaveform; } diff --git a/src/waveform/widgets/glsimplewaveformwidget.cpp b/src/waveform/widgets/glsimplewaveformwidget.cpp index f511e1e9a5..b7819633c8 100644 --- a/src/waveform/widgets/glsimplewaveformwidget.cpp +++ b/src/waveform/widgets/glsimplewaveformwidget.cpp @@ -15,7 +15,7 @@ #include "util/performancetimer.h" -GLSimpleWaveformWidget::GLSimpleWaveformWidget(const char* group, QWidget* parent) +GLSimpleWaveformWidget::GLSimpleWaveformWidget(const QString& group, QWidget* parent) : QGLWidget(parent, SharedGLContext::getWidget()), WaveformWidgetAbstract(group) { qDebug() << "Created QGLWidget. Context" diff --git a/src/waveform/widgets/glsimplewaveformwidget.h b/src/waveform/widgets/glsimplewaveformwidget.h index 786b9f7291..7cc3ddfc7c 100644 --- a/src/waveform/widgets/glsimplewaveformwidget.h +++ b/src/waveform/widgets/glsimplewaveformwidget.h @@ -8,7 +8,7 @@ class GLSimpleWaveformWidget : public QGLWidget, public WaveformWidgetAbstract { Q_OBJECT public: - GLSimpleWaveformWidget(const char* group, QWidget* parent); + GLSimpleWaveformWidget(const QString& group, QWidget* parent); virtual ~GLSimpleWaveformWidget(); virtual WaveformWidgetType::Type getType() const { return WaveformWidgetType::GLSimpleWaveform; } diff --git a/src/waveform/widgets/glslwaveformwidget.cpp b/src/waveform/widgets/glslwaveformwidget.cpp index c1b6f74684..1950193eba 100644 --- a/src/waveform/widgets/glslwaveformwidget.cpp +++ b/src/waveform/widgets/glslwaveformwidget.cpp @@ -15,17 +15,22 @@ #include "util/performancetimer.h" -GLSLFilteredWaveformWidget::GLSLFilteredWaveformWidget(const char* group, - QWidget* parent) +GLSLFilteredWaveformWidget::GLSLFilteredWaveformWidget( + const QString& group, + QWidget* parent) : GLSLWaveformWidget(group, parent, false) { } -GLSLRGBWaveformWidget::GLSLRGBWaveformWidget(const char* group, QWidget* parent) +GLSLRGBWaveformWidget::GLSLRGBWaveformWidget( + const QString& group, + QWidget* parent) : GLSLWaveformWidget(group, parent, true) { } -GLSLWaveformWidget::GLSLWaveformWidget(const char* group, QWidget* parent, - bool rgbRenderer) +GLSLWaveformWidget::GLSLWaveformWidget( + const QString& group, + QWidget* parent, + bool rgbRenderer) : QGLWidget(parent, SharedGLContext::getWidget()), WaveformWidgetAbstract(group) { qDebug() << "Created QGLWidget. Context" diff --git a/src/waveform/widgets/glslwaveformwidget.h b/src/waveform/widgets/glslwaveformwidget.h index 2a28d3944b..da946fedfe 100644 --- a/src/waveform/widgets/glslwaveformwidget.h +++ b/src/waveform/widgets/glslwaveformwidget.h @@ -10,8 +10,10 @@ class GLSLWaveformRendererSignal; class GLSLWaveformWidget : public QGLWidget, public WaveformWidgetAbstract { Q_OBJECT public: - GLSLWaveformWidget(const char* group, QWidget* parent, - bool rgbRenderer); + GLSLWaveformWidget( + const QString& group, + QWidget* parent, + bool rgbRenderer); ~GLSLWaveformWidget() override; void resize(int width, int height) override; @@ -31,7 +33,7 @@ class GLSLWaveformWidget : public QGLWidget, public WaveformWidgetAbstract { class GLSLFilteredWaveformWidget : public GLSLWaveformWidget { Q_OBJECT public: - GLSLFilteredWaveformWidget(const char* group, QWidget* parent); + GLSLFilteredWaveformWidget(const QString& group, QWidget* parent); ~GLSLFilteredWaveformWidget() override = default; WaveformWidgetType::Type getType() const override { return WaveformWidgetType::GLSLFilteredWaveform; } @@ -46,7 +48,7 @@ class GLSLFilteredWaveformWidget : public GLSLWaveformWidget { class GLSLRGBWaveformWidget : public GLSLWaveformWidget { Q_OBJECT public: - GLSLRGBWaveformWidget(const char* group, QWidget* parent); + GLSLRGBWaveformWidget(const QString& group, QWidget* parent); ~GLSLRGBWaveformWidget() override = default; WaveformWidgetType::Type getType() const override { return WaveformWidgetType::GLSLRGBWaveform; } diff --git a/src/waveform/widgets/glvsynctestwidget.cpp b/src/waveform/widgets/glvsynctestwidget.cpp index 3f39ef23f3..8d4a3e1c8f 100644 --- a/src/waveform/widgets/glvsynctestwidget.cpp +++ b/src/waveform/widgets/glvsynctestwidget.cpp @@ -15,9 +15,9 @@ #include "util/performancetimer.h" -GLVSyncTestWidget::GLVSyncTestWidget(const char* group, QWidget* parent) - : QGLWidget(parent, SharedGLContext::getWidget()), - WaveformWidgetAbstract(group) { +GLVSyncTestWidget::GLVSyncTestWidget(const QString& group, QWidget* parent) + : QGLWidget(parent, SharedGLContext::getWidget()), + WaveformWidgetAbstract(group) { qDebug() << "Created QGLWidget. Context" << "Valid:" << context()->isValid() << "Sharing:" << context()->isSharing(); diff --git a/src/waveform/widgets/glvsynctestwidget.h b/src/waveform/widgets/glvsynctestwidget.h index 8480f99a31..6a3aaf3a8b 100644 --- a/src/waveform/widgets/glvsynctestwidget.h +++ b/src/waveform/widgets/glvsynctestwidget.h @@ -8,7 +8,7 @@ class GLVSyncTestWidget : public QGLWidget, public WaveformWidgetAbstract { Q_OBJECT public: - GLVSyncTestWidget(const char* group, QWidget* parent); + GLVSyncTestWidget(const QString& group, QWidget* parent); virtual ~GLVSyncTestWidget(); virtual WaveformWidgetType::Type getType() const { return WaveformWidgetType::GLVSyncTest; } diff --git a/src/waveform/widgets/glwaveformwidget.cpp b/src/waveform/widgets/glwaveformwidget.cpp index b24de85ee9..624ef397c1 100644 --- a/src/waveform/widgets/glwaveformwidget.cpp +++ b/src/waveform/widgets/glwaveformwidget.cpp @@ -15,7 +15,7 @@ #include "waveform/sharedglcontext.h" #include "util/performancetimer.h" -GLWaveformWidget::GLWaveformWidget(const char* group, QWidget* parent) +GLWaveformWidget::GLWaveformWidget(const QString& group, QWidget* parent) : QGLWidget(parent, SharedGLContext::getWidget()), WaveformWidgetAbstract(group) { qDebug() << "Created QGLWidget. Context" diff --git a/src/waveform/widgets/glwaveformwidget.h b/src/waveform/widgets/glwaveformwidget.h index 0e13ff01ba..ea81612bca 100644 --- a/src/waveform/widgets/glwaveformwidget.h +++ b/src/waveform/widgets/glwaveformwidget.h @@ -8,7 +8,7 @@ class GLWaveformWidget : public QGLWidget, public WaveformWidgetAbstract { Q_OBJECT public: - GLWaveformWidget(const char* group, QWidget* parent); + GLWaveformWidget(const QString& group, QWidget* parent); virtual ~GLWaveformWidget(); virtual WaveformWidgetType::Type getType() const { return WaveformWidgetType::GLFilteredWaveform; } diff --git a/src/waveform/widgets/hsvwaveformwidget.cpp b/src/waveform/widgets/hsvwaveformwidget.cpp index 14d7ec1670..26721ed660 100644 --- a/src/waveform/widgets/hsvwaveformwidget.cpp +++ b/src/waveform/widgets/hsvwaveformwidget.cpp @@ -11,9 +11,9 @@ #include "waveform/renderers/waveformrendererendoftrack.h" #include "waveform/renderers/waveformrenderbeat.h" -HSVWaveformWidget::HSVWaveformWidget(const char* group, QWidget* parent) - : QWidget(parent), - WaveformWidgetAbstract(group) { +HSVWaveformWidget::HSVWaveformWidget(const QString& group, QWidget* parent) + : QWidget(parent), + WaveformWidgetAbstract(group) { addRenderer<WaveformRenderBackground>(); addRenderer<WaveformRendererEndOfTrack>(); addRenderer<WaveformRendererPreroll>(); diff --git a/src/waveform/widgets/hsvwaveformwidget.h b/src/waveform/widgets/hsvwaveformwidget.h index 4b068a6cad..e035b60d79 100644 --- a/src/waveform/widgets/hsvwaveformwidget.h +++ b/src/waveform/widgets/hsvwaveformwidget.h @@ -23,7 +23,7 @@ class HSVWaveformWidget : public QWidget, public WaveformWidgetAbstract { virtual void paintEvent(QPaintEvent* event); private: - HSVWaveformWidget(const char* group, QWidget* parent); + HSVWaveformWidget(const QString& group, QWidget* parent); friend class WaveformWidgetFactory; }; diff --git a/src/waveform/widgets/qthsvwaveformwidget.cpp b/src/waveform/widgets/qthsvwaveformwidget.cpp index 98fadd3c51..23a75ff0ed 100644 --- a/src/waveform/widgets/qthsvwaveformwidget.cpp +++ b/src/waveform/widgets/qthsvwaveformwidget.cpp @@ -13,9 +13,9 @@ #include "waveform/renderers/waveformrendererendoftrack.h" #include "waveform/renderers/waveformrenderbeat.h" -QtHSVWaveformWidget::QtHSVWaveformWidget(const char* group, QWidget* parent) - : QGLWidget(parent), - WaveformWidgetAbstract(group) { +QtHSVWaveformWidget::QtHSVWaveformWidget(const QString& group, QWidget* parent) + : QGLWidget(parent), + WaveformWidgetAbstract(group) { if (QGLContext::currentContext() != context()) { makeCurrent(); } diff --git a/src/waveform/widgets/qthsvwaveformwidget.h b/src/waveform/widgets/qthsvwaveformwidget.h index f273f2cb25..6a013cb1a0 100644 --- a/src/waveform/widgets/qthsvwaveformwidget.h +++ b/src/waveform/widgets/qthsvwaveformwidget.h @@ -24,7 +24,7 @@ class QtHSVWaveformWidget : public QGLWidget, public WaveformWidgetAbstract { virtual mixxx::Duration render(); private: - QtHSVWaveformWidget(const char* group, QWidget* parent); + QtHSVWaveformWidget(const QString& group, QWidget* parent); friend class WaveformWidgetFactory; }; diff --git a/src/waveform/widgets/qtrgbwaveformwidget.cpp b/src/waveform/widgets/qtrgbwaveformwidget.cpp index ec56ccc3e2..a824598b8c 100644 --- a/src/waveform/widgets/qtrgbwaveformwidget.cpp +++ b/src/waveform/widgets/qtrgbwaveformwidget.cpp @@ -14,7 +14,7 @@ #include "waveform/renderers/waveformrenderbeat.h" #include "waveform/sharedglcontext.h" -QtRGBWaveformWidget::QtRGBWaveformWidget(const char* group, QWidget* parent) +QtRGBWaveformWidget::QtRGBWaveformWidget(const QString& group, QWidget* parent) : QGLWidget(parent, SharedGLContext::getWidget()), WaveformWidgetAbstract(group) { qDebug() << "Created QGLWidget. Context" diff --git a/src/waveform/widgets/qtrgbwaveformwidget.h b/src/waveform/widgets/qtrgbwaveformwidget.h index b502dc2c41..57d60b40bf 100644 --- a/src/waveform/widgets/qtrgbwaveformwidget.h +++ b/src/waveform/widgets/qtrgbwaveformwidget.h @@ -24,7 +24,7 @@ class QtRGBWaveformWidget : public QGLWidget, public WaveformWidgetAbstract { virtual mixxx::Duration render(); private: - QtRGBWaveformWidget(const char* group, QWidget* parent); + QtRGBWaveformWidget(const QString& group, QWidget* parent); friend class WaveformWidgetFactory; }; diff --git a/src/waveform/widgets/qtsimplewaveformwidget.cpp b/src/waveform/widgets/qtsimplewaveformwidget.cpp index 62cc3741e4..3d2d7e2a80 100644 --- a/src/waveform/widgets/qtsimplewaveformwidget.cpp +++ b/src/waveform/widgets/qtsimplewaveformwidget.cpp @@ -15,7 +15,9 @@ #include "util/performancetimer.h" -QtSimpleWaveformWidget::QtSimpleWaveformWidget(const char* group, QWidget* parent) +QtSimpleWaveformWidget::QtSimpleWaveformWidget( + const QString& group, + QWidget* parent) : QGLWidget(parent, SharedGLContext::getWidget()), WaveformWidgetAbstract(group) { qDebug() << "Created QGLWidget. Context" diff --git a/src/waveform/widgets/qtsimplewaveformwidget.h b/src/waveform/widgets/qtsimplewaveformwidget.h index 5104418381..a00f7ec36b 100644 --- a/src/waveform/widgets/qtsimplewaveformwidget.h +++ b/src/waveform/widgets/qtsimplewaveformwidget.h @@ -8,7 +8,7 @@ class QtSimpleWaveformWidget : public QGLWidget, public WaveformWidgetAbstract { Q_OBJECT public: - QtSimpleWaveformWidget(const char* group, QWidget* parent); + QtSimpleWaveformWidget(const QString& group, QWidget* parent); virtual ~QtSimpleWaveformWidget(); diff --git a/src/waveform/widgets/qtvsynctestwidget.cpp b/src/waveform/widgets/qtvsynctestwidget.cpp index f54906543b..d2dd173e59 100644 --- a/src/waveform/widgets/qtvsynctestwidget.cpp +++ b/src/waveform/widgets/qtvsynctestwidget.cpp @@ -16,9 +16,9 @@ #include "util/performancetimer.h" -QtVSyncTestWidget::QtVSyncTestWidget(const char* group, QWidget* parent) - : QGLWidget(parent, SharedGLContext::getWidget()), - WaveformWidgetAbstract(group) { +QtVSyncTestWidget::QtVSyncTestWidget(const QString& group, QWidget* parent) + : QGLWidget(parent, SharedGLContext::getWidget()), + WaveformWidgetAbstract(group) { qDebug() << "Created QGLWidget. Context" << "Valid:" << context()->isValid() << "Sharing:" << context()->isSharing(); diff --git a/src/waveform/widgets/qtvsynctestwidget.h b/src/waveform/widgets/qtvsynctestwidget.h index 07f9872ae4..bb575d54b4 100644 --- a/src/waveform/widgets/qtvsynctestwidget.h +++ b/src/waveform/widgets/qtvsynctestwidget.h @@ -8,7 +8,7 @@ class QtVSyncTestWidget : public QGLWidget, public WaveformWidgetAbstract { Q_OBJECT public: - QtVSyncTestWidget(const char* group, QWidget* parent); + QtVSyncTestWidget(const QString& group, QWidget* parent); virtual ~QtVSyncTestWidget(); virtual WaveformWidgetType::Type getType() const { return WaveformWidgetType::QtVSyncTest; } diff --git a/src/waveform/widgets/qtwaveformwidget.cpp b/src/waveform/widgets/qtwaveformwidget.cpp index 2a8f62ad94..03af01a59e 100644 --- a/src/waveform/widgets/qtwaveformwidget.cpp +++ b/src/waveform/widgets/qtwaveformwidget.cpp @@ -16,7 +16,7 @@ #include "util/performancetimer.h" -QtWaveformWidget::QtWaveformWidget(const char* group, QWidget* parent) +QtWaveformWidget::QtWaveformWidget(const QString& group, QWidget* parent) : QGLWidget(parent, SharedGLContext::getWidget()), WaveformWidgetAbstract(group) { qDebug() << "Created QGLWidget. Context" diff --git a/src/waveform/widgets/qtwaveformwidget.h b/src/waveform/widgets/qtwaveformwidget.h index c9c108c2fc..bb9b58c2e6 100644 --- a/src/waveform/widgets/qtwaveformwidget.h +++ b/src/waveform/widgets/qtwaveformwidget.h @@ -8,7 +8,7 @@ class QtWaveformWidget : public QGLWidget, public WaveformWidgetAbstract { Q_OBJECT public: - QtWaveformWidget(const char* group, QWidget* parent); + QtWaveformWidget(const QString& group, QWidget* parent); virtual ~QtWaveformWidget(); virtual WaveformWidgetType::Type getType() const { return WaveformWidgetType::QtWaveform; } diff --git a/src/waveform/widgets/rgbwaveformwidget.cpp b/src/waveform/widgets/rgbwaveformwidget.cpp index 95d33a5aa1..24b2337cb6 100644 --- a/src/waveform/widgets/rgbwaveformwidget.cpp +++ b/src/waveform/widgets/rgbwaveformwidget.cpp @@ -11,7 +11,7 @@ #include "waveform/renderers/waveformrendererendoftrack.h" #include "waveform/renderers/waveformrenderbeat.h" -RGBWaveformWidget::RGBWaveformWidget(const char* group, QWidget* parent) +RGBWaveformWidget::RGBWaveformWidget(const QString& group, QWidget* parent) : QWidget(parent), WaveformWidgetAbstract(group) { addRenderer<WaveformRenderBackground>(); diff --git a/src/waveform/widgets/rgbwaveformwidget.h b/src/waveform/widgets/rgbwaveformwidget.h index 88649f7d35..dd4202b593 100644 --- a/src/waveform/widgets/rgbwaveformwidget.h +++ b/src/waveform/widgets/rgbwaveformwidget.h @@ -23,7 +23,7 @@ class RGBWaveformWidget : public QWidget, public WaveformWidgetAbstract { virtual void paintEvent(QPaintEvent* event); private: - RGBWaveformWidget(const char* group, QWidget* parent); + RGBWaveformWidget(const QString& group, QWidget* parent); friend class WaveformWidgetFactory; }; diff --git a/src/waveform/widgets/softwarewaveformwidget.cpp b/src/waveform/widgets/softwarewaveformwidget.cpp index 15d5f8c7e1..aaf950098f 100644 --- a/src/waveform/widgets/softwarewaveformwidget.cpp +++ b/src/waveform/widgets/softwarewaveformwidget.cpp @@ -11,9 +11,9 @@ #include "waveform/renderers/waveformrendererendoftrack.h" #include "waveform/renderers/waveformrenderbeat.h" -SoftwareWaveformWidget::SoftwareWaveformWidget(const char* group, QWidget* parent) - : QWidget(parent), - WaveformWidgetAbstract(group) { +SoftwareWaveformWidget::SoftwareWaveformWidget(const QString& group, QWidget* parent) + : QWidget(parent), + WaveformWidgetAbstract(group) { addRenderer<WaveformRenderBackground>(); addRenderer<WaveformRendererEndOfTrack>(); addRenderer<WaveformRendererPreroll>(); diff --git a/src/waveform/widgets/softwarewaveformwidget.h b/src/waveform/widgets/softwarewaveformwidget.h index a84ecae20c..da6319501c 100644 --- a/src/waveform/widgets/softwarewaveformwidget.h +++ b/src/waveform/widgets/softwarewaveformwidget.h @@ -23,7 +23,7 @@ class SoftwareWaveformWidget : public QWidget, public WaveformWidgetAbstract { virtual void paintEvent(QPaintEvent* event); private: - SoftwareWaveformWidget(const char* group, QWidget* parent); + SoftwareWaveformWidget(const QString& groupp, QWidget* parent); friend class WaveformWidgetFactory; }; diff --git a/src/waveform/widgets/waveformwidgetabstract.cpp b/src/waveform/widgets/waveformwidgetabstract.cpp index 6149e19494..c6851d8745 100644 --- a/src/waveform/widgets/waveformwidgetabstract.cpp +++ b/src/waveform/widgets/waveformwidgetabstract.cpp @@ -5,9 +5,9 @@ #include <QtDebug> #include <QWidget> -WaveformWidgetAbstract::WaveformWidgetAbstract(const char* group) - : WaveformWidgetRenderer(group), - m_initSuccess(false) { +WaveformWidgetAbstract::WaveformWidgetAbstract(const QString& group) + : WaveformWidgetRenderer(group), + m_initSuccess(false) { m_widget = NULL; } diff --git a/src/waveform/widgets/waveformwidgetabstract.h b/src/waveform/widgets/waveformwidgetabstract.h index 41ee222a6f..67c9f9aae3 100644 --- a/src/waveform/widgets/waveformwidgetabstract.h +++ b/src/waveform/widgets/waveformwidgetabstract.h @@ -18,7 +18,7 @@ class VSyncThread; class WaveformWidgetAbstract : public WaveformWidgetRenderer { public: - WaveformWidgetAbstract(const char* group); + WaveformWidgetAbstract(const QString& group); virtual ~WaveformWidgetAbstract(); //Type is use by the factory to safely up-cast waveform widgets |