hydrogen 1.2.6
ExportSongDialog Class Reference

Dialog for exporting song. More...

#include <ExportSongDialog.h>

Inheritance diagram for ExportSongDialog:
EventListener Object< ExportSongDialog > Base

Public Member Functions

 ExportSongDialog (QWidget *parent)
 
 ~ExportSongDialog ()
 
void closeEvent (QCloseEvent *event) override
 
virtual void progressEvent (int nValue) override
 
- Public Member Functions inherited from EventListener
virtual ~EventListener ()
 
virtual void actionModeChangeEvent (int nValue)
 
virtual void bbtChangedEvent ()
 
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 (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 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 tempoChangedEvent (int nValue)
 
virtual void timelineActivationEvent ()
 
virtual void timelineUpdateEvent (int nValue)
 
virtual void undoRedoActionEvent (int nValue)
 
virtual void updatePreferencesEvent (int nValue)
 
virtual void updateSongEvent (int nValue)
 
virtual void XRunEvent ()
 
- Public Member Functions inherited from Object< ExportSongDialog >
 Object ()
 
 Object (const Object< ExportSongDialog > &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.
 

Private Slots

void formatComboIndexChanged (int index)
 
void on_browseBtn_clicked ()
 
void on_closeBtn_clicked ()
 
void on_exportNameTxt_textChanged (const QString &text)
 
void on_okBtn_clicked ()
 
void resampleComboBoIndexChanged (int index)
 
void toggleRubberbandBatchMode (bool toggled)
 
void toggleTimeLineBPMMode (bool toggled)
 

Private Member Functions

bool checkUseOfRubberband ()
 
void closeExport ()
 
QString createDefaultFilename ()
 
bool currentInstrumentHasNotes ()
 
void exportTracks ()
 
QString findUniqueExportFilenameForInstrument (std::shared_ptr< H2Core::Instrument > pInstrument)
 
void restoreSettingsFromPreferences ()
 
void saveSettingsToPreferences ()
 
void setResamplerMode (int index)
 
bool validateUserInput ()
 

Private Attributes

bool m_bExporting
 
bool m_bExportTrackouts
 
bool m_bOldRubberbandBatchMode
 
bool m_bOldTimeLineBPMMode
 
bool m_bOverwriteFiles
 
bool m_bQfileDialog
 
std::map< int, H2Core::Filesystem::AudioFormatm_formatMap
 
uint m_nInstrument
 
InterpolateMode m_OldInterpolationMode
 
H2Core::Hydrogenm_pHydrogen
 
H2Core::Preferencesm_pPreferences
 
QString m_sExtension
 

Static Private Attributes

static QString sLastFilename = ""
 

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

Detailed Description

Dialog for exporting song.

Definition at line 48 of file ExportSongDialog.h.

Constructor & Destructor Documentation

◆ ExportSongDialog()

ExportSongDialog ( QWidget * parent)
explicit

Definition at line 89 of file ExportSongDialog.cpp.

◆ ~ExportSongDialog()

Definition at line 192 of file ExportSongDialog.cpp.

Member Function Documentation

◆ checkUseOfRubberband()

bool checkUseOfRubberband ( )
private

Definition at line 887 of file ExportSongDialog.cpp.

◆ closeEvent()

void closeEvent ( QCloseEvent * event)
override

Definition at line 688 of file ExportSongDialog.cpp.

◆ closeExport()

void closeExport ( )
private

Definition at line 696 of file ExportSongDialog.cpp.

◆ createDefaultFilename()

QString createDefaultFilename ( )
private

Definition at line 199 of file ExportSongDialog.cpp.

◆ currentInstrumentHasNotes()

bool currentInstrumentHasNotes ( )
private

Definition at line 561 of file ExportSongDialog.cpp.

◆ exportTracks()

void exportTracks ( )
private

Definition at line 606 of file ExportSongDialog.cpp.

◆ findUniqueExportFilenameForInstrument()

QString findUniqueExportFilenameForInstrument ( std::shared_ptr< H2Core::Instrument > pInstrument)
private

Definition at line 585 of file ExportSongDialog.cpp.

◆ formatComboIndexChanged

void formatComboIndexChanged ( int index)
privateslot

Definition at line 716 of file ExportSongDialog.cpp.

◆ on_browseBtn_clicked

void on_browseBtn_clicked ( )
privateslot

Definition at line 294 of file ExportSongDialog.cpp.

◆ on_closeBtn_clicked

void on_closeBtn_clicked ( )
privateslot

Definition at line 692 of file ExportSongDialog.cpp.

◆ on_exportNameTxt_textChanged

void on_exportNameTxt_textChanged ( const QString & text)
privateslot

Definition at line 781 of file ExportSongDialog.cpp.

◆ on_okBtn_clicked

void on_okBtn_clicked ( )
privateslot

Definition at line 387 of file ExportSongDialog.cpp.

◆ progressEvent()

void progressEvent ( int nValue)
overridevirtual

Reimplemented from EventListener.

Definition at line 810 of file ExportSongDialog.cpp.

◆ resampleComboBoIndexChanged

void resampleComboBoIndexChanged ( int index)
privateslot

Definition at line 861 of file ExportSongDialog.cpp.

◆ restoreSettingsFromPreferences()

void restoreSettingsFromPreferences ( )
private

Definition at line 240 of file ExportSongDialog.cpp.

◆ saveSettingsToPreferences()

void saveSettingsToPreferences ( )
private

Definition at line 217 of file ExportSongDialog.cpp.

◆ setResamplerMode()

void setResamplerMode ( int index)
private

Definition at line 866 of file ExportSongDialog.cpp.

◆ toggleRubberbandBatchMode

void toggleRubberbandBatchMode ( bool toggled)
privateslot

Definition at line 851 of file ExportSongDialog.cpp.

◆ toggleTimeLineBPMMode

void toggleTimeLineBPMMode ( bool toggled)
privateslot

Definition at line 856 of file ExportSongDialog.cpp.

◆ validateUserInput()

bool validateUserInput ( )
private

Definition at line 369 of file ExportSongDialog.cpp.

Field Documentation

◆ m_bExporting

bool m_bExporting
private

Definition at line 88 of file ExportSongDialog.h.

◆ m_bExportTrackouts

bool m_bExportTrackouts
private

Definition at line 89 of file ExportSongDialog.h.

◆ m_bOldRubberbandBatchMode

bool m_bOldRubberbandBatchMode
private

Definition at line 93 of file ExportSongDialog.h.

◆ m_bOldTimeLineBPMMode

bool m_bOldTimeLineBPMMode
private

Definition at line 94 of file ExportSongDialog.h.

◆ m_bOverwriteFiles

bool m_bOverwriteFiles
private

Definition at line 90 of file ExportSongDialog.h.

◆ m_bQfileDialog

bool m_bQfileDialog
private

Definition at line 96 of file ExportSongDialog.h.

◆ m_formatMap

std::map<int, H2Core::Filesystem::AudioFormat> m_formatMap
private

Definition at line 100 of file ExportSongDialog.h.

◆ m_nInstrument

uint m_nInstrument
private

Definition at line 91 of file ExportSongDialog.h.

◆ m_OldInterpolationMode

InterpolateMode m_OldInterpolationMode
private

Definition at line 95 of file ExportSongDialog.h.

◆ m_pHydrogen

H2Core::Hydrogen* m_pHydrogen
private

Definition at line 97 of file ExportSongDialog.h.

◆ m_pPreferences

H2Core::Preferences* m_pPreferences
private

Definition at line 98 of file ExportSongDialog.h.

◆ m_sExtension

QString m_sExtension
private

Definition at line 92 of file ExportSongDialog.h.

◆ sLastFilename

QString sLastFilename = ""
staticprivate

Definition at line 101 of file ExportSongDialog.h.