|
LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
|
Namespaces | |
| namespace | anonymous_namespace{ExportManager.cpp} |
Functions | |
| util::Result< void, error::Error > | ToCsv (const QAbstractItemModel &model, const std::vector< int > &rows, const QString &path) |
| Export the given view rows to a CSV file. | |
| util::Result< void, error::Error > | ToJson (const QAbstractItemModel &model, const std::vector< int > &rows, const QString &path) |
| Export the given view rows to a JSON file. | |
| util::Result< void, error::Error > | ToXml (const QAbstractItemModel &model, const std::vector< int > &rows, const QString &path) |
| Export the given view rows to an XML file. | |
| util::Result< void, error::Error > ui::qt::ExportManager::ToCsv | ( | const QAbstractItemModel & | model, |
| const std::vector< int > & | rows, | ||
| const QString & | path | ||
| ) |
Export the given view rows to a CSV file.
The first row of the output is a header derived from the model's horizontal header data. Each subsequent row corresponds to one entry in rows. Fields containing commas, double-quotes, or newlines are quoted per RFC 4180.
| model | The item model (e.g. EventsTableModel) to read data from. |
| rows | View row indices to export (in order). |
| path | Destination file path. |

| util::Result< void, error::Error > ui::qt::ExportManager::ToJson | ( | const QAbstractItemModel & | model, |
| const std::vector< int > & | rows, | ||
| const QString & | path | ||
| ) |
Export the given view rows to a JSON file.
Output is a JSON array of objects. Each object maps column header names to cell values, e.g. [{"timestamp": "...", "level": "ERROR"}, ...].
| model | The item model to read data from. |
| rows | View row indices to export (in order). |
| path | Destination file path. |

| util::Result< void, error::Error > ui::qt::ExportManager::ToXml | ( | const QAbstractItemModel & | model, |
| const std::vector< int > & | rows, | ||
| const QString & | path | ||
| ) |
Export the given view rows to an XML file.
Output is a well-formed XML document with a root <events> element. Each row becomes an <event> child; column values are stored as attributes. Attribute names are derived from the model's horizontal header data.
| model | The item model to read data from. |
| rows | View row indices to export (in order). |
| path | Destination file path. |
