(self)
| 279 | return displayData |
| 280 | |
| 281 | def LoadMainFrameAttribs(self): |
| 282 | mainFrameDefaultAttribs = { |
| 283 | "wnd_display": 0, "wnd_x": 0, "wnd_y": 0, "wnd_width": 1000, "wnd_height": 700, "wnd_maximized": False, |
| 284 | "browser_width": 300, "market_height": 0, "fitting_height": -200 |
| 285 | } |
| 286 | self.mainFrameAttribs = SettingsProvider.getInstance().getSettings( |
| 287 | "pyfaMainWindowAttribs", mainFrameDefaultAttribs) |
| 288 | |
| 289 | wndDisplay = self.mainFrameAttribs["wnd_display"] |
| 290 | displayData = self._getDisplayData() |
| 291 | try: |
| 292 | selectedDisplayData = displayData[wndDisplay] |
| 293 | except IndexError: |
| 294 | selectedDisplayData = displayData[0] |
| 295 | dspX, dspY, dspW, dspH = selectedDisplayData |
| 296 | |
| 297 | if self.mainFrameAttribs["wnd_maximized"]: |
| 298 | wndW = mainFrameDefaultAttribs["wnd_width"] |
| 299 | wndH = mainFrameDefaultAttribs["wnd_height"] |
| 300 | wndX = min(mainFrameDefaultAttribs["wnd_x"], dspW * 0.75) |
| 301 | wndY = min(mainFrameDefaultAttribs["wnd_y"], dspH * 0.75) |
| 302 | self.Maximize() |
| 303 | else: |
| 304 | wndW = self.mainFrameAttribs["wnd_width"] |
| 305 | wndH = self.mainFrameAttribs["wnd_height"] |
| 306 | wndX = min(self.mainFrameAttribs["wnd_x"], dspW * 0.75) |
| 307 | wndY = min(self.mainFrameAttribs["wnd_y"], dspH * 0.75) |
| 308 | |
| 309 | self.SetPosition((dspX + wndX, dspY + wndY)) |
| 310 | self.SetSize((wndW, wndH)) |
| 311 | self.SetMinSize((mainFrameDefaultAttribs["wnd_width"], mainFrameDefaultAttribs["wnd_height"])) |
| 312 | |
| 313 | self.browserWidth = self.mainFrameAttribs["browser_width"] |
| 314 | self.marketHeight = self.mainFrameAttribs["market_height"] |
| 315 | self.fittingHeight = self.mainFrameAttribs["fitting_height"] |
| 316 | |
| 317 | def UpdateMainFrameAttribs(self): |
| 318 | if self.IsIconized(): |
no test coverage detected