eric6/Preferences/ConfigurationPages/GraphicsPage.py

changeset 7529
2b8a0d8ba12a
parent 7360
9190402e4505
child 7780
41420f82c0ac
equal deleted inserted replaced
7528:0345f54d3959 7529:2b8a0d8ba12a
30 30
31 # set initial values 31 # set initial values
32 self.graphicsFont = Preferences.getGraphics("Font") 32 self.graphicsFont = Preferences.getGraphics("Font")
33 self.graphicsFontSample.setFont(self.graphicsFont) 33 self.graphicsFontSample.setFont(self.graphicsFont)
34 34
35 drawingMode = Preferences.getGraphics("DrawingMode")
36 if drawingMode == "black_white":
37 self.blackWhiteButton.setChecked(True)
38 elif drawingMode == "white_black":
39 self.whiteBlackButton.setChecked(True)
40 else:
41 self.automaticButton.setChecked(True)
42
35 def save(self): 43 def save(self):
36 """ 44 """
37 Public slot to save the Printer configuration. 45 Public slot to save the Printer configuration.
38 """ 46 """
39 Preferences.setGraphics("Font", self.graphicsFont) 47 Preferences.setGraphics("Font", self.graphicsFont)
40 48
49 if self.blackWhiteButton.isChecked():
50 drawingMode = "black_white"
51 elif self.whiteBlackButton.isChecked():
52 drawingMode = "white_black"
53 else:
54 # default is automatic
55 drawingMode = "automatic"
56 Preferences.setGraphics("DrawingMode", drawingMode)
57
41 @pyqtSlot() 58 @pyqtSlot()
42 def on_graphicsFontButton_clicked(self): 59 def on_graphicsFontButton_clicked(self):
43 """ 60 """
44 Private method used to select the font for the graphics items. 61 Private method used to select the font for the graphics items.
45 """ 62 """

eric ide

mercurial