Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enabled "close window" option on modal dialogs #2690

Merged
merged 4 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/sas/qtgui/Calculators/DataOperationUtilityPanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ def __init__(self, parent=None):
self.setupUi(self)
self.manager = parent
self.communicator = self.manager.communicator()
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

# To store input datafiles
self.filenames = None
Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/Calculators/DensityPanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ def __init__(self, parent=None):
self.mode = None
self.manager = parent
self.setupUi()
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

self.setupModel()
self.setupMapper()
Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/Calculators/GenericScatteringCalculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ class GenericScatteringCalculator(QtWidgets.QDialog, Ui_GenericScatteringCalcula
def __init__(self, parent=None):
super(GenericScatteringCalculator, self).__init__()
self.setupUi(self)
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
self.setFixedSize(self.minimumSizeHint())

self.manager = parent
Expand Down
3 changes: 0 additions & 3 deletions src/sas/qtgui/Calculators/KiessigPanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ class KiessigPanel(QtWidgets.QDialog, Ui_KiessigPanel):
def __init__(self, parent=None):
super(KiessigPanel, self).__init__()
self.setupUi(self)
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

self.setWindowTitle("Kiessig Thickness Calculator")

self.manager = parent
Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/Calculators/ResolutionCalculatorPanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ class ResolutionCalculatorPanel(QtWidgets.QDialog, Ui_ResolutionCalculatorPanel)
def __init__(self, parent=None):
super(ResolutionCalculatorPanel, self).__init__()
self.setupUi(self)
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
self.setFixedSize(self.minimumSizeHint())

self.manager = parent
Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/Calculators/SldPanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ def __init__(self, parent=None):
self.manager = parent

self.setupUi()
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
self.setFixedSize(self.minimumSizeHint())

self.setupModel()
Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/Calculators/SlitSizeCalculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ class SlitSizeCalculator(QtWidgets.QDialog, Ui_SlitSizeCalculator):
def __init__(self, parent=None):
super(SlitSizeCalculator, self).__init__()
self.setupUi(self)
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

self.setWindowTitle("Slit Size Calculator")
self._parent = parent
Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/MainWindow/AboutBox.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ class AboutBox(QtWidgets.QDialog, Ui_AboutUI):
def __init__(self, parent=None):
super(AboutBox, self).__init__(parent)
self.setupUi(self)
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

self.setWindowTitle("About")

Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/MainWindow/Acknowledgements.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ class Acknowledgements(QtWidgets.QDialog, Ui_Acknowledgements):
def __init__(self, parent=None):
super(Acknowledgements, self).__init__(parent)
self.setupUi(self)
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

self.addText()

Expand Down
5 changes: 0 additions & 5 deletions src/sas/qtgui/MainWindow/CategoryManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@ def __init__(self, parent=None, manager=None):
super(CategoryManager, self).__init__(parent)
self.setupUi(self)

# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

self.communicator = manager.communicator()

self.setWindowTitle("Category Manager")
Expand Down Expand Up @@ -330,8 +327,6 @@ class ChangeCategory(QtWidgets.QDialog, Ui_ChangeCategoryUI):
def __init__(self, parent=None, categories=None, model=None):
super(ChangeCategory, self).__init__(parent)
self.setupUi(self)
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

self.model = model
self.parent = parent
Expand Down
1 change: 0 additions & 1 deletion src/sas/qtgui/MainWindow/NameChanger.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ def __init__(self, parent=None):
self._model_item = None
self.setupUi(self)

self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
self.setModal(True)

self.parent = parent
Expand Down
4 changes: 0 additions & 4 deletions src/sas/qtgui/Perspectives/Fitting/ComplexConstraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ def __init__(self, parent=None, tabs=None):
self.setupUi(self)
self.setModal(True)

# disable the context help icon
windowFlags = self.windowFlags()
self.setWindowFlags(windowFlags & ~QtCore.Qt.WindowContextHelpButtonHint)

# Useful globals
self.tabs = tabs
self.params = None
Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/Perspectives/Fitting/GPUOptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ def __init__(self):

self.radio_buttons = []

# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
self.add_options()
self.progressBar.setVisible(False)
self.progressBar.setFormat(" Test %v / %m")
Expand Down
4 changes: 0 additions & 4 deletions src/sas/qtgui/Perspectives/Fitting/MultiConstraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ def __init__(self, parent=None, params=None, constraint=None):
self.setupUi(self)
self.setModal(True)

# disable the context help icon
windowFlags = self.windowFlags()
self.setWindowFlags(windowFlags & ~QtCore.Qt.WindowContextHelpButtonHint)

self.params = params
self.parent = parent
# Text of the constraint
Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/Plotting/AddText.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ class AddText(QtWidgets.QDialog, Ui_AddText):
def __init__(self, parent=None):
super(AddText, self).__init__()
self.setupUi(self)
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

self._font = QtGui.QFont()
self._color = "black"
Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/Plotting/ColorMap.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ def __init__(self, parent=None, cmap=None, vmin=0.0, vmax=100.0, data=None):

self.setupUi(self)
assert(isinstance(data, Data2D))
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

self.data = data
self._cmap_orig = self._cmap = cmap if cmap is not None else DEFAULT_MAP
Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/Plotting/LinearFit.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ def __init__(self, parent=None,
super(LinearFit, self).__init__(parent)

self.setupUi(self)
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

assert(isinstance(max_range, tuple))
assert(isinstance(fit_range, tuple))
Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/Plotting/MaskEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ def __init__(self, parent=None, data=None):
assert isinstance(data, Data2D)

self.setupUi(self)
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

self.data = data
self.parent = parent
Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/Plotting/PlotLabelProperties.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ def __init__(self,

super(PlotLabelProperties, self).__init__(parent)
self.setupUi(self)
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

self.setFixedSize(self.minimumSizeHint())

Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/Plotting/PlotProperties.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ def __init__(self,
legend=""):
super(PlotProperties, self).__init__(parent)
self.setupUi(self)
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

self.setFixedSize(self.minimumSizeHint())

Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/Plotting/ScaleProperties.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ class ScaleProperties(QtWidgets.QDialog, Ui_scalePropertiesUI):
def __init__(self, parent=None, init_scale_x='x', init_scale_y='y'):
super(ScaleProperties, self).__init__(parent)
self.setupUi(self)
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

# Set up comboboxes
self.cbX.addItems(x_values)
Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/Plotting/SetGraphRange.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ def __init__(self, parent=None, x_range=(0.0, 0.0), y_range=(0.0, 0.0)):
super(SetGraphRange, self).__init__()

self.setupUi(self)
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

assert(isinstance(x_range, tuple))
assert(isinstance(y_range, tuple))
Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/Plotting/WindowTitle.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ class WindowTitle(QtWidgets.QDialog, Ui_WindowTitle):
def __init__(self, parent=None, new_title=""):
super(WindowTitle, self).__init__(parent)
self.setupUi(self)
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

self.txtTitle.setText(new_title)

Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/Utilities/AddMultEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ def __init__(self, parent=None):
self.parent = parent

self.setupUi(self)
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

# uncheck self.chkOverwrite
self.chkOverwrite.setChecked(False)
Expand Down
4 changes: 0 additions & 4 deletions src/sas/qtgui/Utilities/FileConverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ def __init__(self, parent=None):
self.parent = parent
self.setupUi(self)

# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)


self.setWindowTitle("File Converter")

# i,q file fields are not editable
Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/Utilities/ModelEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ class ModelEditor(QtWidgets.QDialog, Ui_ModelEditor):
def __init__(self, parent=None, is_python=True):
super(ModelEditor, self).__init__(parent)
self.setupUi(self)
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

self.is_python = is_python

Expand Down
3 changes: 0 additions & 3 deletions src/sas/qtgui/Utilities/PluginManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ def __init__(self, parent=None):
super(PluginManager, self).__init__(parent._parent)
self.setupUi(self)

# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

self.parent = parent
self.cmdDelete.setEnabled(False)
self.cmdEdit.setEnabled(False)
Expand Down
2 changes: 0 additions & 2 deletions src/sas/qtgui/Utilities/Reports/ReportDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ def __init__(self, report_data: ReportData, parent: Optional[QtCore.QObject]=Non

super().__init__(parent)
self.setupUi(self)
# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

self.report_data = report_data

Expand Down
3 changes: 0 additions & 3 deletions src/sas/qtgui/Utilities/TabbedModelEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ def __init__(self, parent=None, edit_only=False):

self.setupUi(self)

# disable the context help icon
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)

# globals
self.filename = ""
self.window_title = self.windowTitle()
Expand Down