def test_mainWindow(): from PyQt5.QtWidgets import QWidget, QLCDNumber assert F.mainWindow() != None assert F.MW != None F.statusMessage("Test") F.printObjects() assert len(F.findWidgetsOfClass(QWidget)) > 0 assert len(F.findWidgetsOfClass(QLCDNumber)) == 0
def test_mainWindow(): from PyQt5.QtWidgets import QWidget, QLCDNumber assert F.mainWindow() is not None assert F.MW is not None F.statusMessage("Test") F.printObjects() assert len(F.findWidgetsOfClass(QWidget)) > 0 assert len(F.findWidgetsOfClass(QLCDNumber)) == 0
def outlineColumnsChanged(self): chk = self.sender() val = True if chk.checkState() else False col = self.outlineColumnsData()[chk] if val and not col in settings.outlineViewColumns: settings.outlineViewColumns.append(col) elif not val and col in settings.outlineViewColumns: settings.outlineViewColumns.remove(col) # Update views for w in findWidgetsOfClass(outlineView): w.hideColumns()
def outlineColumnsChanged(self): chk = self.sender() val = True if chk.checkState() else False col = self.outlineColumnsData()[chk] if val and not col in settings.outlineViewColumns: settings.outlineViewColumns.append(col) elif not val and col in settings.outlineViewColumns: settings.outlineViewColumns.remove(col) # Update views for w in findWidgetsOfClass(outlineView): w.hideColumns()
def viewModeFictionVisibilitySwitch(self, val): """ Swtiches the visibility of some UI components useful for fiction only @param val: sets visibility to val """ # Menu navigation & boutton in toolbar self.toolbar.setDockVisibility(self.dckNavigation, val) # POV in metadatas from manuskript.ui.views.propertiesView import propertiesView for w in findWidgetsOfClass(propertiesView): w.lblPOV.setVisible(val) w.cmbPOV.setVisible(val) # POV in outline view if Outline.POV.value in settings.outlineViewColumns: settings.outlineViewColumns.remove(Outline.POV.value) from manuskript.ui.views.outlineView import outlineView for w in findWidgetsOfClass(outlineView): w.hideColumns()
def viewModeFictionVisibilitySwitch(self, val): """ Swtiches the visibility of some UI components useful for fiction only @param val: sets visibility to val """ # Menu navigation & boutton in toolbar self.toolbar.setDockVisibility(self.dckNavigation, val) # POV in metadatas from manuskript.ui.views.propertiesView import propertiesView for w in findWidgetsOfClass(propertiesView): w.lblPOV.setVisible(val) w.cmbPOV.setVisible(val) # POV in outline view if Outline.POV.value in settings.outlineViewColumns: settings.outlineViewColumns.remove(Outline.POV.value) from manuskript.ui.views.outlineView import outlineView for w in findWidgetsOfClass(outlineView): w.hideColumns()