00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 import wx
00019 import wx.lib.intctrl
00020 from objects.logic.process.extXportTableDict import extXportTableDict
00021 import sys
00022
00023 def create(parent):
00024 return displaySettings(parent)
00025
00026 [wxID_DISPLAYSETTINGS, wxID_DISPLAYSETTINGSAPPPANEL,
00027 wxID_DISPLAYSETTINGSBUTTONAPPLY, wxID_DISPLAYSETTINGSBUTTONCANCEL,
00028 wxID_DISPLAYSETTINGSBUTTONDEFAULTCOLOR,
00029 wxID_DISPLAYSETTINGSBUTTONREFRESHLIST, wxID_DISPLAYSETTINGSBUTTONSETCOLOR,
00030 wxID_DISPLAYSETTINGSBUTTONUSEDEFAULT,
00031 wxID_DISPLAYSETTINGSCHECKBOXDRAWCOUNTRIES,
00032 wxID_DISPLAYSETTINGSCHECKBOXDRAWRIVERS, wxID_DISPLAYSETTINGSCHECKBOXMAXIDLE,
00033 wxID_DISPLAYSETTINGSCHECKBOXMINXFER, wxID_DISPLAYSETTINGSCOMBOBOXLABEL,
00034 wxID_DISPLAYSETTINGSCOMBOBOXLABELZOOM, wxID_DISPLAYSETTINGSCOMBOBOXLINEZOOM,
00035 wxID_DISPLAYSETTINGSCOMBOBOXMAXIDLESCALE,
00036 wxID_DISPLAYSETTINGSCOMBOBOXMINXFERSCALE, wxID_DISPLAYSETTINGSGLOBPANEL,
00037 wxID_DISPLAYSETTINGSINTCTRLMAXIDLE, wxID_DISPLAYSETTINGSINTCTRLMINXFER,
00038 wxID_DISPLAYSETTINGSLISTCTRLPROCESSLIST, wxID_DISPLAYSETTINGSPANELMAPPARAMS,
00039 wxID_DISPLAYSETTINGSRADIOBTNLABELALWAYS,
00040 wxID_DISPLAYSETTINGSRADIOBTNLABELNEVER,
00041 wxID_DISPLAYSETTINGSRADIOBTNLABELONLY,
00042 wxID_DISPLAYSETTINGSRADIOBTNLINEALWAYS,
00043 wxID_DISPLAYSETTINGSRADIOBTNLINENEVER, wxID_DISPLAYSETTINGSRADIOBTNLINEONLY,
00044 wxID_DISPLAYSETTINGSRADIOBUTTONHIGHDETAIL,
00045 wxID_DISPLAYSETTINGSRADIOBUTTONLOWDETAIL,
00046 wxID_DISPLAYSETTINGSRADIOBUTTONREFRESHHIGH,
00047 wxID_DISPLAYSETTINGSRADIOBUTTONREFRESHLOW,
00048 wxID_DISPLAYSETTINGSRADIOBUTTONREFRESHMED,
00049 wxID_DISPLAYSETTINGSRADIOSIZESCALEGB, wxID_DISPLAYSETTINGSRADIOSIZESCALEKB,
00050 wxID_DISPLAYSETTINGSRADIOSIZESCALEMB, wxID_DISPLAYSETTINGSSETTINGSNOTEBOOK,
00051 wxID_DISPLAYSETTINGSSTATICBITMAPDEFAULTCOLOR,
00052 wxID_DISPLAYSETTINGSSTATICBITMAPPROCESSCOLOR,
00053 wxID_DISPLAYSETTINGSSTATICBOXDISPLAYSCALE,
00054 wxID_DISPLAYSETTINGSSTATICBOXLINESLABELS,
00055 wxID_DISPLAYSETTINGSSTATICBOXMAPDETAILS,
00056 wxID_DISPLAYSETTINGSSTATICBOXMAPELEMENTS,
00057 wxID_DISPLAYSETTINGSSTATICBOXNETWORKEDPROCESSES,
00058 wxID_DISPLAYSETTINGSSTATICBOXNETWORKPEERS,
00059 wxID_DISPLAYSETTINGSSTATICBOXREFRESHRATE,
00060 wxID_DISPLAYSETTINGSSTATICTEXTDISPLAYLABEL, wxID_DISPLAYSETTINGSTEXTFADEAWAY,
00061 wxID_DISPLAYSETTINGSTEXTLINMARKSCALE, wxID_DISPLAYSETTINGSTEXTMAPREFRESH,
00062 ] = [wx.NewId() for _init_ctrls in range(50)]
00063
00064
00065
00066
00067
00068
00069
00070 class displaySettings(wx.Dialog):
00071 def _init_coll_settingsNotebook_Pages(self, parent):
00072
00073
00074 parent.AddPage(imageId=-1, page=self.globPanel, select=True,
00075 text='Drawing Options')
00076 parent.AddPage(imageId=-1, page=self.appPanel, select=False,
00077 text='Process Info')
00078 parent.AddPage(imageId=-1, page=self.panelMapParams, select=False,
00079 text='Map Options')
00080
00081 def _init_coll_listCtrlProcessList_Columns(self, parent):
00082
00083
00084 parent.InsertColumn(col=0, format=wx.LIST_FORMAT_LEFT,
00085 heading='Process Name', width=165)
00086 parent.InsertColumn(col=1, format=wx.LIST_FORMAT_LEFT,
00087 heading='Running', width=54)
00088
00089 def _init_ctrls(self, prnt):
00090
00091 wx.Dialog.__init__(self, id=wxID_DISPLAYSETTINGS,
00092 name='displaySettings', parent=prnt, pos=wx.Point(425, 297),
00093 size=wx.Size(655, 553), style=wx.DEFAULT_DIALOG_STYLE,
00094 title='Display Settings')
00095 self.SetClientSize(wx.Size(639, 517))
00096
00097 self.buttonApply = wx.Button(id=wxID_DISPLAYSETTINGSBUTTONAPPLY,
00098 label='Apply', name='buttonApply', parent=self, pos=wx.Point(552,
00099 488), size=wx.Size(75, 23), style=0)
00100 self.buttonApply.Bind(wx.EVT_BUTTON, self.OnButtonApplyButton,
00101 id=wxID_DISPLAYSETTINGSBUTTONAPPLY)
00102
00103 self.buttonCancel = wx.Button(id=wxID_DISPLAYSETTINGSBUTTONCANCEL,
00104 label='Cancel', name='buttonCancel', parent=self,
00105 pos=wx.Point(464, 488), size=wx.Size(75, 23), style=0)
00106 self.buttonCancel.Bind(wx.EVT_BUTTON, self.OnButtonCancelButton,
00107 id=wxID_DISPLAYSETTINGSBUTTONCANCEL)
00108
00109 self.settingsNotebook = wx.Notebook(id=wxID_DISPLAYSETTINGSSETTINGSNOTEBOOK,
00110 name='settingsNotebook', parent=self, pos=wx.Point(0, 8),
00111 size=wx.Size(640, 472), style=0)
00112 self.settingsNotebook.SetToolTipString('')
00113
00114 self.globPanel = wx.Panel(id=wxID_DISPLAYSETTINGSGLOBPANEL,
00115 name='globPanel', parent=self.settingsNotebook, pos=wx.Point(0,
00116 0), size=wx.Size(632, 446), style=wx.TAB_TRAVERSAL)
00117 self.globPanel.SetAutoLayout(False)
00118 self.globPanel.SetToolTipString('')
00119
00120 self.appPanel = wx.Panel(id=wxID_DISPLAYSETTINGSAPPPANEL,
00121 name='appPanel', parent=self.settingsNotebook, pos=wx.Point(0, 0),
00122 size=wx.Size(632, 446), style=wx.TAB_TRAVERSAL)
00123
00124 self.checkboxMinXfer = wx.CheckBox(id=wxID_DISPLAYSETTINGSCHECKBOXMINXFER,
00125 label='Hide Peer unless data transfer exceeds:',
00126 name='checkboxMinXfer', parent=self.globPanel, pos=wx.Point(16,
00127 48), size=wx.Size(216, 13), style=0)
00128 self.checkboxMinXfer.SetValue(True)
00129 self.checkboxMinXfer.SetToolTipString('')
00130
00131 self.checkboxMaxIdle = wx.CheckBox(id=wxID_DISPLAYSETTINGSCHECKBOXMAXIDLE,
00132 label='Hide Peer when Idle time exceeds this value',
00133 name='checkboxMaxIdle', parent=self.globPanel, pos=wx.Point(304,
00134 85), size=wx.Size(240, 13), style=0)
00135 self.checkboxMaxIdle.SetValue(False)
00136 self.checkboxMaxIdle.SetToolTipString('')
00137
00138 self.radioBtnLineNever = wx.RadioButton(id=wxID_DISPLAYSETTINGSRADIOBTNLINENEVER,
00139 label='Never show lines', name='radioBtnLineNever',
00140 parent=self.globPanel, pos=wx.Point(16, 200), size=wx.Size(104,
00141 13), style=wx.RB_GROUP)
00142 self.radioBtnLineNever.SetValue(True)
00143 self.radioBtnLineNever.SetToolTipString('')
00144 self.radioBtnLineNever.Bind(wx.EVT_RADIOBUTTON,
00145 self._onRadioButtonLineDisable,
00146 id=wxID_DISPLAYSETTINGSRADIOBTNLINENEVER)
00147
00148 self.radioBtnLineAlways = wx.RadioButton(id=wxID_DISPLAYSETTINGSRADIOBTNLINEALWAYS,
00149 label='Always show lines', name='radioBtnLineAlways',
00150 parent=self.globPanel, pos=wx.Point(16, 224), size=wx.Size(112,
00151 13), style=0)
00152 self.radioBtnLineAlways.SetValue(True)
00153 self.radioBtnLineAlways.SetToolTipString('')
00154 self.radioBtnLineAlways.Bind(wx.EVT_RADIOBUTTON,
00155 self._onRadioButtonLineDisable,
00156 id=wxID_DISPLAYSETTINGSRADIOBTNLINEALWAYS)
00157
00158 self.radioBtnLineOnly = wx.RadioButton(id=wxID_DISPLAYSETTINGSRADIOBTNLINEONLY,
00159 label='Only show lines when zoomed to', name='radioBtnLineOnly',
00160 parent=self.globPanel, pos=wx.Point(16, 248), size=wx.Size(176,
00161 13), style=0)
00162 self.radioBtnLineOnly.SetValue(True)
00163 self.radioBtnLineOnly.SetToolTipString('')
00164 self.radioBtnLineOnly.Bind(wx.EVT_RADIOBUTTON,
00165 self._onRadioButtonLineEnable,
00166 id=wxID_DISPLAYSETTINGSRADIOBTNLINEONLY)
00167
00168 self.comboBoxLabelZoom = wx.ComboBox(choices=['Continent',
00169 'Country/State', 'City'],
00170 id=wxID_DISPLAYSETTINGSCOMBOBOXLABELZOOM,
00171 name='comboBoxLabelZoom', parent=self.globPanel, pos=wx.Point(512,
00172 246), size=wx.Size(100, 21), style=0, value='Continent')
00173 self.comboBoxLabelZoom.SetLabel('Continent')
00174 self.comboBoxLabelZoom.SetSelection(0)
00175 self.comboBoxLabelZoom.SetToolTipString('')
00176
00177 self.radioBtnLabelNever = wx.RadioButton(id=wxID_DISPLAYSETTINGSRADIOBTNLABELNEVER,
00178 label='Never show labels', name='radioBtnLabelNever',
00179 parent=self.globPanel, pos=wx.Point(320, 200), size=wx.Size(112,
00180 13), style=wx.RB_GROUP)
00181 self.radioBtnLabelNever.SetValue(True)
00182 self.radioBtnLabelNever.SetToolTipString('')
00183 self.radioBtnLabelNever.Bind(wx.EVT_RADIOBUTTON,
00184 self._onRadioButtonLabelDisable,
00185 id=wxID_DISPLAYSETTINGSRADIOBTNLABELNEVER)
00186
00187 self.radioBtnLabelAlways = wx.RadioButton(id=wxID_DISPLAYSETTINGSRADIOBTNLABELALWAYS,
00188 label='Always show label', name='radioBtnLabelAlways',
00189 parent=self.globPanel, pos=wx.Point(320, 224), size=wx.Size(112,
00190 13), style=0)
00191 self.radioBtnLabelAlways.SetValue(True)
00192 self.radioBtnLabelAlways.SetToolTipString('')
00193 self.radioBtnLabelAlways.Bind(wx.EVT_RADIOBUTTON,
00194 self._onRadioButtonLabelDisable,
00195 id=wxID_DISPLAYSETTINGSRADIOBTNLABELALWAYS)
00196
00197 self.radioBtnLabelOnly = wx.RadioButton(id=wxID_DISPLAYSETTINGSRADIOBTNLABELONLY,
00198 label='Only show labels when zoomed to', name='radioBtnLabelOnly',
00199 parent=self.globPanel, pos=wx.Point(320, 248), size=wx.Size(184,
00200 13), style=0)
00201 self.radioBtnLabelOnly.SetValue(True)
00202 self.radioBtnLabelOnly.SetToolTipString('')
00203 self.radioBtnLabelOnly.Bind(wx.EVT_RADIOBUTTON,
00204 self._onRadioButtonLabelEnable,
00205 id=wxID_DISPLAYSETTINGSRADIOBTNLABELONLY)
00206
00207 self.comboBoxLineZoom = wx.ComboBox(choices=['Continent',
00208 'Country/State', 'City'], id=wxID_DISPLAYSETTINGSCOMBOBOXLINEZOOM,
00209 name='comboBoxLineZoom', parent=self.globPanel, pos=wx.Point(200,
00210 246), size=wx.Size(100, 21), style=0, value='Continent')
00211 self.comboBoxLineZoom.SetLabel('Continent')
00212 self.comboBoxLineZoom.SetSelection(0)
00213 self.comboBoxLineZoom.SetToolTipString('')
00214
00215 self.textLinMarkScale = wx.StaticText(id=wxID_DISPLAYSETTINGSTEXTLINMARKSCALE,
00216 label='Line width and marker size are scaled to:',
00217 name='textLinMarkScale', parent=self.globPanel, pos=wx.Point(16,
00218 328), size=wx.Size(195, 13), style=0)
00219 self.textLinMarkScale.SetToolTipString('')
00220
00221 self.radioSizeScaleKB = wx.RadioButton(id=wxID_DISPLAYSETTINGSRADIOSIZESCALEKB,
00222 label='KiloBytes', name='radioSizeScaleKB', parent=self.globPanel,
00223 pos=wx.Point(216, 328), size=wx.Size(72, 13), style=wx.RB_GROUP)
00224 self.radioSizeScaleKB.SetValue(True)
00225 self.radioSizeScaleKB.SetToolTipString('')
00226 self.radioSizeScaleKB.Bind(wx.EVT_RADIOBUTTON,
00227 self.OnRadioSizeScaleKBRadiobutton,
00228 id=wxID_DISPLAYSETTINGSRADIOSIZESCALEKB)
00229
00230 self.radioSizeScaleMB = wx.RadioButton(id=wxID_DISPLAYSETTINGSRADIOSIZESCALEMB,
00231 label='MegaBytes', name='radioSizeScaleMB', parent=self.globPanel,
00232 pos=wx.Point(296, 328), size=wx.Size(81, 13), style=0)
00233 self.radioSizeScaleMB.SetValue(True)
00234 self.radioSizeScaleMB.SetToolTipString('')
00235 self.radioSizeScaleMB.Bind(wx.EVT_RADIOBUTTON,
00236 self.OnRadioSizeScaleMBRadiobutton,
00237 id=wxID_DISPLAYSETTINGSRADIOSIZESCALEMB)
00238
00239 self.radioSizeScaleGB = wx.RadioButton(id=wxID_DISPLAYSETTINGSRADIOSIZESCALEGB,
00240 label='GigaBytes', name='radioSizeScaleGB', parent=self.globPanel,
00241 pos=wx.Point(376, 328), size=wx.Size(72, 13), style=0)
00242 self.radioSizeScaleGB.SetValue(True)
00243 self.radioSizeScaleGB.SetToolTipString('')
00244 self.radioSizeScaleGB.Bind(wx.EVT_RADIOBUTTON,
00245 self.OnRadioSizeScaleGBRadiobutton,
00246 id=wxID_DISPLAYSETTINGSRADIOSIZESCALEGB)
00247
00248 self.textMapRefresh = wx.StaticText(id=wxID_DISPLAYSETTINGSTEXTMAPREFRESH,
00249 label='Refresh Map every:', name='textMapRefresh',
00250 parent=self.globPanel, pos=wx.Point(16, 408), size=wx.Size(96,
00251 13), style=0)
00252 self.textMapRefresh.SetToolTipString('')
00253
00254 self.radioButtonRefreshHigh = wx.RadioButton(id=wxID_DISPLAYSETTINGSRADIOBUTTONREFRESHHIGH,
00255 label='3 Seconds', name='radioButtonRefreshHigh',
00256 parent=self.globPanel, pos=wx.Point(120, 408), size=wx.Size(72,
00257 13), style=wx.RB_GROUP)
00258 self.radioButtonRefreshHigh.SetValue(True)
00259 self.radioButtonRefreshHigh.SetToolTipString('')
00260 self.radioButtonRefreshHigh.Bind(wx.EVT_RADIOBUTTON,
00261 self.OnRadioButtonRefreshHighRadiobutton,
00262 id=wxID_DISPLAYSETTINGSRADIOBUTTONREFRESHHIGH)
00263
00264 self.radioButtonRefreshMed = wx.RadioButton(id=wxID_DISPLAYSETTINGSRADIOBUTTONREFRESHMED,
00265 label='10 Seconds', name='radioButtonRefreshMed',
00266 parent=self.globPanel, pos=wx.Point(200, 408), size=wx.Size(81,
00267 13), style=0)
00268 self.radioButtonRefreshMed.SetValue(True)
00269 self.radioButtonRefreshMed.SetToolTipString('')
00270 self.radioButtonRefreshMed.Bind(wx.EVT_RADIOBUTTON,
00271 self.OnRadioButtonRefreshMedRadiobutton,
00272 id=wxID_DISPLAYSETTINGSRADIOBUTTONREFRESHMED)
00273
00274 self.radioButtonRefreshLow = wx.RadioButton(id=wxID_DISPLAYSETTINGSRADIOBUTTONREFRESHLOW,
00275 label='Minute', name='radioButtonRefreshLow',
00276 parent=self.globPanel, pos=wx.Point(288, 408), size=wx.Size(64,
00277 13), style=0)
00278 self.radioButtonRefreshLow.SetValue(True)
00279 self.radioButtonRefreshLow.SetToolTipString('')
00280 self.radioButtonRefreshLow.Bind(wx.EVT_RADIOBUTTON,
00281 self.OnRadioButtonRefreshLowRadiobutton,
00282 id=wxID_DISPLAYSETTINGSRADIOBUTTONREFRESHLOW)
00283
00284 self.staticBoxLinesLabels = wx.StaticBox(id=wxID_DISPLAYSETTINGSSTATICBOXLINESLABELS,
00285 label='Lines and Labels', name='staticBoxLinesLabels',
00286 parent=self.globPanel, pos=wx.Point(8, 168), size=wx.Size(616,
00287 120), style=0)
00288 self.staticBoxLinesLabels.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL,
00289 wx.BOLD, False, 'Tahoma'))
00290 self.staticBoxLinesLabels.SetToolTipString('')
00291
00292 self.staticBoxNetworkPeers = wx.StaticBox(id=wxID_DISPLAYSETTINGSSTATICBOXNETWORKPEERS,
00293 label='Network Peers', name='staticBoxNetworkPeers',
00294 parent=self.globPanel, pos=wx.Point(8, 16), size=wx.Size(616,
00295 144), style=0)
00296 self.staticBoxNetworkPeers.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL,
00297 wx.BOLD, False, 'Tahoma'))
00298 self.staticBoxNetworkPeers.SetToolTipString('')
00299
00300 self.staticBoxDisplayScale = wx.StaticBox(id=wxID_DISPLAYSETTINGSSTATICBOXDISPLAYSCALE,
00301 label='Display Scale', name='staticBoxDisplayScale',
00302 parent=self.globPanel, pos=wx.Point(8, 296), size=wx.Size(616,
00303 72), style=0)
00304 self.staticBoxDisplayScale.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL,
00305 wx.BOLD, False, 'Tahoma'))
00306 self.staticBoxDisplayScale.SetToolTipString('')
00307
00308 self.staticBoxRefreshRate = wx.StaticBox(id=wxID_DISPLAYSETTINGSSTATICBOXREFRESHRATE,
00309 label='Refresh Rate', name='staticBoxRefreshRate',
00310 parent=self.globPanel, pos=wx.Point(8, 376), size=wx.Size(616,
00311 64), style=0)
00312 self.staticBoxRefreshRate.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL,
00313 wx.BOLD, False, 'Tahoma'))
00314 self.staticBoxRefreshRate.SetToolTipString('')
00315
00316 self.comboBoxMinXferScale = wx.ComboBox(choices=['Kb', 'Mb', 'Gb'],
00317 id=wxID_DISPLAYSETTINGSCOMBOBOXMINXFERSCALE,
00318 name='comboBoxMinXferScale', parent=self.globPanel,
00319 pos=wx.Point(304, 45), size=wx.Size(50, 21), style=0,
00320 value='comboBox1')
00321 self.comboBoxMinXferScale.SetSelection(1)
00322 self.comboBoxMinXferScale.SetToolTipString('')
00323
00324 self.textFadeAway = wx.StaticText(id=wxID_DISPLAYSETTINGSTEXTFADEAWAY,
00325 label='Idle Peer fades away after:', name='textFadeAway',
00326 parent=self.globPanel, pos=wx.Point(16, 84), size=wx.Size(133,
00327 13), style=0)
00328 self.textFadeAway.SetToolTipString('')
00329
00330 self.comboBoxMaxIdleScale = wx.ComboBox(choices=['Seconds', 'Minutes',
00331 'Hours'], id=wxID_DISPLAYSETTINGSCOMBOBOXMAXIDLESCALE,
00332 name='comboBoxMaxIdleScale', parent=self.globPanel,
00333 pos=wx.Point(224, 82), size=wx.Size(70, 21), style=0,
00334 value='comboBox1')
00335 self.comboBoxMaxIdleScale.SetSelection(1)
00336
00337 self.buttonSetColor = wx.Button(id=wxID_DISPLAYSETTINGSBUTTONSETCOLOR,
00338 label='Change Peer Color', name='buttonSetColor',
00339 parent=self.appPanel, pos=wx.Point(288, 56), size=wx.Size(120,
00340 23), style=0)
00341 self.buttonSetColor.SetToolTipString('')
00342 self.buttonSetColor.Bind(wx.EVT_BUTTON, self.OnButtonSetColorButton,
00343 id=wxID_DISPLAYSETTINGSBUTTONSETCOLOR)
00344
00345 self.staticBitmapProcessColor = wx.StaticBitmap(bitmap=wx.NullBitmap,
00346 id=wxID_DISPLAYSETTINGSSTATICBITMAPPROCESSCOLOR,
00347 name='staticBitmapProcessColor', parent=self.appPanel,
00348 pos=wx.Point(432, 56), size=wx.Size(56, 56), style=0)
00349 self.staticBitmapProcessColor.SetToolTipString('')
00350
00351 self.buttonDefaultColor = wx.Button(id=wxID_DISPLAYSETTINGSBUTTONDEFAULTCOLOR,
00352 label='Default Peer Color', name='buttonDefaultColor',
00353 parent=self.appPanel, pos=wx.Point(288, 152), size=wx.Size(120,
00354 23), style=0)
00355 self.buttonDefaultColor.SetToolTipString('')
00356 self.buttonDefaultColor.Bind(wx.EVT_BUTTON,
00357 self.OnButtonDefaultColorButton,
00358 id=wxID_DISPLAYSETTINGSBUTTONDEFAULTCOLOR)
00359
00360 self.staticBitmapDefaultColor = wx.StaticBitmap(bitmap=wx.NullBitmap,
00361 id=wxID_DISPLAYSETTINGSSTATICBITMAPDEFAULTCOLOR,
00362 name='staticBitmapDefaultColor', parent=self.appPanel,
00363 pos=wx.Point(432, 136), size=wx.Size(56, 56), style=0)
00364 self.staticBitmapDefaultColor.SetToolTipString('')
00365
00366 self.buttonRefreshList = wx.Button(id=wxID_DISPLAYSETTINGSBUTTONREFRESHLIST,
00367 label='Refresh List', name='buttonRefreshList',
00368 parent=self.appPanel, pos=wx.Point(32, 360), size=wx.Size(224,
00369 23), style=0)
00370 self.buttonRefreshList.SetToolTipString('')
00371 self.buttonRefreshList.Bind(wx.EVT_BUTTON,
00372 self.OnButtonRefreshListButton,
00373 id=wxID_DISPLAYSETTINGSBUTTONREFRESHLIST)
00374
00375 self.staticBoxNetworkedProcesses = wx.StaticBox(id=wxID_DISPLAYSETTINGSSTATICBOXNETWORKEDPROCESSES,
00376 label='Network Process List', name='staticBoxNetworkedProcesses',
00377 parent=self.appPanel, pos=wx.Point(16, 16), size=wx.Size(256,
00378 384), style=0)
00379 self.staticBoxNetworkedProcesses.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL,
00380 wx.BOLD, False, 'Tahoma'))
00381
00382 self.listCtrlProcessList = wx.ListCtrl(id=wxID_DISPLAYSETTINGSLISTCTRLPROCESSLIST,
00383 name='listCtrlProcessList', parent=self.appPanel, pos=wx.Point(32,
00384 40), size=wx.Size(224, 308),
00385 style=wx.LC_REPORT | wx.LC_SINGLE_SEL)
00386 self.listCtrlProcessList.SetToolTipString('')
00387 self._init_coll_listCtrlProcessList_Columns(self.listCtrlProcessList)
00388 self.listCtrlProcessList.Bind(wx.EVT_LIST_ITEM_SELECTED,
00389 self.OnListCtrlProcessListListItemSelected,
00390 id=wxID_DISPLAYSETTINGSLISTCTRLPROCESSLIST)
00391 self.listCtrlProcessList.Bind(wx.EVT_LIST_ITEM_DESELECTED,
00392 self.OnListCtrlProcessListListItemDeselected,
00393 id=wxID_DISPLAYSETTINGSLISTCTRLPROCESSLIST)
00394
00395 self.buttonUseDefault = wx.Button(id=wxID_DISPLAYSETTINGSBUTTONUSEDEFAULT,
00396 label='Use Default Color', name='buttonUseDefault',
00397 parent=self.appPanel, pos=wx.Point(288, 88), size=wx.Size(120,
00398 23), style=0)
00399 self.buttonUseDefault.SetToolTipString('')
00400 self.buttonUseDefault.Bind(wx.EVT_BUTTON, self.OnButtonUseDefaultButton,
00401 id=wxID_DISPLAYSETTINGSBUTTONUSEDEFAULT)
00402
00403 self.intCtrlMinXfer = wx.lib.intctrl.IntCtrl(allow_long=False,
00404 allow_none=False, default_color=wx.BLACK,
00405 id=wxID_DISPLAYSETTINGSINTCTRLMINXFER, limited=False, max=None,
00406 min=1, name='intCtrlMinXfer', oob_color=wx.RED,
00407 parent=self.globPanel, pos=wx.Point(240, 45), size=wx.Size(40,
00408 21), style=0, value=0)
00409 self.intCtrlMinXfer.SetToolTipString('')
00410
00411 self.intCtrlMaxIdle = wx.lib.intctrl.IntCtrl(allow_long=False,
00412 allow_none=False, default_color=wx.BLACK,
00413 id=wxID_DISPLAYSETTINGSINTCTRLMAXIDLE, limited=False, max=None,
00414 min=1, name='intCtrlMaxIdle', oob_color=wx.RED,
00415 parent=self.globPanel, pos=wx.Point(160, 82), size=wx.Size(40,
00416 21), style=0, value=0)
00417 self.intCtrlMaxIdle.SetToolTipString('')
00418
00419 self.comboBoxLabel = wx.ComboBox(choices=['Process Name', 'IP Address',
00420 'Src. Port', 'Dest. Port', 'Conn. Since', 'Idle Time',
00421 'KB Transfer', 'City', 'ISP', 'Organization'],
00422 id=wxID_DISPLAYSETTINGSCOMBOBOXLABEL, name='comboBoxLabel',
00423 parent=self.globPanel, pos=wx.Point(16, 120), size=wx.Size(106,
00424 21), style=0, value='comboBox1')
00425 self.comboBoxLabel.SetSelection(0)
00426
00427 self.staticTextDisplayLabel = wx.StaticText(id=wxID_DISPLAYSETTINGSSTATICTEXTDISPLAYLABEL,
00428 label='Peer Display Label', name='staticTextDisplayLabel',
00429 parent=self.globPanel, pos=wx.Point(136, 123), size=wx.Size(87,
00430 13), style=0)
00431 self.staticTextDisplayLabel.SetToolTipString('')
00432
00433 self.panelMapParams = wx.Panel(id=wxID_DISPLAYSETTINGSPANELMAPPARAMS,
00434 name='panelMapParams', parent=self.settingsNotebook,
00435 pos=wx.Point(0, 0), size=wx.Size(632, 446),
00436 style=wx.TAB_TRAVERSAL)
00437
00438 self.radioButtonHighDetail = wx.RadioButton(id=wxID_DISPLAYSETTINGSRADIOBUTTONHIGHDETAIL,
00439 label='High', name='radioButtonHighDetail',
00440 parent=self.panelMapParams, pos=wx.Point(112, 64),
00441 size=wx.Size(48, 13), style=0)
00442 self.radioButtonHighDetail.SetValue(True)
00443 self.radioButtonHighDetail.Bind(wx.EVT_RADIOBUTTON,
00444 self.OnRadioButtonHighDetailRadiobutton,
00445 id=wxID_DISPLAYSETTINGSRADIOBUTTONHIGHDETAIL)
00446
00447 self.radioButtonLowDetail = wx.RadioButton(id=wxID_DISPLAYSETTINGSRADIOBUTTONLOWDETAIL,
00448 label='Low', name='radioButtonLowDetail',
00449 parent=self.panelMapParams, pos=wx.Point(48, 64), size=wx.Size(40,
00450 13), style=0)
00451 self.radioButtonLowDetail.SetValue(True)
00452 self.radioButtonLowDetail.Bind(wx.EVT_RADIOBUTTON,
00453 self.OnRadioButtonLowDetailRadiobutton,
00454 id=wxID_DISPLAYSETTINGSRADIOBUTTONLOWDETAIL)
00455
00456 self.checkBoxDrawCountries = wx.CheckBox(id=wxID_DISPLAYSETTINGSCHECKBOXDRAWCOUNTRIES,
00457 label='Draw Country and State Borders',
00458 name='checkBoxDrawCountries', parent=self.panelMapParams,
00459 pos=wx.Point(48, 160), size=wx.Size(184, 13), style=0)
00460 self.checkBoxDrawCountries.SetValue(True)
00461 self.checkBoxDrawCountries.Bind(wx.EVT_CHECKBOX,
00462 self.OnCheckBoxDrawCountriesCheckbox,
00463 id=wxID_DISPLAYSETTINGSCHECKBOXDRAWCOUNTRIES)
00464
00465 self.staticBoxMapDetails = wx.StaticBox(id=wxID_DISPLAYSETTINGSSTATICBOXMAPDETAILS,
00466 label='Map Detail', name='staticBoxMapDetails',
00467 parent=self.panelMapParams, pos=wx.Point(24, 32),
00468 size=wx.Size(160, 64), style=0)
00469 self.staticBoxMapDetails.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL,
00470 wx.BOLD, False, 'Tahoma'))
00471
00472 self.checkBoxDrawRivers = wx.CheckBox(id=wxID_DISPLAYSETTINGSCHECKBOXDRAWRIVERS,
00473 label='Draw Rivers', name='checkBoxDrawRivers',
00474 parent=self.panelMapParams, pos=wx.Point(48, 192),
00475 size=wx.Size(80, 13), style=0)
00476 self.checkBoxDrawRivers.SetValue(False)
00477 self.checkBoxDrawRivers.Bind(wx.EVT_CHECKBOX,
00478 self.OnCheckBoxDrawRiversCheckbox,
00479 id=wxID_DISPLAYSETTINGSCHECKBOXDRAWRIVERS)
00480
00481 self.staticBoxMapElements = wx.StaticBox(id=wxID_DISPLAYSETTINGSSTATICBOXMAPELEMENTS,
00482 label='Map Elements', name='staticBoxMapElements',
00483 parent=self.panelMapParams, pos=wx.Point(24, 128),
00484 size=wx.Size(224, 100), style=0)
00485 self.staticBoxMapElements.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL,
00486 wx.BOLD, False, 'Tahoma'))
00487
00488 self._init_coll_settingsNotebook_Pages(self.settingsNotebook)
00489
00490 def __init__(self, parent):
00491 self._init_ctrls(parent)
00492
00493 self.refreshRateStart = ""
00494
00495 self.transportTable = extXportTableDict()
00496
00497
00498
00499
00500
00501 def OnRadioXferMBRadiobutton(self, event):
00502 event.Skip()
00503
00504
00505
00506
00507 def OnRadioXferGBRadiobutton(self, event):
00508 event.Skip()
00509
00510
00511
00512
00513 def OnRadioXferKBRadiobutton(self, event):
00514 event.Skip()
00515
00516
00517
00518
00519 def _onRadioButtonLineDisable(self, event):
00520 self.comboBoxLineZoom.Disable()
00521
00522
00523
00524 def _onRadioButtonLineEnable(self, event):
00525 self.comboBoxLineZoom.Enable()
00526
00527
00528
00529
00530 def _onRadioButtonLabelDisable(self, event):
00531 self.comboBoxLabelZoom.Disable()
00532
00533
00534
00535
00536 def _onRadioButtonLabelEnable(self, event):
00537 self.comboBoxLabelZoom.Enable()
00538
00539
00540
00541
00542 def OnRadioSizeScaleKBRadiobutton(self, event):
00543 event.Skip()
00544
00545
00546
00547
00548 def OnRadioSizeScaleMBRadiobutton(self, event):
00549 event.Skip()
00550
00551
00552
00553
00554 def OnRadioSizeScaleGBRadiobutton(self, event):
00555 event.Skip()
00556
00557
00558
00559
00560 def OnRadioTimeScaleSecsRadiobutton(self, event):
00561 event.Skip()
00562
00563
00564
00565
00566 def OnRadioTimeScaleMinsRadiobutton(self, event):
00567 event.Skip()
00568
00569
00570
00571
00572 def OnRadioTimeScaleHoursRadiobutton(self, event):
00573 event.Skip()
00574
00575
00576
00577
00578 def OnRadioButtonRefreshHighRadiobutton(self, event):
00579 event.Skip()
00580
00581
00582
00583
00584 def OnRadioButtonRefreshMedRadiobutton(self, event):
00585 event.Skip()
00586
00587
00588
00589
00590 def OnRadioButtonRefreshLowRadiobutton(self, event):
00591 event.Skip()
00592
00593
00594
00595
00596 def OnButtonApplyButton(self, event):
00597
00598 if self.radioButtonRefreshLow.GetValue() == True:
00599 currRefresh = "Low"
00600 elif self.radioButtonRefreshMed.GetValue() == True:
00601 currRefresh = "Med"
00602 else:
00603 currRefresh = "Hi"
00604
00605
00606 if self.refreshRateStart != currRefresh:
00607 self.refreshRateConfigChanged = True
00608 else:
00609 self.refreshRateConfigChanged = False
00610
00611 if self.validateGlobalSettings() == False:
00612 return
00613
00614 return self.EndModal(wx.ID_OK)
00615
00616
00617
00618
00619 def OnButtonCancelButton(self, event):
00620 return self.EndModal(wx.ID_CANCEL)
00621
00622
00623
00624
00625 def validateGlobalSettings(self):
00626 min, max = self.intCtrlMinXfer.GetBounds()
00627 if min == None: min = 0
00628 if max == None: max = 1000000
00629
00630 if not (min <= self.intCtrlMinXfer.GetValue() <= max):
00631 dlg = wx.MessageDialog(None, "Min Transfer value is not within a reasonable range", 'Error', wx.ICON_ERROR)
00632 dlg.ShowModal()
00633 dlg.Destroy()
00634 return False
00635
00636 min, max = self.intCtrlMaxIdle.GetBounds()
00637 if min == None: min = 0
00638 if max == None: max = 1000000
00639 if not (min <= self.intCtrlMaxIdle.GetValue() <= max):
00640 dlg = wx.MessageDialog(None, "Maximum Idle Time value is not within a reasonable range", 'Error', wx.ICON_ERROR)
00641 dlg.ShowModal()
00642 dlg.Destroy()
00643 return False
00644
00645 return True
00646
00647
00648
00649
00650 def loadConfiguration(self, displayConfigurator):
00651
00652 self.dispConfigurator = displayConfigurator
00653
00654
00655
00656
00657 minXferOn, minXfer, xferScale = self.dispConfigurator.glb_getMinXferOptions()
00658 maxIdleOn, minIdle, idleScale = self.dispConfigurator.glb_getMaxIdleOptions()
00659
00660 self.checkboxMinXfer.SetValue(minXferOn)
00661 self.intCtrlMinXfer.SetValue(minXfer)
00662
00663
00664 if xferScale == 1000:
00665 self.comboBoxMinXferScale.SetSelection(0)
00666 elif xferScale == 1000000:
00667 self.comboBoxMinXferScale.SetSelection(1)
00668 else:
00669 self.comboBoxMinXferScale.SetSelection(2)
00670
00671
00672
00673 self.checkboxMaxIdle.SetValue(maxIdleOn)
00674 self.intCtrlMaxIdle.SetValue(minIdle)
00675
00676 if idleScale == 1:
00677 self.comboBoxMaxIdleScale.SetSelection(0)
00678 elif idleScale == 60:
00679 self.comboBoxMaxIdleScale.SetSelection(1)
00680 else:
00681 self.comboBoxMaxIdleScale.SetSelection(2)
00682
00683
00684
00685 lineOption, lineZoom = self.dispConfigurator.glb_getLineOptions()
00686
00687 if lineOption == "Always":
00688 self.radioBtnLineAlways.SetValue(True)
00689 self.comboBoxLineZoom.Disable()
00690 elif lineOption == "Never":
00691 self.radioBtnLineNever.SetValue(True)
00692 self.comboBoxLineZoom.Disable()
00693 else:
00694 self.radioBtnLineOnly.SetValue(True)
00695
00696 self.comboBoxLineZoom.SetStringSelection(lineZoom)
00697
00698
00699 labelOption, labelZoom = self.dispConfigurator.glb_getLabelOptions()
00700
00701
00702 if labelOption == "Always":
00703 self.radioBtnLabelAlways.SetValue(True)
00704 self.comboBoxLabelZoom.Disable()
00705 elif labelOption == "Never":
00706 self.radioBtnLabelNever.SetValue(True)
00707 self.comboBoxLabelZoom.Disable()
00708 else:
00709 self.radioBtnLabelOnly.SetValue(True)
00710
00711 self.comboBoxLabelZoom.SetStringSelection(labelZoom)
00712
00713
00714 dispXferScale = self.dispConfigurator.glb_getDisplayScale()
00715
00716
00717 if dispXferScale == 1000:
00718 self.radioSizeScaleKB.SetValue(True)
00719 elif dispXferScale == 1000000:
00720 self.radioSizeScaleMB.SetValue(True)
00721 else:
00722 self.radioSizeScaleGB.SetValue(True)
00723
00724
00725
00726 refreshRate = self.dispConfigurator.glb_getRefreshRate()
00727
00728 if refreshRate == "Low":
00729 self.radioButtonRefreshLow.SetValue(True)
00730 elif refreshRate == "Med":
00731 self.radioButtonRefreshMed.SetValue(True)
00732 else:
00733 self.radioButtonRefreshHigh.SetValue(True)
00734
00735
00736 self.refreshRateStart = refreshRate
00737
00738
00739 displayLabel = self.dispConfigurator.glb_getDisplayLabel()
00740
00741 if displayLabel == "_DEFAULT_":
00742 self.comboBoxLabel.SetSelection(0)
00743 else:
00744 self.comboBoxLabel.SetStringSelection(displayLabel)
00745
00746
00747 self.initApplicationsControls()
00748
00749
00750 self.initMapOptions()
00751
00752
00753
00754
00755
00756
00757
00758 def CreateBitmap(self, color, w, h):
00759 bmp = wx.EmptyBitmap(w, h)
00760 dc = wx.MemoryDC()
00761 dc.SelectObject(bmp)
00762 dc.SetBackground(wx.Brush(color))
00763 dc.Clear()
00764 dc.SelectObject(wx.NullBitmap)
00765 return bmp
00766
00767
00768
00769
00770 def getGlbPeerXferOptions(self):
00771 xferScale = None
00772
00773 if self.comboBoxMinXferScale.GetSelection() == 0:
00774 xferScale = 1000
00775 elif self.comboBoxMinXferScale.GetSelection() == 1:
00776 xferScale = 1000000
00777 else:
00778 xferScale = 1000000000
00779
00780
00781 return self.checkboxMinXfer.GetValue(), self.intCtrlMinXfer.GetValue(), xferScale
00782
00783
00784
00785
00786 def getGlbPeerIdleOptions(self):
00787 timeScale = None
00788
00789 if self.comboBoxMaxIdleScale.GetSelection() == 0:
00790 timeScale = 1
00791 elif self.comboBoxMaxIdleScale.GetSelection() == 1:
00792 timeScale = 60
00793 else:
00794 timeScale = 3600
00795
00796 return self.checkboxMaxIdle.GetValue(), self.intCtrlMaxIdle.GetValue(), timeScale
00797
00798
00799
00800
00801 def getGlbLineOptions(self):
00802 if self.radioBtnLineAlways.GetValue() == True:
00803 selectedButton = "Always"
00804 elif self.radioBtnLineNever.GetValue() == True:
00805 selectedButton = "Never"
00806 else:
00807 selectedButton = "Only"
00808
00809 return selectedButton, self.comboBoxLineZoom.GetValue()
00810
00811
00812
00813
00814 def getGlbLabelOptions(self):
00815 if self.radioBtnLabelAlways.GetValue() == True:
00816 selectedButton = "Always"
00817 elif self.radioBtnLabelNever.GetValue() == True:
00818 selectedButton = "Never"
00819 else:
00820 selectedButton = "Only"
00821
00822 return selectedButton, self.comboBoxLabelZoom.GetValue()
00823
00824
00825
00826
00827 def getGlbDisplayScale(self):
00828 dispXferScale = None
00829 dispTimeScale = None
00830
00831 if self.radioSizeScaleKB.GetValue() == True:
00832 dispXferScale = 1000
00833 elif self.radioSizeScaleMB.GetValue() == True:
00834 dispXferScale = 1000000
00835 else:
00836 dispXferScale = 1000000000
00837
00838 return dispXferScale
00839
00840
00841
00842
00843 def getGlbRefreshRate(self):
00844
00845 if self.radioButtonRefreshLow.GetValue() == True:
00846 selectedButton = "Low"
00847 elif self.radioButtonRefreshMed.GetValue() == True:
00848 selectedButton = "Med"
00849 else:
00850 selectedButton = "Hi"
00851
00852 return selectedButton
00853
00854
00855
00856 def getGlbDisplayLabel(self):
00857 return self.comboBoxLabel.GetValue()
00858
00859 """
00860 Process Info Tab related stuff
00861 """
00862
00863
00864
00865 def getAppDefaultColor(self):
00866 return self.processDefaultColor
00867
00868
00869
00870
00871 def getAppColorDict(self):
00872 return self.processColorDict
00873
00874
00875
00876 def initApplicationsControls(self):
00877 self.processColorDict = dict()
00878 self.processDefaultColor = self.dispConfigurator.app_getProcessDefaultColor()
00879
00880
00881 self.populateAppProcesList()
00882
00883 defColorBmp = self.CreateBitmap(self.processDefaultColor, 56, 56)
00884 self.staticBitmapDefaultColor.SetBitmap(defColorBmp)
00885
00886 ProcessColorBmp = self.CreateBitmap(self.processDefaultColor, 56, 56)
00887 self.staticBitmapProcessColor.SetBitmap(ProcessColorBmp)
00888
00889
00890
00891 def populateAppProcesList(self):
00892
00893 procListException = False
00894
00895
00896
00897 try:
00898 procDict = self.transportTable.getEnrichedProcessDict()
00899 except Exception, err:
00900 procListException = True
00901
00902
00903
00904
00905 configProcessList = self.dispConfigurator.app_getProcessColorCodes()
00906
00907 for proc, color in configProcessList:
00908 proc = proc.lower()
00909 self.processColorDict[proc] = color
00910 if not procDict.has_key(proc):
00911 procDict[proc] = "No"
00912
00913
00914 if procListException == True:
00915 self.disableAppControls()
00916 dlg = wx.MessageDialog(None, "There was an error retreiving the process list in the Application Tab", 'Error', wx.ICON_ERROR)
00917 dlg.ShowModal()
00918 dlg.Destroy()
00919
00920 self.disableAppControls()
00921
00922 elif len(procDict) == 0:
00923 self.listCtrlProcessList.InsertStringItem("No Processes Found", 0)
00924 self.listCtrlProcessList.Select(0)
00925 self.disableAppControls()
00926 else:
00927 keys = procDict.keys()
00928 keys.sort()
00929
00930 for key in keys:
00931 index = self.listCtrlProcessList.InsertStringItem(sys.maxint, key)
00932 self.listCtrlProcessList.SetStringItem(index, 1, procDict[key])
00933
00934 self.listCtrlProcessList.Select(0)
00935 self.enableAppControls()
00936
00937
00938
00939 def disableAppControls(self):
00940 self.buttonSetColor.Disable()
00941 self.buttonDefaultColor.Disable()
00942
00943
00944
00945 def enableAppControls(self):
00946 self.buttonSetColor.Enable()
00947 self.buttonDefaultColor.Enable()
00948
00949
00950
00951
00952 def OnButtonSetColorButton(self, event):
00953 if self.processSelected == False:
00954 dlg = wx.MessageDialog(None, "No process was selected", 'Error', wx.ICON_ERROR)
00955 dlg.ShowModal()
00956 dlg.Destroy()
00957 return
00958
00959 colorDialog = wx.ColourDialog(self)
00960
00961 if colorDialog.ShowModal() == wx.ID_OK:
00962 newColor = colorDialog.GetColourData().GetColour().GetAsString(wx.C2S_HTML_SYNTAX)
00963
00964 ProcessColorBmp = self.CreateBitmap(newColor, 56, 56)
00965 self.staticBitmapProcessColor.SetBitmap(ProcessColorBmp)
00966
00967 proc = self.selectedProcess.lower()
00968 self.processColorDict[proc] = newColor
00969
00970
00971
00972 colorDialog.Destroy()
00973
00974
00975
00976
00977
00978 def OnButtonDefaultColorButton(self, event):
00979 colorDialog = wx.ColourDialog(self)
00980
00981 if colorDialog.ShowModal() == wx.ID_OK:
00982 defaultColor = colorDialog.GetColourData().GetColour().GetAsString(wx.C2S_HTML_SYNTAX)
00983
00984 ProcessColorBmp = self.CreateBitmap(defaultColor, 56, 56)
00985 self.staticBitmapDefaultColor.SetBitmap(ProcessColorBmp)
00986
00987 self.processDefaultColor = defaultColor
00988
00989
00990
00991
00992 def OnButtonRefreshListButton(self, event):
00993 self.listCtrlProcessList.DeleteAllItems()
00994 self.populateAppProcesList()
00995
00996
00997
00998 def OnListCtrlProcessListListItemSelected(self, event):
00999 item = event.GetItem()
01000
01001 self.processSelected = True
01002 self.selectedProcess = item.GetText()
01003
01004
01005 if self.processColorDict.has_key(self.selectedProcess):
01006 ProcessColorBmp = self.CreateBitmap(self.processColorDict[self.selectedProcess], 56, 56)
01007 self.staticBitmapProcessColor.SetBitmap(ProcessColorBmp)
01008 else:
01009 ProcessColorBmp = self.CreateBitmap(self.processDefaultColor, 56, 56)
01010 self.staticBitmapProcessColor.SetBitmap(ProcessColorBmp)
01011
01012
01013
01014
01015 def OnListCtrlProcessListListItemDeselected(self, event):
01016 self.processSelected = False
01017
01018
01019
01020
01021 def OnButtonUseDefaultButton(self, event):
01022 if self.processSelected == False:
01023 dlg = wx.MessageDialog(None, "No process was selected", 'Error', wx.ICON_ERROR)
01024 dlg.ShowModal()
01025 dlg.Destroy()
01026 return
01027
01028 ProcessColorBmp = self.CreateBitmap(self.processDefaultColor, 56, 56)
01029 self.staticBitmapProcessColor.SetBitmap(ProcessColorBmp)
01030
01031 proc = self.selectedProcess.lower()
01032 self.processColorDict[proc] = self.processDefaultColor
01033
01034 """
01035 Map options related tab
01036 """
01037
01038
01039 def initMapOptions(self):
01040 self.mapOptionsChanged = False
01041 mapDetail = self.dispConfigurator.map_getMapDetail()
01042
01043 if mapDetail == True:
01044 self.radioButtonLowDetail.SetValue(False)
01045 self.radioButtonHighDetail.SetValue(True)
01046 else:
01047 self.radioButtonLowDetail.SetValue(True)
01048 self.radioButtonHighDetail.SetValue(False)
01049
01050 self.checkBoxDrawCountries.SetValue(self.dispConfigurator.map_getDrawCSBorders())
01051 self.checkBoxDrawRivers.SetValue(self.dispConfigurator.map_getDrawRivers())
01052
01053
01054
01055 def getMapDetailLevel(self):
01056 return self.radioButtonHighDetail.GetValue()
01057
01058
01059
01060
01061 def getMapDrawCSBorders(self):
01062 return self.checkBoxDrawCountries.GetValue()
01063
01064
01065
01066
01067 def getMapDrawRivers(self):
01068 return self.checkBoxDrawRivers.GetValue()
01069
01070
01071
01072
01073 def OnRadioButtonHighDetailRadiobutton(self, event):
01074 self.mapOptionsChanged = True
01075
01076
01077
01078
01079
01080 def OnRadioButtonLowDetailRadiobutton(self, event):
01081 self.mapOptionsChanged = True
01082
01083
01084
01085
01086 def OnCheckBoxDrawCountriesCheckbox(self, event):
01087 self.mapOptionsChanged = True
01088
01089
01090
01091
01092 def OnCheckBoxDrawRiversCheckbox(self, event):
01093 self.mapOptionsChanged = True
01094
01095
01096
01097
01098
01099
01100
01101
01102
01103
01104
01105