2
* \file timeeventeditor.h
3
* Editor for time events (synchronized lyrics and event timing codes).
9
* Copyright (C) 2014 Urs Fleisch
11
* This file is part of Kid3.
13
* Kid3 is free software; you can redistribute it and/or modify
14
* it under the terms of the GNU General Public License as published by
15
* the Free Software Foundation; either version 2 of the License, or
16
* (at your option) any later version.
18
* Kid3 is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU General Public License for more details.
23
* You should have received a copy of the GNU General Public License
24
* along with this program. If not, see <http://www.gnu.org/licenses/>.
27
#ifndef TIMEEVENTEDITOR_H
28
#define TIMEEVENTEDITOR_H
36
class Kid3Application;
38
class EventCodeDelegate;
40
class TimeEventTableView;
43
* Editor for time events (synchronized lyrics and event timing codes).
45
class TimeEventEditor : public QWidget {
51
* @param platformTools platform tools
52
* @param app application context
53
* @param parent parent widget
54
* @param field field containing binary data
55
* @param taggedFile tagged file
57
TimeEventEditor(IPlatformTools* platformTools, Kid3Application* app,
58
QWidget* parent, const Frame::Field& field,
59
const TaggedFile* taggedFile);
64
virtual ~TimeEventEditor();
67
* Set time event model.
68
* @param model time event model
70
void setModel(TimeEventModel* model);
74
* Connect to player when editor is shown.
77
virtual void showEvent(QShowEvent* event);
80
* Disconnect from player when editor is hidden.
83
virtual void hideEvent(QHideEvent* event);
87
* Make sure that player is visible and in the edited file.
92
* Add a time event at the current player position.
97
* Load LRC data from clipboard.
102
* Import data in LRC format.
107
* Export data in LRC format.
112
* Insert a new row after the current row.
117
* Delete the selected rows.
122
* Clear the selected cells.
127
* Add offset to time stamps.
132
* Seek to position of current time stamp.
137
* Display custom context menu.
139
* @param pos position where context menu is drawn on screen
141
void customContextMenu(const QPoint& pos);
144
* Called when the played track changed.
145
* @param filePath path to file being played
147
void onTrackChanged(const QString& filePath);
150
* Called when the player position changed.
151
* @param position time in ms
153
void onPositionChanged(qint64 position);
156
QString getLrcNameFilter() const;
158
IPlatformTools* m_platformTools;
159
Kid3Application* m_app;
161
TimeEventTableView* m_tableView;
162
EventCodeDelegate* m_eventCodeDelegate;
163
TimeEventModel* m_model;
164
const TaggedFile* m_taggedFile;
165
QByteArray m_byteArray;
169
#endif // TIMEEVENTEDITOR_H