Skip to content

Commit 9cd0c60

Browse files
committed
Refactor documentation comments to use /// Doxygen style for consistency across export and import classes.
1 parent f52c94d commit 9cd0c60

File tree

6 files changed

+67
-123
lines changed

6 files changed

+67
-123
lines changed

include/eible/ExportData.h

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,18 @@ class QAbstractItemView;
88
class QAbstractItemModel;
99
class QIODevice;
1010

11-
/**
12-
* @class ExportData
13-
* @brief Base class for exporting classes.
14-
*/
11+
/// @class ExportData
12+
/// @brief Base class for exporting classes.
1513
class EIBLE_EXPORT ExportData : public QObject
1614
{
1715
Q_OBJECT
1816
public:
1917
explicit ExportData(QObject* parent = nullptr);
2018

21-
/**
22-
* @brief Export data from view to ioDevice.
23-
* @param view Source of data.
24-
* @param ioDevice Destination of exported content.
25-
* @return True if success, false if failure.
26-
*/
19+
/// @brief Export data from view to ioDevice.
20+
/// @param view Source of data.
21+
/// @param ioDevice Destination of exported content.
22+
/// @return True if success, false if failure.
2723
bool exportView(const QAbstractItemView& view, QIODevice& ioDevice);
2824

2925
protected:
@@ -47,9 +43,7 @@ class EIBLE_EXPORT ExportData : public QObject
4743
static bool rowShouldBeSkipped(const QAbstractItemView& view, int row);
4844

4945
Q_SIGNALS:
50-
/**
51-
* Triggered on change of progress percentage.
52-
* @param currentPercent New progress percent.
53-
*/
46+
/// Triggered on change of progress percentage.
47+
/// @param currentPercent New progress percent.
5448
void progressPercentChanged(int currentPercent);
5549
};

include/eible/ExportDsv.h

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,26 @@
88
class QAbstractItemView;
99
class QIODevice;
1010

11-
/**
12-
* @class ExportDsv
13-
* @brief Class for exporting data to DSV (Delimiter Separated Values) files.
14-
*/
11+
/// @class ExportDsv
12+
/// @brief Class for exporting data to DSV (Delimiter Separated Values) files.
1513
class EIBLE_EXPORT ExportDsv : public ExportData
1614
{
1715
Q_OBJECT
1816
public:
19-
/**
20-
* @brief Constructor.
21-
* @param separator Separator to be used during export (comma, tab, ...).
22-
*/
17+
/// @brief Constructor.
18+
/// @param separator Separator to be used during export (comma, tab, ...).
2319
explicit ExportDsv(char separator, QObject* parent = nullptr);
2420

25-
/**
26-
* @brief Change date format to given one via Qt::DateFormat. (overloaded)
27-
* @param format New format for dates as Qt::DateFormat.
28-
*/
21+
/// @brief Change date format to given one via Qt::DateFormat. (overloaded)
22+
/// @param format New format for dates as Qt::DateFormat.
2923
void setDateFormat(Qt::DateFormat format);
3024

31-
/**
32-
* @brief Change date format to given one via string. (overloaded)
33-
* @param format New format for dates as string.
34-
*/
25+
/// @brief Change date format to given one via string. (overloaded)
26+
/// @param format New format for dates as string.
3527
void setDateFormat(const QString& format);
3628

37-
/**
38-
* @brief Set locale for numbers conversion.
39-
* @param locale Locale to be used in exporting.
40-
*/
29+
/// @brief Set locale for numbers conversion.
30+
/// @param locale Locale to be used in exporting.
4131
void setNumbersLocale(const QLocale& locale);
4232

4333
protected:

include/eible/ExportXlsx.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ class QAbstractItemModel;
99
class QAbstractItemView;
1010
class QIODevice;
1111

12-
/**
13-
* @class ExportXlsx
14-
* @brief Class for exporting data to xlsx files.
15-
*/
12+
/// @class ExportXlsx
13+
/// @brief Class for exporting data to xlsx files.
1614
class EIBLE_EXPORT ExportXlsx : public ExportData
1715
{
1816
Q_OBJECT

include/eible/ImportOds.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,14 @@ class QuaZipFile;
1111
class QXmlStreamReader;
1212
class QXmlStreamAttributes;
1313

14-
/**
15-
* @class ImportOds
16-
* @brief Class analysing content and loading it from ods files.
17-
*/
14+
/// @class ImportOds
15+
/// @brief Class analysing content and loading it from ods files.
1816
class EIBLE_EXPORT ImportOds : public ImportSpreadsheet
1917
{
2018
Q_OBJECT
2119
public:
22-
/**
23-
* @brief Constructor.
24-
* @param ioDevice Source of data (QFile, QBuffer, ...).
25-
*/
20+
/// @brief Constructor.
21+
/// @param ioDevice Source of data (QFile, QBuffer, ...).
2622
explicit ImportOds(QIODevice& ioDevice);
2723

2824
std::pair<bool, QStringList> getSheetNames() override;

include/eible/ImportSpreadsheet.h

Lines changed: 33 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -10,84 +10,62 @@
1010
class QIODevice;
1111
class QuaZipFile;
1212

13-
/**
14-
* @class ImportSpreadsheet
15-
* @brief Base class for spreadsheet importing classes.
16-
*/
13+
/// @class ImportSpreadsheet
14+
/// @brief Base class for spreadsheet importing classes.
1715
class EIBLE_EXPORT ImportSpreadsheet : public QObject
1816
{
1917
Q_OBJECT
2018
public:
21-
/**
22-
* @brief Constructor.
23-
* @param ioDevice Source of data (QFile, QBuffer, ...).
24-
*/
19+
/// @brief Constructor.
20+
/// @param ioDevice Source of data (QFile, QBuffer, ...).
2521
explicit ImportSpreadsheet(QIODevice& ioDevice);
2622

27-
/**
28-
* @brief Get list of sheet names.
29-
* @return First value indicating success, second is sheet names list.
30-
*/
23+
/// @brief Get list of sheet names.
24+
/// @return First value indicating success, second is sheet names list.
3125
virtual std::pair<bool, QStringList> getSheetNames() = 0;
3226

33-
/**
34-
* @brief Get list of column names.
35-
* @param sheetName Sheet name.
36-
* @return First value indicating success, second is column names list.
37-
*/
27+
/// @brief Get list of column names.
28+
/// @param sheetName Sheet name.
29+
/// @return First value indicating success, second is column names list.
3830
virtual std::pair<bool, QStringList> getColumnNames(
3931
const QString& sheetName) = 0;
4032

41-
/**
42-
* @brief Get list of column types.
43-
* @param sheetName Sheet name.
44-
* @return First value indicating success, second is column types vector.
45-
*/
33+
/// @brief Get list of column types.
34+
/// @param sheetName Sheet name.
35+
/// @return First value indicating success, second is column types vector.
4636
virtual std::pair<bool, QVector<ColumnType>> getColumnTypes(
4737
const QString& sheetName) = 0;
4838

49-
/**
50-
* @brief Get last error.
51-
* @return First value contains function name, second error.
52-
*/
39+
/// @brief Get last error.
40+
/// @return First value contains function name, second error.
5341
QString getLastError() const;
5442

55-
/**
56-
* @brief Set name used for empty columns.
57-
* @param name Name for empty column.
58-
*/
43+
/// @brief Set name used for empty columns.
44+
/// @param name Name for empty column.
5945
void setNameForEmptyColumn(const QString& name);
6046

61-
/**
62-
* @brief Get number of columns in given sheet.
63-
* @param sheetName Sheet name.
64-
* @return First value indicating success, second is column count.
65-
*/
47+
/// @brief Get number of columns in given sheet.
48+
/// @param sheetName Sheet name.
49+
/// @return First value indicating success, second is column count.
6650
std::pair<bool, int> getColumnCount(const QString& sheetName);
6751

68-
/**
69-
* @brief Get number of rows in given sheet.
70-
* @param sheetName Sheet name.
71-
* @return First value indicating success, second is row count.
72-
*/
52+
/// @brief Get number of rows in given sheet.
53+
/// @param sheetName Sheet name.
54+
/// @return First value indicating success, second is row count.
7355
std::pair<bool, int> getRowCount(const QString& sheetName);
7456

75-
/**
76-
* @brief Get data from sheet.
77-
* @param sheetName Sheet name.
78-
* @param excludedColumns Vector of excluded columns (indexes).
79-
* @return First value indicating success, second is vector of data rows.
80-
*/
57+
/// @brief Get data from sheet.
58+
/// @param sheetName Sheet name.
59+
/// @param excludedColumns Vector of excluded columns (indexes).
60+
/// @return First value indicating success, second is vector of data rows.
8161
std::pair<bool, QVector<QVector<QVariant>>> getData(
8262
const QString& sheetName, const QVector<int>& excludedColumns);
8363

84-
/**
85-
* @brief Get limited data from sheet.
86-
* @param sheetName Sheet name.
87-
* @param excludedColumns Vector of excluded columns (indexes).
88-
* @param rowLimit Number of rows to load.
89-
* @return First value indicating success, second is vector of data rows.
90-
*/
64+
/// @brief Get limited data from sheet.
65+
/// @param sheetName Sheet name.
66+
/// @param excludedColumns Vector of excluded columns (indexes).
67+
/// @param rowLimit Number of rows to load.
68+
/// @return First value indicating success, second is vector of data rows.
9169
virtual std::pair<bool, QVector<QVector<QVariant>>> getLimitedData(
9270
const QString& sheetName, const QVector<int>& excludedColumns,
9371
int rowLimit) = 0;
@@ -148,9 +126,7 @@ class EIBLE_EXPORT ImportSpreadsheet : public QObject
148126
QuaZip zip_;
149127

150128
Q_SIGNALS:
151-
/**
152-
* Triggered on change of progress percentage.
153-
* @param progressPercent New progress percent.
154-
*/
129+
/// Triggered on change of progress percentage.
130+
/// @param progressPercent New progress percent.
155131
void progressPercentChanged(int progressPercent);
156132
};

include/eible/ImportXlsx.h

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,14 @@ class QuaZip;
1212
class QuaZipFile;
1313
class QXmlStreamReader;
1414

15-
/**
16-
* @class ImportXlsx
17-
* @brief Class analysing content and loading it from xlsx files.
18-
*/
15+
/// @class ImportXlsx
16+
/// @brief Class analysing content and loading it from xlsx files.
1917
class EIBLE_EXPORT ImportXlsx : public ImportSpreadsheet
2018
{
2119
Q_OBJECT
2220
public:
23-
/**
24-
* @brief Constructor.
25-
* @param ioDevice Source of data (QFile, QBuffer, ...).
26-
*/
21+
/// @brief Constructor.
22+
/// @param ioDevice Source of data (QFile, QBuffer, ...).
2723
explicit ImportXlsx(QIODevice& ioDevice);
2824

2925
std::pair<bool, QStringList> getSheetNames() override;
@@ -34,22 +30,16 @@ class EIBLE_EXPORT ImportXlsx : public ImportSpreadsheet
3430
std::pair<bool, QStringList> getColumnNames(
3531
const QString& sheetName) override;
3632

37-
/**
38-
* @brief Get shared strings from xlsx.
39-
* @return First value indicating success, second list of shared strings.
40-
*/
33+
/// @brief Get shared strings from xlsx.
34+
/// @return First value indicating success, second list of shared strings.
4135
std::pair<bool, QStringList> getSharedStrings();
4236

43-
/**
44-
* @brief Get date styles from xlsx.
45-
* @return First value indicating success, second list of date style ids.
46-
*/
37+
/// @brief Get date styles from xlsx.
38+
/// @return First value indicating success, second list of date style ids.
4739
std::pair<bool, QList<int>> getDateStyles();
4840

49-
/**
50-
* @brief Get all styles from xlsx.
51-
* @return First value indicating success, second list of all style ids.
52-
*/
41+
/// @brief Get all styles from xlsx.
42+
/// @return First value indicating success, second list of all style ids.
5343
std::pair<bool, QList<int>> getAllStyles();
5444

5545
std::pair<bool, QVector<QVector<QVariant>>> getLimitedData(

0 commit comments

Comments
 (0)