40 @param parent parent widget of the item (QTreeWidget or QTreeWidgetItem) |
42 @param parent parent widget of the item (QTreeWidget or QTreeWidgetItem) |
41 @param text text to be displayed (string) |
43 @param text text to be displayed (string) |
42 @param pageName name of the configuration page (string) |
44 @param pageName name of the configuration page (string) |
43 @param iconFile file name of the icon to be shown (string) |
45 @param iconFile file name of the icon to be shown (string) |
44 """ |
46 """ |
45 super().__init__(parent, [text]) |
47 super(ConfigurationPageItem, self).__init__(parent, [text]) |
46 self.setIcon(0, UI.PixmapCache.getIcon(iconFile)) |
48 self.setIcon(0, UI.PixmapCache.getIcon(iconFile)) |
47 |
49 |
48 self.__pageName = pageName |
50 self.__pageName = pageName |
49 |
51 |
50 def getPageName(self): |
52 def getPageName(self): |
89 ConfigurationWidget.DefaultMode, |
91 ConfigurationWidget.DefaultMode, |
90 ConfigurationWidget.HelpBrowserMode, |
92 ConfigurationWidget.HelpBrowserMode, |
91 ConfigurationWidget.TrayStarterMode |
93 ConfigurationWidget.TrayStarterMode |
92 ) |
94 ) |
93 |
95 |
94 super().__init__(parent) |
96 super(ConfigurationWidget, self).__init__(parent) |
95 self.fromEric = fromEric |
97 self.fromEric = fromEric |
96 self.displayMode = displayMode |
98 self.displayMode = displayMode |
97 |
99 |
98 self.__setupUi() |
100 self.__setupUi() |
99 |
101 |
743 @keyparam fromEric flag indicating a dialog generation from within the |
745 @keyparam fromEric flag indicating a dialog generation from within the |
744 eric5 ide (boolean) |
746 eric5 ide (boolean) |
745 @keyparam displayMode mode of the configuration dialog |
747 @keyparam displayMode mode of the configuration dialog |
746 (DefaultMode, HelpBrowserMode, TrayStarterMode) |
748 (DefaultMode, HelpBrowserMode, TrayStarterMode) |
747 """ |
749 """ |
748 super().__init__(parent) |
750 super(ConfigurationDialog, self).__init__(parent) |
749 if name: |
751 if name: |
750 self.setObjectName(name) |
752 self.setObjectName(name) |
751 self.setModal(modal) |
753 self.setModal(modal) |
752 self.layout = QVBoxLayout(self) |
754 self.layout = QVBoxLayout(self) |
753 self.layout.setMargin(0) |
755 self.layout.setMargin(0) |
800 Public method called to store the selected values into the preferences storage. |
802 Public method called to store the selected values into the preferences storage. |
801 """ |
803 """ |
802 self.cw.setPreferences() |
804 self.cw.setPreferences() |
803 |
805 |
804 def accept(self): |
806 def accept(self): |
805 super().accept() |
807 super(ConfigurationDialog, self).accept() |
806 |
808 |
807 |
809 |
808 class ConfigurationWindow(E5MainWindow): |
810 class ConfigurationWindow(E5MainWindow): |
809 """ |
811 """ |
810 Main window class for the standalone dialog. |
812 Main window class for the standalone dialog. |
813 """ |
815 """ |
814 Constructor |
816 Constructor |
815 |
817 |
816 @param parent reference to the parent widget (QWidget) |
818 @param parent reference to the parent widget (QWidget) |
817 """ |
819 """ |
818 super().__init__(parent) |
820 super(ConfigurationWindow, self).__init__(parent) |
819 |
821 |
820 self.cw = ConfigurationWidget(self, fromEric=False) |
822 self.cw = ConfigurationWidget(self, fromEric=False) |
821 size = self.cw.size() |
823 size = self.cw.size() |
822 self.setCentralWidget(self.cw) |
824 self.setCentralWidget(self.cw) |
823 self.resize(size) |
825 self.resize(size) |