31#ifndef TESTINGWINDOW_H
32#define TESTINGWINDOW_H
34#include <QElapsedTimer>
78 QPushButton* startStopButton;
79 QSpinBox* numberOfTrialsSpinbox;
82 QLabel* attemptCountLabel;
83 QLabel* currentlyPlayinglabel;
89 QThread* workerThread;
92 QList<AudioSample> audioFiles;
95 QString selectedAudioFilePath;
97 int selectedAudioFileId;
99 FilterType activeFilterType = FilterType::HighShelf;
100 std::shared_ptr<BaseFilter> activeFilter;
105 int maxTrialsCount = 5;
106 int currentTrialCursor = 0;
109 int cutOffFrequency = 8000;
111 int currentSession = -1;
113 QElapsedTimer responseTimer;
118 void startPlayingTrackA();
120 void showErrorDialog(
const QString &message);
121 void showSessionStartConfirmationDialog(
const QString &message);
122 void showSessionStopConfirmationDialog(
const QString &message);
123 void showSessionEarlyEndConfirmationDialog(
const QString &message);
124 void startTestingSessionAction();
125 void stopTestingSessionAction();
126 void startResponseTimer();
127 void restartResponseTimer();
129 bool loadSelectedAudioFile(QString filePath);
Definition: AudioFile.h:82
A custom QComboBox with modified popup behavior.
Definition: CustomComboBox.h:40
The DatabaseManager class manages the database operations for the audio testing application.
Definition: DatabaseManager.h:50
The JackWorker class is responsible for managing the Jack audio server and audio client engine.
Definition: JackWorker.h:55
Provides a widget for conducting testing sessions.
Definition: TestingWindow.h:59
void updateSelectedAudioFile(QString filePath)
Updates the selected audio file.
Definition: TestingWindow.cpp:402
void updateFilterParameters(int gain, int cutOffFrequency)
Updates filter parameters.
Definition: TestingWindow.cpp:418
void setDatabaseManager(DatabaseManager *manager)
Sets the database manager.
Definition: TestingWindow.cpp:374
QWidget * createWidget()
Creates the widget for the testing window.
Definition: TestingWindow.cpp:57
void populateAudioFiles()
Populates the list of audio files.
Definition: TestingWindow.cpp:379
void updateSelectedFilterType(FilterType filterType)
Updates the selected filter type.
Definition: TestingWindow.cpp:413
void didChangeTestingSessionState(SessionType sessionType)
Signal emitted when the testing session state changes.
Definition: moc_TestingWindow.cpp:316
~TestingWindow()
Destructor.
Definition: TestingWindow.cpp:52
SessionType
Represents the state of a testing session.
Definition: SessionType.h:41
FilterType
An enumeration of filter types.
Definition: FilterType.h:43
TrackType
Represents the type of audio track.
Definition: TrackType.h:45
Represents an audio sample retrieved from a database.
Definition: AudioSample.h:39