Subversion Repositories Projects

Rev

Rev 481 | Go to most recent revision | Details | Compare with Previous | 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;
525 KeyOz 27
    int MaxPorts;
28
    int PortID;
29
    QString Ports[10];
227 KeyOz 30
};
31
 
32
struct set_GUI
33
{
34
    bool   isMax;
35
    QSize  Size;
36
    QPoint Point;
37
    QBitArray TabViews;
38
    QBitArray ToolViews;
39
    bool Term_Info;
40
    bool Term_Data;
41
    bool Term_Always;
42
    bool Term_Send;
43
};
44
 
306 KeyOz 45
struct set_Map
46
{
47
    bool GotoPosition;
48
    bool ShowTrack;
481 KeyOz 49
    double LastLatitude;
50
    double LastLongitude;
306 KeyOz 51
};
52
 
227 KeyOz 53
struct set_Data
54
{
55
    int Plotter_Count;
56
    int Debug_Fast;
57
    int Debug_Slow;
58
    int Debug_Off;
59
    int Navi_Fast;
60
    int Navi_Slow;
61
    int Navi_Off;
62
};
63
 
64
struct set_DIR
65
{
66
    QString Logging;
67
    QString Parameter;
306 KeyOz 68
    QString Cache;
69
    QString AVRDUDE;
227 KeyOz 70
};
71
 
72
struct set_Server
73
{
74
    QString Port;
75
    bool StartServer;
76
    bool ToGround;
77
    QString QMKS_Login;
78
    QString QMKS_Password;
272 KeyOz 79
    QString QMKS_Host;
80
    QString QMKS_Port;
227 KeyOz 81
};
82
 
83
 
84
struct set_Analog
85
{
86
    QString   Version;
87
    QString   Label[MaxAnalog];
88
    QBitArray PlotView;
89
    QBitArray LogView;
90
};
91
 
92
class cSettings
93
{
94
public:
95
    cSettings();
96
    ~cSettings();
97
 
98
    int Settings_ID;
99
 
100
    set_GUI GUI;
101
    set_DIR DIR;
102
    set_TTY TTY;
103
    set_Analog Analog1;
104
    set_Data Data;
105
    set_Server Server;
306 KeyOz 106
    set_Map Map;
227 KeyOz 107
 
108
    void read_Settings();
109
    void read_SettingsID();
110
    void write_Settings();
111
    void write_Settings_Analog(int ID = 0);
112
    void read_Settings_Analog(int ID = 0);
113
    void write_Settings_AnalogLabels(int ID = 0);
114
    void read_Settings_AnalogLabels(int ID = 0);
115
};
116
 
117
#endif