hydrogen 1.2.6
SoundLibraryPanel Class Reference

#include <SoundLibraryPanel.h>

Inheritance diagram for SoundLibraryPanel:
WidgetWithScalableFont< 8, 10, 12 > Object< SoundLibraryPanel > EventListener

Public Slots

void on_drumkitLoadAction ()
 

Signals

void item_changed (bool bDrumkitSelected)
 

Public Member Functions

 SoundLibraryPanel (QWidget *parent, bool bInItsOwnDialog)
 
 ~SoundLibraryPanel ()
 
virtual void drumkitLoadedEvent () override
 
QString getDrumkitLabel (const QString &sDrumkitPath) const
 
QString getDrumkitPath (const QString &sDrumkitLabel) const
 
virtual void selectedInstrumentChangedEvent () override
 
virtual void soundLibraryChangedEvent () override
 
virtual void updateSongEvent (int nValue) override
 
- Public Member Functions inherited from EventListener
virtual ~EventListener ()
 
virtual void actionModeChangeEvent (int nValue)
 
virtual void bbtChangedEvent ()
 
virtual void driverChangedEvent ()
 
virtual void errorEvent (int nErrorCode)
 
virtual void gridCellToggledEvent ()
 
virtual void instrumentParametersChangedEvent (int nInstrumentNumber)
 
virtual void jacksessionEvent (int nValue)
 
virtual void jackTimebaseStateChangedEvent (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 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 selectedPatternChangedEvent ()
 
virtual void songModeActivationEvent ()
 
virtual void songModifiedEvent ()
 
virtual void songSizeChangedEvent ()
 
virtual void stackedModeActivationEvent (int nValue)
 
virtual void stateChangedEvent (H2Core::AudioEngine::State state)
 
virtual void tempoChangedEvent (int nValue)
 
virtual void timelineActivationEvent ()
 
virtual void timelineUpdateEvent (int nValue)
 
virtual void undoRedoActionEvent (int nValue)
 
virtual void updatePreferencesEvent (int nValue)
 
virtual void XRunEvent ()
 

Private Slots

void on_drumkitDeleteAction ()
 
void on_drumkitExportAction ()
 
void on_DrumkitList_itemActivated (QTreeWidgetItem *item, int column)
 
void on_DrumkitList_ItemChanged (QTreeWidgetItem *current, QTreeWidgetItem *previous)
 
void on_DrumkitList_leftClicked (QPoint pos)
 
void on_DrumkitList_mouseMove (QMouseEvent *event)
 
void on_DrumkitList_rightClicked (QPoint pos)
 
void on_drumkitPropertiesAction ()
 
void on_patternDeleteAction ()
 
void on_patternLoadAction ()
 
void on_songLoadAction ()
 
void onPreferencesChanged (H2Core::Preferences::Changes changes)
 

Private Member Functions

void change_background_color ()
 
void restore_background_color ()
 
void test_expandedItems ()
 
void update_background_color ()
 
void updateTree ()
 
- Private Member Functions inherited from Object< SoundLibraryPanel >
 Object ()
 
 Object (const Object< SoundLibraryPanel > &other)
 
 ~Object ()
 
- Private 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.
 
 ~Base ()
 

Private Attributes

QMenu * __drumkit_menu
 
QMenu * __drumkit_menu_system
 
bool __expand_pattern_list
 
bool __expand_songs_list
 
QTreeWidgetItem * __pattern_item
 
QTreeWidgetItem * __pattern_item_list
 
QMenu * __pattern_menu
 
QMenu * __pattern_menu_list
 
QTreeWidgetItem * __song_item
 
QMenu * __song_menu
 
SoundLibraryTree__sound_library_tree
 
QPoint __start_drag_position
 
bool m_bInItsOwnDialog
 Whether the dialog was constructed via a click in the MainForm or as part of the GUI.
 
QStringList m_drumkitLabels
 List of all labels used for drumkits in the tree.
 
std::map< QString, QString > m_drumkitRegister
 Used to uniquely identify the drumkit corresponding to an item in the tree.
 
QTreeWidgetItem * m_pTreeSessionDrumkitsItem
 
QTreeWidgetItem * m_pTreeSystemDrumkitsItem
 
QTreeWidgetItem * m_pTreeUserDrumkitsItem
 

Additional Inherited Members

- Protected Member Functions inherited from WidgetWithScalableFont< 8, 10, 12 >
constexpr int getPointSize (H2Core::FontTheme::FontSize fontSize) const
 
- Protected Member Functions inherited from EventListener
virtual ~EventListener ()
 
virtual void actionModeChangeEvent (int nValue)
 
virtual void bbtChangedEvent ()
 
virtual void driverChangedEvent ()
 
virtual void errorEvent (int nErrorCode)
 
virtual void gridCellToggledEvent ()
 
virtual void instrumentParametersChangedEvent (int nInstrumentNumber)
 
virtual void jacksessionEvent (int nValue)
 
virtual void jackTimebaseStateChangedEvent (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 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 selectedPatternChangedEvent ()
 
virtual void songModeActivationEvent ()
 
virtual void songModifiedEvent ()
 
virtual void songSizeChangedEvent ()
 
virtual void stackedModeActivationEvent (int nValue)
 
virtual void stateChangedEvent (H2Core::AudioEngine::State state)
 
virtual void tempoChangedEvent (int nValue)
 
virtual void timelineActivationEvent ()
 
virtual void timelineUpdateEvent (int nValue)
 
virtual void undoRedoActionEvent (int nValue)
 
virtual void updatePreferencesEvent (int nValue)
 
virtual void XRunEvent ()
 
- Static Private 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 void registerClass (const char *name, const atomic_obj_cpt_t *counters)
 
- Static Private Attributes inherited from Base
static QString sPrintIndention = " "
 String used to format the debugging string output of some core classes.
 
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

Definition at line 40 of file SoundLibraryPanel.h.

Constructor & Destructor Documentation

◆ SoundLibraryPanel()

SoundLibraryPanel ( QWidget * parent,
bool bInItsOwnDialog )

Definition at line 63 of file SoundLibraryPanel.cpp.

◆ ~SoundLibraryPanel()

Definition at line 138 of file SoundLibraryPanel.cpp.

Member Function Documentation

◆ change_background_color()

void change_background_color ( )
private

Definition at line 681 of file SoundLibraryPanel.cpp.

◆ drumkitLoadedEvent()

void drumkitLoadedEvent ( )
overridevirtual

Reimplemented from EventListener.

Definition at line 630 of file SoundLibraryPanel.cpp.

◆ getDrumkitLabel()

QString getDrumkitLabel ( const QString & sDrumkitPath) const

Definition at line 668 of file SoundLibraryPanel.cpp.

◆ getDrumkitPath()

QString getDrumkitPath ( const QString & sDrumkitLabel) const

Definition at line 677 of file SoundLibraryPanel.cpp.

◆ item_changed

void item_changed ( bool bDrumkitSelected)
signal

◆ on_drumkitDeleteAction

void on_drumkitDeleteAction ( )
privateslot

Definition at line 727 of file SoundLibraryPanel.cpp.

◆ on_drumkitExportAction

void on_drumkitExportAction ( )
privateslot

Definition at line 769 of file SoundLibraryPanel.cpp.

◆ on_DrumkitList_itemActivated

void on_DrumkitList_itemActivated ( QTreeWidgetItem * item,
int column )
privateslot

Definition at line 349 of file SoundLibraryPanel.cpp.

◆ on_DrumkitList_ItemChanged

void on_DrumkitList_ItemChanged ( QTreeWidgetItem * current,
QTreeWidgetItem * previous )
privateslot

Definition at line 328 of file SoundLibraryPanel.cpp.

◆ on_DrumkitList_leftClicked

void on_DrumkitList_leftClicked ( QPoint pos)
privateslot

Definition at line 458 of file SoundLibraryPanel.cpp.

◆ on_DrumkitList_mouseMove

void on_DrumkitList_mouseMove ( QMouseEvent * event)
privateslot

Definition at line 465 of file SoundLibraryPanel.cpp.

◆ on_DrumkitList_rightClicked

void on_DrumkitList_rightClicked ( QPoint pos)
privateslot

Definition at line 408 of file SoundLibraryPanel.cpp.

◆ on_drumkitLoadAction

void on_drumkitLoadAction ( )
slot

Definition at line 547 of file SoundLibraryPanel.cpp.

◆ on_drumkitPropertiesAction

void on_drumkitPropertiesAction ( )
privateslot

Definition at line 784 of file SoundLibraryPanel.cpp.

◆ on_patternDeleteAction

void on_patternDeleteAction ( )
privateslot

Definition at line 826 of file SoundLibraryPanel.cpp.

◆ on_patternLoadAction

void on_patternLoadAction ( )
privateslot

Definition at line 816 of file SoundLibraryPanel.cpp.

◆ on_songLoadAction

void on_songLoadAction ( )
privateslot

Definition at line 807 of file SoundLibraryPanel.cpp.

◆ onPreferencesChanged

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

Definition at line 871 of file SoundLibraryPanel.cpp.

◆ restore_background_color()

void restore_background_color ( )
private

Definition at line 646 of file SoundLibraryPanel.cpp.

◆ selectedInstrumentChangedEvent()

void selectedInstrumentChangedEvent ( )
overridevirtual

Reimplemented from EventListener.

Definition at line 634 of file SoundLibraryPanel.cpp.

◆ soundLibraryChangedEvent()

void soundLibraryChangedEvent ( )
overridevirtual

Reimplemented from EventListener.

Definition at line 848 of file SoundLibraryPanel.cpp.

◆ test_expandedItems()

void test_expandedItems ( )
private

Definition at line 853 of file SoundLibraryPanel.cpp.

◆ update_background_color()

void update_background_color ( )
private

Definition at line 638 of file SoundLibraryPanel.cpp.

◆ updateSongEvent()

void updateSongEvent ( int nValue)
overridevirtual

Reimplemented from EventListener.

Definition at line 936 of file SoundLibraryPanel.cpp.

◆ updateTree()

void updateTree ( )
private

Definition at line 147 of file SoundLibraryPanel.cpp.

Field Documentation

◆ __drumkit_menu

QMenu* __drumkit_menu
private

Definition at line 86 of file SoundLibraryPanel.h.

◆ __drumkit_menu_system

QMenu* __drumkit_menu_system
private

Definition at line 87 of file SoundLibraryPanel.h.

◆ __expand_pattern_list

bool __expand_pattern_list
private

Definition at line 99 of file SoundLibraryPanel.h.

◆ __expand_songs_list

bool __expand_songs_list
private

Definition at line 100 of file SoundLibraryPanel.h.

◆ __pattern_item

QTreeWidgetItem* __pattern_item
private

Definition at line 96 of file SoundLibraryPanel.h.

◆ __pattern_item_list

QTreeWidgetItem* __pattern_item_list
private

Definition at line 97 of file SoundLibraryPanel.h.

◆ __pattern_menu

QMenu* __pattern_menu
private

Definition at line 89 of file SoundLibraryPanel.h.

◆ __pattern_menu_list

QMenu* __pattern_menu_list
private

Definition at line 90 of file SoundLibraryPanel.h.

◆ __song_item

QTreeWidgetItem* __song_item
private

Definition at line 95 of file SoundLibraryPanel.h.

◆ __song_menu

QMenu* __song_menu
private

Definition at line 88 of file SoundLibraryPanel.h.

◆ __sound_library_tree

SoundLibraryTree* __sound_library_tree
private

Definition at line 82 of file SoundLibraryPanel.h.

◆ __start_drag_position

QPoint __start_drag_position
private

Definition at line 85 of file SoundLibraryPanel.h.

◆ m_bInItsOwnDialog

bool m_bInItsOwnDialog
private

Whether the dialog was constructed via a click in the MainForm or as part of the GUI.

Definition at line 119 of file SoundLibraryPanel.h.

◆ m_drumkitLabels

QStringList m_drumkitLabels
private

List of all labels used for drumkits in the tree.

Used to ensure uniqueness.

Definition at line 114 of file SoundLibraryPanel.h.

◆ m_drumkitRegister

std::map<QString,QString> m_drumkitRegister
private

Used to uniquely identify the drumkit corresponding to an item in the tree.

It maps the name used as label (key) to the absolute path of the drumkit (value) also used as unique ID in H2Core::Hydrogen::SoundLibraryDatabase::m_drumkitDatabase.

Definition at line 110 of file SoundLibraryPanel.h.

◆ m_pTreeSessionDrumkitsItem

QTreeWidgetItem* m_pTreeSessionDrumkitsItem
private

Definition at line 94 of file SoundLibraryPanel.h.

◆ m_pTreeSystemDrumkitsItem

QTreeWidgetItem* m_pTreeSystemDrumkitsItem
private

Definition at line 92 of file SoundLibraryPanel.h.

◆ m_pTreeUserDrumkitsItem

QTreeWidgetItem* m_pTreeUserDrumkitsItem
private

Definition at line 93 of file SoundLibraryPanel.h.