menu item for easier bug reports; renaming of plot to graph; fixes T237; fixes T241;
This commit is contained in:
parent
69206235af
commit
377454b683
@ -368,6 +368,8 @@ class Ui_BaseWindow(object):
|
||||
self.actionMine.setObjectName("actionMine")
|
||||
self.action_draw_object = QtWidgets.QAction(BaseWindow)
|
||||
self.action_draw_object.setObjectName("action_draw_object")
|
||||
self.actionBugs = QtWidgets.QAction(BaseWindow)
|
||||
self.actionBugs.setObjectName("actionBugs")
|
||||
self.menuSave.addAction(self.actionSave)
|
||||
self.menuSave.addAction(self.actionExportGraphic)
|
||||
self.menuSave.addAction(self.action_save_fit_parameter)
|
||||
@ -394,6 +396,7 @@ class Ui_BaseWindow(object):
|
||||
self.menuData.addAction(self.actionChange_datatypes)
|
||||
self.menuHelp.addAction(self.actionDocumentation)
|
||||
self.menuHelp.addAction(self.actionUpdate)
|
||||
self.menuHelp.addAction(self.actionBugs)
|
||||
self.menuNormalize.addAction(self.action_norm_max)
|
||||
self.menuNormalize.addAction(self.action_norm_max_abs)
|
||||
self.menuNormalize.addSeparator()
|
||||
@ -576,8 +579,8 @@ class Ui_BaseWindow(object):
|
||||
self.actionMaximize.setText(_translate("BaseWindow", "Maximize"))
|
||||
self.actionTile.setText(_translate("BaseWindow", "Tile windows"))
|
||||
self.actionMinimize.setText(_translate("BaseWindow", "Minimize"))
|
||||
self.actionNew_window.setText(_translate("BaseWindow", "New plot"))
|
||||
self.actionDelete_window.setText(_translate("BaseWindow", "Delete plot"))
|
||||
self.actionNew_window.setText(_translate("BaseWindow", "New graph"))
|
||||
self.actionDelete_window.setText(_translate("BaseWindow", "Delete graph"))
|
||||
self.actionCascade_windows.setText(_translate("BaseWindow", "Cascade windows"))
|
||||
self.actionNext_window.setText(_translate("BaseWindow", "Next"))
|
||||
self.actionNext_window.setShortcut(_translate("BaseWindow", "Alt+Right"))
|
||||
@ -619,6 +622,7 @@ class Ui_BaseWindow(object):
|
||||
self.actionUpdate.setText(_translate("BaseWindow", "Look for updates"))
|
||||
self.actionMine.setText(_translate("BaseWindow", "Mine"))
|
||||
self.action_draw_object.setText(_translate("BaseWindow", "Draw objects..."))
|
||||
self.actionBugs.setText(_translate("BaseWindow", "Bugs! Problems! Wishes!"))
|
||||
from ..data.datawidget.datawidget import DataWidget
|
||||
from ..data.integral_widget import IntegralWidget
|
||||
from ..data.point_select import PointSelectWidget
|
||||
|
@ -8,6 +8,7 @@ from numpy import geomspace, linspace
|
||||
from pyqtgraph import ViewBox, PlotDataItem
|
||||
|
||||
from nmreval.configs import *
|
||||
from nmreval.lib.utils import open_bug_report
|
||||
|
||||
from .management import UpperManagement
|
||||
from ..Qt import QtCore, QtGui, QtPrintSupport, QtWidgets
|
||||
@ -994,3 +995,7 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
|
||||
def read_state(self):
|
||||
opts = read_state()
|
||||
self.path = pathlib.Path(opts.get('recent_path', Path.home()))
|
||||
|
||||
@QtCore.pyqtSlot(name='on_actionBugs_triggered')
|
||||
def report_bug(self):
|
||||
open_bug_report()
|
||||
|
@ -75,8 +75,10 @@ allowed_values = {
|
||||
|
||||
def write_state(opts: dict):
|
||||
config_file = config_paths() / 'guistate.ini'
|
||||
old_opts = read_state()
|
||||
old_opts.update(opts)
|
||||
with config_file.open('wb') as f:
|
||||
pickle.dump(opts, f)
|
||||
pickle.dump(old_opts, f)
|
||||
|
||||
|
||||
def read_state() -> dict:
|
||||
|
@ -16,3 +16,23 @@ def valid_function(expr: str, extra_namespace: dict = None):
|
||||
return ne.evaluate(expr, {}, local), True
|
||||
except:
|
||||
return None, False
|
||||
|
||||
|
||||
def open_bug_report():
|
||||
form_entries = {
|
||||
'description': 'Please state the nature of the medical emergency.',
|
||||
'title': 'Everything is awesome?',
|
||||
'assign[0]': 'dominik',
|
||||
'subscribers[0]': 'dominik',
|
||||
'tag': 'nmreval',
|
||||
'priority': 'normal',
|
||||
'status': 'open',
|
||||
}
|
||||
full_url = 'https://chaos3.fkp.physik.tu-darmstadt.de/maniphest/task/edit/?'
|
||||
|
||||
for k, v in form_entries.items():
|
||||
full_url += f'{k}={v}&'
|
||||
full_url.replace(' ', '+')
|
||||
|
||||
import webbrowser
|
||||
webbrowser.open(full_url)
|
||||
|
@ -191,6 +191,7 @@
|
||||
</property>
|
||||
<addaction name="actionDocumentation"/>
|
||||
<addaction name="actionUpdate"/>
|
||||
<addaction name="actionBugs"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuExtra">
|
||||
<property name="title">
|
||||
@ -774,7 +775,7 @@
|
||||
</action>
|
||||
<action name="actionNew_window">
|
||||
<property name="text">
|
||||
<string>New plot</string>
|
||||
<string>New graph</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDelete_window">
|
||||
@ -783,7 +784,7 @@
|
||||
<normaloff>../../../../../.designer/backup</normaloff>../../../../../.designer/backup</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Delete plot</string>
|
||||
<string>Delete graph</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionCascade_windows">
|
||||
@ -1016,6 +1017,11 @@
|
||||
<string>Draw objects...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionBugs">
|
||||
<property name="text">
|
||||
<string>Bugs! Problems! Wishes!</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
Loading…
Reference in New Issue
Block a user