From 57f4d38841c40cad3c206abdd16eebaed753aa1c Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 18 Mar 2018 18:18:57 +0100 Subject: Update all fiels to adhere to style-guide --- src/samplesorter.h | 63 +++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 32 deletions(-) (limited to 'src/samplesorter.h') diff --git a/src/samplesorter.h b/src/samplesorter.h index ed86b9d..fa53a3f 100644 --- a/src/samplesorter.h +++ b/src/samplesorter.h @@ -24,59 +24,58 @@ * along with DrumGizmo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef __DRUMGIZMO_SAMPLESORTER_H__ -#define __DRUMGIZMO_SAMPLESORTER_H__ +#pragma once #include #include #include "selection.h" -class SampleSorter : public QWidget { -Q_OBJECT +class SampleSorter + : public QWidget +{ + Q_OBJECT public: - SampleSorter(Selections &selections, Selections &selections_preview); + SampleSorter(Selections& selections, Selections& selections_preview); public slots: - void setWavData(const float *data, size_t size); - void setAttackLength(int len); - int attackLength(); + void setWavData(const float* data, size_t size); + void setAttackLength(int len); + int attackLength(); - void addSelection(sel_id_t id); - void addSelectionPreview(sel_id_t id); + void addSelection(sel_id_t id); + void addSelectionPreview(sel_id_t id); - void relayout(); + void relayout(); - void setShowPreview(bool show_preview); + void setShowPreview(bool show_preview); - void setSpreadFactor(int spread); + void setSpreadFactor(int spread); protected: - void paintEvent(QPaintEvent *event); - void mouseMoveEvent(QMouseEvent *event); - void mousePressEvent(QMouseEvent *event); - void mouseReleaseEvent(QMouseEvent *event); + void paintEvent(QPaintEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); private: - sel_id_t getSelectionByCoordinate(int x, int y); + sel_id_t getSelectionByCoordinate(int x, int y); - Selections &selections; - Selections &selections_preview; + Selections& selections; + Selections& selections_preview; - bool show_preview; + bool show_preview; - float min; - float max; - int attlen; + float min; + float max; + int attlen; - // Wav data - const float *data; - size_t size; + // Wav data + const float* data; + size_t size; - Selection sel; + Selection sel; - sel_id_t sel_moving; + sel_id_t sel_moving; - double spread; + double spread; }; - -#endif/*__DRUMGIZMO_SAMPLESORTER_H__*/ -- cgit v1.2.3