hydrogen 1.2.3
SongEditorPanel Class Reference

#include <SongEditorPanel.h>

Inheritance diagram for SongEditorPanel:
EventListener Object< SongEditorPanel > Base

Public Slots

void activateSelectMode (bool bActivate)
 
void activateStackedMode (bool bActivate)
 Used by the shotlist during automated generation of images for the manual.
 
void showHideTimeline (bool bClicked)
 
void toggleAutomationAreaVisibility ()
 

Public Member Functions

 SongEditorPanel (QWidget *parent)
 
 ~SongEditorPanel ()
 
virtual void actionModeChangeEvent (int nValue) override
 Updates the associated buttons if the action mode was changed within the core.
 
AutomationPathViewgetAutomationPathView () const
 
PlaybackTrackWaveDisplaygetPlaybackTrackWaveDisplay () const
 
SongEditorgetSongEditor () const
 
SongEditorPatternListgetSongEditorPatternList () const
 
SongEditorPositionRulergetSongEditorPositionRuler () const
 
bool getTimelineActive () const
 
bool getTimelineEnabled () const
 
virtual void gridCellToggledEvent () override
 
void highlightPatternEditorLocked (bool bUseRedBackground)
 Turns the background color of m_pPatternEditorLockedBtn red to signal the user her last action was not permitted.
 
virtual void jackTimebaseStateChangedEvent () override
 
virtual void patternEditorLockedEvent () override
 
virtual void patternModifiedEvent () override
 
virtual void playbackTrackChangedEvent () override
 
virtual void playingPatternsChangedEvent () override
 
void restoreGroupVector (QString filename)
 
virtual void selectedPatternChangedEvent () override
 
void setTimelineActive (bool bActive)
 
void setTimelineEnabled (bool bEnabled)
 
void showPlaybackTrack ()
 
void showTimeline ()
 
virtual void songModeActivationEvent () override
 
virtual void stackedModeActivationEvent (int) override
 
virtual void stateChangedEvent (H2Core::AudioEngine::State) override
 
virtual void timelineActivationEvent () override
 
void updateAll ()
 Update and redraw all...
 
void updatePlaybackTrackIfNecessary ()
 
void updatePositionRuler ()
 
virtual void updateSongEvent (int) override
 
void updateTimelineUsage ()
 Disables and deactivates the Timeline when an external JACK timebase master is detected and enables it when it's gone or Hydrogen itself becomes the timebase master.
 
- Public Member Functions inherited from EventListener
virtual ~EventListener ()
 
virtual void bbtChangedEvent ()
 
virtual void driverChangedEvent ()
 
virtual void drumkitLoadedEvent ()
 
virtual void errorEvent (int nErrorCode)
 
virtual void instrumentParametersChangedEvent (int nInstrumentNumber)
 
virtual void jacksessionEvent (int nValue)
 
virtual void jackTransportActivationEvent ()
 
virtual void loopModeActivationEvent ()
 
virtual void metronomeEvent (int nValue)
 
virtual void midiActivityEvent ()
 
virtual void midiMapChangedEvent ()
 
virtual void nextPatternsChangedEvent ()
 
virtual void nextShotEvent ()
 
virtual void noteOnEvent (int nInstrument)
 
virtual void playlistLoadSongEvent (int nIndex)
 
virtual void progressEvent (int nValue)
 
virtual void quitEvent (int nValue)
 
virtual void relocationEvent ()
 
virtual void selectedInstrumentChangedEvent ()
 
virtual void songModifiedEvent ()
 
virtual void songSizeChangedEvent ()
 
virtual void soundLibraryChangedEvent ()
 
virtual void tempoChangedEvent (int nValue)
 
virtual void timelineUpdateEvent (int nValue)
 
virtual void undoRedoActionEvent (int nValue)
 
virtual void updatePreferencesEvent (int nValue)
 
virtual void XRunEvent ()
 
- Public Member Functions inherited from Object< SongEditorPanel >
 Object ()
 
 Object (const Object< SongEditorPanel > &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.
 

Private Slots

void automationPathPointAdded (float x, float y)
 
void automationPathPointMoved (float ox, float oy, float tx, float ty)
 
void automationPathPointRemoved (float x, float y)
 
void clearSequence ()
 
void downBtnClicked ()
 Move down a pattern in the patternList.
 
void editPlaybackTrackBtnClicked ()
 
void faderChanged (WidgetWithInput *pRef)
 
void hScrollTo (int value)
 
void newPatBtnClicked ()
 Create a new pattern.
 
void timelineBtnClicked ()
 
void upBtnClicked ()
 Move up a pattern in the patternList.
 
void updatePlaybackFaderPeaks ()
 
void updatePlayHeadPosition ()
 
void viewPlaybackTrackBtnClicked ()
 
void viewTimelineBtnClicked ()
 
void vScrollTo (int value)
 
void zoomInBtnClicked ()
 
void zoomOutBtnClicked ()
 

Private Member Functions

virtual void resizeEvent (QResizeEvent *ev) override
 
void resyncExternalScrollBar ()
 

Private Attributes

bool m_bLastIsTimelineActivated
 
uint m_nInitialHeight
 
uint m_nInitialWidth
 
LCDCombom_pAutomationCombo
 
QScrollArea * m_pAutomationPathScrollView
 
AutomationPathViewm_pAutomationPathView
 
Buttonm_pClearPatternSeqBtn
 
Buttonm_pDownBtn
 
Buttonm_pDrawModeBtn
 
QScrollArea * m_pEditorScrollView
 
Buttonm_pEditPlaybackBtn
 
QScrollBar * m_pHScrollBar
 
Buttonm_pMutePlaybackBtn
 
Buttonm_pPatternEditorLockedBtn
 
Buttonm_pPatternEditorUnlockedBtn
 
SongEditorPatternListm_pPatternList
 
QScrollArea * m_pPatternListScrollView
 
Faderm_pPlaybackTrackFader
 
QScrollArea * m_pPlaybackTrackScrollView
 
PlaybackTrackWaveDisplaym_pPlaybackTrackWaveDisplay
 
Buttonm_pPlaySelectedMultipleBtn
 
Buttonm_pPlaySelectedSingleBtn
 
SongEditorPositionRulerm_pPositionRuler
 
QScrollArea * m_pPositionRulerScrollView
 
Buttonm_pSelectionModeBtn
 
SongEditorm_pSongEditor
 
Buttonm_pTimelineBtn
 
QTimer * m_pTimer
 
Buttonm_pUpBtn
 
Buttonm_pViewPlaybackBtn
 
Buttonm_pViewTimelineBtn
 
QScrollBar * m_pVScrollBar
 
QStackedWidget * m_pWidgetStack
 

Static Private Attributes

static const int m_nPatternListWidth = 200
 

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< SongEditorPanel >
 ~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

Definition at line 47 of file SongEditorPanel.h.

Constructor & Destructor Documentation

◆ SongEditorPanel()

SongEditorPanel ( QWidget * parent)
explicit

Definition at line 56 of file SongEditorPanel.cpp.

◆ ~SongEditorPanel()

Definition at line 424 of file SongEditorPanel.cpp.

Member Function Documentation

◆ actionModeChangeEvent()

void actionModeChangeEvent ( int nValue)
overridevirtual

Updates the associated buttons if the action mode was changed within the core.

Parameters
nValue0 - select mode and 1 - draw mode.

Reimplemented from EventListener.

Definition at line 806 of file SongEditorPanel.cpp.

◆ activateSelectMode

void activateSelectMode ( bool bActivate)
slot

Definition at line 1177 of file SongEditorPanel.cpp.

◆ activateStackedMode

void activateStackedMode ( bool bActivate)
slot

Used by the shotlist during automated generation of images for the manual.

Definition at line 1167 of file SongEditorPanel.cpp.

◆ automationPathPointAdded

void automationPathPointAdded ( float x,
float y )
privateslot

Definition at line 1018 of file SongEditorPanel.cpp.

◆ automationPathPointMoved

void automationPathPointMoved ( float ox,
float oy,
float tx,
float ty )
privateslot

Definition at line 1034 of file SongEditorPanel.cpp.

◆ automationPathPointRemoved

void automationPathPointRemoved ( float x,
float y )
privateslot

Definition at line 1026 of file SongEditorPanel.cpp.

◆ clearSequence

void clearSequence ( )
privateslot

Definition at line 685 of file SongEditorPanel.cpp.

◆ downBtnClicked

void downBtnClicked ( )
privateslot

Move down a pattern in the patternList.

Definition at line 665 of file SongEditorPanel.cpp.

◆ editPlaybackTrackBtnClicked

void editPlaybackTrackBtnClicked ( )
privateslot

Definition at line 879 of file SongEditorPanel.cpp.

◆ faderChanged

void faderChanged ( WidgetWithInput * pRef)
privateslot

Definition at line 980 of file SongEditorPanel.cpp.

◆ getAutomationPathView()

AutomationPathView * getAutomationPathView ( ) const
inline

Definition at line 59 of file SongEditorPanel.h.

◆ getPlaybackTrackWaveDisplay()

PlaybackTrackWaveDisplay * getPlaybackTrackWaveDisplay ( ) const
inline

Definition at line 60 of file SongEditorPanel.h.

◆ getSongEditor()

SongEditor * getSongEditor ( ) const
inline

Definition at line 56 of file SongEditorPanel.h.

◆ getSongEditorPatternList()

SongEditorPatternList * getSongEditorPatternList ( ) const
inline

Definition at line 57 of file SongEditorPanel.h.

◆ getSongEditorPositionRuler()

SongEditorPositionRuler * getSongEditorPositionRuler ( ) const
inline

Definition at line 58 of file SongEditorPanel.h.

◆ getTimelineActive()

bool getTimelineActive ( ) const

Definition at line 1104 of file SongEditorPanel.cpp.

◆ getTimelineEnabled()

bool getTimelineEnabled ( ) const

Definition at line 1123 of file SongEditorPanel.cpp.

◆ gridCellToggledEvent()

void gridCellToggledEvent ( )
overridevirtual

Reimplemented from EventListener.

Definition at line 1148 of file SongEditorPanel.cpp.

◆ highlightPatternEditorLocked()

void highlightPatternEditorLocked ( bool bUseRedBackground)

Turns the background color of m_pPatternEditorLockedBtn red to signal the user her last action was not permitted.

Definition at line 475 of file SongEditorPanel.cpp.

◆ hScrollTo

void hScrollTo ( int value)
privateslot

Definition at line 530 of file SongEditorPanel.cpp.

◆ jackTimebaseStateChangedEvent()

void jackTimebaseStateChangedEvent ( )
overridevirtual

Reimplemented from EventListener.

Definition at line 1058 of file SongEditorPanel.cpp.

◆ newPatBtnClicked

void newPatBtnClicked ( )
privateslot

Create a new pattern.

Definition at line 618 of file SongEditorPanel.cpp.

◆ patternEditorLockedEvent()

void patternEditorLockedEvent ( )
overridevirtual

Reimplemented from EventListener.

Definition at line 771 of file SongEditorPanel.cpp.

◆ patternModifiedEvent()

void patternModifiedEvent ( )
overridevirtual

Reimplemented from EventListener.

Definition at line 563 of file SongEditorPanel.cpp.

◆ playbackTrackChangedEvent()

void playbackTrackChangedEvent ( )
overridevirtual

Reimplemented from EventListener.

Definition at line 767 of file SongEditorPanel.cpp.

◆ playingPatternsChangedEvent()

void playingPatternsChangedEvent ( )
overridevirtual

Reimplemented from EventListener.

Definition at line 1152 of file SongEditorPanel.cpp.

◆ resizeEvent()

void resizeEvent ( QResizeEvent * ev)
overrideprivatevirtual

Definition at line 745 of file SongEditorPanel.cpp.

◆ restoreGroupVector()

void restoreGroupVector ( QString filename)

Definition at line 705 of file SongEditorPanel.cpp.

◆ resyncExternalScrollBar()

void resyncExternalScrollBar ( )
private

Definition at line 729 of file SongEditorPanel.cpp.

◆ selectedPatternChangedEvent()

void selectedPatternChangedEvent ( )
overridevirtual

Reimplemented from EventListener.

Definition at line 1002 of file SongEditorPanel.cpp.

◆ setTimelineActive()

void setTimelineActive ( bool bActive)

Definition at line 1108 of file SongEditorPanel.cpp.

◆ setTimelineEnabled()

void setTimelineEnabled ( bool bEnabled)

Definition at line 1127 of file SongEditorPanel.cpp.

◆ showHideTimeline

void showHideTimeline ( bool bClicked)
inlineslot

Definition at line 116 of file SongEditorPanel.h.

◆ showPlaybackTrack()

void showPlaybackTrack ( )

Definition at line 843 of file SongEditorPanel.cpp.

◆ showTimeline()

void showTimeline ( )

Definition at line 826 of file SongEditorPanel.cpp.

◆ songModeActivationEvent()

void songModeActivationEvent ( )
overridevirtual

Reimplemented from EventListener.

Definition at line 1070 of file SongEditorPanel.cpp.

◆ stackedModeActivationEvent()

void stackedModeActivationEvent ( int )
overridevirtual

Reimplemented from EventListener.

Definition at line 934 of file SongEditorPanel.cpp.

◆ stateChangedEvent()

void stateChangedEvent ( H2Core::AudioEngine::State )
overridevirtual

Reimplemented from EventListener.

Definition at line 801 of file SongEditorPanel.cpp.

◆ timelineActivationEvent()

void timelineActivationEvent ( )
overridevirtual

Reimplemented from EventListener.

Definition at line 1095 of file SongEditorPanel.cpp.

◆ timelineBtnClicked

void timelineBtnClicked ( )
privateslot

Definition at line 821 of file SongEditorPanel.cpp.

◆ toggleAutomationAreaVisibility

void toggleAutomationAreaVisibility ( )
slot

Definition at line 1041 of file SongEditorPanel.cpp.

◆ upBtnClicked

void upBtnClicked ( )
privateslot

Move up a pattern in the patternList.

Definition at line 647 of file SongEditorPanel.cpp.

◆ updateAll()

void updateAll ( )

Update and redraw all...

Definition at line 547 of file SongEditorPanel.cpp.

◆ updatePlaybackFaderPeaks

void updatePlaybackFaderPeaks ( )
privateslot

Definition at line 479 of file SongEditorPanel.cpp.

◆ updatePlaybackTrackIfNecessary()

void updatePlaybackTrackIfNecessary ( )

Definition at line 574 of file SongEditorPanel.cpp.

◆ updatePlayHeadPosition

void updatePlayHeadPosition ( )
privateslot

Definition at line 431 of file SongEditorPanel.cpp.

◆ updatePositionRuler()

void updatePositionRuler ( )

Definition at line 610 of file SongEditorPanel.cpp.

◆ updateSongEvent()

void updateSongEvent ( int nValue)
overridevirtual

Reimplemented from EventListener.

Definition at line 751 of file SongEditorPanel.cpp.

◆ updateTimelineUsage()

void updateTimelineUsage ( )

Disables and deactivates the Timeline when an external JACK timebase master is detected and enables it when it's gone or Hydrogen itself becomes the timebase master.

◆ viewPlaybackTrackBtnClicked

void viewPlaybackTrackBtnClicked ( )
privateslot

Definition at line 870 of file SongEditorPanel.cpp.

◆ viewTimelineBtnClicked

void viewTimelineBtnClicked ( )
privateslot

Definition at line 861 of file SongEditorPanel.cpp.

◆ vScrollTo

void vScrollTo ( int value)
privateslot

Definition at line 518 of file SongEditorPanel.cpp.

◆ zoomInBtnClicked

void zoomInBtnClicked ( )
privateslot

Definition at line 951 of file SongEditorPanel.cpp.

◆ zoomOutBtnClicked

void zoomOutBtnClicked ( )
privateslot

Definition at line 966 of file SongEditorPanel.cpp.

Field Documentation

◆ m_bLastIsTimelineActivated

bool m_bLastIsTimelineActivated
private

Definition at line 199 of file SongEditorPanel.h.

◆ m_nInitialHeight

uint m_nInitialHeight
private

Definition at line 150 of file SongEditorPanel.h.

◆ m_nInitialWidth

uint m_nInitialWidth
private

Definition at line 149 of file SongEditorPanel.h.

◆ m_nPatternListWidth

const int m_nPatternListWidth = 200
staticprivate

Definition at line 152 of file SongEditorPanel.h.

◆ m_pAutomationCombo

LCDCombo* m_pAutomationCombo
private

Definition at line 194 of file SongEditorPanel.h.

◆ m_pAutomationPathScrollView

QScrollArea* m_pAutomationPathScrollView
private

Definition at line 163 of file SongEditorPanel.h.

◆ m_pAutomationPathView

AutomationPathView* m_pAutomationPathView
private

Definition at line 193 of file SongEditorPanel.h.

◆ m_pClearPatternSeqBtn

Button* m_pClearPatternSeqBtn
private

Definition at line 174 of file SongEditorPanel.h.

◆ m_pDownBtn

Button* m_pDownBtn
private

Definition at line 173 of file SongEditorPanel.h.

◆ m_pDrawModeBtn

Button* m_pDrawModeBtn
private

Definition at line 176 of file SongEditorPanel.h.

◆ m_pEditorScrollView

QScrollArea* m_pEditorScrollView
private

Definition at line 154 of file SongEditorPanel.h.

◆ m_pEditPlaybackBtn

Button* m_pEditPlaybackBtn
private

Definition at line 184 of file SongEditorPanel.h.

◆ m_pHScrollBar

QScrollBar* m_pHScrollBar
private

Definition at line 160 of file SongEditorPanel.h.

◆ m_pMutePlaybackBtn

Button* m_pMutePlaybackBtn
private

Definition at line 183 of file SongEditorPanel.h.

◆ m_pPatternEditorLockedBtn

Button* m_pPatternEditorLockedBtn
private

Definition at line 188 of file SongEditorPanel.h.

◆ m_pPatternEditorUnlockedBtn

Button* m_pPatternEditorUnlockedBtn
private

Definition at line 189 of file SongEditorPanel.h.

◆ m_pPatternList

SongEditorPatternList* m_pPatternList
private

Definition at line 167 of file SongEditorPanel.h.

◆ m_pPatternListScrollView

QScrollArea* m_pPatternListScrollView
private

Definition at line 155 of file SongEditorPanel.h.

◆ m_pPlaybackTrackFader

Fader* m_pPlaybackTrackFader
private

Definition at line 178 of file SongEditorPanel.h.

◆ m_pPlaybackTrackScrollView

QScrollArea* m_pPlaybackTrackScrollView
private

Definition at line 157 of file SongEditorPanel.h.

◆ m_pPlaybackTrackWaveDisplay

PlaybackTrackWaveDisplay* m_pPlaybackTrackWaveDisplay
private

Definition at line 169 of file SongEditorPanel.h.

◆ m_pPlaySelectedMultipleBtn

Button* m_pPlaySelectedMultipleBtn
private

Definition at line 187 of file SongEditorPanel.h.

◆ m_pPlaySelectedSingleBtn

Button* m_pPlaySelectedSingleBtn
private

Definition at line 186 of file SongEditorPanel.h.

◆ m_pPositionRuler

SongEditorPositionRuler* m_pPositionRuler
private

Definition at line 168 of file SongEditorPanel.h.

◆ m_pPositionRulerScrollView

QScrollArea* m_pPositionRulerScrollView
private

Definition at line 156 of file SongEditorPanel.h.

◆ m_pSelectionModeBtn

Button* m_pSelectionModeBtn
private

Definition at line 175 of file SongEditorPanel.h.

◆ m_pSongEditor

SongEditor* m_pSongEditor
private

Definition at line 166 of file SongEditorPanel.h.

◆ m_pTimelineBtn

Button* m_pTimelineBtn
private

Definition at line 180 of file SongEditorPanel.h.

◆ m_pTimer

QTimer* m_pTimer
private

Definition at line 191 of file SongEditorPanel.h.

◆ m_pUpBtn

Button* m_pUpBtn
private

Definition at line 172 of file SongEditorPanel.h.

◆ m_pViewPlaybackBtn

Button* m_pViewPlaybackBtn
private

Definition at line 182 of file SongEditorPanel.h.

◆ m_pViewTimelineBtn

Button* m_pViewTimelineBtn
private

Definition at line 181 of file SongEditorPanel.h.

◆ m_pVScrollBar

QScrollBar* m_pVScrollBar
private

Definition at line 159 of file SongEditorPanel.h.

◆ m_pWidgetStack

QStackedWidget* m_pWidgetStack
private

Definition at line 162 of file SongEditorPanel.h.