diff --git a/Editor/Editor.pro b/Editor/Editor.pro
index 0f76788..8330019 100644
--- a/Editor/Editor.pro
+++ b/Editor/Editor.pro
@@ -131,7 +131,9 @@ SOURCES += main.cpp\
../filters/loudnessCorrection/LoudnessCorrectionFilterFactory.cpp \
../filters/loudnessCorrection/VolumeController.cpp \
guis/LoudnessCorrectionFilterGUIDialog.cpp \
- helpers/QtSndfileHandle.cpp
+ helpers/QtSndfileHandle.cpp \
+ widgets/MiddleClickTabWidget.cpp \
+ widgets/MiddleClickTabBar.cpp
HEADERS += \
../helpers/LogHelper.h \
@@ -252,7 +254,9 @@ HEADERS += \
../filters/loudnessCorrection/ParameterArchive.h \
../filters/loudnessCorrection/VolumeController.h \
guis/LoudnessCorrectionFilterGUIDialog.h \
- helpers/QtSndfileHandle.h
+ helpers/QtSndfileHandle.h \
+ widgets/MiddleClickTabWidget.h \
+ widgets/MiddleClickTabBar.h
FORMS += \
guis/PreampFilterGUI.ui \
diff --git a/Editor/Editor.qrc b/Editor/Editor.qrc
index 1229442..eefd618 100644
--- a/Editor/Editor.qrc
+++ b/Editor/Editor.qrc
@@ -24,5 +24,6 @@
icons/reset_response.icoicons/resize_corner.icosounds/pinkNoise.flac
+ icons/edit-select-all.ico
diff --git a/Editor/FilterTable.cpp b/Editor/FilterTable.cpp
index eace1f3..be6a9a7 100644
--- a/Editor/FilterTable.cpp
+++ b/Editor/FilterTable.cpp
@@ -487,6 +487,14 @@ void FilterTable::deleteSelectedLines()
updateGuis();
}
+void FilterTable::selectAll()
+{
+ selected.clear();
+ for (Item* item : items)
+ selected.insert(item);
+ update();
+}
+
void FilterTable::updateModel()
{
emit linesChanged();
@@ -652,6 +660,29 @@ void FilterTable::mousePressEvent(QMouseEvent* event)
}
}
+void FilterTable::mouseReleaseEvent(QMouseEvent* event)
+{
+ if (event->button() == Qt::LeftButton)
+ {
+ int row = rowForPos(event->pos(), false);
+ if (row != -1)
+ {
+ Item* item = items[row];
+
+ if (!(event->modifiers() & Qt::ControlModifier) && !(event->modifiers() & Qt::ShiftModifier))
+ {
+ if (selected.contains(item) && selectionStart == item)
+ {
+ selected.clear();
+ selected.insert(item);
+ }
+ }
+ ensureRowVisible(row);
+ update();
+ }
+ }
+}
+
void FilterTable::mouseMoveEvent(QMouseEvent* event)
{
if (event->buttons() & Qt::LeftButton)
diff --git a/Editor/FilterTable.h b/Editor/FilterTable.h
index e130c99..68cf532 100644
--- a/Editor/FilterTable.h
+++ b/Editor/FilterTable.h
@@ -70,6 +70,7 @@ public:
void copy();
void paste();
void deleteSelectedLines();
+ void selectAll();
const QList >& getOutputDevices() const;
const QList >& getInputDevices() const;
@@ -105,6 +106,7 @@ public slots:
protected:
void mousePressEvent(QMouseEvent* event) override;
+ void mouseReleaseEvent(QMouseEvent* event) override;
void mouseMoveEvent(QMouseEvent* event) override;
void dragEnterEvent(QDragEnterEvent* event) override;
void dragMoveEvent(QDragMoveEvent* event) override;
diff --git a/Editor/FilterTableRow.cpp b/Editor/FilterTableRow.cpp
index ee094b1..cd5c1c2 100644
--- a/Editor/FilterTableRow.cpp
+++ b/Editor/FilterTableRow.cpp
@@ -191,6 +191,7 @@ void FilterTableRow::on_lineEdit_editingFinished()
{
editingDone = true;
item->text = ui->lineEdit->text();
+ table->updateModel();
// set focus to table so that enter key does not cause scrolling down
table->setFocus();
table->updateGuis();
diff --git a/Editor/MainWindow.cpp b/Editor/MainWindow.cpp
index b076b90..8ccc59d 100644
--- a/Editor/MainWindow.cpp
+++ b/Editor/MainWindow.cpp
@@ -519,7 +519,21 @@ void MainWindow::linesChanged()
bool MainWindow::on_tabWidget_tabCloseRequested(int index)
{
if (askForClose(index))
+ {
+ QScrollArea* scrollArea = qobject_cast(ui->tabWidget->widget(index));
+ if (scrollArea != NULL)
+ {
+ FilterTable* filterTable = qobject_cast(scrollArea->widget());
+ QString path = filterTable->getConfigPath();
+ recentFiles.removeAll(path);
+ recentFiles.prepend(path);
+ if (recentFiles.size() > 10)
+ recentFiles.removeLast();
+ updateRecentFiles();
+ }
+
ui->tabWidget->removeTab(index);
+ }
return true;
}
@@ -665,6 +679,16 @@ void MainWindow::on_actionDelete_triggered()
filterTable->deleteSelectedLines();
}
+void MainWindow::on_actionSelectAll_triggered()
+{
+ QScrollArea* scrollArea = qobject_cast(ui->tabWidget->currentWidget());
+ if (scrollArea == NULL)
+ return;
+
+ FilterTable* filterTable = qobject_cast(scrollArea->widget());
+ filterTable->selectAll();
+}
+
void MainWindow::instantModeEnabled(bool enabled)
{
if (enabled)
diff --git a/Editor/MainWindow.h b/Editor/MainWindow.h
index 75d7ba7..0751ffb 100644
--- a/Editor/MainWindow.h
+++ b/Editor/MainWindow.h
@@ -70,9 +70,10 @@ private slots:
void recentFileSelected();
void on_actionCut_triggered();
- void on_actionDelete_triggered();
- void on_actionPaste_triggered();
void on_actionCopy_triggered();
+ void on_actionPaste_triggered();
+ void on_actionDelete_triggered();
+ void on_actionSelectAll_triggered();
void instantModeEnabled(bool enabled);
void on_tabWidget_currentChanged(int index);
diff --git a/Editor/MainWindow.ui b/Editor/MainWindow.ui
index e485160..6bacec8 100644
--- a/Editor/MainWindow.ui
+++ b/Editor/MainWindow.ui
@@ -28,7 +28,7 @@
0
-
+ true
@@ -71,6 +71,8 @@
+
+
@@ -568,7 +570,7 @@
New
- Ctrl+N
+ Ctrl+N
@@ -583,7 +585,7 @@
Open
- Ctrl+O
+ Ctrl+O
@@ -598,7 +600,7 @@
Save
- Ctrl+S
+ Ctrl+S
@@ -612,13 +614,16 @@
Save as...
+
+
+ Exit
- Alt+F4
+ Alt+F4
@@ -630,7 +635,7 @@
Cut
- Ctrl+X
+ Ctrl+X
@@ -642,7 +647,7 @@
Copy
- Ctrl+C
+ Ctrl+C
@@ -654,7 +659,7 @@
Paste
- Ctrl+V
+ Ctrl+V
@@ -665,6 +670,9 @@
Delete
+
+
+
@@ -692,6 +700,18 @@
Reset all file-specific preferences
+
+
+
+ :/icons/edit-select-all.ico:/icons/edit-select-all.ico
+
+
+ Select all
+
+
+ Ctrl+A
+
+
@@ -705,6 +725,12 @@
QSpinBoxEditor/widgets/ExponentialSpinBox.h
+
+ MiddleClickTabWidget
+ QTabWidget
+ Editor/widgets/MiddleClickTabWidget.h
+ 1
+
diff --git a/Editor/icons/edit-select-all.ico b/Editor/icons/edit-select-all.ico
new file mode 100644
index 0000000..1100197
Binary files /dev/null and b/Editor/icons/edit-select-all.ico differ
diff --git a/Editor/translations/Editor_de.qm b/Editor/translations/Editor_de.qm
index fd62ab3..dbbffad 100644
Binary files a/Editor/translations/Editor_de.qm and b/Editor/translations/Editor_de.qm differ
diff --git a/Editor/translations/Editor_de.ts b/Editor/translations/Editor_de.ts
index 99da11d..27bb7df 100644
--- a/Editor/translations/Editor_de.ts
+++ b/Editor/translations/Editor_de.ts
@@ -900,12 +900,12 @@ Change the file permissions or copy the file to the config directory.
LoudnessCorrectionFilterGUI
-
+ Attenuation:Abschwächung:
-
+ Reference offset:Referenzversatz:
@@ -924,19 +924,19 @@ Change the file permissions or copy the file to the config directory.
Gesamtlautstärke:
-
+ contributed by
Alexander Walchbeigetragen durch
Alexander Walch
-
+ Loudness correction:Lautheitskorrektur:
-
+ CalibrateKalibrieren
@@ -1038,30 +1038,30 @@ Alexander Walch
Bearbeiten
-
+ ViewAnsicht
-
-
+
+ SettingsEinstellungen
-
+ LanguageSprache
-
-
+
+ ToolbarWerkzeugleiste
-
-
+
+ Analysis panelAnalysepanel
@@ -1070,143 +1070,141 @@ Alexander Walch
FFT-Auflösung:
-
+ Resolution:Auflösung:
-
+ Channel:Kanal:
-
+ Start from:Beginne bei:
-
+ Current fileAktuelle Datei
-
+ Estimated propertiesGeschätzte Eigenschaften
-
+ CPU usage:CPU-Last:
-
+ Init. time:Init.-Zeit:
-
+ Latency: Latenz:
-
+ Peak gain:Maximum:
-
+ NewNeu
- Ctrl+N
- Ctrl+N
+ Ctrl+N
-
-
+
+ OpenÖffnen
- Ctrl+O
- Ctrl+O
+ Ctrl+O
-
-
+
+ SaveSpeichern
- Ctrl+S
- Ctrl+S
+ Ctrl+S
-
-
+
+ Save as...Speichern unter...
-
+ ExitBeenden
- Alt+F4
- Alt+F4
+ Alt+F4
-
+ CutAusschneiden
- Ctrl+X
- Ctrl+X
+ Ctrl+X
-
+ CopyKopieren
- Ctrl+C
- Ctrl+C
+ Ctrl+C
-
+ PasteEinfügen
- Ctrl+V
- Ctrl+V
+ Ctrl+V
-
+ DeleteLöschen
-
+ Reset all global preferencesAlle globalen Einstellungen zurücksetzen
-
+ Reset all file-specific preferencesAlle dateispezifischen Einstellungen zurücksetzen
+
+
+ Select all
+ Alles auswählen
+ Equalizer APO %0 Configuration Editor
@@ -1328,7 +1326,7 @@ Möchten Sie die Configurator-Anwendung starten, um das Problem zu beheben?Von Gerät
-
+ %0 dB%0 dB
@@ -1337,7 +1335,7 @@ Möchten Sie die Configurator-Anwendung starten, um das Problem zu beheben?%0 ms (%1 Samp.)
-
+ %0 ms (%1 s.)%0 ms (%1 S.)
@@ -1346,46 +1344,46 @@ Möchten Sie die Configurator-Anwendung starten, um das Problem zu beheben?%0 ms (%1 Samples)
-
+ %0 ms%0 ms
-
+ %0 % (one core)%0 % (ein Kern)
-
-
-
+
+
+ Restart requiredNeustart erforderlich
-
-
-
+
+
+ Configuration Editor will be restarted to apply the changed settings. Proceed?Konfigurationseditor wird neugestartet, um die geänderten Einstellungen zu übernehmen. Fortsetzen?
-
+ Unsaved changesUngespeicherte Änderungen
-
+ The configuration file %0 has unsaved changes.Die Konfigurationsdatei %0 hat ungespeicherte Änderungen.
-
+ Do you want to save the changes before closing the file?Möchten Sie die Änderungen speichern, bevor die Datei geschlossen wird?
-
+ Open fileDatei öffnen
@@ -1395,18 +1393,18 @@ Möchten Sie die Configurator-Anwendung starten, um das Problem zu beheben?Automatisch (%0)
-
-
+
+ E-APO configurations (*.txt)E-APO-Konfigurationen (*.txt)
-
+ Save file asDatei speichern unter
-
+ UnsavedUngespeichert
@@ -1655,12 +1653,12 @@ Möchten Sie die Configurator-Anwendung starten, um das Problem zu beheben?VST-Plugins (*.dll)
-
+ Plugin crashed when opening panel.Plugin ist beim Öffnen des Panels abgestürzt.
-
+ The library is not readable by the audio service.
Change the file permissions or copy the file to the VSTPlugins directory.Die Bibliothek ist für den Audiodienst nicht lesbar.
@@ -1673,7 +1671,7 @@ Change the file permissions or copy the file to the plugins directory.
Ändern Sie die Dateiberechtigungen oder kopieren Sie die Datei in das plugins-Verzeichnis.
-
+ The plugin seemingly accesses these files not readable by the audio service:
%0
Change the file permissions or copy the files to the config directory.
diff --git a/Editor/widgets/MiddleClickTabBar.cpp b/Editor/widgets/MiddleClickTabBar.cpp
new file mode 100644
index 0000000..ece0ee7
--- /dev/null
+++ b/Editor/widgets/MiddleClickTabBar.cpp
@@ -0,0 +1,42 @@
+/*
+ This file is part of Equalizer APO, a system-wide equalizer.
+ Copyright (C) 2017 Jonas Thedering
+
+ This program 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 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+
+#include
+
+#include "MiddleClickTabBar.h"
+
+MiddleClickTabBar::MiddleClickTabBar(QWidget* parent)
+ : QTabBar(parent)
+{
+}
+
+void MiddleClickTabBar::mouseReleaseEvent(QMouseEvent* event)
+{
+ if (event->button() == Qt::MidButton)
+ {
+ int tabIndex = tabAt(event->pos());
+ if (tabIndex != -1)
+ {
+ emit tabCloseRequested(tabIndex);
+ return;
+ }
+ }
+
+ QTabBar::mouseReleaseEvent(event);
+}
diff --git a/Editor/widgets/MiddleClickTabBar.h b/Editor/widgets/MiddleClickTabBar.h
new file mode 100644
index 0000000..29f4841
--- /dev/null
+++ b/Editor/widgets/MiddleClickTabBar.h
@@ -0,0 +1,31 @@
+/*
+ This file is part of Equalizer APO, a system-wide equalizer.
+ Copyright (C) 2017 Jonas Thedering
+
+ This program 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 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+
+#pragma once
+
+#include
+
+class MiddleClickTabBar : public QTabBar
+{
+public:
+ MiddleClickTabBar(QWidget* parent = NULL);
+
+protected:
+ void mouseReleaseEvent(QMouseEvent* event) override;
+};
diff --git a/Editor/widgets/MiddleClickTabWidget.cpp b/Editor/widgets/MiddleClickTabWidget.cpp
new file mode 100644
index 0000000..ee57ba3
--- /dev/null
+++ b/Editor/widgets/MiddleClickTabWidget.cpp
@@ -0,0 +1,27 @@
+/*
+ This file is part of Equalizer APO, a system-wide equalizer.
+ Copyright (C) 2017 Jonas Thedering
+
+ This program 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 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+
+#include "MiddleClickTabBar.h"
+#include "MiddleClickTabWidget.h"
+
+MiddleClickTabWidget::MiddleClickTabWidget(QWidget* parent)
+ : QTabWidget(parent)
+{
+ setTabBar(new MiddleClickTabBar(this));
+}
diff --git a/Editor/widgets/MiddleClickTabWidget.h b/Editor/widgets/MiddleClickTabWidget.h
new file mode 100644
index 0000000..babeef0
--- /dev/null
+++ b/Editor/widgets/MiddleClickTabWidget.h
@@ -0,0 +1,28 @@
+/*
+ This file is part of Equalizer APO, a system-wide equalizer.
+ Copyright (C) 2017 Jonas Thedering
+
+ This program 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 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+
+#pragma once
+
+#include
+
+class MiddleClickTabWidget : public QTabWidget
+{
+public:
+ MiddleClickTabWidget(QWidget* parent = NULL);
+};