summaryrefslogtreecommitdiffstats
path: root/src/library/library.cpp
diff options
context:
space:
mode:
authorDaniel Schürmann <daschuer@mixxx.org>2018-03-26 23:16:41 +0200
committerDaniel Schürmann <daschuer@mixxx.org>2018-03-26 23:16:41 +0200
commit332ceb6265b8504ec0359e02ed1ca955dde0a903 (patch)
tree0bf358b230331f2c2b68e1f3f7f96280d6a1d91a /src/library/library.cpp
parentdbbfa258de76cedcd52d99f0aff9447026c4eb82 (diff)
Added "Edit Metadata" preferences function, replacing the related Load to deck feature
Diffstat (limited to 'src/library/library.cpp')
-rw-r--r--src/library/library.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/library/library.cpp b/src/library/library.cpp
index 745a609beb..d5c7daf1ee 100644
--- a/src/library/library.cpp
+++ b/src/library/library.cpp
@@ -172,6 +172,9 @@ Library::Library(
} else {
m_trackTableFont = QApplication::font();
}
+
+ m_editMetadata = m_pConfig->getValue(
+ ConfigKey(kConfigGroup, "EditMetadata"), true);
}
Library::~Library() {
@@ -242,6 +245,8 @@ void Library::bindWidget(WLibrary* pLibraryWidget,
pTrackTableView, SLOT(setTrackTableFont(QFont)));
connect(this, SIGNAL(setTrackTableRowHeight(int)),
pTrackTableView, SLOT(setTrackTableRowHeight(int)));
+ connect(this, SIGNAL(setSelectedClick(bool)),
+ pTrackTableView, SLOT(setSelectedClick(bool)));
connect(this, SIGNAL(searchStarting()),
pTrackTableView, SLOT(onSearchStarting()));
@@ -260,6 +265,7 @@ void Library::bindWidget(WLibrary* pLibraryWidget,
// just connected to us.
emit(setTrackTableFont(m_trackTableFont));
emit(setTrackTableRowHeight(m_iTrackTableRowHeight));
+ emit(setSelectedClick(m_editMetadata));
}
void Library::addFeature(LibraryFeature* feature) {
@@ -412,16 +418,21 @@ QStringList Library::getDirs() {
return m_pTrackCollection->getDirectoryDAO().getDirs();
}
-void Library::slotSetTrackTableFont(const QFont& font) {
+void Library::setFont(const QFont& font) {
m_trackTableFont = font;
emit(setTrackTableFont(font));
}
-void Library::slotSetTrackTableRowHeight(int rowHeight) {
+void Library::setRowHeight(int rowHeight) {
m_iTrackTableRowHeight = rowHeight;
emit(setTrackTableRowHeight(rowHeight));
}
+void Library::setEditMedatata(bool enabled) {
+ m_editMetadata = enabled;
+ emit(setSelectedClick(enabled));
+}
+
void Library::saveCachedTrack(Track* pTrack) noexcept {
// It can produce dangerous signal loops if the track is still
// sending signals while being saved!