Permalink
Browse files

main: Re-add command-line sample rate setting

  • Loading branch information...
1 parent f2b7f91 commit 5b03a23ba1d607ed62703b3258ce3559b9b75376 @miek committed Mar 6, 2016
Showing with 7 additions and 1 deletion.
  1. +1 −1 main.cpp
  2. +5 −0 mainwindow.cpp
  3. +1 −0 mainwindow.h
View
@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
fputs("ERROR: could not parse rate\n", stderr);
return 1;
}
- // TODO: set sample rate
+ mainWin.setSampleRate(rate);
}
const QStringList args = parser.positionalArguments();
View
@@ -64,3 +64,8 @@ void MainWindow::setSampleRate(QString rate)
{
input->setSampleRate(rate.toInt());
}
+
+void MainWindow::setSampleRate(int rate)
+{
+ dock->sampleRate->setText(QString::number(rate));
+}
View
@@ -35,6 +35,7 @@ class MainWindow : public QMainWindow
public slots:
void openFile(QString fileName);
void setSampleRate(QString rate);
+ void setSampleRate(int rate);
private:
SpectrogramControls *dock;

0 comments on commit 5b03a23

Please sign in to comment.