Incorporate feedback (namespace), Adds shortcut for zen mode, 1:1 ratio #3

Open
neuron303 wants to merge 4 commits from neuron303/master into master
2 changed files with 13 additions and 11 deletions
Showing only changes of commit 5dc2edf795 - Show all commits

View File

@@ -16,18 +16,18 @@
#include <stdexcept>
namespace {
constexpr int samplerates[] = { 44100, 48000, 96000, 192000 };
constexpr int samplerates[] = { 44100, 48000, 96000, 192000 };
constexpr int refreshrates[] = { 1, 15, 30, 50, 60 };
constexpr int refreshrates[] = { 1, 15, 30, 50, 60 };
constexpr int zoomlevels[] = { 50, 75, 100, 200, 400, 800 };
constexpr int zoomlevels[] = { 50, 75, 100, 200, 400, 800 };
template<typename T>
void setActionsEnabled(const T &actions, bool enabled)
{
for(auto action : actions)
action->setEnabled(enabled);
}
template<typename T>
void setActionsEnabled(const T &actions, bool enabled)
{
for(auto action : actions)
action->setEnabled(enabled);
}
}
MainWindow::MainWindow(QWidget *parent) :

View File

@@ -9,8 +9,10 @@
// system includes
#include <cmath>
qint32 framesForDuration(qint64 duration){
return qint32(44100 * duration / 1000000LL);
namespace {
qint32 framesForDuration(qint64 duration){
return qint32(44100 * duration / 1000000LL);
}
}