Add a "complete tags automatically" shortcut to the playlist context menu. Fixes issue #1532
This commit is contained in:
parent
99101c8442
commit
c2445edad5
@ -302,5 +302,6 @@
|
|||||||
<file>icons/22x22/network-server.png</file>
|
<file>icons/22x22/network-server.png</file>
|
||||||
<file>icons/32x32/network-server.png</file>
|
<file>icons/32x32/network-server.png</file>
|
||||||
<file>icons/48x48/network-server.png</file>
|
<file>icons/48x48/network-server.png</file>
|
||||||
|
<file>providers/musicbrainz.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
BIN
data/providers/musicbrainz.png
Normal file
BIN
data/providers/musicbrainz.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
@ -57,7 +57,6 @@ TagFetcher::TagFetcher(QObject *parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
TagFetcher::~TagFetcher() {
|
TagFetcher::~TagFetcher() {
|
||||||
delete network_;
|
|
||||||
tp_Delete(pimp_);
|
tp_Delete(pimp_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,8 +64,8 @@ EditTagDialog::EditTagDialog(QWidget* parent)
|
|||||||
connect(tag_fetcher_, SIGNAL(FetchFinished(QString, SongList)),
|
connect(tag_fetcher_, SIGNAL(FetchFinished(QString, SongList)),
|
||||||
results_dialog_, SLOT(FetchTagFinished(QString, SongList)),
|
results_dialog_, SLOT(FetchTagFinished(QString, SongList)),
|
||||||
Qt::QueuedConnection);
|
Qt::QueuedConnection);
|
||||||
connect(results_dialog_, SIGNAL(SongChosen(QString, Song)),
|
connect(results_dialog_, SIGNAL(SongChosen(Song, Song)),
|
||||||
SLOT(FetchTagSongChosen(QString, Song)));
|
SLOT(FetchTagSongChosen(Song, Song)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ui_->setupUi(this);
|
ui_->setupUi(this);
|
||||||
@ -708,7 +708,8 @@ void EditTagDialog::FetchTag() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditTagDialog::FetchTagSongChosen(const QString& filename, const Song& new_metadata) {
|
void EditTagDialog::FetchTagSongChosen(const Song& original_song, const Song& new_metadata) {
|
||||||
|
const QString filename = original_song.filename();
|
||||||
|
|
||||||
// Find the song with this filename
|
// Find the song with this filename
|
||||||
for (int i=0 ; i<data_.count() ; ++i) {
|
for (int i=0 ; i<data_.count() ; ++i) {
|
||||||
|
@ -75,7 +75,7 @@ private slots:
|
|||||||
void SongRated(float rating);
|
void SongRated(float rating);
|
||||||
void ResetPlayCounts();
|
void ResetPlayCounts();
|
||||||
void FetchTag();
|
void FetchTag();
|
||||||
void FetchTagSongChosen(const QString& filename, const Song& new_metadata);
|
void FetchTagSongChosen(const Song& original_song, const Song& new_metadata);
|
||||||
|
|
||||||
void ArtLoaded(quint64 id, const QImage& scaled, const QImage& original);
|
void ArtLoaded(quint64 id, const QImage& scaled, const QImage& original);
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<widget class="QTabWidget" name="tab_widget">
|
<widget class="QTabWidget" name="tab_widget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="summary_tab">
|
<widget class="QWidget" name="summary_tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -823,6 +823,16 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Complete tags automatically</string>
|
<string>Complete tags automatically</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../data/data.qrc">
|
||||||
|
<normaloff>:/providers/musicbrainz.png</normaloff>:/providers/musicbrainz.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>38</width>
|
||||||
|
<height>22</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "core/player.h"
|
#include "core/player.h"
|
||||||
#include "core/songloader.h"
|
#include "core/songloader.h"
|
||||||
#include "core/stylesheetloader.h"
|
#include "core/stylesheetloader.h"
|
||||||
|
#include "core/tagfetcher.h"
|
||||||
#include "core/taskmanager.h"
|
#include "core/taskmanager.h"
|
||||||
#include "devices/devicemanager.h"
|
#include "devices/devicemanager.h"
|
||||||
#include "devices/devicestatefiltermodel.h"
|
#include "devices/devicestatefiltermodel.h"
|
||||||
@ -78,6 +79,7 @@
|
|||||||
#include "ui/qtsystemtrayicon.h"
|
#include "ui/qtsystemtrayicon.h"
|
||||||
#include "ui/settingsdialog.h"
|
#include "ui/settingsdialog.h"
|
||||||
#include "ui/systemtrayicon.h"
|
#include "ui/systemtrayicon.h"
|
||||||
|
#include "ui/trackselectiondialog.h"
|
||||||
#include "ui/windows7thumbbar.h"
|
#include "ui/windows7thumbbar.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "widgets/errordialog.h"
|
#include "widgets/errordialog.h"
|
||||||
@ -296,6 +298,7 @@ MainWindow::MainWindow(
|
|||||||
ui_->action_full_library_scan->setIcon(IconLoader::Load("view-refresh"));
|
ui_->action_full_library_scan->setIcon(IconLoader::Load("view-refresh"));
|
||||||
ui_->action_rain->setIcon(IconLoader::Load("weather-showers-scattered"));
|
ui_->action_rain->setIcon(IconLoader::Load("weather-showers-scattered"));
|
||||||
|
|
||||||
|
|
||||||
// File view connections
|
// File view connections
|
||||||
connect(file_view_, SIGNAL(AddToPlaylist(QMimeData*)), SLOT(AddToPlaylist(QMimeData*)));
|
connect(file_view_, SIGNAL(AddToPlaylist(QMimeData*)), SLOT(AddToPlaylist(QMimeData*)));
|
||||||
connect(file_view_, SIGNAL(PathChanged(QString)), SLOT(FilePathChanged(QString)));
|
connect(file_view_, SIGNAL(PathChanged(QString)), SLOT(FilePathChanged(QString)));
|
||||||
@ -322,6 +325,7 @@ MainWindow::MainWindow(
|
|||||||
connect(ui_->action_renumber_tracks, SIGNAL(triggered()), SLOT(RenumberTracks()));
|
connect(ui_->action_renumber_tracks, SIGNAL(triggered()), SLOT(RenumberTracks()));
|
||||||
connect(ui_->action_selection_set_value, SIGNAL(triggered()), SLOT(SelectionSetValue()));
|
connect(ui_->action_selection_set_value, SIGNAL(triggered()), SLOT(SelectionSetValue()));
|
||||||
connect(ui_->action_edit_value, SIGNAL(triggered()), SLOT(EditValue()));
|
connect(ui_->action_edit_value, SIGNAL(triggered()), SLOT(EditValue()));
|
||||||
|
connect(ui_->action_auto_complete_tags, SIGNAL(triggered()), SLOT(AutoCompleteTags()));
|
||||||
connect(ui_->action_configure, SIGNAL(triggered()), SLOT(OpenSettingsDialog()));
|
connect(ui_->action_configure, SIGNAL(triggered()), SLOT(OpenSettingsDialog()));
|
||||||
connect(ui_->action_about, SIGNAL(triggered()), SLOT(ShowAboutDialog()));
|
connect(ui_->action_about, SIGNAL(triggered()), SLOT(ShowAboutDialog()));
|
||||||
connect(ui_->action_about_qt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
|
connect(ui_->action_about_qt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
|
||||||
@ -471,6 +475,9 @@ MainWindow::MainWindow(
|
|||||||
playlist_menu_->addAction(ui_->action_edit_value);
|
playlist_menu_->addAction(ui_->action_edit_value);
|
||||||
playlist_menu_->addAction(ui_->action_renumber_tracks);
|
playlist_menu_->addAction(ui_->action_renumber_tracks);
|
||||||
playlist_menu_->addAction(ui_->action_selection_set_value);
|
playlist_menu_->addAction(ui_->action_selection_set_value);
|
||||||
|
#ifdef HAVE_LIBTUNEPIMP
|
||||||
|
playlist_menu_->addAction(ui_->action_auto_complete_tags);
|
||||||
|
#endif
|
||||||
playlist_menu_->addSeparator();
|
playlist_menu_->addSeparator();
|
||||||
playlist_copy_to_library_ = playlist_menu_->addAction(IconLoader::Load("edit-copy"), tr("Copy to library..."), this, SLOT(PlaylistCopyToLibrary()));
|
playlist_copy_to_library_ = playlist_menu_->addAction(IconLoader::Load("edit-copy"), tr("Copy to library..."), this, SLOT(PlaylistCopyToLibrary()));
|
||||||
playlist_move_to_library_ = playlist_menu_->addAction(IconLoader::Load("go-jump"), tr("Move to library..."), this, SLOT(PlaylistMoveToLibrary()));
|
playlist_move_to_library_ = playlist_menu_->addAction(IconLoader::Load("go-jump"), tr("Move to library..."), this, SLOT(PlaylistMoveToLibrary()));
|
||||||
@ -1108,6 +1115,8 @@ void MainWindow::PlaylistRightClick(const QPoint& global_pos, const QModelIndex&
|
|||||||
// those is not CUE related
|
// those is not CUE related
|
||||||
ui_->action_edit_track->setEnabled(editable);
|
ui_->action_edit_track->setEnabled(editable);
|
||||||
ui_->action_edit_track->setVisible(editable);
|
ui_->action_edit_track->setVisible(editable);
|
||||||
|
ui_->action_auto_complete_tags->setEnabled(editable);
|
||||||
|
ui_->action_auto_complete_tags->setVisible(editable);
|
||||||
// the rest of the read / write actions work only when there are no CUEs
|
// the rest of the read / write actions work only when there are no CUEs
|
||||||
// involved
|
// involved
|
||||||
if(cue_selected)
|
if(cue_selected)
|
||||||
@ -1871,3 +1880,47 @@ void MainWindow::Exit() {
|
|||||||
}
|
}
|
||||||
qApp->quit();
|
qApp->quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::AutoCompleteTags() {
|
||||||
|
// Create the tag fetching stuff if it hasn't been already
|
||||||
|
if (!tag_fetcher_) {
|
||||||
|
tag_fetcher_.reset(new TagFetcher);
|
||||||
|
track_selection_dialog_.reset(new TrackSelectionDialog);
|
||||||
|
track_selection_dialog_->set_save_on_close(true);
|
||||||
|
|
||||||
|
connect(tag_fetcher_.get(), SIGNAL(FetchFinished(QString, SongList)),
|
||||||
|
track_selection_dialog_.get(), SLOT(FetchTagFinished(QString, SongList)),
|
||||||
|
Qt::QueuedConnection);
|
||||||
|
connect(track_selection_dialog_.get(), SIGNAL(accepted()),
|
||||||
|
SLOT(AutoCompleteTagsAccepted()));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the selected songs and start fetching tags for them
|
||||||
|
SongList songs;
|
||||||
|
autocomplete_tag_items_.clear();
|
||||||
|
foreach (const QModelIndex& index,
|
||||||
|
ui_->playlist->view()->selectionModel()->selection().indexes()) {
|
||||||
|
if (index.column() != 0)
|
||||||
|
continue;
|
||||||
|
int row = playlists_->current()->proxy()->mapToSource(index).row();
|
||||||
|
PlaylistItemPtr item(playlists_->current()->item_at(row));
|
||||||
|
Song song = item->Metadata();
|
||||||
|
|
||||||
|
if (song.IsEditable()) {
|
||||||
|
songs << song;
|
||||||
|
autocomplete_tag_items_ << item;
|
||||||
|
tag_fetcher_->FetchFromFile(song.filename());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
track_selection_dialog_->Init(songs);
|
||||||
|
track_selection_dialog_->show();
|
||||||
|
}
|
||||||
|
void MainWindow::AutoCompleteTagsAccepted() {
|
||||||
|
foreach (PlaylistItemPtr item, autocomplete_tag_items_) {
|
||||||
|
item->Reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is really lame but we don't know what rows have changed
|
||||||
|
ui_->playlist->view()->update();
|
||||||
|
}
|
||||||
|
@ -66,7 +66,9 @@ class Song;
|
|||||||
class SongInfoBase;
|
class SongInfoBase;
|
||||||
class SongInfoView;
|
class SongInfoView;
|
||||||
class SystemTrayIcon;
|
class SystemTrayIcon;
|
||||||
|
class TagFetcher;
|
||||||
class TaskManager;
|
class TaskManager;
|
||||||
|
class TrackSelectionDialog;
|
||||||
class TranscodeDialog;
|
class TranscodeDialog;
|
||||||
class VisualisationContainer;
|
class VisualisationContainer;
|
||||||
class WiimotedevShortcuts;
|
class WiimotedevShortcuts;
|
||||||
@ -157,6 +159,8 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
|||||||
void RenumberTracks();
|
void RenumberTracks();
|
||||||
void SelectionSetValue();
|
void SelectionSetValue();
|
||||||
void EditValue();
|
void EditValue();
|
||||||
|
void AutoCompleteTags();
|
||||||
|
void AutoCompleteTagsAccepted();
|
||||||
void PlaylistUndoRedoChanged(QAction* undo, QAction* redo);
|
void PlaylistUndoRedoChanged(QAction* undo, QAction* redo);
|
||||||
|
|
||||||
void PlaylistCopyToLibrary();
|
void PlaylistCopyToLibrary();
|
||||||
@ -283,6 +287,9 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
|||||||
boost::scoped_ptr<OrganiseDialog> organise_dialog_;
|
boost::scoped_ptr<OrganiseDialog> organise_dialog_;
|
||||||
boost::scoped_ptr<QueueManager> queue_manager_;
|
boost::scoped_ptr<QueueManager> queue_manager_;
|
||||||
|
|
||||||
|
boost::scoped_ptr<TagFetcher> tag_fetcher_;
|
||||||
|
boost::scoped_ptr<TrackSelectionDialog> track_selection_dialog_;
|
||||||
|
PlaylistItemList autocomplete_tag_items_;
|
||||||
|
|
||||||
#ifdef ENABLE_VISUALISATIONS
|
#ifdef ENABLE_VISUALISATIONS
|
||||||
boost::scoped_ptr<VisualisationContainer> visualisation_;
|
boost::scoped_ptr<VisualisationContainer> visualisation_;
|
||||||
|
@ -390,7 +390,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1131</width>
|
<width>1131</width>
|
||||||
<height>25</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menu_music">
|
<widget class="QMenu" name="menu_music">
|
||||||
@ -764,6 +764,18 @@
|
|||||||
<string>Do a full library rescan</string>
|
<string>Do a full library rescan</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="action_auto_complete_tags">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../data/data.qrc">
|
||||||
|
<normaloff>:/providers/musicbrainz.png</normaloff>:/providers/musicbrainz.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Complete tags automatically...</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Ctrl+T</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
@ -19,13 +19,16 @@
|
|||||||
#include "trackselectiondialog.h"
|
#include "trackselectiondialog.h"
|
||||||
|
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
#include <QFutureWatcher>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QShortcut>
|
#include <QShortcut>
|
||||||
|
#include <QtConcurrentRun>
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
|
|
||||||
TrackSelectionDialog::TrackSelectionDialog(QWidget *parent)
|
TrackSelectionDialog::TrackSelectionDialog(QWidget *parent)
|
||||||
: QDialog(parent),
|
: QDialog(parent),
|
||||||
ui_(new Ui_TrackSelectionDialog)
|
ui_(new Ui_TrackSelectionDialog),
|
||||||
|
save_on_close_(false)
|
||||||
{
|
{
|
||||||
// Setup dialog window
|
// Setup dialog window
|
||||||
ui_->setupUi(this);
|
ui_->setupUi(this);
|
||||||
@ -35,6 +38,7 @@ TrackSelectionDialog::TrackSelectionDialog(QWidget *parent)
|
|||||||
SLOT(ResultSelected()));
|
SLOT(ResultSelected()));
|
||||||
|
|
||||||
ui_->splitter->setSizes(QList<int>() << 200 << width() - 200);
|
ui_->splitter->setSizes(QList<int>() << 200 << width() - 200);
|
||||||
|
SetLoading(QString());
|
||||||
|
|
||||||
// Add the next/previous buttons
|
// Add the next/previous buttons
|
||||||
previous_button_ = new QPushButton(IconLoader::Load("go-previous"), tr("Previous"), this);
|
previous_button_ = new QPushButton(IconLoader::Load("go-previous"), tr("Previous"), this);
|
||||||
@ -188,17 +192,68 @@ void TrackSelectionDialog::ResultSelected() {
|
|||||||
data_[song_row].selected_result_ = result_index;
|
data_[song_row].selected_result_ = result_index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TrackSelectionDialog::SetLoading(const QString& message) {
|
||||||
|
const bool loading = !message.isEmpty();
|
||||||
|
|
||||||
|
ui_->loading_container->setVisible(loading);
|
||||||
|
ui_->button_box->setEnabled(!loading);
|
||||||
|
ui_->splitter->setEnabled(!loading);
|
||||||
|
ui_->loading_label->setText(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TrackSelectionDialog::SaveData(const QList<Data>& data) {
|
||||||
|
for (int i=0 ; i<data.count() ; ++i) {
|
||||||
|
const Data& ref = data[i];
|
||||||
|
if (ref.pending_ || ref.results_.isEmpty() || ref.selected_result_ == -1)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
const Song& new_metadata = ref.results_[ref.selected_result_];
|
||||||
|
|
||||||
|
Song copy(ref.original_song_);
|
||||||
|
copy.set_title(new_metadata.title());
|
||||||
|
copy.set_artist(new_metadata.artist());
|
||||||
|
copy.set_album(new_metadata.album());
|
||||||
|
copy.set_track(new_metadata.track());
|
||||||
|
|
||||||
|
copy.Save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void TrackSelectionDialog::accept() {
|
void TrackSelectionDialog::accept() {
|
||||||
|
if (save_on_close_) {
|
||||||
|
SetLoading(tr("Saving tracks") + "...");
|
||||||
|
|
||||||
|
// Save tags in the background
|
||||||
|
QFuture<void> future = QtConcurrent::run(&TrackSelectionDialog::SaveData, data_);
|
||||||
|
QFutureWatcher<void>* watcher = new QFutureWatcher<void>(this);
|
||||||
|
watcher->setFuture(future);
|
||||||
|
connect(watcher, SIGNAL(finished()), SLOT(AcceptFinished()));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
QDialog::accept();
|
QDialog::accept();
|
||||||
|
|
||||||
foreach (const Data& data, data_) {
|
foreach (const Data& data, data_) {
|
||||||
if (data.pending_ || data.results_.isEmpty() || data.selected_result_ == -1)
|
if (data.pending_ || data.results_.isEmpty() || data.selected_result_ == -1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
emit SongChosen(data.original_song_.filename(), data.results_[data.selected_result_]);
|
const Song& new_metadata = data.results_[data.selected_result_];
|
||||||
|
|
||||||
|
emit SongChosen(data.original_song_, new_metadata);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TrackSelectionDialog::AcceptFinished() {
|
||||||
|
QFutureWatcher<void>* watcher = dynamic_cast<QFutureWatcher<void>*>(sender());
|
||||||
|
if (!watcher)
|
||||||
|
return;
|
||||||
|
watcher->deleteLater();
|
||||||
|
|
||||||
|
SetLoading(QString());
|
||||||
|
QDialog::accept();
|
||||||
|
}
|
||||||
|
|
||||||
void TrackSelectionDialog::NextSong() {
|
void TrackSelectionDialog::NextSong() {
|
||||||
int row = (ui_->song_list->currentRow() + 1) % ui_->song_list->count();
|
int row = (ui_->song_list->currentRow() + 1) % ui_->song_list->count();
|
||||||
ui_->song_list->setCurrentRow(row);
|
ui_->song_list->setCurrentRow(row);
|
||||||
|
@ -32,6 +32,8 @@ public:
|
|||||||
TrackSelectionDialog(QWidget *parent = 0);
|
TrackSelectionDialog(QWidget *parent = 0);
|
||||||
~TrackSelectionDialog();
|
~TrackSelectionDialog();
|
||||||
|
|
||||||
|
void set_save_on_close(bool save_on_close) { save_on_close_ = save_on_close; }
|
||||||
|
|
||||||
void Init(const SongList& songs);
|
void Init(const SongList& songs);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
@ -41,7 +43,7 @@ public slots:
|
|||||||
void accept();
|
void accept();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void SongChosen(const QString& filename, const Song& song);
|
void SongChosen(const Song& original_song, const Song& new_metadata);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void UpdateStack();
|
void UpdateStack();
|
||||||
@ -50,10 +52,7 @@ private slots:
|
|||||||
void PreviousSong();
|
void PreviousSong();
|
||||||
|
|
||||||
void ResultSelected();
|
void ResultSelected();
|
||||||
|
void AcceptFinished();
|
||||||
private:
|
|
||||||
void AddDivider(const QString& text, QTreeWidget* parent) const;
|
|
||||||
void AddSong(const Song& song, int result_index, QTreeWidget* parent) const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui_TrackSelectionDialog* ui_;
|
Ui_TrackSelectionDialog* ui_;
|
||||||
@ -67,10 +66,19 @@ private:
|
|||||||
int selected_result_;
|
int selected_result_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void AddDivider(const QString& text, QTreeWidget* parent) const;
|
||||||
|
void AddSong(const Song& song, int result_index, QTreeWidget* parent) const;
|
||||||
|
|
||||||
|
void SetLoading(const QString& message);
|
||||||
|
static void SaveData(const QList<Data>& data);
|
||||||
|
|
||||||
|
private:
|
||||||
QList<Data> data_;
|
QList<Data> data_;
|
||||||
|
|
||||||
QPushButton* previous_button_;
|
QPushButton* previous_button_;
|
||||||
QPushButton* next_button_;
|
QPushButton* next_button_;
|
||||||
|
|
||||||
|
bool save_on_close_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TRACKSELECTIONDIALOG_H
|
#endif // TRACKSELECTIONDIALOG_H
|
||||||
|
@ -220,6 +220,37 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="loading_container" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="BusyIndicator" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="loading_label">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="button_box">
|
<widget class="QDialogButtonBox" name="button_box">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -237,6 +268,8 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user