-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
single waveformwidget class for all allshader waveform widget types #2
single waveformwidget class for all allshader waveform widget types #2
Conversation
…some cleanup in waveformwidgetfactory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small syntax nitpick, rest is good enough. Thank you.
WaveformWidgetVars WaveformWidget::vars() { | ||
WaveformWidgetVars result; | ||
result.m_useGL = true; | ||
result.m_useGLES = true; | ||
result.m_useGLSL = true; | ||
result.m_category = WaveformWidgetCategory::AllShader; | ||
return result; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WaveformWidgetVars WaveformWidget::vars() { | |
WaveformWidgetVars result; | |
result.m_useGL = true; | |
result.m_useGLES = true; | |
result.m_useGLSL = true; | |
result.m_category = WaveformWidgetCategory::AllShader; | |
return result; | |
WaveformWidgetVars WaveformWidget::defaultVars() { | |
return { .m_useGL = true, | |
.m_useGLES = true, | |
.m_useGLSL = true, | |
.m_category = WaveformWidgetCategory::AllShader | |
}; |
void addHandle( | ||
QHash<WaveformWidgetType::Type, QList<WaveformWidgetBackend>>& | ||
collectedHandles, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the out-parameter here, but we can clean that up some time else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, I was thinking to put all this in a class with the QHash as a member. I'll add a TODO so we don't forget about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just referencing mixxxdj/mixxx#13245 for tracking
@acolombier up to you to review / merge :) |
@acolombier I think you can merge this already. I will create a follow-up PR with the suggestions from @Swiftb0y when I have a moment. |
5c3551d
into
acolombier:feat/simplify-waveform-combobox
Use a single allshader::WaveformWidget class for all the allshader Waveform widget types.
Note how I automatically deal with adding the slip renderer layers.
I also did some cleanup in WaveformWidgetFactory, some related with / required by this change to use a single allshader::WaveformWidget. I also introduced a struct WaveformWidgetVars, to be used instead of having to add multiple static functions (static bool useGL, etc), but I only use this for the allshader::WaveformWidget for now.