22 explicit CSVManager(QObject* parent =
nullptr);
32 QVector<QVector<QString>>
readCSV(
const QString& filename,
const QString& delimiter,
bool firstRowHeader =
true);
41 QVector<QVector<QString>>
filterByColumn(
int column,
const QString& value)
const;
51 QVector<QVector<QString>>
filterByColumn(
const QVector<QVector<QString>>& data,
int column,
const QString& value)
const;
68 QVector<QString>
getColumnValues(
const QVector<QVector<QString>>& data,
int column)
const;
76 void dataReady(
const QVector<QVector<QString>>& data);
79 QVector<QVector<QString>> data;
Definition csvmanager.h:8
QVector< QVector< QString > > filterByColumn(int column, const QString &value) const
Filters the data based on a specific column and value.
Definition csvmanager.cpp:40
QVector< QString > getColumnValues(const QVector< QVector< QString > > &data, int column) const
Retrieves the values in a specific column from the provided data.
Definition csvmanager.cpp:89
void dataReady(const QVector< QVector< QString > > &data)
Signal emitted when the data is ready.
QVector< QVector< QString > > readCSV(const QString &filename, const QString &delimiter, bool firstRowHeader=true)
Reads a CSV file and returns the data as a 2D QVector of QString values.
Definition csvmanager.cpp:12
QStringList getDistinctColumnValues(int column) const
Retrieves the distinct values in a specific column.
Definition csvmanager.cpp:71