From 68f0f2e769eb59fae418cebd22bfd383fae6fd9b Mon Sep 17 00:00:00 2001
From: Jack Andersen
Date: Wed, 29 Aug 2018 22:16:37 -1000
Subject: [PATCH] Use asynchronous file dialogs
---
Editor/MainWindow.cpp | 104 ++++++++---
Editor/MainWindow.hpp | 10 ++
Editor/SongGroupEditor.cpp | 77 ++++----
Editor/SongGroupEditor.hpp | 8 +-
Editor/SoundMacroEditor.cpp | 5 +-
Editor/StatusBarWidget.cpp | 8 +-
Editor/StudioSetupWidget.cpp | 2 +-
Editor/resources/lang_de.ts | 328 +++++++++++++++++------------------
lib/AudioGroup.cpp | 2 +
9 files changed, 322 insertions(+), 222 deletions(-)
diff --git a/Editor/MainWindow.cpp b/Editor/MainWindow.cpp
index b3f99de..9e82aad 100644
--- a/Editor/MainWindow.cpp
+++ b/Editor/MainWindow.cpp
@@ -25,6 +25,7 @@ MainWindow::MainWindow(QWidget* parent)
m_navIt(m_navList.begin()),
m_treeDelegate(*this, this),
m_mainMessenger(this),
+ m_fileDialog(this),
m_undoStack(new QUndoStack(this)),
m_backgroundThread(this)
{
@@ -82,7 +83,7 @@ MainWindow::MainWindow(QWidget* parent)
connect(m_ui.actionImport_C_Headers, SIGNAL(triggered()), this, SLOT(importHeadersAction()));
connect(m_ui.actionExport_C_Headers, SIGNAL(triggered()), this, SLOT(exportHeadersAction()));
m_ui.actionQuit->setShortcut(QKeySequence::Quit);
- connect(m_ui.actionQuit, SIGNAL(triggered()), qApp, SLOT(quit()));
+ connect(m_ui.actionQuit, SIGNAL(triggered()), this, SLOT(close()));
for (int i = 0; i < MaxRecentFiles; ++i)
{
@@ -165,7 +166,7 @@ MainWindow::MainWindow(QWidget* parent)
m_voxEngine = boo::NewAudioVoiceEngine();
m_voxAllocator = std::make_unique(*m_voxEngine);
m_engine = std::make_unique(*m_voxAllocator);
- m_voxEngine->setVolume(0.7f);
+ m_engine->setVolume(0.7f);
m_studioSetup->loadData(m_engine->getDefaultStudio().get());
m_ctrlVals[7] = 127;
@@ -302,6 +303,7 @@ bool MainWindow::setProjectPath(const QString& path)
connect(m_ui.projectOutline->selectionModel(),
SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)),
this, SLOT(onOutlineSelectionChanged(const QItemSelection&, const QItemSelection&)));
+ m_fileDialog.setDirectory(path);
m_ui.actionSave_Project->setEnabled(true);
m_ui.actionRevert_Project->setEnabled(true);
m_ui.actionReload_Sample_Data->setEnabled(true);
@@ -399,8 +401,14 @@ void MainWindow::timerEvent(QTimerEvent* ev)
if (m_voxEngine && m_engine)
{
m_voxEngine->pumpAndMixVoices();
- if (!(m_timerFireCount % 10)) /* Rate limit voice counter */
- m_ui.statusbar->setVoiceCount(int(m_engine->getNumTotalActiveVoices()));
+
+ m_peakVoices = std::max(int(m_engine->getNumTotalActiveVoices()), m_peakVoices);
+ if (!(m_timerFireCount % 10))
+ {
+ /* Rate limit voice counter */
+ m_ui.statusbar->setVoiceCount(m_peakVoices);
+ m_peakVoices = 0;
+ }
if (m_engine->getActiveVoices().empty() && m_uiDisabled)
{
m_ui.projectOutline->setEnabled(true);
@@ -790,7 +798,16 @@ void MainWindow::showEvent(QShowEvent* ev)
void MainWindow::newAction()
{
- QString path = QFileDialog::getSaveFileName(this, tr("New Project"));
+ m_fileDialog.setWindowTitle(tr("New Project"));
+ m_fileDialog.setAcceptMode(QFileDialog::AcceptSave);
+ m_fileDialog.setFileMode(QFileDialog::AnyFile);
+ m_fileDialog.setOption(QFileDialog::ShowDirsOnly, false);
+ m_fileDialog.open(this, SLOT(_newAction(const QString&)));
+}
+
+void MainWindow::_newAction(const QString& path)
+{
+ m_fileDialog.close();
if (path.isEmpty())
return;
if (!MkPath(path, m_mainMessenger))
@@ -858,7 +875,16 @@ bool MainWindow::openProject(const QString& path)
void MainWindow::openAction()
{
- QString path = QFileDialog::getExistingDirectory(this, tr("Open Project"));
+ m_fileDialog.setWindowTitle(tr("Open Project"));
+ m_fileDialog.setAcceptMode(QFileDialog::AcceptOpen);
+ m_fileDialog.setFileMode(QFileDialog::Directory);
+ m_fileDialog.setOption(QFileDialog::ShowDirsOnly, true);
+ m_fileDialog.open(this, SLOT(_openAction(const QString&)));
+}
+
+void MainWindow::_openAction(const QString& path)
+{
+ m_fileDialog.close();
if (path.isEmpty())
return;
openProject(path);
@@ -945,8 +971,16 @@ void MainWindow::reloadSampleDataAction()
void MainWindow::importAction()
{
- QString path = QFileDialog::getOpenFileName(this, tr("Import Project"),
- m_projectModel ? m_projectModel->dir().path() : QString());
+ m_fileDialog.setWindowTitle(tr("Import Project"));
+ m_fileDialog.setAcceptMode(QFileDialog::AcceptOpen);
+ m_fileDialog.setFileMode(QFileDialog::ExistingFile);
+ m_fileDialog.setOption(QFileDialog::ShowDirsOnly, false);
+ m_fileDialog.open(this, SLOT(_importAction(const QString&)));
+}
+
+void MainWindow::_importAction(const QString& path)
+{
+ m_fileDialog.close();
if (path.isEmpty())
return;
@@ -962,11 +996,11 @@ void MainWindow::importAction()
/* Ask user about sample conversion */
int impMode = m_mainMessenger.question(tr("Sample Import Mode"),
- tr("Amuse can import samples as WAV files for ease of editing, "
- "import original compressed data for lossless repacking, or both. "
- "Exporting the project will prefer whichever version was modified "
- "most recently."),
- tr("Import Compressed"), tr("Import WAVs"), tr("Import Both"));
+ tr("Amuse can import samples as WAV files for ease of editing, "
+ "import original compressed data for lossless repacking, or both. "
+ "Exporting the project will prefer whichever version was modified "
+ "most recently."),
+ tr("Import Compressed"), tr("Import WAVs"), tr("Import Both"));
switch (impMode)
{
@@ -983,8 +1017,8 @@ void MainWindow::importAction()
if (tp == amuse::ContainerRegistry::Type::Raw4)
{
int scanMode = m_mainMessenger.question(tr("Raw Import Mode"),
- tr("Would you like to scan for all MusyX group files in this directory?"),
- QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
+ tr("Would you like to scan for all MusyX group files in this directory?"),
+ QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
if (scanMode == QMessageBox::Yes)
{
/* Auto-create project */
@@ -1079,7 +1113,16 @@ void MainWindow::importSongsAction()
if (!m_projectModel)
return;
- QString path = QFileDialog::getOpenFileName(this, tr("Import Songs"), m_projectModel->dir().path());
+ m_fileDialog.setWindowTitle(tr("Import Songs"));
+ m_fileDialog.setAcceptMode(QFileDialog::AcceptOpen);
+ m_fileDialog.setFileMode(QFileDialog::ExistingFile);
+ m_fileDialog.setOption(QFileDialog::ShowDirsOnly, false);
+ m_fileDialog.open(this, SLOT(_importSongsAction(const QString&)));
+}
+
+void MainWindow::_importSongsAction(const QString& path)
+{
+ m_fileDialog.close();
if (path.isEmpty())
return;
@@ -1131,13 +1174,22 @@ void MainWindow::importHeadersAction()
"Group, Song and SFX definitions are matched according to the following forms:"
"
#define GRP<name> <id>\n#define SNG<name> <id>\n"
"#define SFX<name> <id>
"
- "This operation cannot be undone! Is is recommended to "
+ "This operation cannot be undone! It is recommended to "
"make a backup of the project directory before proceeding.
"
"Continue?
"), QMessageBox::Yes | QMessageBox::No);
if (confirm == QMessageBox::No)
return;
- QString path = QFileDialog::getExistingDirectory(this, tr("Import C Headers"), m_projectModel->dir().path());
+ m_fileDialog.setWindowTitle(tr("Import C Headers"));
+ m_fileDialog.setAcceptMode(QFileDialog::AcceptOpen);
+ m_fileDialog.setFileMode(QFileDialog::Directory);
+ m_fileDialog.setOption(QFileDialog::ShowDirsOnly, true);
+ m_fileDialog.open(this, SLOT(_importHeadersAction(const QString&)));
+}
+
+void MainWindow::_importHeadersAction(const QString& path)
+{
+ m_fileDialog.close();
if (path.isEmpty())
return;
@@ -1156,7 +1208,16 @@ void MainWindow::exportHeadersAction()
if (!m_projectModel)
return;
- QString path = QFileDialog::getExistingDirectory(this, tr("Export C Headers"), m_projectModel->dir().path());
+ m_fileDialog.setWindowTitle(tr("Export C Headers"));
+ m_fileDialog.setAcceptMode(QFileDialog::AcceptOpen);
+ m_fileDialog.setFileMode(QFileDialog::Directory);
+ m_fileDialog.setOption(QFileDialog::ShowDirsOnly, true);
+ m_fileDialog.open(this, SLOT(_exportHeadersAction(const QString&)));
+}
+
+void MainWindow::_exportHeadersAction(const QString& path)
+{
+ m_fileDialog.close();
if (path.isEmpty())
return;
@@ -1439,6 +1500,7 @@ void MainWindow::newSoundMacroAction()
while (result == QDialog::Accepted && newName.isEmpty())
{
NewSoundMacroDialog dialog(groupName, this);
+ dialog.setWindowModality(Qt::WindowModal);
result = dialog.exec();
newName = dialog.getName();
templ = dialog.getSelectedTemplate();
@@ -1913,6 +1975,7 @@ void MainWindow::studioSetupShown()
void MainWindow::onBackgroundTaskFinished(int id)
{
+ m_backgroundDialog->close();
m_backgroundDialog->reset();
m_backgroundDialog->deleteLater();
m_backgroundDialog = nullptr;
@@ -1924,8 +1987,7 @@ void MainWindow::onBackgroundTaskFinished(int id)
if (m_mainMessenger.question(tr("Export Complete"), tr("%1?").
arg(ShowInGraphicalShellString())) == QMessageBox::Yes)
{
- QFileInfo
- dirInfo(m_projectModel->dir(), QStringLiteral("out"));
+ QFileInfo dirInfo(m_projectModel->dir(), QStringLiteral("out"));
QDir dir(dirInfo.filePath());
QStringList entryList = dir.entryList(QDir::Files);
ShowInGraphicalShell(this,
diff --git a/Editor/MainWindow.hpp b/Editor/MainWindow.hpp
index b333942..d013f8b 100644
--- a/Editor/MainWindow.hpp
+++ b/Editor/MainWindow.hpp
@@ -8,6 +8,7 @@
#include
#include
#include
+#include
#include "ui_MainWindow.h"
#include "amuse/Engine.hpp"
#include "amuse/BooBackend.hpp"
@@ -116,6 +117,7 @@ class MainWindow : public QMainWindow
LayersEditor* m_layersEditor = nullptr;
SampleEditor* m_sampleEditor = nullptr;
StudioSetupWidget* m_studioSetup = nullptr;
+ QFileDialog m_fileDialog;
std::unique_ptr m_voxEngine;
std::unique_ptr m_voxAllocator;
@@ -143,6 +145,7 @@ class MainWindow : public QMainWindow
QThread m_backgroundThread;
uint64_t m_timerFireCount = 0;
+ int m_peakVoices = 0;
void connectMessenger(UIMessenger* messenger, Qt::ConnectionType type);
@@ -186,6 +189,7 @@ public:
amuse::ObjToken startSong(amuse::GroupId groupId, amuse::SongId songId,
const unsigned char* arrData);
void pushUndoCommand(EditorUndoCommand* cmd);
+ QFileDialog& fileDialog() { return m_fileDialog; }
void updateFocus();
void aboutToDeleteNode(ProjectModel::INode* node);
void closeEvent(QCloseEvent* ev);
@@ -208,17 +212,23 @@ public:
public slots:
void newAction();
+ void _newAction(const QString& path);
void openAction();
+ void _openAction(const QString& path);
void openRecentFileAction();
void clearRecentFilesAction();
void saveAction();
void revertAction();
void reloadSampleDataAction();
void importAction();
+ void _importAction(const QString& path);
void importSongsAction();
+ void _importSongsAction(const QString& path);
void exportAction();
void importHeadersAction();
+ void _importHeadersAction(const QString& path);
void exportHeadersAction();
+ void _exportHeadersAction(const QString& path);
void newSubprojectAction();
void newSFXGroupAction();
diff --git a/Editor/SongGroupEditor.cpp b/Editor/SongGroupEditor.cpp
index f18f842..3e987dd 100644
--- a/Editor/SongGroupEditor.cpp
+++ b/Editor/SongGroupEditor.cpp
@@ -347,6 +347,7 @@ MIDIFileFieldWidget::MIDIFileFieldWidget(QWidget* parent)
connect(&m_button, SIGNAL(clicked(bool)), this, SLOT(buttonPressed()));
m_dialog.setFileMode(QFileDialog::ExistingFile);
+ m_dialog.setAcceptMode(QFileDialog::AcceptOpen);
}
QWidget* MIDIFileDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const
@@ -427,7 +428,7 @@ void MIDIFileDelegate::doExportMIDI()
return;
QString inPath = g_MainWindow->projectModel()->dir().absoluteFilePath(path);
- std::vector data;
+ m_exportData.clear();
{
QFile fi(inPath);
if (!fi.open(QFile::ReadOnly))
@@ -437,41 +438,48 @@ void MIDIFileDelegate::doExportMIDI()
return;
}
auto d = fi.readAll();
- data.resize(d.size());
- memcpy(&data[0], d.data(), d.size());
+ m_exportData.resize(d.size());
+ memcpy(&m_exportData[0], d.data(), d.size());
}
- if (!memcmp(data.data(), "MThd", 4))
+ if (!memcmp(m_exportData.data(), "MThd", 4))
{
//data = amuse::SongConverter::MIDIToSong(data, 1, true);
}
else
{
bool isBig;
- if (amuse::SongState::DetectVersion(data.data(), isBig) < 0)
+ if (amuse::SongState::DetectVersion(m_exportData.data(), isBig) < 0)
{
g_MainWindow->uiMessenger().critical(tr("File Error"),
tr("Invalid song data at %1").arg(inPath));
return;
}
int version;
- data = amuse::SongConverter::SongToMIDI(data.data(), version, isBig);
+ m_exportData = amuse::SongConverter::SongToMIDI(m_exportData.data(), version, isBig);
}
QFileInfo inInfo(inPath);
- QString outPath =
- QFileDialog::getSaveFileName(g_MainWindow, tr("Export MIDI"),
- QFileInfo(inInfo.path(), inInfo.completeBaseName() + QStringLiteral(".mid")).filePath(), tr("MIDI(*.mid)"));
- if (outPath.isEmpty())
+ m_fileDialogMid.setDirectory(QFileInfo(inInfo.path(), inInfo.completeBaseName() + QStringLiteral(".mid")).filePath());
+ m_fileDialogMid.setAcceptMode(QFileDialog::AcceptSave);
+ m_fileDialogMid.setFileMode(QFileDialog::AnyFile);
+ m_fileDialogMid.setOption(QFileDialog::ShowDirsOnly, false);
+ m_fileDialogMid.open(this, SLOT(_doExportMIDI(const QString&)));
+}
+
+void MIDIFileDelegate::_doExportMIDI(const QString& path)
+{
+ m_fileDialogMid.close();
+ if (path.isEmpty())
return;
- QFile fo(outPath);
+ QFile fo(path);
if (!fo.open(QFile::WriteOnly))
{
g_MainWindow->uiMessenger().critical(tr("File Error"),
- tr("Unable to open %1 for writing: %1").arg(outPath).arg(fo.errorString()));
+ tr("Unable to open %1 for writing: %1").arg(path).arg(fo.errorString()));
return;
}
- fo.write((char*)data.data(), data.size());
+ fo.write((char*)m_exportData.data(), m_exportData.size());
}
void MIDIFileDelegate::doExportSNG()
@@ -482,7 +490,7 @@ void MIDIFileDelegate::doExportSNG()
return;
QString inPath = g_MainWindow->projectModel()->dir().absoluteFilePath(path);
- std::vector data;
+ m_exportData.clear();
{
QFile fi(inPath);
if (!fi.open(QFile::ReadOnly))
@@ -492,14 +500,14 @@ void MIDIFileDelegate::doExportSNG()
return;
}
auto d = fi.readAll();
- data.resize(d.size());
- memcpy(&data[0], d.data(), d.size());
+ m_exportData.resize(d.size());
+ memcpy(&m_exportData[0], d.data(), d.size());
}
- if (!memcmp(data.data(), "MThd", 4))
+ if (!memcmp(m_exportData.data(), "MThd", 4))
{
- data = amuse::SongConverter::MIDIToSong(data, 1, true);
- if (data.empty())
+ m_exportData = amuse::SongConverter::MIDIToSong(m_exportData, 1, true);
+ if (m_exportData.empty())
{
g_MainWindow->uiMessenger().critical(tr("File Error"),
tr("Invalid MIDI data at %1").arg(inPath));
@@ -509,7 +517,7 @@ void MIDIFileDelegate::doExportSNG()
else
{
bool isBig;
- if (amuse::SongState::DetectVersion(data.data(), isBig) < 0)
+ if (amuse::SongState::DetectVersion(m_exportData.data(), isBig) < 0)
{
g_MainWindow->uiMessenger().critical(tr("File Error"),
tr("Invalid song data at %1").arg(inPath));
@@ -518,19 +526,26 @@ void MIDIFileDelegate::doExportSNG()
}
QFileInfo inInfo(inPath);
- QString outPath =
- QFileDialog::getSaveFileName(g_MainWindow, tr("Export SNG"),
- QFileInfo(inInfo.path(), inInfo.completeBaseName() + QStringLiteral(".sng")).filePath(), tr("Song(*.sng)"));
- if (outPath.isEmpty())
+ m_fileDialogSng.setDirectory(QFileInfo(inInfo.path(), inInfo.completeBaseName() + QStringLiteral(".sng")).filePath());
+ m_fileDialogSng.setAcceptMode(QFileDialog::AcceptSave);
+ m_fileDialogSng.setFileMode(QFileDialog::AnyFile);
+ m_fileDialogSng.setOption(QFileDialog::ShowDirsOnly, false);
+ m_fileDialogSng.open(this, SLOT(_doExportSNG(const QString&)));
+}
+
+void MIDIFileDelegate::_doExportSNG(const QString& path)
+{
+ m_fileDialogSng.close();
+ if (path.isEmpty())
return;
- QFile fo(outPath);
+ QFile fo(path);
if (!fo.open(QFile::WriteOnly))
{
g_MainWindow->uiMessenger().critical(tr("File Error"),
- tr("Unable to open %1 for writing: %1").arg(outPath).arg(fo.errorString()));
+ tr("Unable to open %1 for writing: %1").arg(path).arg(fo.errorString()));
return;
}
- fo.write((char*)data.data(), data.size());
+ fo.write((char*)m_exportData.data(), m_exportData.size());
}
void MIDIFileDelegate::pathChanged()
@@ -538,8 +553,10 @@ void MIDIFileDelegate::pathChanged()
emit commitData(static_cast(sender()));
}
-MIDIFileDelegate::MIDIFileDelegate(QObject* parent)
-: QStyledItemDelegate(parent) {}
+MIDIFileDelegate::MIDIFileDelegate(SetupTableView* parent)
+: QStyledItemDelegate(parent),
+ m_fileDialogMid(parent, tr("Export MIDI"), {}, tr("MIDI(*.mid)")),
+ m_fileDialogSng(parent, tr("Export Song"), {}, tr("Song(*.sng)")) {}
std::unordered_map& PageModel::_getMap() const
{
@@ -1315,7 +1332,7 @@ void SetupTableView::showEvent(QShowEvent* event)
}
SetupTableView::SetupTableView(QWidget* parent)
-: QSplitter(parent), m_listView(new QTableView), m_tableView(new QTableView)
+: QSplitter(parent), m_listView(new QTableView), m_tableView(new QTableView), m_midiDelegate(this)
{
setChildrenCollapsible(false);
setStretchFactor(0, 1);
diff --git a/Editor/SongGroupEditor.hpp b/Editor/SongGroupEditor.hpp
index 453a2e4..d387a80 100644
--- a/Editor/SongGroupEditor.hpp
+++ b/Editor/SongGroupEditor.hpp
@@ -15,6 +15,8 @@
#include
#include "amuse/Sequencer.hpp"
+class SetupTableView;
+
class PageObjectDelegate : public BaseObjectDelegate
{
Q_OBJECT
@@ -49,8 +51,10 @@ signals:
class MIDIFileDelegate : public QStyledItemDelegate
{
Q_OBJECT
+ QFileDialog m_fileDialogMid, m_fileDialogSng;
+ std::vector m_exportData;
public:
- explicit MIDIFileDelegate(QObject* parent = Q_NULLPTR);
+ explicit MIDIFileDelegate(SetupTableView* parent = Q_NULLPTR);
QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const;
void destroyEditor(QWidget *editor, const QModelIndex &index) const;
void setEditorData(QWidget* editor, const QModelIndex& index) const;
@@ -59,7 +63,9 @@ public:
const QStyleOptionViewItem &option, const QModelIndex &index);
private slots:
void doExportMIDI();
+ void _doExportMIDI(const QString& path);
void doExportSNG();
+ void _doExportSNG(const QString& path);
public slots:
void pathChanged();
};
diff --git a/Editor/SoundMacroEditor.cpp b/Editor/SoundMacroEditor.cpp
index d529299..ea98bbf 100644
--- a/Editor/SoundMacroEditor.cpp
+++ b/Editor/SoundMacroEditor.cpp
@@ -128,7 +128,7 @@ CommandWidget::CommandWidget(QWidget* parent, amuse::SoundMacro::ICmd* cmd,
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
m_numberFont.setWeight(QFont::Bold);
m_numberFont.setStyleHint(QFont::Monospace);
- m_numberFont.setPointSize(16);
+ m_numberFont.setPointSize(m_numberFont.pointSize() * 2);
setContentsMargins(QMargins());
setFixedHeight(100);
@@ -186,6 +186,7 @@ CommandWidget::CommandWidget(QWidget* parent, amuse::SoundMacro::ICmd* cmd,
case amuse::SoundMacro::CmdIntrospection::Field::Type::UInt32:
{
FieldSpinBox* sb = new FieldSpinBox(this);
+ sb->setFixedHeight(30);
sb->setProperty("fieldIndex", f);
sb->setProperty("fieldName", fieldName);
sb->setMinimum(int(field.m_min));
@@ -253,6 +254,7 @@ CommandWidget::CommandWidget(QWidget* parent, amuse::SoundMacro::ICmd* cmd,
case amuse::SoundMacro::CmdIntrospection::Field::Type::SoundMacroStep:
{
FieldSoundMacroStep* sb = new FieldSoundMacroStep(nf, this);
+ sb->setFixedHeight(30);
sb->setProperty("fieldIndex", f);
sb->setProperty("fieldName", fieldName);
sb->m_spinBox.setValue(amuse::AccessField>(m_cmd, field).step);
@@ -264,6 +266,7 @@ CommandWidget::CommandWidget(QWidget* parent, amuse::SoundMacro::ICmd* cmd,
case amuse::SoundMacro::CmdIntrospection::Field::Type::Choice:
{
FieldComboBox* cb = new FieldComboBox(this);
+ cb->setFixedHeight(30);
cb->setProperty("fieldIndex", f);
cb->setProperty("fieldName", fieldName);
for (int j = 0; j < 4; ++j)
diff --git a/Editor/StatusBarWidget.cpp b/Editor/StatusBarWidget.cpp
index 42ae23b..61e6edc 100644
--- a/Editor/StatusBarWidget.cpp
+++ b/Editor/StatusBarWidget.cpp
@@ -16,10 +16,10 @@ StatusBarWidget::StatusBarWidget(QWidget* parent)
m_killButton.setVisible(false);
m_killButton.setToolTip(tr("Immediately kill active voices"));
m_voiceCount.setVisible(false);
- m_volumeIcons[0] = QIcon(QStringLiteral(":/icons/IconVolume0"));
- m_volumeIcons[1] = QIcon(QStringLiteral(":/icons/IconVolume1"));
- m_volumeIcons[2] = QIcon(QStringLiteral(":/icons/IconVolume2"));
- m_volumeIcons[3] = QIcon(QStringLiteral(":/icons/IconVolume3"));
+ m_volumeIcons[0] = QIcon(QStringLiteral(":/icons/IconVolume0.svg"));
+ m_volumeIcons[1] = QIcon(QStringLiteral(":/icons/IconVolume1.svg"));
+ m_volumeIcons[2] = QIcon(QStringLiteral(":/icons/IconVolume2.svg"));
+ m_volumeIcons[3] = QIcon(QStringLiteral(":/icons/IconVolume3.svg"));
m_aIcon.setFixedSize(16, 16);
m_aIcon.setPixmap(QIcon(QStringLiteral(":/icons/IconA.svg")).pixmap(16, 16));
QString aTip = tr("Aux A send level for all voices");
diff --git a/Editor/StudioSetupWidget.cpp b/Editor/StudioSetupWidget.cpp
index c1c8df3..2788dc7 100644
--- a/Editor/StudioSetupWidget.cpp
+++ b/Editor/StudioSetupWidget.cpp
@@ -351,7 +351,7 @@ EffectWidget::EffectWidget(QWidget* parent, amuse::EffectBaseTypeless* effect, a
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
m_numberFont.setWeight(QFont::Bold);
m_numberFont.setStyleHint(QFont::Monospace);
- m_numberFont.setPointSize(16);
+ m_numberFont.setPointSize(m_numberFont.pointSize() * 2);
setContentsMargins(QMargins());
setFixedHeight(100);
diff --git a/Editor/resources/lang_de.ts b/Editor/resources/lang_de.ts
index 6e71047..f33e249 100644
--- a/Editor/resources/lang_de.ts
+++ b/Editor/resources/lang_de.ts
@@ -125,7 +125,7 @@
CommandWidget
-
+
@@ -342,71 +342,71 @@
MIDIFileDelegate
-
+
-
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
+
-
+
-
-
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
+
@@ -427,13 +427,13 @@
MIDIPlayerWidget
-
+
-
-
+
+
@@ -451,333 +451,333 @@
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
-
+
+
-
+
+#define SFX<name> <id></pre></p><p><strong>This operation cannot be undone! It is recommended to make a backup of the project directory before proceeding.</strong></p><p>Continue?</p>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -997,7 +997,7 @@
-
+
@@ -1121,38 +1121,38 @@
PageModel
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
@@ -1186,12 +1186,12 @@
PageTableView
-
+
-
+
@@ -1551,7 +1551,7 @@
QDialogButtonBox
-
+
@@ -1559,12 +1559,12 @@
QMessageBox
-
+
-
+
@@ -1736,27 +1736,27 @@
SetupListModel
-
+
-
+
-
+
-
+
-
+
@@ -1764,32 +1764,32 @@
SetupModel
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1797,12 +1797,12 @@
SetupTableView
-
+
-
+
@@ -1810,37 +1810,37 @@
SongGroupEditor
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1866,72 +1866,72 @@
SoundMacroCatalogue
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1947,17 +1947,17 @@
SoundMacroListing
-
+
-
+
-
+
@@ -2014,52 +2014,52 @@
TreeDelegate
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/lib/AudioGroup.cpp b/lib/AudioGroup.cpp
index 3b67ba3..391367d 100644
--- a/lib/AudioGroup.cpp
+++ b/lib/AudioGroup.cpp
@@ -318,6 +318,8 @@ std::string AudioGroupDatabase::exportCHeader(std::string_view projectName, std:
char curTmStr[26];
asctime_s(curTmStr, &curTm);
#endif
+ if (char* ch = strchr(curTmStr, '\n'))
+ *ch = '\0';
ret += curTmStr;
ret += "\n"
" */\n\n\n"sv;