|
hydrogen 1.2.3
|
#include <HydrogenApp.h>
Public Types | |
| enum | SetPropertyFlag { SetX = 1 << 0 , SetY = 1 << 1 , SetWidth = 1 << 2 , SetHeight = 1 << 3 , SetVisible = 1 << 4 , SetAll = SetX + SetY + SetWidth + SetHeight + SetVisible , SetDefault = SetAll } |
Public Slots | |
| void | changePreferences (H2Core::Preferences::Changes changes) |
| Propagates a change in the Preferences through the GUI. | |
| void | currentTabChanged (int) |
| void | onEventQueueTimer () |
| Function called every QUEUE_TIMER_PERIOD millisecond to pop all Events from the EventQueue and invoke the corresponding functions. | |
| void | onPreferencesChanged (H2Core::Preferences::Changes changes) |
Signals | |
| void | preferencesChanged (H2Core::Preferences::Changes changes) |
| Propagates a change in the Preferences through the GUI. | |
Public Member Functions | |
| HydrogenApp (MainForm *pMainForm) | |
| virtual | ~HydrogenApp () |
| void | addEventListener (EventListener *pListener) |
| InfoBar * | addInfoBar () |
| void | cleanupTemporaryFiles () |
| Removes temporary files that were created for undo'ing things. | |
| void | closeFXProperties () |
| AudioEngineInfoForm * | getAudioEngineInfoForm () |
| std::shared_ptr< CommonStrings > | getCommonStrings () |
| Director * | getDirector () |
| InstrumentRack * | getInstrumentRack () |
| MainForm * | getMainForm () |
| Mixer * | getMixer () |
| PatternEditorPanel * | getPatternEditorPanel () |
| PlayerControl * | getPlayerControl () |
| PlaylistDialog * | getPlayListDialog () |
| SampleEditor * | getSampleEditor () |
| SongEditorPanel * | getSongEditorPanel () |
| H2Core::WindowProperties | getWindowProperties (QWidget *pWindow) |
| bool | hideKeyboardCursor () |
| void | removeEventListener (EventListener *pListener) |
| void | setHideKeyboardCursor (bool bHidden) |
| void | setWindowProperties (QWidget *pWindow, H2Core::WindowProperties &prop, unsigned flags=SetAll) |
| void | showAudioEngineInfoForm () |
| void | showDirector () |
| void | showFilesystemInfoForm () |
| void | showInstrumentPanel (bool) |
| void | showMixer (bool bShow) |
| void | showPlaylistDialog () |
| void | showPreferencesDialog () |
| void | showSampleEditor (QString name, int mSelectedComponemt, int mSelectedLayer) |
| void | showStatusBarMessage (const QString &sMessage, const QString &sCaller="") |
| void | updateMixerCheckbox () |
| void | updateWindowTitle () |
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 () |
| 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 | songSizeChangedEvent () |
| virtual void | soundLibraryChangedEvent () |
| 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) |
Public Member Functions inherited from Object< HydrogenApp > | |
| Object () | |
| Object (const Object< HydrogenApp > &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. | |
Static Public Member Functions | |
| static bool | checkDrumkitLicense (std::shared_ptr< H2Core::Drumkit > pDrumkit) |
| static HydrogenApp * | get_instance () |
| Returns the instance of HydrogenApp class. | |
| static bool | openSong (QString sFilename) |
| static bool | openSong (std::shared_ptr< H2Core::Song > pSong) |
| static bool | recoverEmptySong () |
| Specialized version of openSong( QString sFilename ) trying to open the autosave file corresponding to current empty song. | |
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 Logger * | logger () |
| 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 | |
Data Fields | |
| QUndoStack * | m_pUndoStack |
Private Slots | |
| void | propagatePreferences () |
Private Member Functions | |
| virtual void | drumkitLoadedEvent () override |
| void | engineError (uint nErrorCode) |
| void | setupSinglePanedInterface () |
| virtual void | songModifiedEvent () override |
| virtual void | updatePreferencesEvent (int nValue) override |
| Handles the loading and saving of the H2Core::Preferences from the core part of H2Core::Hydrogen. | |
| virtual void | updateSongEvent (int nValue) override |
| Refreshes and updates the GUI after the Song was changed in the core part of Hydrogen. | |
| virtual void | XRunEvent () override |
Private Attributes | |
| bool | m_bHideKeyboardCursor |
| H2Core::Preferences::Changes | m_bufferedChanges |
| std::vector< EventListener * > | m_EventListeners |
| int | m_nPreferencesUpdateTimeout |
| AudioEngineInfoForm * | m_pAudioEngineInfoForm |
| std::shared_ptr< CommonStrings > | m_pCommonStrings |
| Director * | m_pDirector |
| QTimer * | m_pEventQueueTimer |
| FilesystemInfoForm * | m_pFilesystemInfoForm |
| InstrumentRack * | m_pInstrumentRack |
| MainForm * | m_pMainForm |
| QVBoxLayout * | m_pMainVBox |
| Mixer * | m_pMixer |
| PatternEditorPanel * | m_pPatternEditorPanel |
| PlayerControl * | m_pPlayerControl |
| PlaylistDialog * | m_pPlaylistDialog |
| QTimer * | m_pPreferencesUpdateTimer |
| SampleEditor * | m_pSampleEditor |
| SongEditorPanel * | m_pSongEditorPanel |
| QSplitter * | m_pSplitter |
| QTabWidget * | m_pTab |
Static Private Attributes | |
| static HydrogenApp * | m_pInstance = nullptr |
| HydrogenApp instance. | |
Additional Inherited Members | |
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< HydrogenApp > | |
| ~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 |
Definition at line 75 of file HydrogenApp.h.
| enum SetPropertyFlag |
| Enumerator | |
|---|---|
| SetX | |
| SetY | |
| SetWidth | |
| SetHeight | |
| SetVisible | |
| SetAll | |
| SetDefault | |
Definition at line 144 of file HydrogenApp.h.
| HydrogenApp | ( | MainForm * | pMainForm | ) |
Definition at line 70 of file HydrogenApp.cpp.
|
virtual |
Definition at line 198 of file HydrogenApp.cpp.
| void addEventListener | ( | EventListener * | pListener | ) |
Definition at line 955 of file HydrogenApp.cpp.
| InfoBar * addInfoBar | ( | ) |
Definition at line 361 of file HydrogenApp.cpp.
|
slot |
Propagates a change in the Preferences through the GUI.
Triggered by the PreferencesDialog upon a change of the underlying options in the Preferences class.
Definition at line 1096 of file HydrogenApp.cpp.
|
static |
Definition at line 1114 of file HydrogenApp.cpp.
| void cleanupTemporaryFiles | ( | ) |
Removes temporary files that were created for undo'ing things.
Definition at line 976 of file HydrogenApp.cpp.
| void closeFXProperties | ( | ) |
Definition at line 374 of file HydrogenApp.cpp.
|
slot |
Definition at line 369 of file HydrogenApp.cpp.
|
overrideprivatevirtual |
Reimplemented from EventListener.
Definition at line 703 of file HydrogenApp.cpp.
|
private |
|
inlinestatic |
Returns the instance of HydrogenApp class.
Return an HydrogenApp m_pInstance.
Definition at line 266 of file HydrogenApp.h.
|
inline |
Definition at line 285 of file HydrogenApp.h.
|
inline |
Definition at line 320 of file HydrogenApp.h.
|
inline |
Definition at line 295 of file HydrogenApp.h.
|
inline |
Definition at line 315 of file HydrogenApp.h.
|
inline |
Definition at line 275 of file HydrogenApp.h.
|
inline |
Definition at line 270 of file HydrogenApp.h.
|
inline |
Definition at line 305 of file HydrogenApp.h.
|
inline |
Definition at line 310 of file HydrogenApp.h.
|
inline |
Definition at line 290 of file HydrogenApp.h.
|
inline |
Definition at line 300 of file HydrogenApp.h.
|
inline |
Definition at line 280 of file HydrogenApp.h.
| WindowProperties getWindowProperties | ( | QWidget * | pWindow | ) |
Definition at line 185 of file HydrogenApp.cpp.
|
inline |
Definition at line 325 of file HydrogenApp.h.
|
slot |
Function called every QUEUE_TIMER_PERIOD millisecond to pop all Events from the EventQueue and invoke the corresponding functions.
In addition, all MIDI notes in H2Core::EventQueue::m_addMidiNoteVector will converted into actions via SE_addNoteAction() and deleted from the former array.
Definition at line 714 of file HydrogenApp.cpp.
|
slot |
Definition at line 1236 of file HydrogenApp.cpp.
|
static |
| sFilename | Absolute or relative path used to load the next H2Core::Song. |
Definition at line 383 of file HydrogenApp.cpp.
|
static |
Definition at line 453 of file HydrogenApp.cpp.
|
signal |
Propagates a change in the Preferences through the GUI.
Triggered by the PreferencesDialog upon a change of the underlying options in the Preferences class.
| changes | Or-able options indicating which part of the Preferences did change. |
|
privateslot |
Definition at line 1109 of file HydrogenApp.cpp.
|
static |
Specialized version of openSong( QString sFilename ) trying to open the autosave file corresponding to current empty song.
This will be used if the last set in Hydrogen was an empty one. If the user either decided to discard the changes or Hydrogen was terminated untimely, this function allows to restore all changes that would have been lost otherwise.
Definition at line 470 of file HydrogenApp.cpp.
| void removeEventListener | ( | EventListener * | pListener | ) |
Definition at line 963 of file HydrogenApp.cpp.
|
inline |
Definition at line 330 of file HydrogenApp.h.
|
private |
Definition at line 239 of file HydrogenApp.cpp.
| void setWindowProperties | ( | QWidget * | pWindow, |
| H2Core::WindowProperties & | prop, | ||
| unsigned | flags = SetAll ) |
Definition at line 136 of file HydrogenApp.cpp.
| void showAudioEngineInfoForm | ( | ) |
Definition at line 653 of file HydrogenApp.cpp.
| void showDirector | ( | ) |
Definition at line 676 of file HydrogenApp.cpp.
| void showFilesystemInfoForm | ( | ) |
Definition at line 659 of file HydrogenApp.cpp.
| void showInstrumentPanel | ( | bool | show | ) |
Definition at line 558 of file HydrogenApp.cpp.
| void showMixer | ( | bool | bShow | ) |
Definition at line 540 of file HydrogenApp.cpp.
| void showPlaylistDialog | ( | ) |
Definition at line 665 of file HydrogenApp.cpp.
| void showPreferencesDialog | ( | ) |
Definition at line 578 of file HydrogenApp.cpp.
| void showSampleEditor | ( | QString | name, |
| int | mSelectedComponemt, | ||
| int | mSelectedLayer ) |
Definition at line 687 of file HydrogenApp.cpp.
| void showStatusBarMessage | ( | const QString & | sMessage, |
| const QString & | sCaller = "" ) |
Definition at line 587 of file HydrogenApp.cpp.
|
overrideprivatevirtual |
Reimplemented from EventListener.
Definition at line 709 of file HydrogenApp.cpp.
| void updateMixerCheckbox | ( | ) |
|
overrideprivatevirtual |
Handles the loading and saving of the H2Core::Preferences from the core part of H2Core::Hydrogen.
If nValue is 0 - the H2Core::Preferences got saved - it triggers the display of a message in the status bar. If, on the other hand, nValue is 1 and the configuration file has been reloaded, it gets a fresh version of H2Core::Preferences and updates all widgets and setting to reflect the changes in the configuration.
| nValue | If 0, Preferences was save. If 1, it was loaded. |
Reimplemented from EventListener.
Definition at line 981 of file HydrogenApp.cpp.
|
overrideprivatevirtual |
Refreshes and updates the GUI after the Song was changed in the core part of Hydrogen.
When using session management or changing the Song using an OSC message, this command will get core and GUI in sync again.
| nValue | If 0, update the GUI to represent the new song. If 1, a message in the status bar will be displayed notifying the user about the saving of the current Song. If 2, notifies the user that the current song is opened in read-only mode. |
Reimplemented from EventListener.
Definition at line 1062 of file HydrogenApp.cpp.
| void updateWindowTitle | ( | ) |
Definition at line 603 of file HydrogenApp.cpp.
|
overrideprivatevirtual |
Reimplemented from EventListener.
Definition at line 594 of file HydrogenApp.cpp.
|
private |
Definition at line 219 of file HydrogenApp.h.
|
private |
Definition at line 222 of file HydrogenApp.h.
|
private |
Definition at line 213 of file HydrogenApp.h.
|
private |
Definition at line 221 of file HydrogenApp.h.
|
private |
Definition at line 204 of file HydrogenApp.h.
|
private |
Definition at line 217 of file HydrogenApp.h.
|
private |
Definition at line 211 of file HydrogenApp.h.
|
private |
Definition at line 212 of file HydrogenApp.h.
|
private |
Definition at line 205 of file HydrogenApp.h.
|
staticprivate |
HydrogenApp instance.
Definition at line 195 of file HydrogenApp.h.
|
private |
Definition at line 207 of file HydrogenApp.h.
|
private |
Definition at line 201 of file HydrogenApp.h.
|
private |
Definition at line 216 of file HydrogenApp.h.
|
private |
Definition at line 202 of file HydrogenApp.h.
|
private |
Definition at line 203 of file HydrogenApp.h.
|
private |
Definition at line 208 of file HydrogenApp.h.
|
private |
Definition at line 209 of file HydrogenApp.h.
|
private |
Definition at line 220 of file HydrogenApp.h.
|
private |
Definition at line 210 of file HydrogenApp.h.
|
private |
Definition at line 206 of file HydrogenApp.h.
|
private |
Definition at line 215 of file HydrogenApp.h.
|
private |
Definition at line 214 of file HydrogenApp.h.
| QUndoStack* m_pUndoStack |
Definition at line 130 of file HydrogenApp.h.