Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
227 KeyOz 1
/***************************************************************************
2
 *   Copyright (C) 2008 by Manuel Schrape                                  *
3
 *   manuel.schrape@gmx.de                                                 *
4
 *                                                                         *
5
 *   This program is free software; you can redistribute it and/or modify  *
6
 *   it under the terms of the GNU General Public License as published by  *
7
 *   the Free Software Foundation; either version 2 of the License.        *
8
 *                                                                         *
9
 *   This program is distributed in the hope that it will be useful,       *
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12
 *   GNU General Public License for more details.                          *
13
 *                                                                         *
14
 *   You should have received a copy of the GNU General Public License     *
15
 *   along with this program; if not, write to the                         *
16
 *   Free Software Foundation, Inc.,                                       *
17
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
18
 ***************************************************************************/
19
#ifndef CSETTINGS_H
20
#define CSETTINGS_H
21
 
22
#include "../global.h"
23
 
24
struct set_TTY
25
{
26
    QString Port;
27
};
28
 
29
struct set_GUI
30
{
31
    bool   isMax;
32
    QSize  Size;
33
    QPoint Point;
34
    QBitArray TabViews;
35
    QBitArray ToolViews;
36
    bool Term_Info;
37
    bool Term_Data;
38
    bool Term_Always;
39
    bool Term_Send;
40
};
41
 
306 KeyOz 42
struct set_Map
43
{
44
    bool GotoPosition;
45
    bool ShowTrack;
481 KeyOz 46
    double LastLatitude;
47
    double LastLongitude;
306 KeyOz 48
};
49
 
227 KeyOz 50
struct set_Data
51
{
52
    int Plotter_Count;
53
    int Debug_Fast;
54
    int Debug_Slow;
55
    int Debug_Off;
56
    int Navi_Fast;
57
    int Navi_Slow;
58
    int Navi_Off;
59
};
60
 
61
struct set_DIR
62
{
63
    QString Logging;
64
    QString Parameter;
306 KeyOz 65
    QString Cache;
66
    QString AVRDUDE;
227 KeyOz 67
};
68
 
69
struct set_Server
70
{
71
    QString Port;
72
    bool StartServer;
73
    bool ToGround;
74
    QString QMKS_Login;
75
    QString QMKS_Password;
272 KeyOz 76
    QString QMKS_Host;
77
    QString QMKS_Port;
227 KeyOz 78
};
79
 
80
 
81
struct set_Analog
82
{
83
    QString   Version;
84
    QString   Label[MaxAnalog];
85
    QBitArray PlotView;
86
    QBitArray LogView;
87
};
88
 
89
class cSettings
90
{
91
public:
92
    cSettings();
93
    ~cSettings();
94
 
95
    int Settings_ID;
96
 
97
    set_GUI GUI;
98
    set_DIR DIR;
99
    set_TTY TTY;
100
    set_Analog Analog1;
101
    set_Data Data;
102
    set_Server Server;
306 KeyOz 103
    set_Map Map;
227 KeyOz 104
 
105
    void read_Settings();
106
    void read_SettingsID();
107
    void write_Settings();
108
    void write_Settings_Analog(int ID = 0);
109
    void read_Settings_Analog(int ID = 0);
110
    void write_Settings_AnalogLabels(int ID = 0);
111
    void read_Settings_AnalogLabels(int ID = 0);
112
};
113
 
114
#endif