src/eric7/UI/NumbersWidget.py

branch
eric7
changeset 9413
80c06d472826
parent 9221
bf71ee032bb4
child 9473
3f23dbf37dbe
equal deleted inserted replaced
9412:45e7bb09c120 9413:80c06d472826
8 """ 8 """
9 9
10 from PyQt6.QtCore import pyqtSlot, pyqtSignal, Qt, QAbstractTableModel 10 from PyQt6.QtCore import pyqtSlot, pyqtSignal, Qt, QAbstractTableModel
11 from PyQt6.QtWidgets import QWidget, QHeaderView 11 from PyQt6.QtWidgets import QWidget, QHeaderView
12 12
13 from EricWidgets.EricApplication import ericApp 13 from eric7.EricWidgets.EricApplication import ericApp
14 14
15 from .Ui_NumbersWidget import Ui_NumbersWidget 15 from .Ui_NumbersWidget import Ui_NumbersWidget
16 16
17 import UI.PixmapCache 17 from eric7.EricGui import EricPixmapCache
18 18
19 19
20 class BinaryModel(QAbstractTableModel): 20 class BinaryModel(QAbstractTableModel):
21 """ 21 """
22 Class implementing a model for entering binary numbers. 22 Class implementing a model for entering binary numbers.
177 @param parent reference to the parent widget (QWidget) 177 @param parent reference to the parent widget (QWidget)
178 """ 178 """
179 super().__init__(parent) 179 super().__init__(parent)
180 self.setupUi(self) 180 self.setupUi(self)
181 181
182 self.setWindowIcon(UI.PixmapCache.getIcon("eric")) 182 self.setWindowIcon(EricPixmapCache.getIcon("eric"))
183 183
184 self.__badNumberSheet = ( 184 self.__badNumberSheet = (
185 "background-color: #b31b1b;" 185 "background-color: #b31b1b;"
186 if ericApp().usesDarkPalette() 186 if ericApp().usesDarkPalette()
187 else "background-color: #ffa0a0;" 187 else "background-color: #ffa0a0;"
188 ) 188 )
189 189
190 self.binInButton.setIcon(UI.PixmapCache.getIcon("2downarrow")) 190 self.binInButton.setIcon(EricPixmapCache.getIcon("2downarrow"))
191 self.binOutButton.setIcon(UI.PixmapCache.getIcon("2uparrow")) 191 self.binOutButton.setIcon(EricPixmapCache.getIcon("2uparrow"))
192 self.octInButton.setIcon(UI.PixmapCache.getIcon("2downarrow")) 192 self.octInButton.setIcon(EricPixmapCache.getIcon("2downarrow"))
193 self.octOutButton.setIcon(UI.PixmapCache.getIcon("2uparrow")) 193 self.octOutButton.setIcon(EricPixmapCache.getIcon("2uparrow"))
194 self.decInButton.setIcon(UI.PixmapCache.getIcon("2downarrow")) 194 self.decInButton.setIcon(EricPixmapCache.getIcon("2downarrow"))
195 self.decOutButton.setIcon(UI.PixmapCache.getIcon("2uparrow")) 195 self.decOutButton.setIcon(EricPixmapCache.getIcon("2uparrow"))
196 self.hexInButton.setIcon(UI.PixmapCache.getIcon("2downarrow")) 196 self.hexInButton.setIcon(EricPixmapCache.getIcon("2downarrow"))
197 self.hexOutButton.setIcon(UI.PixmapCache.getIcon("2uparrow")) 197 self.hexOutButton.setIcon(EricPixmapCache.getIcon("2uparrow"))
198 198
199 self.formatBox.addItem(self.tr("Auto"), 0) 199 self.formatBox.addItem(self.tr("Auto"), 0)
200 self.formatBox.addItem(self.tr("Dec"), 10) 200 self.formatBox.addItem(self.tr("Dec"), 10)
201 self.formatBox.addItem(self.tr("Hex"), 16) 201 self.formatBox.addItem(self.tr("Hex"), 16)
202 self.formatBox.addItem(self.tr("Oct"), 8) 202 self.formatBox.addItem(self.tr("Oct"), 8)

eric ide

mercurial