File: qdltsettingsmanager.h

package info (click to toggle)
dlt-viewer 2.23.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 7,432 kB
  • sloc: cpp: 27,832; ansic: 4,454; xml: 491; sh: 154; makefile: 75
file content (135 lines) | stat: -rw-r--r-- 4,733 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
/**
 * @licence app begin@
 * Copyright (C) 2011-2012  BMW AG
 *
 * This file is part of COVESA Project Dlt Viewer.
 *
 * Contributions are licensed to the COVESA Alliance under one or more
 * Contribution License Agreements.
 *
 * \copyright
 * This Source Code Form is subject to the terms of the
 * Mozilla Public License, v. 2.0. If a  copy of the MPL was not distributed with
 * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * \author Lassi Marttala <Lassi.LM.Marttala@parner.bmw.de>
 *
 * \file dltsettingsmanager.h
 * For further information see http://www.covesa.global/.
 * @licence end@
 */

#ifndef QDLTSETTINGSMANAGER_H
#define QDLTSETTINGSMANAGER_H

#include <QColor>
#include <qsettings.h>
#include <QXmlStreamWriter>
#include <QXmlStreamReader>

#include "export_rules.h"

#define DEFAULT_REFRESH_RATE 20

class QDLT_EXPORT QDltSettingsManager
{
// Singleton pattern
public:
    enum class UI_Colour
    {
        UI_SystemDefault, UI_Light, UI_Dark
    };

    static QDltSettingsManager* getInstance();
    static void close();

private:
    QDltSettingsManager();
    ~QDltSettingsManager();
    static QDltSettingsManager *m_instance;
    QSettings *settings;

// QSettings delegates
public:
    void setValue(const QString &key, const QVariant &value);
    QVariant value(const QString &key, const QVariant &defaultValue = QVariant()) const;
    void clear();
    QString fileName() const;

    void writeSettings();
    void readSettings();

    void writeSettingsLocal(QXmlStreamWriter &xml);
    void readSettingsLocal(QXmlStreamReader &xml);

    int     tempUseSystem; // local setting
    QString tempSystemPath; // local setting
    int     tempUseOwn; // local setting
    QString tempOwnPath; // local setting
    int     tempCloseWithoutAsking; // local setting
    int     tempSaveOnClear; // local setting

    int defaultLogFile; // local setting
    QString defaultLogFileName; // local setting
    int defaultProjectFile; // local setting
    QString defaultProjectFileName; // local setting
    int pluginsPath; // local setting
    QString pluginsPathName; // local setting
    int defaultFilterPath; // local setting
    QString defaultFilterPathName; // local setting
    int pluginsAutoloadPath; // local setting
    QString pluginsAutoloadPathName; // local setting
    int filterCache; // local setting
    QByteArray geometry; // local setting
    QByteArray windowState; // local setting
    int RefreshRate; // local setting
    int StartupMinimized; // local settings
    UI_Colour themeSelectionSettings; // local settings
    UI_Colour uiColour; // local settings

    QColor markercolor; // local and project setting
    int autoConnect; // project and local setting
    int autoScroll; // project and local setting
    int autoMarkFatalError; // local and local setting
    int autoMarkWarn; // project and local setting
    int autoMarkMarker; // project and local setting
    int writeControl; // project and local setting
    int updateContextLoadingFile; // project and local setting
    int updateContextsUnregister; // project and local setting
    int loggingOnlyMode; // project and local setting
    int splitlogfile; // local and project setting
    float fmaxFileSizeMB; // local and project setting
    int appendDateTime; // local and project setting

    int fontSize; // project and local setting
    int sectionSize; // project and local setting
    QString fontName; // project and local setting
    int showIndex; // project and local setting
    int showTime; // project and local setting
    int showTimestamp; // project and local setting
    int showCount; // project and local setting
    int showEcuId; // project and local setting
    int showApId; // project and local setting
    int showApIdDesc; // project and local setting
    int showCtId; // project and local setting
    int showCtIdDesc; // project and local setting
    int showSessionId; // project and local setting
    int showSessionName; // project and local setting
    int showType; // project and local setting
    int showSubtype; // project and local setting
    int showMode; // project and local setting
    int showNoar; // project and local setting
    int showPayload; // project and local setting
    int showArguments; // project and local setting
    int showMsgId; // project and local setting

    QString msgIdFormat; // project and local setting
    int automaticTimeSettings; // project and local setting
    int automaticTimezoneFromDlt; // project and local setting
    qlonglong utcOffset; // project and local setting
    int dst; // project and local setting

    QStringList pluginExecutionPrio; //local setting
};

#endif // QDLTSETTINGSMANAGER_H