summaryrefslogtreecommitdiffstats
path: root/src/waveform
diff options
context:
space:
mode:
authorJosepMaJAZ <josepma@gmail.com>2020-04-12 17:02:05 +0200
committerJosepMaJAZ <josepma@gmail.com>2020-04-12 17:02:05 +0200
commit95f7a0eb2d149b8cea66d0c38556c559b450bd62 (patch)
tree24521de14874bcf73ebb431f23ef9d5579febd51 /src/waveform
parentb5ba6b90ee1406d7c6a1d9cbd374155b531ce195 (diff)
Fixes from the PR (naming , doxygen and spaces)
Diffstat (limited to 'src/waveform')
-rw-r--r--src/waveform/waveformwidgetfactory.cpp7
-rw-r--r--src/waveform/waveformwidgetfactory.h18
2 files changed, 14 insertions, 11 deletions
diff --git a/src/waveform/waveformwidgetfactory.cpp b/src/waveform/waveformwidgetfactory.cpp
index 571a8f7dad..43da5f6f81 100644
--- a/src/waveform/waveformwidgetfactory.cpp
+++ b/src/waveform/waveformwidgetfactory.cpp
@@ -314,7 +314,7 @@ bool WaveformWidgetFactory::setConfig(UserSettingsPointer config) {
WaveformWidgetType::Type type = static_cast<WaveformWidgetType::Type>(
m_config->getValueString(ConfigKey("[Waveform]","WaveformType")).toInt(&ok));
- // Store the widget type on m_configType for later initialization.
+ // Store the widget type on m_configType for later initialization.
// We will initialize the objects later because of a problem with GL on QT 5.14.2 on Windows
if (!ok || !setWidgetType(type, m_configType)) {
setWidgetType(autoChooseWidgetType(), m_configType);
@@ -365,7 +365,7 @@ void WaveformWidgetFactory::addTimerListener(QWidget* pWidget) {
}
-void WaveformWidgetFactory::onSkinLoadFinished() {
+void WaveformWidgetFactory::slotSkinLoaded() {
// This regenerates twice the waveforms because of a bug found on Windows
// where the first one fails.
// The problem is that the window of the widget thinks that it is not exposed.
@@ -449,6 +449,7 @@ int WaveformWidgetFactory::getVSyncType() {
bool WaveformWidgetFactory::setWidgetType(WaveformWidgetType::Type type) {
return setWidgetType(type, m_type);
}
+
bool WaveformWidgetFactory::setWidgetType(WaveformWidgetType::Type type, WaveformWidgetType::Type& currentType) {
if (type == currentType)
return true;
@@ -480,6 +481,7 @@ bool WaveformWidgetFactory::setWidgetTypeFromConfig() {
}
return setWidgetTypeFromHandle(desired, true);
}
+
bool WaveformWidgetFactory::setWidgetTypeFromHandle(int handleIndex, bool force) {
if (handleIndex < 0 || handleIndex >= (int)m_waveformWidgetHandles.size()) {
qDebug() << "WaveformWidgetFactory::setWidgetType - invalid handle --> use of 'EmptyWaveform'";
@@ -1007,6 +1009,7 @@ WaveformWidgetType::Type WaveformWidgetFactory::findTypeFromHandleIndex(int inde
}
return type;
}
+
int WaveformWidgetFactory::findHandleIndexFromType(WaveformWidgetType::Type type) {
int index = -1;
for (int i = 0; i < m_waveformWidgetHandles.size(); i++) {
diff --git a/src/waveform/waveformwidgetfactory.h b/src/waveform/waveformwidgetfactory.h
index 0ab967ea46..67c4e7fd19 100644
--- a/src/waveform/waveformwidgetfactory.h
+++ b/src/waveform/waveformwidgetfactory.h
@@ -64,9 +64,9 @@ class WaveformWidgetFactory : public QObject, public Singleton<WaveformWidgetFac
bool setConfig(UserSettingsPointer config);
- // creates the waveform widget using the type set with setWidgetType
- // and binds it to the viewer.
- // deletes older widget and resets positions to config defaults
+ /// creates the waveform widget using the type set with setWidgetType
+ /// and binds it to the viewer.
+ /// deletes older widget and resets positions to config defaults
bool setWaveformWidget(
WWaveformViewer* viewer,
const QDomElement &node,
@@ -84,13 +84,13 @@ class WaveformWidgetFactory : public QObject, public Singleton<WaveformWidgetFac
bool isOpenGlShaderAvailable() const { return m_openGLShaderAvailable;}
- // Sets the widget type and saves it to configuration.
- // Returns false and sets EmtpyWaveform if type is invalid
+ /// Sets the widget type and saves it to configuration.
+ /// Returns false and sets EmtpyWaveform if type is invalid
bool setWidgetType(WaveformWidgetType::Type type);
- // Changes the widged type to that loaded from config and recreates them.
- // Used as a workaround on Windows due to a problem with GL and QT 5.14.2
+ /// Changes the widged type to that loaded from config and recreates them.
+ /// Used as a workaround on Windows due to a problem with GL and QT 5.14.2
bool setWidgetTypeFromConfig();
- // Changes the widget type and recreates them. Used from the pref. dialog
+ /// Changes the widget type and recreates them. Used from the pref. dialog
bool setWidgetTypeFromHandle(int handleIndex, bool force = false);
WaveformWidgetType::Type getType() const { return m_type;}
@@ -137,7 +137,7 @@ class WaveformWidgetFactory : public QObject, public Singleton<WaveformWidgetFac
void swapSpinnies();
public slots:
- void onSkinLoadFinished();
+ void slotSkinLoaded();
protected:
WaveformWidgetFactory();