File: cli_config.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 (38 lines) | stat: -rw-r--r-- 911 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
33
34
35
36
37
38
#ifndef CLI_CONFIG_H
#define CLI_CONFIG_H

#include "config_builder.h"

namespace CliResultsDisplay
{
    enum Mode
    {
        CLASSIC = 0,
        FIXED = 1,
        ROW = 2,
        COLUMNS = 3
    };

    Mode mode(const QString& mode);
    QString mode(Mode mode);
    void staticInit();

}

QDataStream &operator<<(QDataStream &out, const CliResultsDisplay::Mode& mode);
QDataStream &operator>>(QDataStream &in, CliResultsDisplay::Mode& mode);

Q_DECLARE_METATYPE(CliResultsDisplay::Mode)

CFG_CATEGORIES(Cli,
    CFG_CATEGORY(Console,
        CFG_ENTRY(QString,                 DefaultDatabase,    QString())
        CFG_ENTRY(QString,                 CommandPrefixChar,  ".")
        CFG_ENTRY(CliResultsDisplay::Mode, ResultsDisplayMode, CliResultsDisplay::CLASSIC)
        CFG_ENTRY(QString,                 NullValue,          "")
    )
)

#define CFG_CLI CFG_INSTANCE(Cli)

#endif // CLI_CONFIG_H