def findSpreadsheetWindow(self, show=True): """ findSpreadsheetWindow() -> QWidget Looking for the spreadsheet window """ wList = QtGui.QApplication.topLevelWidgets() for w in wList: if isinstance(w, SpreadsheetWindow): return w global spreadsheetWindow spreadsheetWindow = SpreadsheetWindow() if show: spreadsheetWindow.configShow() return spreadsheetWindow
def findSpreadsheetWindow(self, show=True): """ findSpreadsheetWindow() -> QWidget Looking for the spreadsheet window """ from gui.uvcdat.mainwindow import UVCDATMainWindow wList = QtGui.QApplication.topLevelWidgets() for w in wList: if type(w)==SpreadsheetWindow: return w elif type(w)==UVCDATMainWindow: if hasattr(w,'spreadsheetWindow'): return w.spreadsheetWindow global spreadsheetWindow spreadsheetWindow = SpreadsheetWindow() if show: spreadsheetWindow.configShow() return spreadsheetWindow
def findSpreadsheetWindow(self, show=True): """ findSpreadsheetWindow() -> QWidget Looking for the spreadsheet window """ from gui.uvcdat.mainwindow import UVCDATMainWindow wList = QtGui.QApplication.topLevelWidgets() for w in wList: if type(w) == SpreadsheetWindow: return w elif type(w) == UVCDATMainWindow: if hasattr(w, 'spreadsheetWindow'): return w.spreadsheetWindow global spreadsheetWindow spreadsheetWindow = SpreadsheetWindow() if show: spreadsheetWindow.configShow() return spreadsheetWindow