-
-
Notifications
You must be signed in to change notification settings - Fork 132
Expand file tree
/
Copy pathdialog_state.py
More file actions
120 lines (111 loc) · 3.13 KB
/
dialog_state.py
File metadata and controls
120 lines (111 loc) · 3.13 KB
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
"""
dialog_state.py
Class holding global constants, strings and dictionaries
used to maintain the state of the various pop-up dialogs.
CLASS = name of dialog class
DLG = instance of dialog frame
RESIZE = whether dialog is resizeable (defaults to False)
Created on 16 Aug 2023
:author: semuadmin (Steve Smith)
:copyright: 2020 semuadmin
:license: BSD 3-Clause
"""
from pygpsclient.about_dialog import AboutDialog
from pygpsclient.globals import CLASS, RESIZE
from pygpsclient.gpx_dialog import GPXViewerDialog
from pygpsclient.importmap_dialog import ImportMapDialog
from pygpsclient.nmea_config_dialog import NMEAConfigDialog
from pygpsclient.ntrip_client_dialog import NTRIPConfigDialog
from pygpsclient.recorder_dialog import RecorderDialog
from pygpsclient.rinex_dialog import RINEXDialog
from pygpsclient.serverconfig_dialog import ServerConfigDialog
from pygpsclient.settings_dialog import SettingsDialog
from pygpsclient.spartn_dialog import SPARTNConfigDialog
from pygpsclient.strings import (
DLG,
DLGTABOUT,
DLGTGPX,
DLGTIMPORTMAP,
DLGTNMEA,
DLGTNTRIP,
DLGTRECORD,
DLGTRINEX,
DLGTSERVER,
DLGTSETTINGS,
DLGTSPARTN,
DLGTTTY,
DLGTUBX,
)
from pygpsclient.tty_preset_dialog import TTYPresetDialog
from pygpsclient.ubx_config_dialog import UBXConfigDialog
class DialogState:
"""
Class holding current state of PyGPSClient dialogs.
"""
def __init__(self):
"""
Constructor.
"""
self.state = {
DLGTABOUT: {
CLASS: AboutDialog,
DLG: None,
RESIZE: False,
},
DLGTUBX: {
CLASS: UBXConfigDialog,
DLG: None,
RESIZE: False,
},
DLGTNMEA: {
CLASS: NMEAConfigDialog,
DLG: None,
RESIZE: False,
},
DLGTNTRIP: {
CLASS: NTRIPConfigDialog,
DLG: None,
RESIZE: False,
},
DLGTSERVER: {
CLASS: ServerConfigDialog,
DLG: None,
RESIZE: True,
},
DLGTSPARTN: {
CLASS: SPARTNConfigDialog,
DLG: None,
RESIZE: False,
},
DLGTGPX: {
CLASS: GPXViewerDialog,
DLG: None,
RESIZE: True,
},
DLGTIMPORTMAP: {
CLASS: ImportMapDialog,
DLG: None,
RESIZE: True,
},
DLGTTTY: {
CLASS: TTYPresetDialog,
DLG: None,
RESIZE: True,
},
DLGTRECORD: {
CLASS: RecorderDialog,
DLG: None,
RESIZE: False,
},
DLGTRINEX: {
CLASS: RINEXDialog,
DLG: None,
RESIZE: False,
},
DLGTSETTINGS: {
CLASS: SettingsDialog,
DLG: None,
RESIZE: False,
},
# add any new dialogs here
}