AudibleT 0.0.1
A real-time A/B/X audio testing tool for subjective assessment of various audio parameters, compatible for general purpose computer as well as embedded systems.
Loading...
Searching...
No Matches
SessionListWidget.h
Go to the documentation of this file.
1//=======================================================================
29//=======================================================================
30
31#ifndef SESSIONLISTWIDGET_H
32#define SESSIONLISTWIDGET_H
33
34#include <QWidget>
35#include <QVBoxLayout>
36#include <QLabel>
37#include <QEvent>
38#include <QScrollArea>
39
40#include "TestingSession.h"
41
50class SessionListWidget : public QWidget
51{
52 Q_OBJECT
53public:
58 explicit SessionListWidget(QWidget *parent = nullptr);
59
64
69 QWidget* createWidget();
70
75 int getSelectedSessionId() const;
76
77public slots:
82 void populateList(QVector<TestingSession> sessions);
83
87 void clearList();
88
95 bool eventFilter(QObject *obj, QEvent *event);
96
97signals:
102 void didSelectTestingSession(int sessionId);
103
104private:
105 QScrollArea *scrollArea;
106 QVBoxLayout *scrollLayout;
107 QWidget* scrollAreaContentWidget;
108
109 QList<QLabel*> m_labels;
110 QLabel *m_currentSelection;
111
124 QString formatDuration(int durationInSeconds) const;
125};
126
127#endif // SESSIONLISTWIDGET_H
128
The SessionListWidget class provides a widget for displaying a list of TestingSession objects.
Definition: SessionListWidget.h:51
void clearList()
Clears the list of all sessions.
Definition: SessionListWidget.cpp:124
void populateList(QVector< TestingSession > sessions)
Populates the list with the given sessions.
Definition: SessionListWidget.cpp:87
bool eventFilter(QObject *obj, QEvent *event)
Filters events if this object has been installed as an event filter for the watched object.
Definition: SessionListWidget.cpp:138
QWidget * createWidget()
Creates and returns a QWidget to be used as the main widget.
Definition: SessionListWidget.cpp:49
~SessionListWidget()
Destroys the SessionListWidget.
Definition: SessionListWidget.cpp:44
int getSelectedSessionId() const
Returns the session ID of the currently selected session.
Definition: SessionListWidget.cpp:79
void didSelectTestingSession(int sessionId)
This signal is emitted when a testing session is selected.
Definition: moc_SessionListWidget.cpp:219