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

Refactoring Branch #3006

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
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
16 changes: 16 additions & 0 deletions src/sas/qtgui/MainWindow/GuiManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,11 @@ def addTriggers(self):
self._workspace.actionWelcomeWidget.triggered.connect(self.actionWelcome)
self._workspace.actionCheck_for_update.triggered.connect(self.actionCheck_for_update)
self._workspace.actionWhat_s_New.triggered.connect(self.actionWhatsNew)
# Dev
self._workspace.menuDev.menuAction().setVisible(config.DEV_MENU)
self._workspace.actionParticle_Editor.triggered.connect(self.particleEditor)
self._workspace.actionAscii_Loader.triggered.connect(self.asciiLoader)


self.communicate.sendDataToGridSignal.connect(self.showBatchOutput)
self.communicate.resultPlotUpdateSignal.connect(self.showFitResults)
Expand Down Expand Up @@ -1369,3 +1374,14 @@ def saveCustomConfig(self):
Save the config file based on current session values
"""
config.save()


# ============= DEV =================

def particleEditor(self):
from sas.qtgui.Perspectives.ParticleEditor.DesignWindow import show_particle_editor
show_particle_editor()


def asciiLoader(self):
pass
25 changes: 25 additions & 0 deletions src/sas/qtgui/MainWindow/UI/MainWindowUI.ui
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,15 @@
<addaction name="actionCheck_for_update"/>
<addaction name="actionWhat_s_New"/>
</widget>
<widget class="QMenu" name="menuDev">
<property name="title">
<string>Dev</string>
</property>
<addaction name="actionAscii_Loader"/>
<addaction name="actionParticle_Editor"/>
<addaction name="separator"/>
<addaction name="actionDev_Tools"/>
</widget>
<addaction name="menu_File"/>
<addaction name="menuEdit"/>
<addaction name="menuView"/>
Expand All @@ -168,6 +177,7 @@
<addaction name="menuFitting"/>
<addaction name="menuWindow"/>
<addaction name="menuHelp"/>
<addaction name="menuDev"/>
</widget>
<widget class="QStatusBar" name="statusbar">
<property name="sizePolicy">
Expand Down Expand Up @@ -625,6 +635,21 @@
<string>What's New</string>
</property>
</action>
<action name="actionAscii_Loader">
<property name="text">
<string>Ascii Loader</string>
</property>
</action>
<action name="actionParticle_Editor">
<property name="text">
<string>Particle Editor</string>
</property>
</action>
<action name="actionDev_Tools">
<property name="text">
<string>Dev Tools</string>
</property>
</action>
</widget>
<resources/>
<connections/>
Expand Down
7 changes: 7 additions & 0 deletions src/sas/qtgui/Perspectives/ParticleEditor/DesignWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,13 @@ def qSampling(self) -> QSample:

return QSample(min_q, max_q, n_samples, is_log)

particle_editor_window = None
def show_particle_editor():
global particle_editor_window

particle_editor_window = DesignWindow()
particle_editor_window.show()


def main():
""" Demo/testing window"""
Expand Down
5 changes: 3 additions & 2 deletions src/sas/system/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ def __init__(self):

self.SHOW_WELCOME_PANEL = False



# OpenCL option - should be a string, either, "none", a number, or pair of form "A:B"
self.SAS_OPENCL = "none"

Expand Down Expand Up @@ -211,6 +209,9 @@ def __init__(self):
# What's New variables
self.LAST_WHATS_NEW_HIDDEN_VERSION = "5.0.0"

# Developer menu
self.DEV_MENU = False

#
# Lock the class down, this is necessary both for
# securing the class, and for setting up reading/writing files
Expand Down
Loading