Improved: Tabs can be closed by middle click in the Configuration Editor. Ctrl+A can be used to select all rows.

Fixed: When a line was edited manually in the Configuration Editor, the file was not saved automatically when "Instant mode" was enabled.
This commit is contained in:
jthedering committed 2017-08-12 11:13:30 +00:00
1 parent 87d9084d61
commit 5a795a2d26
15 files changed
+299 -83

No files matched your search

+6 -2
View File
@@ -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 \
+1
View File
@@ -24,5 +24,6 @@
<file>icons/reset_response.ico</file>
<file>icons/resize_corner.ico</file>
<file>sounds/pinkNoise.flac</file>
<file>icons/edit-select-all.ico</file>
</qresource>
</RCC>
+31
View File
@@ -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)
+2
View File
@@ -70,6 +70,7 @@ public:
void copy();
void paste();
void deleteSelectedLines();
void selectAll();
const QList<std::shared_ptr<AbstractAPOInfo> >& getOutputDevices() const;
const QList<std::shared_ptr<AbstractAPOInfo> >& 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;
+1
View File
@@ -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();
+24
View File
@@ -519,7 +519,21 @@ void MainWindow::linesChanged()
bool MainWindow::on_tabWidget_tabCloseRequested(int index)
{
if (askForClose(index))
{
QScrollArea* scrollArea = qobject_cast<QScrollArea*>(ui->tabWidget->widget(index));
if (scrollArea != NULL)
{
FilterTable* filterTable = qobject_cast<FilterTable*>(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<QScrollArea*>(ui->tabWidget->currentWidget());
if (scrollArea == NULL)
return;
FilterTable* filterTable = qobject_cast<FilterTable*>(scrollArea->widget());
filterTable->selectAll();
}
void MainWindow::instantModeEnabled(bool enabled)
{
if (enabled)
+3 -2
View File
@@ -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);
+34 -8
View File
@@ -28,7 +28,7 @@
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QTabWidget" name="tabWidget">
<widget class="MiddleClickTabWidget" name="tabWidget">
<property name="documentMode">
<bool>true</bool>
</property>
@@ -71,6 +71,8 @@
<addaction name="actionCopy"/>
<addaction name="actionPaste"/>
<addaction name="actionDelete"/>
<addaction name="separator"/>
<addaction name="actionSelectAll"/>
</widget>
<widget class="QMenu" name="menuView">
<property name="title">
@@ -568,7 +570,7 @@
<string>New</string>
</property>
<property name="shortcut">
<string>Ctrl+N</string>
<string notr="true">Ctrl+N</string>
</property>
</action>
<action name="actionOpen">
@@ -583,7 +585,7 @@
<string>Open</string>
</property>
<property name="shortcut">
<string>Ctrl+O</string>
<string notr="true">Ctrl+O</string>
</property>
</action>
<action name="actionSave">
@@ -598,7 +600,7 @@
<string>Save</string>
</property>
<property name="shortcut">
<string>Ctrl+S</string>
<string notr="true">Ctrl+S</string>
</property>
</action>
<action name="actionSaveAs">
@@ -612,13 +614,16 @@
<property name="toolTip">
<string>Save as...</string>
</property>
<property name="shortcut">
<string notr="true"/>
</property>
</action>
<action name="actionExit">
<property name="text">
<string>Exit</string>
</property>
<property name="shortcut">
<string>Alt+F4</string>
<string notr="true">Alt+F4</string>
</property>
</action>
<action name="actionCut">
@@ -630,7 +635,7 @@
<string>Cut</string>
</property>
<property name="shortcut">
<string>Ctrl+X</string>
<string notr="true">Ctrl+X</string>
</property>
</action>
<action name="actionCopy">
@@ -642,7 +647,7 @@
<string>Copy</string>
</property>
<property name="shortcut">
<string>Ctrl+C</string>
<string notr="true">Ctrl+C</string>
</property>
</action>
<action name="actionPaste">
@@ -654,7 +659,7 @@
<string>Paste</string>
</property>
<property name="shortcut">
<string>Ctrl+V</string>
<string notr="true">Ctrl+V</string>
</property>
</action>
<action name="actionDelete">
@@ -665,6 +670,9 @@
<property name="text">
<string>Delete</string>
</property>
<property name="shortcut">
<string notr="true"/>
</property>
</action>
<action name="actionToolbar">
<property name="checkable">
@@ -692,6 +700,18 @@
<string>Reset all file-specific preferences</string>
</property>
</action>
<action name="actionSelectAll">
<property name="icon">
<iconset resource="Editor.qrc">
<normaloff>:/icons/edit-select-all.ico</normaloff>:/icons/edit-select-all.ico</iconset>
</property>
<property name="text">
<string>Select all</string>
</property>
<property name="shortcut">
<string notr="true">Ctrl+A</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
@@ -705,6 +725,12 @@
<extends>QSpinBox</extends>
<header>Editor/widgets/ExponentialSpinBox.h</header>
</customwidget>
<customwidget>
<class>MiddleClickTabWidget</class>
<extends>QTabWidget</extends>
<header>Editor/widgets/MiddleClickTabWidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources>
<include location="Editor.qrc"/>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.
+69 -71
View File
@@ -900,12 +900,12 @@ Change the file permissions or copy the file to the config directory.</source>
<context>
<name>LoudnessCorrectionFilterGUI</name>
<message>
<location filename="../guis/LoudnessCorrectionFilterGUI.ui" line="158"/>
<location filename="../guis/LoudnessCorrectionFilterGUI.ui" line="160"/>
<source>Attenuation:</source>
<translation>Abschwächung:</translation>
</message>
<message>
<location filename="../guis/LoudnessCorrectionFilterGUI.ui" line="251"/>
<location filename="../guis/LoudnessCorrectionFilterGUI.ui" line="253"/>
<source>Reference offset:</source>
<translation>Referenzversatz:</translation>
</message>
@@ -924,19 +924,19 @@ Change the file permissions or copy the file to the config directory.</source>
<translation>Gesamtlautstärke:</translation>
</message>
<message>
<location filename="../guis/LoudnessCorrectionFilterGUI.ui" line="106"/>
<location filename="../guis/LoudnessCorrectionFilterGUI.ui" line="108"/>
<source>contributed by
Alexander Walch</source>
<translation>beigetragen durch
Alexander Walch</translation>
</message>
<message>
<location filename="../guis/LoudnessCorrectionFilterGUI.ui" line="299"/>
<location filename="../guis/LoudnessCorrectionFilterGUI.ui" line="301"/>
<source>Loudness correction:</source>
<translation>Lautheitskorrektur:</translation>
</message>
<message>
<location filename="../guis/LoudnessCorrectionFilterGUI.ui" line="309"/>
<location filename="../guis/LoudnessCorrectionFilterGUI.ui" line="311"/>
<source>Calibrate</source>
<translation>Kalibrieren</translation>
</message>
@@ -1038,30 +1038,30 @@ Alexander Walch</translation>
<translation>Bearbeiten</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="77"/>
<location filename="../MainWindow.ui" line="79"/>
<source>View</source>
<translation>Ansicht</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="84"/>
<location filename="../MainWindow.ui" line="146"/>
<location filename="../MainWindow.ui" line="86"/>
<location filename="../MainWindow.ui" line="148"/>
<source>Settings</source>
<translation>Einstellungen</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="88"/>
<location filename="../MainWindow.ui" line="90"/>
<source>Language</source>
<translation>Sprache</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="104"/>
<location filename="../MainWindow.ui" line="674"/>
<location filename="../MainWindow.ui" line="106"/>
<location filename="../MainWindow.ui" line="682"/>
<source>Toolbar</source>
<translation>Werkzeugleiste</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="118"/>
<location filename="../MainWindow.ui" line="682"/>
<location filename="../MainWindow.ui" line="120"/>
<location filename="../MainWindow.ui" line="690"/>
<source>Analysis panel</source>
<translation>Analysepanel</translation>
</message>
@@ -1070,143 +1070,141 @@ Alexander Walch</translation>
<translation type="vanished">FFT-Auflösung:</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="161"/>
<location filename="../MainWindow.ui" line="163"/>
<source>Resolution:</source>
<translation>Auflösung:</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="168"/>
<location filename="../MainWindow.ui" line="170"/>
<source>Channel:</source>
<translation>Kanal:</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="197"/>
<location filename="../MainWindow.ui" line="199"/>
<source>Start from:</source>
<translation>Beginne bei:</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="210"/>
<location filename="../MainWindow.ui" line="212"/>
<source>Current file</source>
<translation>Aktuelle Datei</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="221"/>
<location filename="../MainWindow.ui" line="223"/>
<source>Estimated properties</source>
<translation>Geschätzte Eigenschaften</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="237"/>
<location filename="../MainWindow.ui" line="239"/>
<source>CPU usage:</source>
<translation>CPU-Last:</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="244"/>
<location filename="../MainWindow.ui" line="246"/>
<source>Init. time:</source>
<translation>Init.-Zeit:</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="410"/>
<location filename="../MainWindow.ui" line="412"/>
<source>Latency: </source>
<translation>Latenz:</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="417"/>
<location filename="../MainWindow.ui" line="419"/>
<source>Peak gain:</source>
<translation>Maximum:</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="568"/>
<location filename="../MainWindow.ui" line="570"/>
<source>New</source>
<translation>Neu</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="571"/>
<source>Ctrl+N</source>
<translation>Ctrl+N</translation>
<translation type="vanished">Ctrl+N</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="580"/>
<location filename="../MainWindow.ui" line="583"/>
<location filename="../MainWindow.ui" line="582"/>
<location filename="../MainWindow.ui" line="585"/>
<source>Open</source>
<translation>Öffnen</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="586"/>
<source>Ctrl+O</source>
<translation>Ctrl+O</translation>
<translation type="vanished">Ctrl+O</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="595"/>
<location filename="../MainWindow.ui" line="598"/>
<location filename="../MainWindow.ui" line="597"/>
<location filename="../MainWindow.ui" line="600"/>
<source>Save</source>
<translation>Speichern</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="601"/>
<source>Ctrl+S</source>
<translation>Ctrl+S</translation>
<translation type="vanished">Ctrl+S</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="610"/>
<location filename="../MainWindow.ui" line="613"/>
<location filename="../MainWindow.ui" line="612"/>
<location filename="../MainWindow.ui" line="615"/>
<source>Save as...</source>
<translation>Speichern unter...</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="618"/>
<location filename="../MainWindow.ui" line="623"/>
<source>Exit</source>
<translation>Beenden</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="621"/>
<source>Alt+F4</source>
<translation>Alt+F4</translation>
<translation type="vanished">Alt+F4</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="630"/>
<location filename="../MainWindow.ui" line="635"/>
<source>Cut</source>
<translation>Ausschneiden</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="633"/>
<source>Ctrl+X</source>
<translation>Ctrl+X</translation>
<translation type="vanished">Ctrl+X</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="642"/>
<location filename="../MainWindow.ui" line="647"/>
<source>Copy</source>
<translation>Kopieren</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="645"/>
<source>Ctrl+C</source>
<translation>Ctrl+C</translation>
<translation type="vanished">Ctrl+C</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="654"/>
<location filename="../MainWindow.ui" line="659"/>
<source>Paste</source>
<translation>Einfügen</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="657"/>
<source>Ctrl+V</source>
<translation>Ctrl+V</translation>
<translation type="vanished">Ctrl+V</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="666"/>
<location filename="../MainWindow.ui" line="671"/>
<source>Delete</source>
<translation>Löschen</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="687"/>
<location filename="../MainWindow.ui" line="695"/>
<source>Reset all global preferences</source>
<translation>Alle globalen Einstellungen zurücksetzen</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="692"/>
<location filename="../MainWindow.ui" line="700"/>
<source>Reset all file-specific preferences</source>
<translation>Alle dateispezifischen Einstellungen zurücksetzen</translation>
</message>
<message>
<location filename="../MainWindow.ui" line="709"/>
<source>Select all</source>
<translation>Alles auswählen</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="75"/>
<source>Equalizer APO %0 Configuration Editor</source>
@@ -1328,7 +1326,7 @@ Möchten Sie die Configurator-Anwendung starten, um das Problem zu beheben?</tra
<translation>Von Gerät</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="717"/>
<location filename="../MainWindow.cpp" line="741"/>
<source>%0 dB</source>
<translation>%0 dB</translation>
</message>
@@ -1337,7 +1335,7 @@ Möchten Sie die Configurator-Anwendung starten, um das Problem zu beheben?</tra
<translation type="vanished">%0 ms (%1 Samp.)</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="720"/>
<location filename="../MainWindow.cpp" line="744"/>
<source>%0 ms (%1 s.)</source>
<translation>%0 ms (%1 S.)</translation>
</message>
@@ -1346,46 +1344,46 @@ Möchten Sie die Configurator-Anwendung starten, um das Problem zu beheben?</tra
<translation type="vanished">%0 ms (%1 Samples)</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="722"/>
<location filename="../MainWindow.cpp" line="746"/>
<source>%0 ms</source>
<translation>%0 ms</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="725"/>
<location filename="../MainWindow.cpp" line="749"/>
<source>%0 % (one core)</source>
<translation>%0 % (ein Kern)</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="766"/>
<location filename="../MainWindow.cpp" line="793"/>
<location filename="../MainWindow.cpp" line="812"/>
<location filename="../MainWindow.cpp" line="790"/>
<location filename="../MainWindow.cpp" line="817"/>
<location filename="../MainWindow.cpp" line="836"/>
<source>Restart required</source>
<translation>Neustart erforderlich</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="766"/>
<location filename="../MainWindow.cpp" line="793"/>
<location filename="../MainWindow.cpp" line="812"/>
<location filename="../MainWindow.cpp" line="790"/>
<location filename="../MainWindow.cpp" line="817"/>
<location filename="../MainWindow.cpp" line="836"/>
<source>Configuration Editor will be restarted to apply the changed settings. Proceed?</source>
<translation>Konfigurationseditor wird neugestartet, um die geänderten Einstellungen zu übernehmen. Fortsetzen?</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="872"/>
<location filename="../MainWindow.cpp" line="896"/>
<source>Unsaved changes</source>
<translation>Ungespeicherte Änderungen</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="873"/>
<location filename="../MainWindow.cpp" line="897"/>
<source>The configuration file %0 has unsaved changes.</source>
<translation>Die Konfigurationsdatei %0 hat ungespeicherte Änderungen.</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="874"/>
<location filename="../MainWindow.cpp" line="898"/>
<source>Do you want to save the changes before closing the file?</source>
<translation>Möchten Sie die Änderungen speichern, bevor die Datei geschlossen wird?</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="542"/>
<location filename="../MainWindow.cpp" line="556"/>
<source>Open file</source>
<translation>Datei öffnen</translation>
</message>
@@ -1395,18 +1393,18 @@ Möchten Sie die Configurator-Anwendung starten, um das Problem zu beheben?</tra
<translation>Automatisch (%0)</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="544"/>
<location filename="../MainWindow.cpp" line="597"/>
<location filename="../MainWindow.cpp" line="558"/>
<location filename="../MainWindow.cpp" line="611"/>
<source>E-APO configurations (*.txt)</source>
<translation>E-APO-Konfigurationen (*.txt)</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="594"/>
<location filename="../MainWindow.cpp" line="608"/>
<source>Save file as</source>
<translation>Datei speichern unter</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="616"/>
<location filename="../MainWindow.cpp" line="630"/>
<source>Unsaved</source>
<translation>Ungespeichert</translation>
</message>
@@ -1655,12 +1653,12 @@ Möchten Sie die Configurator-Anwendung starten, um das Problem zu beheben?</tra
<translation>VST-Plugins (*.dll)</translation>
</message>
<message>
<location filename="../guis/VSTPluginFilterGUI.cpp" line="320"/>
<location filename="../guis/VSTPluginFilterGUI.cpp" line="321"/>
<source>Plugin crashed when opening panel.</source>
<translation>Plugin ist beim Öffnen des Panels abgestürzt.</translation>
</message>
<message>
<location filename="../guis/VSTPluginFilterGUI.cpp" line="421"/>
<location filename="../guis/VSTPluginFilterGUI.cpp" line="422"/>
<source>The library is not readable by the audio service.
Change the file permissions or copy the file to the VSTPlugins directory.</source>
<translation>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.</source>
Ändern Sie die Dateiberechtigungen oder kopieren Sie die Datei in das plugins-Verzeichnis.</translation>
</message>
<message>
<location filename="../guis/VSTPluginFilterGUI.cpp" line="472"/>
<location filename="../guis/VSTPluginFilterGUI.cpp" line="473"/>
<source>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.</source>
+42
View File
@@ -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 <QMouseEvent>
#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);
}
+31
View File
@@ -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 <QTabBar>
class MiddleClickTabBar : public QTabBar
{
public:
MiddleClickTabBar(QWidget* parent = NULL);
protected:
void mouseReleaseEvent(QMouseEvent* event) override;
};
+27
View File
@@ -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));
}
+28
View File
@@ -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 <QTabWidget>
class MiddleClickTabWidget : public QTabWidget
{
public:
MiddleClickTabWidget(QWidget* parent = NULL);
};