hydrogen 1.2.3
Director Class Reference

#include <Director.h>

Inheritance diagram for Director:
Object< Director > EventListener Base

Public Slots

void onPreferencesChanged (H2Core::Preferences::Changes changes)
 
void resizeEvent (QResizeEvent *event) override
 

Public Member Functions

 Director (const Director &)=delete
 
 Director (QWidget *pParent)
 
 ~Director ()
 
virtual void bbtChangedEvent () override
 
virtual void closeEvent (QCloseEvent *ev) override
 
virtual void keyPressEvent (QKeyEvent *ev) override
 
Directoroperator= (const Director &rhs)=delete
 
virtual void paintEvent (QPaintEvent *) override
 
virtual void tempoChangedEvent (int nValue) override
 
virtual void timelineUpdateEvent (int nValue) override
 
virtual void updateSongEvent (int nValue) override
 
- Public Member Functions inherited from Object< Director >
 Object ()
 
 Object (const Object< Director > &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.
 
- Public Member Functions inherited from EventListener
virtual ~EventListener ()
 
virtual void actionModeChangeEvent (int nValue)
 
virtual void driverChangedEvent ()
 
virtual void drumkitLoadedEvent ()
 
virtual void errorEvent (int nErrorCode)
 
virtual void gridCellToggledEvent ()
 
virtual void instrumentParametersChangedEvent (int nInstrumentNumber)
 
virtual void jacksessionEvent (int nValue)
 
virtual void jackTimebaseStateChangedEvent ()
 
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 patternEditorLockedEvent ()
 
virtual void patternModifiedEvent ()
 
virtual void playbackTrackChangedEvent ()
 
virtual void playingPatternsChangedEvent ()
 
virtual void playlistLoadSongEvent (int nIndex)
 
virtual void progressEvent (int nValue)
 
virtual void quitEvent (int nValue)
 
virtual void relocationEvent ()
 
virtual void selectedInstrumentChangedEvent ()
 
virtual void selectedPatternChangedEvent ()
 
virtual void songModeActivationEvent ()
 
virtual void songModifiedEvent ()
 
virtual void songSizeChangedEvent ()
 
virtual void soundLibraryChangedEvent ()
 
virtual void stackedModeActivationEvent (int nValue)
 
virtual void stateChangedEvent (H2Core::AudioEngine::State state)
 
virtual void timelineActivationEvent ()
 
virtual void undoRedoActionEvent (int nValue)
 
virtual void updatePreferencesEvent (int nValue)
 
virtual void XRunEvent ()
 

Private Types

enum  FontUpdate { SongName = 0x001 , TagCurrent = 0x002 , TagNext = 0x004 }
 

Private Slots

void updateMetronomBackground ()
 

Private Member Functions

void updateFontSize (FontUpdate update)
 
void updateLabelContainers ()
 
bool updateTags ()
 

Private Attributes

QPalette m_BlinkerPalette
 
QColor m_Color
 
QFont m_fontSongName
 
QFont m_fontTagCurrent
 
QFont m_fontTagNext
 
int m_nBar
 
int m_nBeat
 
int m_nFlashingArea
 
QTimer * m_pTimer
 
QRect m_rectSongName
 
QRect m_rectTagCurrent
 
QRect m_rectTagNext
 
QString m_sSongName
 
QString m_sTagCurrent
 
QString m_sTagNext
 

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< Director >
 ~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 36 of file Director.h.

Member Enumeration Documentation

◆ FontUpdate

enum FontUpdate
private
Enumerator
SongName 
TagCurrent 
TagNext 

Definition at line 67 of file Director.h.

Constructor & Destructor Documentation

◆ Director() [1/2]

Director ( QWidget * pParent)
explicit

Definition at line 69 of file Director.cpp.

◆ ~Director()

~Director ( )

Definition at line 96 of file Director.cpp.

◆ Director() [2/2]

Director ( const Director & )
delete

Member Function Documentation

◆ bbtChangedEvent()

void bbtChangedEvent ( )
overridevirtual

Reimplemented from EventListener.

Definition at line 189 of file Director.cpp.

◆ closeEvent()

void closeEvent ( QCloseEvent * ev)
overridevirtual

Definition at line 107 of file Director.cpp.

◆ keyPressEvent()

void keyPressEvent ( QKeyEvent * ev)
overridevirtual

Definition at line 100 of file Director.cpp.

◆ onPreferencesChanged

void onPreferencesChanged ( H2Core::Preferences::Changes changes)
slot

Definition at line 322 of file Director.cpp.

◆ operator=()

Director & operator= ( const Director & rhs)
delete

◆ paintEvent()

void paintEvent ( QPaintEvent * ev)
overridevirtual

Definition at line 278 of file Director.cpp.

◆ resizeEvent

void resizeEvent ( QResizeEvent * event)
overrideslot

Definition at line 271 of file Director.cpp.

◆ tempoChangedEvent()

void tempoChangedEvent ( int nValue)
overridevirtual

Reimplemented from EventListener.

Definition at line 112 of file Director.cpp.

◆ timelineUpdateEvent()

void timelineUpdateEvent ( int nValue)
overridevirtual

Reimplemented from EventListener.

Definition at line 145 of file Director.cpp.

◆ updateFontSize()

void updateFontSize ( FontUpdate update)
private

Definition at line 223 of file Director.cpp.

◆ updateLabelContainers()

void updateLabelContainers ( )
private

Definition at line 258 of file Director.cpp.

◆ updateMetronomBackground

void updateMetronomBackground ( )
privateslot

Definition at line 216 of file Director.cpp.

◆ updateSongEvent()

void updateSongEvent ( int nValue)
overridevirtual

Reimplemented from EventListener.

Definition at line 116 of file Director.cpp.

◆ updateTags()

bool updateTags ( )
private
Returns
true in case either m_sTagCurrent or m_sTagNext did change.

Definition at line 151 of file Director.cpp.

Field Documentation

◆ m_BlinkerPalette

QPalette m_BlinkerPalette
private

Definition at line 80 of file Director.h.

◆ m_Color

QColor m_Color
private

Definition at line 79 of file Director.h.

◆ m_fontSongName

QFont m_fontSongName
private

Definition at line 90 of file Director.h.

◆ m_fontTagCurrent

QFont m_fontTagCurrent
private

Definition at line 91 of file Director.h.

◆ m_fontTagNext

QFont m_fontTagNext
private

Definition at line 92 of file Director.h.

◆ m_nBar

int m_nBar
private

Definition at line 82 of file Director.h.

◆ m_nBeat

int m_nBeat
private

Definition at line 81 of file Director.h.

◆ m_nFlashingArea

int m_nFlashingArea
private

Definition at line 83 of file Director.h.

◆ m_pTimer

QTimer* m_pTimer
private

Definition at line 78 of file Director.h.

◆ m_rectSongName

QRect m_rectSongName
private

Definition at line 87 of file Director.h.

◆ m_rectTagCurrent

QRect m_rectTagCurrent
private

Definition at line 88 of file Director.h.

◆ m_rectTagNext

QRect m_rectTagNext
private

Definition at line 89 of file Director.h.

◆ m_sSongName

QString m_sSongName
private

Definition at line 86 of file Director.h.

◆ m_sTagCurrent

QString m_sTagCurrent
private

Definition at line 84 of file Director.h.

◆ m_sTagNext

QString m_sTagNext
private

Definition at line 85 of file Director.h.