eric7/Plugins/WizardPlugins/FontDialogWizard/FontDialogOptionsDialog.py

branch
eric7
changeset 8413
65ed18753c40
parent 8410
f8d97f05f883
child 8881
54e42bc2437a
diff -r 16e8c2896469 -r 65ed18753c40 eric7/Plugins/WizardPlugins/FontDialogWizard/FontDialogOptionsDialog.py
--- a/eric7/Plugins/WizardPlugins/FontDialogWizard/FontDialogOptionsDialog.py	Tue Jun 08 19:33:51 2021 +0200
+++ b/eric7/Plugins/WizardPlugins/FontDialogWizard/FontDialogOptionsDialog.py	Tue Jun 08 19:41:08 2021 +0200
@@ -1,10 +1,12 @@
 # -*- coding: utf-8 -*-
 
+# Copyright (c) 2021 Detlev Offenbach <detlev@die-offenbachs.de>
+#
+
 """
-Module implementing FontDialogOptionsDialog.
+Module implementing a dialog to select the applicable font dialog options.
 """
 
-from PyQt6.QtCore import pyqtSlot
 from PyQt6.QtWidgets import QDialog
 
 from .Ui_FontDialogOptionsDialog import Ui_FontDialogOptionsDialog
@@ -12,778 +14,37 @@
 
 class FontDialogOptionsDialog(QDialog, Ui_FontDialogOptionsDialog):
     """
-    Class documentation goes here.
+    Class implementing a dialog to select the applicable font dialog options.
     """
-    def __init__(self, parent=None):
+    def __init__(self, options, parent=None):
         """
         Constructor
         
+        @param options dictionary with flags for the various dialog options
+        @type dict
         @param parent reference to the parent widget (defaults to None)
         @type QWidget (optional)
         """
-        super(FontDialogOptionsDialog, self).__init__(parent)
+        super().__init__(parent)
         self.setupUi(self)
-    
-    @pyqtSlot(QObject)
-    def on_noNativeDialogCheckBox_destroyed(self, p0):
-        """
-        Slot documentation goes here.
-        
-        @param p0 DESCRIPTION
-        @type QObject
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_noNativeDialogCheckBox_destroyed(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(str)
-    def on_noNativeDialogCheckBox_objectNameChanged(self, objectName):
-        """
-        Slot documentation goes here.
-        
-        @param objectName DESCRIPTION
-        @type str
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(str)
-    def on_noNativeDialogCheckBox_windowTitleChanged(self, title):
-        """
-        Slot documentation goes here.
-        
-        @param title DESCRIPTION
-        @type str
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(QIcon)
-    def on_noNativeDialogCheckBox_windowIconChanged(self, icon):
-        """
-        Slot documentation goes here.
-        
-        @param icon DESCRIPTION
-        @type QIcon
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(str)
-    def on_noNativeDialogCheckBox_windowIconTextChanged(self, iconText):
-        """
-        Slot documentation goes here.
-        
-        @param iconText DESCRIPTION
-        @type str
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(QPoint)
-    def on_noNativeDialogCheckBox_customContextMenuRequested(self, pos):
-        """
-        Slot documentation goes here.
-        
-        @param pos DESCRIPTION
-        @type QPoint
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_noNativeDialogCheckBox_pressed(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_noNativeDialogCheckBox_released(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(bool)
-    def on_noNativeDialogCheckBox_clicked(self, checked):
-        """
-        Slot documentation goes here.
-        
-        @param checked DESCRIPTION
-        @type bool
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_noNativeDialogCheckBox_clicked(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(bool)
-    def on_noNativeDialogCheckBox_toggled(self, checked):
-        """
-        Slot documentation goes here.
-        
-        @param checked DESCRIPTION
-        @type bool
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(int)
-    def on_noNativeDialogCheckBox_stateChanged(self, p0):
-        """
-        Slot documentation goes here.
-        
-        @param p0 DESCRIPTION
-        @type int
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(QObject)
-    def on_scalableCheckBox_destroyed(self, p0):
-        """
-        Slot documentation goes here.
-        
-        @param p0 DESCRIPTION
-        @type QObject
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_scalableCheckBox_destroyed(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(str)
-    def on_scalableCheckBox_objectNameChanged(self, objectName):
-        """
-        Slot documentation goes here.
-        
-        @param objectName DESCRIPTION
-        @type str
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(str)
-    def on_scalableCheckBox_windowTitleChanged(self, title):
-        """
-        Slot documentation goes here.
-        
-        @param title DESCRIPTION
-        @type str
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(QIcon)
-    def on_scalableCheckBox_windowIconChanged(self, icon):
-        """
-        Slot documentation goes here.
-        
-        @param icon DESCRIPTION
-        @type QIcon
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(str)
-    def on_scalableCheckBox_windowIconTextChanged(self, iconText):
-        """
-        Slot documentation goes here.
         
-        @param iconText DESCRIPTION
-        @type str
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(QPoint)
-    def on_scalableCheckBox_customContextMenuRequested(self, pos):
-        """
-        Slot documentation goes here.
-        
-        @param pos DESCRIPTION
-        @type QPoint
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_scalableCheckBox_pressed(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_scalableCheckBox_released(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(bool)
-    def on_scalableCheckBox_clicked(self, checked):
-        """
-        Slot documentation goes here.
-        
-        @param checked DESCRIPTION
-        @type bool
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_scalableCheckBox_clicked(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(bool)
-    def on_scalableCheckBox_toggled(self, checked):
-        """
-        Slot documentation goes here.
-        
-        @param checked DESCRIPTION
-        @type bool
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(int)
-    def on_scalableCheckBox_stateChanged(self, p0):
-        """
-        Slot documentation goes here.
-        
-        @param p0 DESCRIPTION
-        @type int
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(QObject)
-    def on_nonScalableCheckBox_destroyed(self, p0):
-        """
-        Slot documentation goes here.
-        
-        @param p0 DESCRIPTION
-        @type QObject
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_nonScalableCheckBox_destroyed(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
+        self.noNativeDialogCheckBox.setChecked(options["noNativeDialog"])
+        self.scalableCheckBox.setChecked(options["scalableFonts"])
+        self.nonScalableCheckBox.setChecked(options["nonScalableFonts"])
+        self.monospacedCheckBox.setChecked(options["monospacedFonts"])
+        self.proportionalCheckBox.setChecked(options["proportionalFonts"])
     
-    @pyqtSlot(str)
-    def on_nonScalableCheckBox_objectNameChanged(self, objectName):
-        """
-        Slot documentation goes here.
-        
-        @param objectName DESCRIPTION
-        @type str
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(str)
-    def on_nonScalableCheckBox_windowTitleChanged(self, title):
-        """
-        Slot documentation goes here.
-        
-        @param title DESCRIPTION
-        @type str
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(QIcon)
-    def on_nonScalableCheckBox_windowIconChanged(self, icon):
-        """
-        Slot documentation goes here.
-        
-        @param icon DESCRIPTION
-        @type QIcon
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(str)
-    def on_nonScalableCheckBox_windowIconTextChanged(self, iconText):
-        """
-        Slot documentation goes here.
-        
-        @param iconText DESCRIPTION
-        @type str
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(QPoint)
-    def on_nonScalableCheckBox_customContextMenuRequested(self, pos):
-        """
-        Slot documentation goes here.
-        
-        @param pos DESCRIPTION
-        @type QPoint
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_nonScalableCheckBox_pressed(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_nonScalableCheckBox_released(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(bool)
-    def on_nonScalableCheckBox_clicked(self, checked):
-        """
-        Slot documentation goes here.
-        
-        @param checked DESCRIPTION
-        @type bool
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_nonScalableCheckBox_clicked(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(bool)
-    def on_nonScalableCheckBox_toggled(self, checked):
-        """
-        Slot documentation goes here.
-        
-        @param checked DESCRIPTION
-        @type bool
+    def getOptions(self):
         """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(int)
-    def on_nonScalableCheckBox_stateChanged(self, p0):
-        """
-        Slot documentation goes here.
-        
-        @param p0 DESCRIPTION
-        @type int
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(QObject)
-    def on_monospacedCheckBox_destroyed(self, p0):
-        """
-        Slot documentation goes here.
-        
-        @param p0 DESCRIPTION
-        @type QObject
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_monospacedCheckBox_destroyed(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(str)
-    def on_monospacedCheckBox_objectNameChanged(self, objectName):
-        """
-        Slot documentation goes here.
-        
-        @param objectName DESCRIPTION
-        @type str
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(str)
-    def on_monospacedCheckBox_windowTitleChanged(self, title):
-        """
-        Slot documentation goes here.
-        
-        @param title DESCRIPTION
-        @type str
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(QIcon)
-    def on_monospacedCheckBox_windowIconChanged(self, icon):
-        """
-        Slot documentation goes here.
-        
-        @param icon DESCRIPTION
-        @type QIcon
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(str)
-    def on_monospacedCheckBox_windowIconTextChanged(self, iconText):
-        """
-        Slot documentation goes here.
-        
-        @param iconText DESCRIPTION
-        @type str
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(QPoint)
-    def on_monospacedCheckBox_customContextMenuRequested(self, pos):
-        """
-        Slot documentation goes here.
-        
-        @param pos DESCRIPTION
-        @type QPoint
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_monospacedCheckBox_pressed(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_monospacedCheckBox_released(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(bool)
-    def on_monospacedCheckBox_clicked(self, checked):
-        """
-        Slot documentation goes here.
-        
-        @param checked DESCRIPTION
-        @type bool
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_monospacedCheckBox_clicked(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(bool)
-    def on_monospacedCheckBox_toggled(self, checked):
-        """
-        Slot documentation goes here.
-        
-        @param checked DESCRIPTION
-        @type bool
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(int)
-    def on_monospacedCheckBox_stateChanged(self, p0):
-        """
-        Slot documentation goes here.
-        
-        @param p0 DESCRIPTION
-        @type int
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(QObject)
-    def on_proportionalCheckBox_destroyed(self, p0):
-        """
-        Slot documentation goes here.
-        
-        @param p0 DESCRIPTION
-        @type QObject
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_proportionalCheckBox_destroyed(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(str)
-    def on_proportionalCheckBox_objectNameChanged(self, objectName):
-        """
-        Slot documentation goes here.
-        
-        @param objectName DESCRIPTION
-        @type str
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(str)
-    def on_proportionalCheckBox_windowTitleChanged(self, title):
-        """
-        Slot documentation goes here.
-        
-        @param title DESCRIPTION
-        @type str
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(QIcon)
-    def on_proportionalCheckBox_windowIconChanged(self, icon):
-        """
-        Slot documentation goes here.
+        Public method to get the selected font dialog options.
         
-        @param icon DESCRIPTION
-        @type QIcon
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(str)
-    def on_proportionalCheckBox_windowIconTextChanged(self, iconText):
-        """
-        Slot documentation goes here.
-        
-        @param iconText DESCRIPTION
-        @type str
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(QPoint)
-    def on_proportionalCheckBox_customContextMenuRequested(self, pos):
-        """
-        Slot documentation goes here.
-        
-        @param pos DESCRIPTION
-        @type QPoint
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_proportionalCheckBox_pressed(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_proportionalCheckBox_released(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(bool)
-    def on_proportionalCheckBox_clicked(self, checked):
-        """
-        Slot documentation goes here.
-        
-        @param checked DESCRIPTION
-        @type bool
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_proportionalCheckBox_clicked(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(bool)
-    def on_proportionalCheckBox_toggled(self, checked):
-        """
-        Slot documentation goes here.
-        
-        @param checked DESCRIPTION
-        @type bool
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(int)
-    def on_proportionalCheckBox_stateChanged(self, p0):
-        """
-        Slot documentation goes here.
-        
-        @param p0 DESCRIPTION
-        @type int
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(QObject)
-    def on_buttonBox_destroyed(self, p0):
-        """
-        Slot documentation goes here.
-        
-        @param p0 DESCRIPTION
-        @type QObject
+        @return dictionary with flags for the various dialog options
+        @rtype dict
         """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_buttonBox_destroyed(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(str)
-    def on_buttonBox_objectNameChanged(self, objectName):
-        """
-        Slot documentation goes here.
-        
-        @param objectName DESCRIPTION
-        @type str
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(str)
-    def on_buttonBox_windowTitleChanged(self, title):
-        """
-        Slot documentation goes here.
-        
-        @param title DESCRIPTION
-        @type str
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(QIcon)
-    def on_buttonBox_windowIconChanged(self, icon):
-        """
-        Slot documentation goes here.
-        
-        @param icon DESCRIPTION
-        @type QIcon
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(str)
-    def on_buttonBox_windowIconTextChanged(self, iconText):
-        """
-        Slot documentation goes here.
-        
-        @param iconText DESCRIPTION
-        @type str
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(QPoint)
-    def on_buttonBox_customContextMenuRequested(self, pos):
-        """
-        Slot documentation goes here.
-        
-        @param pos DESCRIPTION
-        @type QPoint
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot(QAbstractButton)
-    def on_buttonBox_clicked(self, button):
-        """
-        Slot documentation goes here.
-        
-        @param button DESCRIPTION
-        @type QAbstractButton
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_buttonBox_accepted(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_buttonBox_helpRequested(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
-    
-    @pyqtSlot()
-    def on_buttonBox_rejected(self):
-        """
-        Slot documentation goes here.
-        """
-        # TODO: not implemented yet
-        raise NotImplementedError
+        return {
+            "noNativeDialog": self.noNativeDialogCheckBox.isChecked(),
+            "scalableFonts": self.scalableCheckBox.isChecked(),
+            "nonScalableFonts": self.nonScalableCheckBox.isChecked(),
+            "monospacedFonts": self.monospacedCheckBox.isChecked(),
+            "proportionalFonts": self.proportionalCheckBox.isChecked(),
+        }

eric ide

mercurial