Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
a428d810
Commit
a428d810
authored
Jun 15, 2020
by
Hahn, Steven
Browse files
Plotting but no range selection
Signed-off-by:
Steven Hahn
<
hahnse@ornl.gov
>
parent
1143026f
Changes
5
Hide whitespace changes
Inline
Side-by-side
qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceTreeWidgetSimple.h
View file @
a428d810
...
...
@@ -34,7 +34,7 @@ class EXPORT_OPT_MANTIDQT_COMMON WorkspaceTreeWidgetSimple
:
public
WorkspaceTreeWidget
{
Q_OBJECT
public:
explicit
WorkspaceTreeWidgetSimple
(
bool
viewOnly
,
QWidget
*
parent
=
nullptr
);
explicit
WorkspaceTreeWidgetSimple
(
bool
viewOnly
=
false
,
QWidget
*
parent
=
nullptr
);
~
WorkspaceTreeWidgetSimple
();
// Context Menu Handlers
...
...
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/Shape2D.h
View file @
a428d810
...
...
@@ -10,9 +10,8 @@
#include
<QColor>
#include
<QPointF>
#include
<QPainterPath>
class
QPainter
;
class
QPainterPath
;
class
QMouseEvent
;
class
QWheelEvent
;
...
...
qt/widgets/instrumentview/src/Shape2D.cpp
View file @
a428d810
...
...
@@ -9,7 +9,6 @@
#include
<QMouseEvent>
#include
<QPainter>
#include
<QPainterPath>
#include
<QWheelEvent>
#include
<QLine>
...
...
scripts/Interface/reduction_gui/widgets/sans/stitcher.py
View file @
a428d810
...
...
@@ -346,8 +346,7 @@ class StitcherWidget(BaseWidget):
if
not
os
.
path
.
isdir
(
str
(
self
.
_output_dir
)):
self
.
_output_dir
=
os
.
path
.
expanduser
(
"~"
)
FileName
=
QFileDialog
.
getOpenFileName
(
self
,
title
,
self
.
_output_dir
,
"Reduced XML files (*.xml);; Reduced Nexus files"
" (*.nxs);; All files (*)"
)
"Reduced txt files (*.txt);; All files (*)"
)
if
isinstance
(
FileName
,
tuple
):
FileName
=
FileName
[
0
]
fname
=
QFileInfo
(
FileName
).
filePath
()
...
...
scripts/LargeScaleStructures/data_stitching.py
View file @
a428d810
...
...
@@ -25,7 +25,7 @@ else:
pass
if
IS_IN_MANTIDGUI
:
from
qtpy
import
QtCore
from
mantid.plots._compatability
import
plotSpectrum
class
RangeSelector
(
object
):
"""
...
...
@@ -44,11 +44,11 @@ class RangeSelector(object):
self
.
_ws_output_base
=
None
self
.
_graph
=
"Range Selector"
def
disconnect
(
self
):
if
IS_IN_MANTIDGUI
:
mantidplot
.
app
.
disconnect
(
mantidplot
.
app
.
mantidUI
,
QtCore
.
SIGNAL
(
"x_range_update(double,double)"
),
self
.
_call_back
)
#
def disconnect(self):
#
if IS_IN_MANTIDGUI:
#
mantidplot.app.disconnect(mantidplot.app.mantidUI,
#
QtCore.SIGNAL("x_range_update(double,double)"),
#
self._call_back)
def
connect
(
self
,
ws
,
call_back
,
xmin
=
None
,
xmax
=
None
,
range_min
=
None
,
range_max
=
None
,
x_title
=
None
,
...
...
@@ -61,35 +61,31 @@ class RangeSelector(object):
self
.
_call_back
=
call_back
self
.
_ws_output_base
=
ws_output_base
mantidplot
.
app
.
connect
(
mantidplot
.
app
.
mantidUI
,
QtCore
.
SIGNAL
(
"x_range_update(double,double)"
),
self
.
_call_back
)
g
=
mantidplot
.
graph
(
self
.
_graph
)
if
g
is
not
None
:
g
.
close
()
#mantidplot.app.connect(mantidplot.app.mantidUI,
# QtCore.SIGNAL("x_range_update(double,double)"),
# self._call_back)
g
=
mantidplot
.
plotSpectrum
(
ws
,
[
0
],
True
)
g
.
s
etNam
e
(
self
.
_graph
)
l
=
g
.
a
ctiveLayer
()
g
=
plotSpectrum
(
ws
,
[
0
],
True
)
g
.
s
uptitl
e
(
self
.
_graph
)
l
=
g
.
a
xes
[
0
]
try
:
title
=
ws
[
0
].
replace
(
"_"
,
" "
)
title
.
strip
()
except
:
title
=
" "
l
.
setTitle
(
" "
)
l
.
setCurveTitle
(
0
,
title
)
l
.
set_title
(
title
)
if
log_scale
:
l
.
logYlinX
()
l
.
yscale
(
'log'
)
l
.
xscale
(
'linear'
)
if
x_title
is
not
None
:
l
.
set
XTitle
(
x_title
)
l
.
set
_xlabel
(
x_title
)
if
xmin
is
not
None
and
xmax
is
not
None
:
l
.
set
Scale
(
2
,
xmin
,
xmax
)
l
.
set
_xlim
(
xmin
,
xmax
)
if
range_min
is
not
None
and
range_max
is
not
None
:
mantidplot
.
selectMultiPeak
(
g
,
False
,
range_min
,
range_max
)
else
:
mantidplot
.
selectMultiPeak
(
g
,
False
)
#
if range_min is not None and range_max is not None:
#
mantidplot.selectMultiPeak(g, False, range_min, range_max)
#
else:
#
mantidplot.selectMultiPeak(g, False)
@
classmethod
def
connect
(
cls
,
ws
,
call_back
,
xmin
=
None
,
xmax
=
None
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment