hydrogen 1.2.6
SampleEditor Class Reference

This dialog is used to preview audiofiles. More...

#include <SampleEditor.h>

Inheritance diagram for SampleEditor:
Object< SampleEditor > Base

Public Member Functions

 SampleEditor (QWidget *pParent, int nSelectedComponent, int nSelectedLayer, QString nSampleFilename)
 
 ~SampleEditor ()
 
bool getCloseQuestion ()
 
bool returnAllMainWaveDisplayValues ()
 
void returnAllTargetDisplayValues ()
 
void setClean ()
 
void setSampleName (QString name)
 
void setUnclean ()
 
- Public Member Functions inherited from Object< SampleEditor >
 Object ()
 
 Object (const Object< SampleEditor > &other)
 
- Public Member Functions inherited from Base
 Base ()
 
 Base (const Base &other)
 
virtual const char * class_name () const
 
void logBacktrace () const
 Print the current stack at point into the debug log.
 
void Print (bool bShort=true) const
 Prints content of toQString() via DEBUGLOG.
 
virtual QString toQString (const QString &sPrefix="", bool bShort=true) const
 Formatted string version for debugging purposes.
 

Data Fields

bool m_bSampleIsModified
 true if sample is modified
 

Private Slots

void on_ClosePushButton_clicked ()
 
void on_PlayOrigPushButton_clicked ()
 
void on_PlayPushButton_clicked ()
 
void on_PrevChangesPushButton_clicked ()
 
void on_verticalzoomSlider_valueChanged (int value)
 
void updateMainsamplePositionRuler ()
 
void updateTargetsamplePositionRuler ()
 
void valueChangedEndFrameSpinBox (int)
 
void valueChangedLoopCountSpinBox (int)
 
void valueChangedLoopFrameSpinBox (int)
 
void valueChangedpitchdoubleSpinBox (double)
 
void valueChangedProcessingTypeComboBox (const QString)
 
void valueChangedrubberbandCsettingscomboBox (const QString)
 
void valueChangedrubberComboBox (const QString)
 
void valueChangedStartFrameSpinBox (int)
 

Private Member Functions

void checkRatioSettings ()
 
virtual void closeEvent (QCloseEvent *event) override
 
void createNewLayer ()
 
void createPositionsRulerPath ()
 
void getAllFrameInfos ()
 
void getAllLocalFrameInfos ()
 
virtual void mouseReleaseEvent (QMouseEvent *ev) override
 
void openDisplays ()
 
std::shared_ptr< H2Core::SampleretrieveSample () const
 
void setAllSampleProps ()
 
void setSamplelengthFrames ()
 
void testPositionsSpinBoxes ()
 
void testpTimer ()
 

Private Attributes

H2Core::Sample::Loops __loops
 
H2Core::Sample::Rubberband __rubberband
 
bool m_bAdjusting
 
bool m_bOnewayEnd
 
bool m_bOnewayLoop
 
bool m_bOnewayStart
 
bool m_bPlayButton
 
bool m_bSampleEditorClean
 
double m_divider
 
float m_fRatio
 
float m_fZoomfactor
 
unsigned long m_nRealtimeFrameEnd
 
unsigned long m_nRealtimeFrameEndForTarget
 
unsigned m_nSamplerate
 
int m_nSelectedComponent
 
int m_nSelectedLayer
 
unsigned m_nSlframes
 
unsigned m_pDetailFrame
 
MainSampleWaveDisplaym_pMainSampleWaveDisplay
 
unsigned * m_pPositionsRulerPath
 
DetailWaveDisplaym_pSampleAdjustView
 
std::shared_ptr< H2Core::Samplem_pSampleFromFile
 
QTimer * m_pTargetDisplayTimer
 
TargetWaveDisplaym_pTargetSampleView
 
QTimer * m_pTimer
 
QString m_sLineColor
 
QString m_sSampleName
 

Additional Inherited Members

- Static Public Member Functions inherited from Base
static const char * _class_name ()
 return the class name
 
static QString base_clock (const QString &sMsg)
 Measures the current time and stores it in __last_clock.
 
static QString base_clock_in (const QString &sMsg)
 
static int bootstrap (Logger *logger, bool count=false)
 must be called before any Object instantiation !
 
static bool count_active ()
 
static int getAliveObjectCount ()
 
static object_map_t getObjectMap ()
 
static Loggerlogger ()
 return the logger instance
 
static int objects_count ()
 
static void printObjectMapDiff (object_map_t map)
 Creates the difference between a snapshot of the object map and its current state and prints it to std::cout.
 
static void set_count (bool flag)
 enable/disable class instances counting
 
static void write_objects_map_to (std::ostream &out, object_map_t *map=nullptr)
 output the full objects map to a given ostream
 
static void write_objects_map_to_cerr ()
 output objects map to stderr
 
- Static Public Attributes inherited from Base
static QString sPrintIndention = " "
 String used to format the debugging string output of some core classes.
 
- Protected Member Functions inherited from Object< SampleEditor >
 ~Object ()
 
- Protected Member Functions inherited from Base
 ~Base ()
 
- Static Protected Member Functions inherited from Base
static void registerClass (const char *name, const atomic_obj_cpt_t *counters)
 
- Static Protected Attributes inherited from Base
static bool __count = false
 should we count class instances
 
static timeval __last_clock = { 0, 0 }
 
static Logger__logger = nullptr
 
static bool bLogColors = true
 

Detailed Description

This dialog is used to preview audiofiles.

Definition at line 45 of file SampleEditor.h.

Constructor & Destructor Documentation

◆ SampleEditor()

SampleEditor ( QWidget * pParent,
int nSelectedComponent,
int nSelectedLayer,
QString nSampleFilename )

Definition at line 54 of file SampleEditor.cpp.

◆ ~SampleEditor()

Definition at line 139 of file SampleEditor.cpp.

Member Function Documentation

◆ checkRatioSettings()

void checkRatioSettings ( )
private

Definition at line 984 of file SampleEditor.cpp.

◆ closeEvent()

void closeEvent ( QCloseEvent * event)
overrideprivatevirtual

Definition at line 157 of file SampleEditor.cpp.

◆ createNewLayer()

void createNewLayer ( )
private

Definition at line 412 of file SampleEditor.cpp.

◆ createPositionsRulerPath()

void createPositionsRulerPath ( )
private

Definition at line 768 of file SampleEditor.cpp.

◆ getAllFrameInfos()

void getAllFrameInfos ( )
private

Definition at line 202 of file SampleEditor.cpp.

◆ getAllLocalFrameInfos()

void getAllLocalFrameInfos ( )
private

Definition at line 340 of file SampleEditor.cpp.

◆ getCloseQuestion()

bool getCloseQuestion ( )

Definition at line 400 of file SampleEditor.cpp.

◆ mouseReleaseEvent()

void mouseReleaseEvent ( QMouseEvent * ev)
overrideprivatevirtual

Definition at line 474 of file SampleEditor.cpp.

◆ on_ClosePushButton_clicked

void on_ClosePushButton_clicked ( )
privateslot

Definition at line 365 of file SampleEditor.cpp.

◆ on_PlayOrigPushButton_clicked

void on_PlayOrigPushButton_clicked ( )
privateslot

Definition at line 654 of file SampleEditor.cpp.

◆ on_PlayPushButton_clicked

void on_PlayPushButton_clicked ( )
privateslot

Definition at line 597 of file SampleEditor.cpp.

◆ on_PrevChangesPushButton_clicked

void on_PrevChangesPushButton_clicked ( )
privateslot

Definition at line 387 of file SampleEditor.cpp.

◆ on_verticalzoomSlider_valueChanged

void on_verticalzoomSlider_valueChanged ( int value)
privateslot

Definition at line 1044 of file SampleEditor.cpp.

◆ openDisplays()

void openDisplays ( )
private

Definition at line 350 of file SampleEditor.cpp.

◆ retrieveSample()

std::shared_ptr< Sample > retrieveSample ( ) const
private

Definition at line 177 of file SampleEditor.cpp.

◆ returnAllMainWaveDisplayValues()

bool returnAllMainWaveDisplayValues ( )

Definition at line 481 of file SampleEditor.cpp.

◆ returnAllTargetDisplayValues()

void returnAllTargetDisplayValues ( )

Definition at line 503 of file SampleEditor.cpp.

◆ setAllSampleProps()

void setAllSampleProps ( )
private

◆ setClean()

void setClean ( )

Definition at line 517 of file SampleEditor.cpp.

◆ setSamplelengthFrames()

void setSamplelengthFrames ( )
private

Definition at line 854 of file SampleEditor.cpp.

◆ setSampleName()

void setSampleName ( QString name)

◆ setUnclean()

void setUnclean ( )

Definition at line 509 of file SampleEditor.cpp.

◆ testPositionsSpinBoxes()

void testPositionsSpinBoxes ( )
private

Definition at line 1052 of file SampleEditor.cpp.

◆ testpTimer()

void testpTimer ( )
private

Definition at line 1068 of file SampleEditor.cpp.

◆ updateMainsamplePositionRuler

void updateMainsamplePositionRuler ( )
privateslot

Definition at line 719 of file SampleEditor.cpp.

◆ updateTargetsamplePositionRuler

void updateTargetsamplePositionRuler ( )
privateslot

Definition at line 742 of file SampleEditor.cpp.

◆ valueChangedEndFrameSpinBox

void valueChangedEndFrameSpinBox ( int )
privateslot

Definition at line 573 of file SampleEditor.cpp.

◆ valueChangedLoopCountSpinBox

void valueChangedLoopCountSpinBox ( int )
privateslot

Definition at line 877 of file SampleEditor.cpp.

◆ valueChangedLoopFrameSpinBox

void valueChangedLoopFrameSpinBox ( int )
privateslot

Definition at line 549 of file SampleEditor.cpp.

◆ valueChangedpitchdoubleSpinBox

void valueChangedpitchdoubleSpinBox ( double )
privateslot

Definition at line 924 of file SampleEditor.cpp.

◆ valueChangedProcessingTypeComboBox

void valueChangedProcessingTypeComboBox ( const QString unused)
privateslot

Definition at line 1024 of file SampleEditor.cpp.

◆ valueChangedrubberbandCsettingscomboBox

void valueChangedrubberbandCsettingscomboBox ( const QString )
privateslot

Definition at line 911 of file SampleEditor.cpp.

◆ valueChangedrubberComboBox

void valueChangedrubberComboBox ( const QString )
privateslot

Definition at line 936 of file SampleEditor.cpp.

◆ valueChangedStartFrameSpinBox

void valueChangedStartFrameSpinBox ( int )
privateslot

Definition at line 524 of file SampleEditor.cpp.

Field Documentation

◆ __loops

H2Core::Sample::Loops __loops
private

Definition at line 130 of file SampleEditor.h.

◆ __rubberband

H2Core::Sample::Rubberband __rubberband
private

Definition at line 131 of file SampleEditor.h.

◆ m_bAdjusting

bool m_bAdjusting
private

Definition at line 119 of file SampleEditor.h.

◆ m_bOnewayEnd

bool m_bOnewayEnd
private

Definition at line 117 of file SampleEditor.h.

◆ m_bOnewayLoop

bool m_bOnewayLoop
private

Definition at line 116 of file SampleEditor.h.

◆ m_bOnewayStart

bool m_bOnewayStart
private

Definition at line 115 of file SampleEditor.h.

◆ m_bPlayButton

bool m_bPlayButton
private

Definition at line 118 of file SampleEditor.h.

◆ m_bSampleEditorClean

bool m_bSampleEditorClean
private

Definition at line 120 of file SampleEditor.h.

◆ m_bSampleIsModified

bool m_bSampleIsModified

true if sample is modified

Definition at line 62 of file SampleEditor.h.

◆ m_divider

double m_divider
private

Definition at line 110 of file SampleEditor.h.

◆ m_fRatio

float m_fRatio
private

Definition at line 129 of file SampleEditor.h.

◆ m_fZoomfactor

float m_fZoomfactor
private

Definition at line 111 of file SampleEditor.h.

◆ m_nRealtimeFrameEnd

unsigned long m_nRealtimeFrameEnd
private

Definition at line 122 of file SampleEditor.h.

◆ m_nRealtimeFrameEndForTarget

unsigned long m_nRealtimeFrameEndForTarget
private

Definition at line 123 of file SampleEditor.h.

◆ m_nSamplerate

unsigned m_nSamplerate
private

Definition at line 125 of file SampleEditor.h.

◆ m_nSelectedComponent

int m_nSelectedComponent
private

Definition at line 107 of file SampleEditor.h.

◆ m_nSelectedLayer

int m_nSelectedLayer
private

Definition at line 106 of file SampleEditor.h.

◆ m_nSlframes

unsigned m_nSlframes
private

Definition at line 124 of file SampleEditor.h.

◆ m_pDetailFrame

unsigned m_pDetailFrame
private

Definition at line 112 of file SampleEditor.h.

◆ m_pMainSampleWaveDisplay

MainSampleWaveDisplay* m_pMainSampleWaveDisplay
private

Definition at line 101 of file SampleEditor.h.

◆ m_pPositionsRulerPath

unsigned* m_pPositionsRulerPath
private

Definition at line 128 of file SampleEditor.h.

◆ m_pSampleAdjustView

DetailWaveDisplay* m_pSampleAdjustView
private

Definition at line 103 of file SampleEditor.h.

◆ m_pSampleFromFile

std::shared_ptr<H2Core::Sample> m_pSampleFromFile
private

Definition at line 105 of file SampleEditor.h.

◆ m_pTargetDisplayTimer

QTimer* m_pTargetDisplayTimer
private

Definition at line 127 of file SampleEditor.h.

◆ m_pTargetSampleView

TargetWaveDisplay* m_pTargetSampleView
private

Definition at line 102 of file SampleEditor.h.

◆ m_pTimer

QTimer* m_pTimer
private

Definition at line 126 of file SampleEditor.h.

◆ m_sLineColor

QString m_sLineColor
private

Definition at line 113 of file SampleEditor.h.

◆ m_sSampleName

QString m_sSampleName
private

Definition at line 108 of file SampleEditor.h.