2010-03-24 00:11:46 +01:00
|
|
|
/* This file is part of Clementine.
|
|
|
|
|
|
|
|
Clementine is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Clementine is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2010-01-16 17:12:47 +01:00
|
|
|
#ifndef EDITTAGDIALOG_H
|
|
|
|
#define EDITTAGDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
2010-08-02 17:07:26 +02:00
|
|
|
#include <QFutureWatcher>
|
|
|
|
#include <QMutex>
|
2010-01-16 17:12:47 +01:00
|
|
|
|
2010-05-10 23:50:31 +02:00
|
|
|
#include "core/song.h"
|
2010-01-16 17:12:47 +01:00
|
|
|
|
2010-05-09 02:10:26 +02:00
|
|
|
class LibraryBackend;
|
2010-05-10 23:50:31 +02:00
|
|
|
class Ui_EditTagDialog;
|
2010-03-29 18:59:01 +02:00
|
|
|
|
2010-01-16 17:12:47 +01:00
|
|
|
class EditTagDialog : public QDialog {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
EditTagDialog(QWidget* parent = 0);
|
2010-05-10 23:50:31 +02:00
|
|
|
~EditTagDialog();
|
2010-01-16 17:12:47 +01:00
|
|
|
|
2010-04-27 19:19:07 +02:00
|
|
|
static const char* kHintText;
|
|
|
|
|
2010-01-16 17:12:47 +01:00
|
|
|
bool SetSongs(const SongList& songs);
|
2010-05-09 02:10:26 +02:00
|
|
|
void SetTagCompleter(LibraryBackend* backend);
|
2010-01-16 17:12:47 +01:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void accept();
|
|
|
|
|
2010-08-02 17:07:26 +02:00
|
|
|
private slots:
|
|
|
|
void SongsEdited();
|
|
|
|
|
2010-01-16 17:12:47 +01:00
|
|
|
private:
|
2010-08-02 17:07:26 +02:00
|
|
|
void SaveSong(const Song& song);
|
|
|
|
|
2010-05-10 23:50:31 +02:00
|
|
|
Ui_EditTagDialog* ui_;
|
2010-01-16 17:12:47 +01:00
|
|
|
|
|
|
|
SongList songs_;
|
2010-04-27 19:19:07 +02:00
|
|
|
|
|
|
|
QString common_artist_;
|
|
|
|
QString common_album_;
|
|
|
|
QString common_genre_;
|
|
|
|
int common_year_;
|
2010-08-02 17:07:26 +02:00
|
|
|
|
|
|
|
QFutureWatcher<void> watcher_;
|
|
|
|
QMutex taglib_mutex_;
|
2010-01-16 17:12:47 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // EDITTAGDIALOG_H
|