Preferences/ConfigurationDialog.py

changeset 1131
7781e396c903
parent 1127
b1802ebe0066
child 1232
ed31e909cf2e
equal deleted inserted replaced
1130:3e9f0330f833 1131:7781e396c903
39 @param parent parent widget of the item (QTreeWidget or QTreeWidgetItem) 39 @param parent parent widget of the item (QTreeWidget or QTreeWidgetItem)
40 @param text text to be displayed (string) 40 @param text text to be displayed (string)
41 @param pageName name of the configuration page (string) 41 @param pageName name of the configuration page (string)
42 @param iconFile file name of the icon to be shown (string) 42 @param iconFile file name of the icon to be shown (string)
43 """ 43 """
44 QTreeWidgetItem.__init__(self, parent, [text]) 44 super().__init__(parent, [text])
45 self.setIcon(0, UI.PixmapCache.getIcon(iconFile)) 45 self.setIcon(0, UI.PixmapCache.getIcon(iconFile))
46 46
47 self.__pageName = pageName 47 self.__pageName = pageName
48 48
49 def getPageName(self): 49 def getPageName(self):
84 ConfigurationWidget.DefaultMode, 84 ConfigurationWidget.DefaultMode,
85 ConfigurationWidget.HelpBrowserMode, 85 ConfigurationWidget.HelpBrowserMode,
86 ConfigurationWidget.TrayStarterMode 86 ConfigurationWidget.TrayStarterMode
87 ) 87 )
88 88
89 QWidget.__init__(self, parent) 89 super().__init__(parent)
90 self.fromEric = fromEric 90 self.fromEric = fromEric
91 self.displayMode = displayMode 91 self.displayMode = displayMode
92 92
93 self.__setupUi() 93 self.__setupUi()
94 94
673 @keyparam fromEric flag indicating a dialog generation from within the 673 @keyparam fromEric flag indicating a dialog generation from within the
674 eric5 ide (boolean) 674 eric5 ide (boolean)
675 @keyparam displayMode mode of the configuration dialog 675 @keyparam displayMode mode of the configuration dialog
676 (DefaultMode, HelpBrowserMode, TrayStarterMode) 676 (DefaultMode, HelpBrowserMode, TrayStarterMode)
677 """ 677 """
678 QDialog.__init__(self, parent) 678 super().__init__(parent)
679 if name: 679 if name:
680 self.setObjectName(name) 680 self.setObjectName(name)
681 self.setModal(modal) 681 self.setModal(modal)
682 self.layout = QVBoxLayout(self) 682 self.layout = QVBoxLayout(self)
683 self.layout.setMargin(0) 683 self.layout.setMargin(0)
740 """ 740 """
741 Constructor 741 Constructor
742 742
743 @param parent reference to the parent widget (QWidget) 743 @param parent reference to the parent widget (QWidget)
744 """ 744 """
745 QMainWindow.__init__(self, parent) 745 super().__init__(parent)
746 746
747 self.cw = ConfigurationWidget(self, fromEric=False) 747 self.cw = ConfigurationWidget(self, fromEric=False)
748 size = self.cw.size() 748 size = self.cw.size()
749 self.setCentralWidget(self.cw) 749 self.setCentralWidget(self.cw)
750 self.resize(size) 750 self.resize(size)

eric ide

mercurial