Added Analyzer Window
parent
9bcd22a53c
commit
4161fac661
@ -0,0 +1,39 @@
|
|||||||
|
#include "analyzer.h"
|
||||||
|
#include "ui_analyzer.h"
|
||||||
|
#include "QFileDialog"
|
||||||
|
#include <QStandardPaths>
|
||||||
|
#include <QString>
|
||||||
|
#include <QDirIterator>
|
||||||
|
#include <QFileInfo>
|
||||||
|
|
||||||
|
analyzer::analyzer(QWidget *parent) :
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::analyzer)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
analyzer::~analyzer()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void analyzer::on_pushButton_clicked()
|
||||||
|
{
|
||||||
|
QString folder=QFileDialog::getExistingDirectory(this,"Select the folder that is containing audio",QStandardPaths::writableLocation(QStandardPaths::DownloadLocation));
|
||||||
|
ui->lineEdit_path->setText(folder);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void analyzer::on_pushButton_calculate_clicked()
|
||||||
|
{
|
||||||
|
QDirIterator it(ui->lineEdit_path->text(), QStringList() << "*.mp3", QDir::NoFilter, QDirIterator::Subdirectories);
|
||||||
|
//while (it.hasNext()) {
|
||||||
|
QFileInfo f(it.next());
|
||||||
|
CAudioSource src;
|
||||||
|
|
||||||
|
src.decode(f.absoluteFilePath());
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
#ifndef ANALYZER_H
|
||||||
|
#define ANALYZER_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QAudioDecoder>
|
||||||
|
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class analyzer;
|
||||||
|
}
|
||||||
|
|
||||||
|
class analyzer : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit analyzer(QWidget *parent = nullptr);
|
||||||
|
~analyzer();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void on_pushButton_clicked();
|
||||||
|
|
||||||
|
void on_pushButton_calculate_clicked();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::analyzer *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ANALYZER_H
|
||||||
@ -0,0 +1,107 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>analyzer</class>
|
||||||
|
<widget class="QDialog" name="analyzer">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>432</width>
|
||||||
|
<height>141</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QFormLayout" name="formLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Folder containing Audio Files</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_path">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>C:/Users/fsx12/Downloads/Zeugnisverleihung</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QPushButton" name="pushButton">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Browse</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="layoutDirection">
|
||||||
|
<enum>Qt::LeftToRight</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>preferred Loudness</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="doubleSpinBox_preferredLoudness">
|
||||||
|
<property name="suffix">
|
||||||
|
<string> dBFS</string>
|
||||||
|
</property>
|
||||||
|
<property name="decimals">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-100.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>0.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>-18.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QPushButton" name="pushButton_calculate">
|
||||||
|
<property name="text">
|
||||||
|
<string>Calculate</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
Loading…
Reference in New Issue