10 import os |
10 import os |
11 |
11 |
12 from PyQt6.QtCore import pyqtSlot |
12 from PyQt6.QtCore import pyqtSlot |
13 from PyQt6.QtWidgets import QListWidgetItem, QInputDialog, QLineEdit |
13 from PyQt6.QtWidgets import QListWidgetItem, QInputDialog, QLineEdit |
14 |
14 |
15 from EricWidgets.EricApplication import ericApp |
15 from eric7.EricWidgets.EricApplication import ericApp |
16 |
16 |
17 from Preferences.ConfigurationPages.ConfigurationPageBase import ConfigurationPageBase |
17 from eric7.Preferences.ConfigurationPages.ConfigurationPageBase import ( |
|
18 ConfigurationPageBase, |
|
19 ) |
18 from .Ui_PrintRemoverPage import Ui_PrintRemoverPage |
20 from .Ui_PrintRemoverPage import Ui_PrintRemoverPage |
19 |
21 |
20 import UI.PixmapCache |
22 try: |
|
23 from eric7.EricGui import EricPixmapCache |
|
24 except ImportError: |
|
25 from UI import PixmapCache as EricPixmapCache |
21 |
26 |
22 |
27 |
23 class PrintRemoverPage(ConfigurationPageBase, Ui_PrintRemoverPage): |
28 class PrintRemoverPage(ConfigurationPageBase, Ui_PrintRemoverPage): |
24 """ |
29 """ |
25 Class implementing the Print Remover configuration page. |
30 Class implementing the Print Remover configuration page. |
38 |
43 |
39 usesDarkPalette = ericApp().usesDarkPalette() |
44 usesDarkPalette = ericApp().usesDarkPalette() |
40 iconSuffix = "dark" if usesDarkPalette else "light" |
45 iconSuffix = "dark" if usesDarkPalette else "light" |
41 |
46 |
42 self.editButton.setIcon( |
47 self.editButton.setIcon( |
43 UI.PixmapCache.getIcon( |
48 EricPixmapCache.getIcon( |
44 os.path.join("PrintRemover", "icons", "edit-{0}".format(iconSuffix)) |
49 os.path.join("PrintRemover", "icons", "edit-{0}".format(iconSuffix)) |
45 ) |
50 ) |
46 ) |
51 ) |
47 self.addButton.setIcon(UI.PixmapCache.getIcon("plus")) |
52 self.addButton.setIcon(EricPixmapCache.getIcon("plus")) |
48 self.addSeparatorButton.setIcon( |
53 self.addSeparatorButton.setIcon( |
49 UI.PixmapCache.getIcon( |
54 EricPixmapCache.getIcon( |
50 os.path.join( |
55 os.path.join( |
51 "PrintRemover", "icons", "separatorAdd-{0}".format(iconSuffix) |
56 "PrintRemover", "icons", "separatorAdd-{0}".format(iconSuffix) |
52 ) |
57 ) |
53 ) |
58 ) |
54 ) |
59 ) |
55 self.deleteButton.setIcon(UI.PixmapCache.getIcon("minus")) |
60 self.deleteButton.setIcon(EricPixmapCache.getIcon("minus")) |
56 self.upButton.setIcon(UI.PixmapCache.getIcon("1uparrow")) |
61 self.upButton.setIcon(EricPixmapCache.getIcon("1uparrow")) |
57 self.downButton.setIcon(UI.PixmapCache.getIcon("1downarrow")) |
62 self.downButton.setIcon(EricPixmapCache.getIcon("1downarrow")) |
58 |
63 |
59 self.editButton.setEnabled(False) |
64 self.editButton.setEnabled(False) |
60 self.deleteButton.setEnabled(False) |
65 self.deleteButton.setEnabled(False) |
61 self.upButton.setEnabled(False) |
66 self.upButton.setEnabled(False) |
62 self.downButton.setEnabled(False) |
67 self.downButton.setEnabled(False) |