45
45
* @param name internal name or 0
46
46
* @param fld ID3_Field containing binary data
48
BinaryOpenSave(QWidget *parent, const char *name, ID3_Field *fld);
48
BinaryOpenSave(QWidget* parent, const char* name, ID3_Field* fld);
55
void setLabel(const QString & txt) { label->setText(txt); }
58
* Get filename of file to import.
62
QString getFilename(void) { return loadfilename; }
55
void setLabel(const QString& txt) { m_label->setText(txt); }
58
* Check if data changed.
59
* @return true if data changed.
61
bool isChanged() const { return m_isChanged; }
67
const QByteArray& getData() const { return m_byteArray; }
63
68
#endif // HAVE_ID3LIB
67
72
* Request name of file to import binary data from.
68
73
* The data is imported later when Ok is pressed in the parent dialog.
73
78
* Request name of file and export binary data.
78
83
* Create image from binary data and display it in window.
84
/** ID3 field containing binary data */
89
/** Array with binary data */
90
QByteArray m_byteArray;
91
/** true if m_byteArray changed */
86
93
/** horizontal layout */
94
QHBoxLayout* m_layout;
88
95
/** Label left of buttons */
90
/** filename of file to import */
92
97
/** Import push button */
93
QPushButton *openButton;
98
QPushButton* m_openButton;
94
99
/** Export push button */
95
QPushButton *saveButton;
100
QPushButton* m_saveButton;
96
101
/** View push button */
97
QPushButton *viewButton;
102
QPushButton* m_viewButton;
98
103
#endif // HAVE_ID3LIB
121
128
* @param taggedFile file
123
130
virtual void setTags(TaggedFile* taggedFile);
125
133
* Create dialog to edit the selected frame and update the fields
126
134
* if Ok is returned.
128
* @return TRUE if Ok selected in dialog.
136
* @return true if Ok selected in dialog.
130
virtual bool editFrame(void);
138
virtual bool editFrame();
132
141
* Delete selected frame.
134
* @return FALSE if frame not found.
143
* @return false if frame not found.
136
virtual bool deleteFrame(void);
145
virtual bool deleteFrame();
138
148
* Add a new frame.
140
150
* @param frameId ID of frame to add
141
151
* @param edit true to edit frame after adding it
142
* @return TRUE if frame added.
152
* @return true if frame added.
144
154
virtual bool addFrame(int frameId, bool edit = false);
146
157
* Copy the selected frame to the copy buffer.
148
159
* @return true if frame copied.
150
161
virtual bool copyFrame();
152
164
* Paste the selected frame from the copy buffer.
154
166
* @return true if frame pasted.
156
168
virtual bool pasteFrame();
158
171
* Display a dialog to select a frame type.
160
173
* @return ID of selected frame,
161
174
* -1 if no frame selected.
163
virtual int selectFrameId(void);
176
virtual int selectFrameId();
165
178
friend class IntComboBoxControl; // access to setSelectedEncoding()
166
179
friend class TextFieldControl; // access to getSelectedEncoding()
175
188
* @param enc encoding.
177
void setSelectedEncoding(ID3_TextEnc enc) { selected_enc = enc; }
190
void setSelectedEncoding(ID3_TextEnc enc) { m_selectedEnc = enc; }
179
193
* Get encoding selected in frame dialog.
181
195
* @return encoding, ID3TE_NONE if none selected.
183
ID3_TextEnc getSelectedEncoding(void) const { return selected_enc; }
197
ID3_TextEnc getSelectedEncoding() const { return m_selectedEnc; }
185
200
* Get frame with index.
187
202
* @param index index in listbox
188
203
* @return frame with index.
190
ID3_Frame *getFrame(int index) const;
205
ID3_Frame* getFrame(int index) const;
192
208
* Get frame which is selected in listbox.
197
213
* @return selected frame.
199
ID3_Frame *getSelectedFrame(int* lbIndex = 0) const;
215
ID3_Frame* getSelectedFrame(int* lbIndex = 0) const;
201
218
* Fill listbox with frame descriptions.
202
219
* Before using this method, the listbox and file have to be set.
203
220
* @see setListBox(), setTags()
207
225
* Create dialog to edit a frame and update the fields if Ok is
210
228
* @param frame frame to edit
212
* @return TRUE if Ok selected in dialog.
230
* @return true if Ok selected in dialog.
214
232
bool editFrame(ID3_Frame* frame);
216
235
* Get description of frame.
218
237
* @param id ID of frame
219
238
* @return description or NULL if id not found.
221
const char *getIdString(ID3_FrameID id) const;
240
const char* getIdString(ID3_FrameID id) const;
223
242
/** ID3v2 tags containing frames */
225
244
/** List with controls to edit fields in frame */
226
Q3PtrList<FieldControl> fieldcontrols;
245
Q3PtrList<FieldControl> m_fieldcontrols;
227
246
/** Number of possible frame IDs */
228
247
#if defined _WIN32 || defined WIN32
229
enum { num_frameid = 76 };
248
enum { NumFrameIds = 74 };
231
static const int num_frameid = 76;
250
static const int NumFrameIds = 74;
233
252
/** Encoding selected in frame dialog */
234
ID3_TextEnc selected_enc;
253
ID3_TextEnc m_selectedEnc;
235
254
/** Frame storage for copy-paste */
236
255
ID3_Frame* m_copyFrame;
238
257
/** Alphabetically sorted list of frame descriptions */
239
static const char *frameid_str[num_frameid];
240
/** Frame IDs corresponding to frameid_str[] */
241
static const ID3_FrameID frameid_code[num_frameid];
258
static const char* s_frameIdStr[NumFrameIds];
259
/** Frame IDs corresponding to s_frameIdStr[] */
260
static const ID3_FrameID s_frameIdCode[NumFrameIds];
244
263
#endif // HAVE_ID3LIB