hydrogen 1.2.3
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 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
 

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 137 of file SampleEditor.cpp.

Member Function Documentation

◆ checkRatioSettings()

void checkRatioSettings ( )
private

Definition at line 954 of file SampleEditor.cpp.

◆ closeEvent()

void closeEvent ( QCloseEvent * event)
overrideprivatevirtual

Definition at line 155 of file SampleEditor.cpp.

◆ createNewLayer()

void createNewLayer ( )
private

Definition at line 411 of file SampleEditor.cpp.

◆ createPositionsRulerPath()

void createPositionsRulerPath ( )
private

Definition at line 738 of file SampleEditor.cpp.

◆ getAllFrameInfos()

void getAllFrameInfos ( )
private

Definition at line 201 of file SampleEditor.cpp.

◆ getAllLocalFrameInfos()

void getAllLocalFrameInfos ( )
private

Definition at line 330 of file SampleEditor.cpp.

◆ getCloseQuestion()

bool getCloseQuestion ( )

Definition at line 392 of file SampleEditor.cpp.

◆ mouseReleaseEvent()

void mouseReleaseEvent ( QMouseEvent * ev)
overrideprivatevirtual

Definition at line 473 of file SampleEditor.cpp.

◆ on_ClosePushButton_clicked

void on_ClosePushButton_clicked ( )
privateslot

Definition at line 355 of file SampleEditor.cpp.

◆ on_PlayOrigPushButton_clicked

void on_PlayOrigPushButton_clicked ( )
privateslot

Definition at line 653 of file SampleEditor.cpp.

◆ on_PlayPushButton_clicked

void on_PlayPushButton_clicked ( )
privateslot

Definition at line 596 of file SampleEditor.cpp.

◆ on_PrevChangesPushButton_clicked

void on_PrevChangesPushButton_clicked ( )
privateslot

Definition at line 379 of file SampleEditor.cpp.

◆ on_verticalzoomSlider_valueChanged

void on_verticalzoomSlider_valueChanged ( int value)
privateslot

Definition at line 1014 of file SampleEditor.cpp.

◆ openDisplays()

void openDisplays ( )
private

Definition at line 340 of file SampleEditor.cpp.

◆ retrieveSample()

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

Definition at line 176 of file SampleEditor.cpp.

◆ returnAllMainWaveDisplayValues()

bool returnAllMainWaveDisplayValues ( )

Definition at line 480 of file SampleEditor.cpp.

◆ returnAllTargetDisplayValues()

void returnAllTargetDisplayValues ( )

Definition at line 502 of file SampleEditor.cpp.

◆ setAllSampleProps()

void setAllSampleProps ( )
private

◆ setClean()

void setClean ( )

Definition at line 516 of file SampleEditor.cpp.

◆ setSamplelengthFrames()

void setSamplelengthFrames ( )
private

Definition at line 824 of file SampleEditor.cpp.

◆ setSampleName()

void setSampleName ( QString name)

◆ setUnclean()

void setUnclean ( )

Definition at line 508 of file SampleEditor.cpp.

◆ testPositionsSpinBoxes()

void testPositionsSpinBoxes ( )
private

Definition at line 1022 of file SampleEditor.cpp.

◆ testpTimer()

void testpTimer ( )
private

Definition at line 1038 of file SampleEditor.cpp.

◆ updateMainsamplePositionRuler

void updateMainsamplePositionRuler ( )
privateslot

Definition at line 689 of file SampleEditor.cpp.

◆ updateTargetsamplePositionRuler

void updateTargetsamplePositionRuler ( )
privateslot

Definition at line 712 of file SampleEditor.cpp.

◆ valueChangedEndFrameSpinBox

void valueChangedEndFrameSpinBox ( int )
privateslot

Definition at line 572 of file SampleEditor.cpp.

◆ valueChangedLoopCountSpinBox

void valueChangedLoopCountSpinBox ( int )
privateslot

Definition at line 847 of file SampleEditor.cpp.

◆ valueChangedLoopFrameSpinBox

void valueChangedLoopFrameSpinBox ( int )
privateslot

Definition at line 548 of file SampleEditor.cpp.

◆ valueChangedpitchdoubleSpinBox

void valueChangedpitchdoubleSpinBox ( double )
privateslot

Definition at line 894 of file SampleEditor.cpp.

◆ valueChangedProcessingTypeComboBox

void valueChangedProcessingTypeComboBox ( const QString unused)
privateslot

Definition at line 994 of file SampleEditor.cpp.

◆ valueChangedrubberbandCsettingscomboBox

void valueChangedrubberbandCsettingscomboBox ( const QString )
privateslot

Definition at line 881 of file SampleEditor.cpp.

◆ valueChangedrubberComboBox

void valueChangedrubberComboBox ( const QString )
privateslot

Definition at line 906 of file SampleEditor.cpp.

◆ valueChangedStartFrameSpinBox

void valueChangedStartFrameSpinBox ( int )
privateslot

Definition at line 523 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.