swift
Loading...
Searching...
No Matches
datastoreutility.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2015 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6#ifndef SWIFT_MISC_DB_DATASTOREUTILITY_H
7#define SWIFT_MISC_DB_DATASTOREUTILITY_H
8
9#include <QDateTime>
10#include <QString>
11
12#include "misc/logcategories.h"
14
15namespace swift::misc
16{
18
19 namespace db
20 {
25 {
26 public:
28 static const QStringList &getLogCategories();
29
32
34 static bool dbBoolStringToBool(const QString &dbBool);
35
37 static const QString &boolToDbYN(bool v);
38
40 static int extractIntegerKey(const QString &stringWithKey);
41
43 static QString stripKeyInParentheses(const QString &valueWithKey);
44
46 static QDateTime parseTimestamp(const QString &timestamp);
47
49 static bool parseAutoPublishResponse(const QString &jsonResponse, CStatusMessageList &messages);
50 };
51 } // namespace db
52} // namespace swift::misc
53
54#endif // SWIFT_MISC_DB_DATASTOREUTILITY_H
Status messages, e.g. from Core -> GUI.
CDatastoreUtility()=delete
No constructor.
static const QString & boolToDbYN(bool v)
Bool to DB yes/no.
static const QStringList & getLogCategories()
Log.categories.
static int extractIntegerKey(const QString &stringWithKey)
Extract key from string like "MyAircraft (33)".
static QString stripKeyInParentheses(const QString &valueWithKey)
Strip the parentheses part, e.g. "foo (123)" => "foo".
static QDateTime parseTimestamp(const QString &timestamp)
Parse a timestamp object.
static bool dbBoolStringToBool(const QString &dbBool)
DB Bool value to bool.
static bool parseAutoPublishResponse(const QString &jsonResponse, CStatusMessageList &messages)
Auto publish response.
Free functions in swift::misc.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.