File: csvformat.h

package info (click to toggle)
sqlitestudio 3.4.21%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 54,880 kB
  • sloc: ansic: 406,208; cpp: 123,872; yacc: 2,692; tcl: 497; sh: 462; xml: 426; makefile: 19
file content (32 lines) | stat: -rw-r--r-- 949 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef CSVFORMAT_H
#define CSVFORMAT_H

#include "coreSQLiteStudio_global.h"
#include <QString>
#include <QStringList>

struct API_EXPORT CsvFormat
{
    CsvFormat();
    CsvFormat(const QString& columnSeparator, const QString& rowSeparator);
    CsvFormat(const QStringList& columnSeparators, const QStringList& rowSeparators);
    CsvFormat(const QString& columnSeparator, const QString& rowSeparator, bool strictRowSeparator, bool strictColumnSeparator);

    void calculateSeparatorMaxLengths();

    QString columnSeparator;
    QString rowSeparator;
    QStringList columnSeparators;
    QStringList rowSeparators;
    bool strictColumnSeparator = false;
    bool strictRowSeparator = false;
    bool multipleRowSeparators = false;
    bool multipleColumnSeparators = false;
    int maxColumnSeparatorLength = 0;
    int maxRowSeparatorLength = 0;
    bool quotationMark = true;

    static const CsvFormat DEFAULT;
};

#endif // CSVFORMAT_H