605 """<b>Preferences</b>""" |
605 """<b>Preferences</b>""" |
606 """<p>Set the configuration items of the application""" |
606 """<p>Set the configuration items of the application""" |
607 """ with your prefered values.</p>""" |
607 """ with your prefered values.</p>""" |
608 )) |
608 )) |
609 self.prefAct.triggered.connect(self.__showPreferences) |
609 self.prefAct.triggered.connect(self.__showPreferences) |
610 self.prefAct.setMenuRole(QAction.PreferencesRole) |
610 self.prefAct.setMenuRole(QAction.MenuRole.PreferencesRole) |
611 self.__actions.append(self.prefAct) |
611 self.__actions.append(self.prefAct) |
612 |
612 |
613 def __setReadOnlyActionTexts(self): |
613 def __setReadOnlyActionTexts(self): |
614 """ |
614 """ |
615 Private method to switch the 'Open Read Only' action between |
615 Private method to switch the 'Open Read Only' action between |
773 self.__statusBar.addPermanentWidget(self.__sbAddress) |
773 self.__statusBar.addPermanentWidget(self.__sbAddress) |
774 self.__sbAddress.setWhatsThis(self.tr( |
774 self.__sbAddress.setWhatsThis(self.tr( |
775 """<p>This part of the status bar displays the cursor""" |
775 """<p>This part of the status bar displays the cursor""" |
776 """ address.</p>""" |
776 """ address.</p>""" |
777 )) |
777 )) |
778 self.__sbAddress.setFrameStyle(QFrame.StyledPanel | QFrame.Plain) |
778 self.__sbAddress.setFrameStyle( |
|
779 QFrame.Shape.StyledPanel | QFrame.Shadow.Plain) |
779 |
780 |
780 self.__sbSelection = QLabel(self.__statusBar) |
781 self.__sbSelection = QLabel(self.__statusBar) |
781 self.__statusBar.addPermanentWidget(self.__sbSelection) |
782 self.__statusBar.addPermanentWidget(self.__sbSelection) |
782 self.__sbSelection.setWhatsThis(self.tr( |
783 self.__sbSelection.setWhatsThis(self.tr( |
783 """<p>This part of the status bar displays some selection""" |
784 """<p>This part of the status bar displays some selection""" |
784 """ information.</p>""" |
785 """ information.</p>""" |
785 )) |
786 )) |
786 self.__sbSelection.setFrameStyle(QFrame.StyledPanel | QFrame.Plain) |
787 self.__sbSelection.setFrameStyle( |
|
788 QFrame.Shape.StyledPanel | QFrame.Shadow.Plain) |
787 |
789 |
788 self.__sbSize = QLabel(self.__statusBar) |
790 self.__sbSize = QLabel(self.__statusBar) |
789 self.__statusBar.addPermanentWidget(self.__sbSize) |
791 self.__statusBar.addPermanentWidget(self.__sbSize) |
790 self.__sbSize.setWhatsThis(self.tr( |
792 self.__sbSize.setWhatsThis(self.tr( |
791 """<p>This part of the status bar displays the size of the""" |
793 """<p>This part of the status bar displays the size of the""" |
792 """ binary data.</p>""" |
794 """ binary data.</p>""" |
793 )) |
795 )) |
794 self.__sbSize.setFrameStyle(QFrame.StyledPanel | QFrame.Plain) |
796 self.__sbSize.setFrameStyle( |
|
797 QFrame.Shape.StyledPanel | QFrame.Shadow.Plain) |
795 |
798 |
796 self.__sbEditMode = E5ClickableLabel(self.__statusBar) |
799 self.__sbEditMode = E5ClickableLabel(self.__statusBar) |
797 self.__statusBar.addPermanentWidget(self.__sbEditMode) |
800 self.__statusBar.addPermanentWidget(self.__sbEditMode) |
798 self.__sbEditMode.setWhatsThis(self.tr( |
801 self.__sbEditMode.setWhatsThis(self.tr( |
799 """<p>This part of the status bar displays the edit mode.</p>""" |
802 """<p>This part of the status bar displays the edit mode.</p>""" |
800 )) |
803 )) |
801 self.__sbEditMode.setFrameStyle(QFrame.StyledPanel | QFrame.Plain) |
804 self.__sbEditMode.setFrameStyle( |
|
805 QFrame.Shape.StyledPanel | QFrame.Shadow.Plain) |
802 self.__sbEditMode.clicked.connect(self.__toggleEditMode) |
806 self.__sbEditMode.clicked.connect(self.__toggleEditMode) |
803 |
807 |
804 self.__sbReadOnly = E5ClickableLabel(self.__statusBar) |
808 self.__sbReadOnly = E5ClickableLabel(self.__statusBar) |
805 self.__statusBar.addPermanentWidget(self.__sbReadOnly) |
809 self.__statusBar.addPermanentWidget(self.__sbReadOnly) |
806 self.__sbReadOnly.setWhatsThis(self.tr( |
810 self.__sbReadOnly.setWhatsThis(self.tr( |
807 """<p>This part of the status bar displays the read""" |
811 """<p>This part of the status bar displays the read""" |
808 """ only mode.</p>""" |
812 """ only mode.</p>""" |
809 )) |
813 )) |
810 self.__sbReadOnly.setFrameStyle(QFrame.StyledPanel | QFrame.Plain) |
814 self.__sbReadOnly.setFrameStyle( |
|
815 QFrame.Shape.StyledPanel | QFrame.Shadow.Plain) |
811 self.__sbReadOnly.clicked.connect(self.__toggleReadOnlyMode) |
816 self.__sbReadOnly.clicked.connect(self.__toggleReadOnlyMode) |
812 |
817 |
813 self.__showEditMode(self.__editor.overwriteMode()) |
818 self.__showEditMode(self.__editor.overwriteMode()) |
814 self.__showReadOnlyMode(self.__editor.isReadOnly()) |
819 self.__showReadOnlyMode(self.__editor.isReadOnly()) |
815 |
820 |
1368 self.__preferencesChangedByLocalPreferencesDialog) |
1373 self.__preferencesChangedByLocalPreferencesDialog) |
1369 dlg.show() |
1374 dlg.show() |
1370 dlg.showConfigurationPageByName("hexEditorPage") |
1375 dlg.showConfigurationPageByName("hexEditorPage") |
1371 dlg.exec() |
1376 dlg.exec() |
1372 QCoreApplication.processEvents() |
1377 QCoreApplication.processEvents() |
1373 if dlg.result() == QDialog.Accepted: |
1378 if dlg.result() == QDialog.DialogCode.Accepted: |
1374 dlg.setPreferences() |
1379 dlg.setPreferences() |
1375 Preferences.syncPreferences() |
1380 Preferences.syncPreferences() |
1376 self.__preferencesChangedByLocalPreferencesDialog() |
1381 self.__preferencesChangedByLocalPreferencesDialog() |
1377 |
1382 |
1378 def __preferencesChangedByLocalPreferencesDialog(self): |
1383 def __preferencesChangedByLocalPreferencesDialog(self): |