10
#ifndef EXPORTDIALOG_H
11
#define EXPORTDIALOG_H
14
#include <qstringlist.h>
15
#include "importtrackdata.h"
25
class ExportDialog : public QDialog {
30
enum Source { SrcV1, SrcV2 };
35
* @param parent parent widget
37
ExportDialog(QWidget* parent);
47
* @param names export format names list
48
* @param headers export format headers
49
* @param tracks export format tracks
50
* @param trailers export format trailers
51
* @param idx selected index
53
void setExportFormat(const QStringList& names,
54
const QStringList& headers,
55
const QStringList& tracks,
56
const QStringList& trailers,
61
* @param name export format name
62
* @param header export format header
63
* @param track export format track
64
* @param trailer export format trailer
66
* @return index of current selection.
68
int getExportFormat(QString& name,
71
QString& trailer) const;
74
* Set ID3v1 or ID3v2 tags as export source.
76
* @param v1 true to set ID3v1, false for ID3v2
78
void setSrcV1(bool v1);
83
* @return true if ID3v1 is source,
86
bool getSrcV1() const;
92
* @param height height
94
void setWindowSize(int width, int height);
99
* @param width the width is returned here
100
* @param height the height is returned here
102
void getWindowSize(int& width, int& height) const;
105
* Set data to be exported.
107
* @param trackDataVector data to export
109
void setExportData(const ImportTrackDataVector& trackDataVector);
113
* Emitted when new export data has to be provided
114
* Parameter: SrcV1 for ID3v1 data, SrcV2 for ID3v2 data
116
void exportDataRequested(int);
125
* Export to clipboard.
127
void slotToClipboard();
130
* Set the format lineedits to the format selected in the combo box.
132
* @param index current index of the combo box
134
void setFormatLineEdit(int index);
137
* Show exported text as preview in editor.
142
* Save the size of the window and close it.
144
void saveWindowSizeAndClose();
149
/** cobobox with formats */
150
QComboBox* m_formatComboBox;
151
/** LineEdit for header */
152
QLineEdit* m_headerLineEdit;
153
/** LineEdit for track */
154
QLineEdit* m_trackLineEdit;
155
/** LineEdit for trailer */
156
QLineEdit* m_trailerLineEdit;
157
/** To File button */
158
QPushButton* m_fileButton;
159
/** To Clipboard button */
160
QPushButton* m_clipButton;
161
/** combobox with export sources */
162
QComboBox* m_srcComboBox;
163
/** header formats */
164
QStringList m_formatHeaders;
166
QStringList m_formatTracks;
167
/** trailer formats */
168
QStringList m_formatTrailers;
170
/** data to export */
171
ImportTrackDataVector m_trackDataVector;
172
/** width of window */
174
/** height of window */