|
hydrogen 1.2.6
|
#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 (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 | 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 | 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. | |
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 |
| void | updateEventListeners () |
| 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 |
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 |
| static bool | bLogColors = true |
Definition at line 76 of file HydrogenApp.h.
| enum SetPropertyFlag |
| Enumerator | |
|---|---|
| SetX | |
| SetY | |
| SetWidth | |
| SetHeight | |
| SetVisible | |
| SetAll | |
| SetDefault | |
Definition at line 145 of file HydrogenApp.h.
| HydrogenApp | ( | MainForm * | pMainForm | ) |
Definition at line 71 of file HydrogenApp.cpp.
|
virtual |
Definition at line 200 of file HydrogenApp.cpp.
| void addEventListener | ( | EventListener * | pListener | ) |
Definition at line 981 of file HydrogenApp.cpp.
| InfoBar * addInfoBar | ( | ) |
Definition at line 375 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 1164 of file HydrogenApp.cpp.
|
static |
Definition at line 1182 of file HydrogenApp.cpp.
| void cleanupTemporaryFiles | ( | ) |
Removes temporary files that were created for undo'ing things.
Definition at line 1044 of file HydrogenApp.cpp.
| void closeFXProperties | ( | ) |
Definition at line 388 of file HydrogenApp.cpp.
|
slot |
Definition at line 383 of file HydrogenApp.cpp.
|
overrideprivatevirtual |
Reimplemented from EventListener.
Definition at line 717 of file HydrogenApp.cpp.
|
private |
|
inlinestatic |
Returns the instance of HydrogenApp class.
Return an HydrogenApp m_pInstance.
Definition at line 275 of file HydrogenApp.h.
|
inline |
Definition at line 294 of file HydrogenApp.h.
|
inline |
Definition at line 329 of file HydrogenApp.h.
|
inline |
Definition at line 304 of file HydrogenApp.h.
|
inline |
Definition at line 324 of file HydrogenApp.h.
|
inline |
Definition at line 284 of file HydrogenApp.h.
|
inline |
Definition at line 279 of file HydrogenApp.h.
|
inline |
Definition at line 314 of file HydrogenApp.h.
|
inline |
Definition at line 319 of file HydrogenApp.h.
|
inline |
Definition at line 299 of file HydrogenApp.h.
|
inline |
Definition at line 309 of file HydrogenApp.h.
|
inline |
Definition at line 289 of file HydrogenApp.h.
| WindowProperties getWindowProperties | ( | QWidget * | pWindow | ) |
Definition at line 187 of file HydrogenApp.cpp.
|
inline |
Definition at line 334 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 728 of file HydrogenApp.cpp.
|
slot |
Definition at line 1304 of file HydrogenApp.cpp.
|
static |
| sFilename | Absolute or relative path used to load the next H2Core::Song. |
Definition at line 397 of file HydrogenApp.cpp.
|
static |
Definition at line 467 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 1177 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 484 of file HydrogenApp.cpp.
| void removeEventListener | ( | EventListener * | pListener | ) |
Definition at line 1001 of file HydrogenApp.cpp.
|
inline |
Definition at line 339 of file HydrogenApp.h.
|
private |
Definition at line 241 of file HydrogenApp.cpp.
| void setWindowProperties | ( | QWidget * | pWindow, |
| H2Core::WindowProperties & | prop, | ||
| unsigned | flags = SetAll ) |
Definition at line 138 of file HydrogenApp.cpp.
| void showAudioEngineInfoForm | ( | ) |
Definition at line 667 of file HydrogenApp.cpp.
| void showDirector | ( | ) |
Definition at line 690 of file HydrogenApp.cpp.
| void showFilesystemInfoForm | ( | ) |
Definition at line 673 of file HydrogenApp.cpp.
| void showInstrumentPanel | ( | bool | show | ) |
Definition at line 572 of file HydrogenApp.cpp.
| void showMixer | ( | bool | bShow | ) |
Definition at line 554 of file HydrogenApp.cpp.
| void showPlaylistDialog | ( | ) |
Definition at line 679 of file HydrogenApp.cpp.
| void showPreferencesDialog | ( | ) |
Definition at line 592 of file HydrogenApp.cpp.
| void showSampleEditor | ( | QString | name, |
| int | mSelectedComponemt, | ||
| int | mSelectedLayer ) |
Definition at line 701 of file HydrogenApp.cpp.
| void showStatusBarMessage | ( | const QString & | sMessage, |
| const QString & | sCaller = "" ) |
Definition at line 601 of file HydrogenApp.cpp.
|
overrideprivatevirtual |
Reimplemented from EventListener.
Definition at line 723 of file HydrogenApp.cpp.
|
private |
Definition at line 1020 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 1049 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 1130 of file HydrogenApp.cpp.
| void updateWindowTitle | ( | ) |
Definition at line 617 of file HydrogenApp.cpp.
|
overrideprivatevirtual |
Reimplemented from EventListener.
Definition at line 608 of file HydrogenApp.cpp.
|
private |
Definition at line 228 of file HydrogenApp.h.
|
private |
Definition at line 231 of file HydrogenApp.h.
|
private |
Definition at line 220 of file HydrogenApp.h.
|
private |
Definition at line 221 of file HydrogenApp.h.
|
private |
Definition at line 222 of file HydrogenApp.h.
|
private |
Definition at line 230 of file HydrogenApp.h.
|
private |
Definition at line 211 of file HydrogenApp.h.
|
private |
Definition at line 226 of file HydrogenApp.h.
|
private |
Definition at line 218 of file HydrogenApp.h.
|
private |
Definition at line 219 of file HydrogenApp.h.
|
private |
Definition at line 212 of file HydrogenApp.h.
|
staticprivate |
HydrogenApp instance.
Definition at line 198 of file HydrogenApp.h.
|
private |
Definition at line 214 of file HydrogenApp.h.
|
private |
Definition at line 208 of file HydrogenApp.h.
|
private |
Used for accessibility reasons to show scroll bars in case Hydrogen has to be shrunk below its minimum size - magnified using the Qt scale factor so its efficitive size is below the minimum one.
Definition at line 207 of file HydrogenApp.h.
|
private |
Definition at line 225 of file HydrogenApp.h.
|
private |
Definition at line 209 of file HydrogenApp.h.
|
private |
Definition at line 210 of file HydrogenApp.h.
|
private |
Definition at line 215 of file HydrogenApp.h.
|
private |
Definition at line 216 of file HydrogenApp.h.
|
private |
Definition at line 229 of file HydrogenApp.h.
|
private |
Definition at line 217 of file HydrogenApp.h.
|
private |
Definition at line 213 of file HydrogenApp.h.
|
private |
Definition at line 224 of file HydrogenApp.h.
|
private |
Definition at line 223 of file HydrogenApp.h.
| QUndoStack* m_pUndoStack |
Definition at line 131 of file HydrogenApp.h.