hydrogen 1.2.3
ExportSongDialog.h
Go to the documentation of this file.
1/*
2 * Hydrogen
3 * Copyright(c) 2002-2008 by Alex >Comix< Cominu [comix@users.sourceforge.net]
4 * Copyright(c) 2008-2024 The hydrogen development team [hydrogen-devel@lists.sourceforge.net]
5 *
6 * http://www.hydrogen-music.org
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY, without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see https://www.gnu.org/licenses
20 *
21 */
22
23
24#ifndef EXPORT_SONG_DIALOG_H
25#define EXPORT_SONG_DIALOG_H
26
27#include <memory>
28
29#include "ui_ExportSongDialog_UI.h"
30#include "EventListener.h"
31#include <core/Object.h>
33
35
36namespace H2Core {
37 class Instrument;
38 class Hydrogen;
39 class Preferences;
40}
41
45
46class ExportSongDialog : public QDialog, public Ui_ExportSongDialog_UI, public EventListener, public H2Core::Object<ExportSongDialog>
47{
49 Q_OBJECT
50
51 public:
52 explicit ExportSongDialog(QWidget* parent);
54
55 virtual void progressEvent( int nValue ) override;
56 void closeEvent( QCloseEvent* event ) override;
57
58
59private slots:
62 void on_okBtn_clicked();
63 void on_exportNameTxt_textChanged(const QString& text);
65 void toggleRubberbandBatchMode(bool toggled);
66 void toggleTimeLineBPMMode(bool toggled);
67 void resampleComboBoIndexChanged(int index);
68
69private:
70
71 void setResamplerMode(int index);
73
76
78 QString findUniqueExportFilenameForInstrument( std::shared_ptr<H2Core::Instrument> pInstrument );
79
80 void exportTracks();
81 bool validateUserInput();
82 QString createDefaultFilename();
83
84 void closeExport();
85
90 QString m_sExtension;
97
98 static QString sLastFilename;
99};
100
101
102#endif
103
#define H2_OBJECT(name)
Definition Object.h:224
Dialog for exporting song.
static QString sLastFilename
virtual void progressEvent(int nValue) override
void toggleRubberbandBatchMode(bool toggled)
void setResamplerMode(int index)
void on_templateCombo_currentIndexChanged(int index)
H2Core::Preferences * m_pPreferences
QString createDefaultFilename()
QString findUniqueExportFilenameForInstrument(std::shared_ptr< H2Core::Instrument > pInstrument)
void closeEvent(QCloseEvent *event) override
void on_exportNameTxt_textChanged(const QString &text)
void restoreSettingsFromPreferences()
ExportSongDialog(QWidget *parent)
InterpolateMode m_OldInterpolationMode
void resampleComboBoIndexChanged(int index)
void toggleTimeLineBPMMode(bool toggled)
H2Core::Hydrogen * m_pHydrogen
Hydrogen Audio Engine.
Definition Hydrogen.h:54
Manager for User Preferences File (singleton)
Definition Preferences.h:78