70 self.__smallScreen = ( |
70 self.__smallScreen = ( |
71 primaryScreenSize.width() < 1920 or primaryScreenSize.height() < 1080 |
71 primaryScreenSize.width() < 1920 or primaryScreenSize.height() < 1080 |
72 ) |
72 ) |
73 |
73 |
74 self.__hasNonStandardPalette = False |
74 self.__hasNonStandardPalette = False |
|
75 |
|
76 self.__mainWindow = None |
75 |
77 |
76 def usesSmallScreen(self): |
78 def usesSmallScreen(self): |
77 """ |
79 """ |
78 Public method to determine, if the application is used on a small |
80 Public method to determine, if the application is used on a small |
79 screen. |
81 screen. |
289 return ( |
291 return ( |
290 palette.color(QPalette.ColorRole.WindowText).lightness() |
292 palette.color(QPalette.ColorRole.WindowText).lightness() |
291 > palette.color(QPalette.ColorRole.Window).lightness() |
293 > palette.color(QPalette.ColorRole.Window).lightness() |
292 ) |
294 ) |
293 |
295 |
|
296 def setMainWindow(self, mainWindow): |
|
297 """ |
|
298 Public method to set the reference to the application main window. |
|
299 |
|
300 @param mainWindow reference to the application main window |
|
301 @type QWidget |
|
302 """ |
|
303 self.__mainWindow = mainWindow |
|
304 |
|
305 def getMainWindow(self): |
|
306 """ |
|
307 Public method to get a reference to the application main window. |
|
308 |
|
309 @return reference to the application main window |
|
310 @rtype QWidget |
|
311 """ |
|
312 return self.__mainWindow |
|
313 |
294 |
314 |
295 ericApp = QCoreApplication.instance |
315 ericApp = QCoreApplication.instance |