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
5541a0db
Commit
5541a0db
authored
Mar 27, 2019
by
Tom Titcombe
Browse files
readability-named-parameter on qt/widgets/instrumentview
parent
01d46f18
Changes
33
Hide whitespace changes
Inline
Side-by-side
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BinDialog.h
View file @
5541a0db
...
...
@@ -34,11 +34,11 @@ class BinDialog : public QDialog {
public:
explicit
BinDialog
(
QWidget
*
parent
=
nullptr
);
~
BinDialog
()
override
;
void
setIntegralMinMax
(
double
,
double
,
bool
);
void
setIntegralMinMax
(
double
/*minBin*/
,
double
/*maxBin*/
,
bool
/*useEverything*/
);
signals:
/// This signal is sent when changing the bin range selected.
/// Parameters are: min, max, and a bool set to true to mean "everything"
void
IntegralMinMax
(
double
,
double
,
bool
);
void
IntegralMinMax
(
double
/*_t1*/
,
double
/*_t2*/
,
bool
/*_t3*/
);
public
slots
:
void
btnOKClicked
();
...
...
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/CollapsiblePanel.h
View file @
5541a0db
...
...
@@ -24,7 +24,7 @@ public:
void
collapse
();
void
expand
();
signals:
void
collapseOrExpand
(
bool
);
void
collapseOrExpand
(
bool
/*_t1*/
);
private:
bool
m_collapsed
;
...
...
@@ -47,7 +47,7 @@ public slots:
void
collapse
();
void
expand
();
private
slots
:
void
collapseOrExpand
(
bool
);
void
collapseOrExpand
(
bool
/*collapse*/
);
private:
QWidget
*
m_widget
;
...
...
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/GLColor.h
View file @
5541a0db
...
...
@@ -34,7 +34,7 @@ public:
/// Set all four values atomically
void
set
(
float
red
,
float
green
,
float
blue
,
float
alpha
);
/// Retrieve the component colours
void
get
(
float
&
,
float
&
,
float
&
,
float
&
)
const
;
void
get
(
float
&
/*red*/
,
float
&
/*green*/
,
float
&
/*blue*/
,
float
&
/*alpha*/
)
const
;
void
get
(
unsigned
char
&
r
,
unsigned
char
&
g
,
unsigned
char
&
b
)
const
;
/// Retrieve the component colours
void
getUB3
(
unsigned
char
*
c
)
const
;
...
...
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentActor.h
View file @
5541a0db
...
...
@@ -72,7 +72,7 @@ public:
/// Set a component (and all its children) visible.
void
setComponentVisible
(
size_t
componentIndex
);
/// Set visibilit of all components.
void
setAllComponentsVisibility
(
bool
);
void
setAllComponentsVisibility
(
bool
/*on*/
);
/// Check if any child is visible
bool
hasChildVisible
()
const
;
/// Get the underlying instrument
...
...
@@ -104,15 +104,15 @@ public:
/// Get the color map.
const
ColorMap
&
getColorMap
()
const
;
/// Load a new color map from a file
void
loadColorMap
(
const
QString
&
,
bool
reset_colors
=
true
);
void
loadColorMap
(
const
QString
&
/*fname*/
,
bool
reset_colors
=
true
);
/// Change the colormap scale type.
void
changeScaleType
(
int
);
void
changeScaleType
(
int
/*type*/
);
/// Change the colormap power scale exponent.
void
changeNthPower
(
double
);
void
changeNthPower
(
double
/*nth_power*/
);
/// Get the file name of the current color map.
QString
getCurrentColorMap
()
const
{
return
m_currentCMap
;
}
/// Toggle colormap scale autoscaling.
void
setAutoscaling
(
bool
);
void
setAutoscaling
(
bool
/*on*/
);
/// extracts a mask workspace from the visualised workspace
Mantid
::
API
::
MatrixWorkspace_sptr
extractCurrentMask
()
const
;
...
...
@@ -171,7 +171,7 @@ public:
/// current integration range.
void
updateColors
();
/// Toggle display of the guide and other non-detector instrument components
void
showGuides
(
bool
);
void
showGuides
(
bool
/*on*/
);
/// Get the guide visibility status
bool
areGuidesShown
()
const
{
return
m_showGuides
;
}
...
...
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentTreeWidget.h
View file @
5541a0db
...
...
@@ -40,9 +40,9 @@ public:
QStringList
findExpandedComponents
(
const
QModelIndex
&
parent
=
QModelIndex
())
const
;
public
slots
:
void
sendComponentSelectedSignal
(
const
QModelIndex
);
void
sendComponentSelectedSignal
(
const
QModelIndex
/*index*/
);
signals:
void
componentSelected
(
size_t
);
void
componentSelected
(
size_t
/*_t1*/
);
private:
InstrumentWidget
*
m_instrWidget
;
...
...
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentWidget.h
View file @
5541a0db
...
...
@@ -157,20 +157,20 @@ public:
std
::
string
saveToProject
()
const
;
signals:
void
enableLighting
(
bool
);
void
plot1D
(
const
QString
&
,
const
std
::
set
<
int
>
&
,
bool
);
void
createDetectorTable
(
const
QString
&
,
const
std
::
vector
<
int
>
&
,
bool
);
void
needSetIntegrationRange
(
double
,
double
);
void
surfaceTypeChanged
(
int
);
void
enableLighting
(
bool
/*_t1*/
);
void
plot1D
(
const
QString
&
/*_t1*/
,
const
std
::
set
<
int
>
&
/*_t2*/
,
bool
/*_t3*/
);
void
createDetectorTable
(
const
QString
&
/*_t1*/
,
const
std
::
vector
<
int
>
&
/*_t2*/
,
bool
/*_t3*/
);
void
needSetIntegrationRange
(
double
/*_t1*/
,
double
/*_t2*/
);
void
surfaceTypeChanged
(
int
/*_t1*/
);
void
colorMapChanged
();
void
colorMapMinValueChanged
(
double
);
void
colorMapMaxValueChanged
(
double
);
void
colorMapRangeChanged
(
double
,
double
);
void
scaleTypeChanged
(
int
);
void
nthPowerChanged
(
double
);
void
integrationRangeChanged
(
double
,
double
);
void
glOptionChanged
(
bool
);
void
requestSelectComponent
(
const
QString
&
);
void
colorMapMinValueChanged
(
double
/*_t1*/
);
void
colorMapMaxValueChanged
(
double
/*_t1*/
);
void
colorMapRangeChanged
(
double
/*_t1*/
,
double
/*_t2*/
);
void
scaleTypeChanged
(
int
/*_t1*/
);
void
nthPowerChanged
(
double
/*_t1*/
);
void
integrationRangeChanged
(
double
/*_t1*/
,
double
/*_t2*/
);
void
glOptionChanged
(
bool
/*_t1*/
);
void
requestSelectComponent
(
const
QString
&
/*_t1*/
);
void
preDeletingHandle
();
void
clearingHandle
();
void
maskedWorkspaceOverlayed
();
...
...
@@ -183,31 +183,31 @@ protected:
bool
eventFilter
(
QObject
*
obj
,
QEvent
*
ev
)
override
;
public
slots
:
void
tabChanged
(
int
);
void
tabChanged
(
int
/*unused*/
);
void
componentSelected
(
size_t
componentIndex
);
void
executeAlgorithm
(
const
QString
&
,
const
QString
&
);
void
executeAlgorithm
(
Mantid
::
API
::
IAlgorithm_sptr
);
void
executeAlgorithm
(
const
QString
&
/*unused*/
,
const
QString
&
/*unused*/
);
void
executeAlgorithm
(
Mantid
::
API
::
IAlgorithm_sptr
/*alg*/
);
void
setupColorMap
();
void
changeColormap
(
const
QString
&
cmapNameOrPath
=
""
);
// Deprecated
void
changeScaleType
(
int
);
// Deprecated
void
changeNthPower
(
double
);
void
changeScaleType
(
int
/*type*/
);
// Deprecated
void
changeNthPower
(
double
/*nth_power*/
);
void
changeColorMapMinValue
(
double
minValue
);
// Deprecated
void
changeColorMapMaxValue
(
double
maxValue
);
// Deprecated
void
changeColorMapRange
(
double
minValue
,
double
maxValue
);
// Deprecated
void
setIntegrationRange
(
double
,
double
);
void
setBinRange
(
double
,
double
);
void
setIntegrationRange
(
double
/*xmin*/
,
double
/*xmax*/
);
void
setBinRange
(
double
/*xmin*/
,
double
/*xmax*/
);
void
disableColorMapAutoscaling
();
// Deprecated
void
setColorMapAutoscaling
(
bool
);
// Deprecated
void
setColorMapAutoscaling
(
bool
/*on*/
);
// Deprecated
void
setViewDirection
(
const
QString
&
);
void
setViewDirection
(
const
QString
&
/*input*/
);
void
pickBackgroundColor
();
void
saveImage
(
QString
filename
);
void
setInfoText
(
const
QString
&
);
void
set3DAxesState
(
bool
);
void
setSurfaceType
(
int
);
void
setWireframe
(
bool
);
void
setInfoText
(
const
QString
&
/*text*/
);
void
set3DAxesState
(
bool
/*on*/
);
void
setSurfaceType
(
int
/*type*/
);
void
setWireframe
(
bool
/*on*/
);
/// Overlay a workspace with the given name
bool
overlay
(
const
QString
&
wsName
);
...
...
@@ -319,7 +319,7 @@ private:
/// overlay a masked workspace on the projection surface
void
overlayMaskedWorkspace
(
Mantid
::
API
::
IMaskWorkspace_sptr
ws
);
/// overlay a table workspace with shape parameters on the projection surface
void
overlayShapesWorkspace
(
Mantid
::
API
::
ITableWorkspace_sptr
);
void
overlayShapesWorkspace
(
Mantid
::
API
::
ITableWorkspace_sptr
/*ws*/
);
/// get a workspace from the ADS
Mantid
::
API
::
Workspace_sptr
getWorkspaceFromADS
(
const
std
::
string
&
name
);
/// get a handle to the unwrapped surface
...
...
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentWidgetMaskTab.h
View file @
5541a0db
...
...
@@ -80,10 +80,10 @@ public:
virtual
std
::
string
saveToProject
()
const
override
;
signals:
void
executeAlgorithm
(
const
QString
&
,
const
QString
&
);
void
executeAlgorithm
(
const
QString
&
/*_t1*/
,
const
QString
&
/*_t2*/
);
public
slots
:
void
changedIntegrationRange
(
double
,
double
);
void
changedIntegrationRange
(
double
/*unused*/
,
double
/*unused*/
);
protected
slots
:
void
setActivity
();
...
...
@@ -111,13 +111,13 @@ protected slots:
void
sumDetsToWorkspace
();
void
saveIncludeGroupToFile
();
void
saveExcludeGroupToFile
();
void
showSaveMenuTooltip
(
QAction
*
);
void
showSaveMenuTooltip
(
QAction
*
/*action*/
);
void
toggleMaskGroup
();
void
enableApplyButtons
();
void
doubleChanged
(
QtProperty
*
);
void
doubleChanged
(
QtProperty
*
/*prop*/
);
protected:
void
showEvent
(
QShowEvent
*
)
override
;
void
showEvent
(
QShowEvent
*
/*unused*/
)
override
;
void
clearProperties
();
void
setProperties
();
...
...
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentWidgetPickTab.h
View file @
5541a0db
...
...
@@ -87,7 +87,7 @@ public:
void
initSurface
()
override
;
void
saveSettings
(
QSettings
&
settings
)
const
override
;
void
loadSettings
(
const
QSettings
&
settings
)
override
;
bool
addToDisplayContextMenu
(
QMenu
&
)
const
override
;
bool
addToDisplayContextMenu
(
QMenu
&
/*unused*/
)
const
override
;
void
selectTool
(
const
ToolType
tool
);
boost
::
shared_ptr
<
ProjectionSurface
>
getSurface
()
const
;
const
InstrumentWidget
*
getInstrumentWidget
()
const
;
...
...
@@ -98,7 +98,7 @@ public:
public
slots
:
void
setTubeXUnits
(
int
units
);
void
changedIntegrationRange
(
double
,
double
);
void
changedIntegrationRange
(
double
/*unused*/
,
double
/*unused*/
);
private
slots
:
void
plotContextMenu
();
void
sumDetectors
();
...
...
@@ -106,7 +106,7 @@ private slots:
void
setPlotCaption
();
void
setSelectionType
();
void
storeCurve
();
void
removeCurve
(
const
QString
&
);
void
removeCurve
(
const
QString
&
/*label*/
);
void
singleComponentTouched
(
size_t
pickID
);
void
singleComponentPicked
(
size_t
pickID
);
void
alignPeaks
(
const
std
::
vector
<
Mantid
::
Kernel
::
V3D
>
&
planePeaks
,
...
...
@@ -120,7 +120,7 @@ private slots:
void
savePlotToWorkspace
();
private:
void
showEvent
(
QShowEvent
*
)
override
;
void
showEvent
(
QShowEvent
*
/*unused*/
)
override
;
QColor
getShapeBorderColor
()
const
;
/* Pick tab controls */
...
...
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentWidgetRenderTab.h
View file @
5541a0db
...
...
@@ -42,14 +42,14 @@ public:
explicit
InstrumentWidgetRenderTab
(
InstrumentWidget
*
instrWindow
);
~
InstrumentWidgetRenderTab
();
void
initSurface
()
override
;
void
saveSettings
(
QSettings
&
)
const
override
;
void
loadSettings
(
const
QSettings
&
)
override
;
void
saveSettings
(
QSettings
&
/*unused*/
)
const
override
;
void
loadSettings
(
const
QSettings
&
/*unused*/
)
override
;
// legacy interface for MantidPlot python api
ColorMap
::
ScaleType
getScaleType
()
const
;
void
setScaleType
(
ColorMap
::
ScaleType
type
);
void
setAxis
(
const
QString
&
axisName
);
bool
areAxesOn
()
const
;
void
setupColorBar
(
const
ColorMap
&
,
double
,
double
,
double
,
bool
);
void
setupColorBar
(
const
ColorMap
&
/*cmap*/
,
double
/*minValue*/
,
double
/*maxValue*/
,
double
/*minPositive*/
,
bool
/*autoscaling*/
);
/// Load the render window tab settings from file.
virtual
void
loadFromProject
(
const
std
::
string
&
lines
)
override
;
/// Save the render window tab settings to file.
...
...
@@ -57,7 +57,7 @@ public:
signals:
void
rescaleColorMap
();
void
setAutoscaling
(
bool
);
void
setAutoscaling
(
bool
/*_t1*/
);
public
slots
:
void
setMinValue
(
double
value
,
bool
apply
=
true
);
...
...
@@ -66,31 +66,31 @@ public slots:
void
showAxes
(
bool
on
);
void
displayDetectorsOnly
(
bool
yes
);
void
enableGL
(
bool
on
);
void
setColorMapAutoscaling
(
bool
);
void
setColorMapAutoscaling
(
bool
/*on*/
);
void
changeColorMap
(
const
QString
&
filename
=
""
);
void
setSurfaceType
(
int
);
void
flipUnwrappedView
(
bool
);
void
setSurfaceType
(
int
/*index*/
);
void
flipUnwrappedView
(
bool
/*on*/
);
void
saveImage
(
QString
filename
=
""
);
private
slots
:
void
showResetView
(
int
);
void
showFlipControl
(
int
);
void
showResetView
(
int
/*iv*/
);
void
showFlipControl
(
int
/*iv*/
);
/// Called before the display setting menu opens. Filters out menu options.
void
displaySettingsAboutToshow
();
/// Change the type of the surfac
void
surfaceTypeChanged
(
int
index
);
void
colorMapChanged
();
void
scaleTypeChanged
(
int
);
void
nthPowerChanged
(
double
);
void
glOptionChanged
(
bool
);
void
showMenuToolTip
(
QAction
*
);
void
scaleTypeChanged
(
int
/*type*/
);
void
nthPowerChanged
(
double
/*nth_power*/
);
void
glOptionChanged
(
bool
/*on*/
);
void
showMenuToolTip
(
QAction
*
/*action*/
);
void
setUCorrection
();
void
toggleLayerDisplay
(
bool
on
);
void
setVisibleLayer
(
int
layer
);
private:
// methods
void
showEvent
(
QShowEvent
*
)
override
;
void
showEvent
(
QShowEvent
*
/*unused*/
)
override
;
QMenu
*
createPeaksMenu
();
QFrame
*
setupAxisFrame
();
void
setPrecisionMenuItemChecked
(
int
n
);
...
...
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentWidgetTab.h
View file @
5541a0db
...
...
@@ -34,13 +34,13 @@ public:
/// Use it for surface-specific initialization
virtual
void
initSurface
()
{}
/// Save tab's persistent settings to the provided QSettings instance
virtual
void
saveSettings
(
QSettings
&
)
const
{}
virtual
void
saveSettings
(
QSettings
&
/*unused*/
)
const
{}
/// Load (read and apply) tab's persistent settings from the provided
/// QSettings instance
virtual
void
loadSettings
(
const
QSettings
&
)
{}
virtual
void
loadSettings
(
const
QSettings
&
/*unused*/
)
{}
/// Add tab-specific items to the context menu
/// Return true if at least 1 item was added or false otherwise.
virtual
bool
addToDisplayContextMenu
(
QMenu
&
)
const
{
return
false
;
}
virtual
bool
addToDisplayContextMenu
(
QMenu
&
/*unused*/
)
const
{
return
false
;
}
/// Get the projection surface
boost
::
shared_ptr
<
ProjectionSurface
>
getSurface
()
const
;
/// Load state for the widget tab from a project file
...
...
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentWidgetTreeTab.h
View file @
5541a0db
...
...
@@ -32,7 +32,7 @@ public slots:
void
selectComponentByName
(
const
QString
&
name
);
private:
void
showEvent
(
QShowEvent
*
)
override
;
void
showEvent
(
QShowEvent
*
/*unused*/
)
override
;
/// Widget to display instrument tree
InstrumentTreeWidget
*
m_instrumentTree
;
friend
class
InstrumentWidgetEncoder
;
...
...
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/MantidGLWidget.h
View file @
5541a0db
...
...
@@ -31,13 +31,13 @@ public:
void
setSurface
(
boost
::
shared_ptr
<
ProjectionSurface
>
surface
);
boost
::
shared_ptr
<
ProjectionSurface
>
getSurface
()
{
return
m_surface
;
}
void
setBackgroundColor
(
QColor
);
void
setBackgroundColor
(
QColor
/*input*/
);
QColor
currentBackgroundColor
()
const
;
void
saveToFile
(
const
QString
&
filename
);
// int getLightingState() const {return m_lightingState;}
public
slots
:
void
enableLighting
(
bool
);
void
enableLighting
(
bool
/*on*/
);
void
updateView
(
bool
picking
=
true
);
void
updateDetectors
();
void
componentSelected
(
size_t
componentIndex
);
...
...
@@ -47,16 +47,16 @@ protected:
void
resetWidget
();
void
MakeObject
();
void
paintEvent
(
QPaintEvent
*
event
)
override
;
void
resizeGL
(
int
,
int
)
override
;
void
contextMenuEvent
(
QContextMenuEvent
*
)
override
;
void
mousePressEvent
(
QMouseEvent
*
)
override
;
void
mouseMoveEvent
(
QMouseEvent
*
)
override
;
void
mouseReleaseEvent
(
QMouseEvent
*
)
override
;
void
wheelEvent
(
QWheelEvent
*
)
override
;
void
keyPressEvent
(
QKeyEvent
*
)
override
;
void
keyReleaseEvent
(
QKeyEvent
*
)
override
;
void
enterEvent
(
QEvent
*
)
override
;
void
leaveEvent
(
QEvent
*
)
override
;
void
resizeGL
(
int
/*w*/
,
int
/*h*/
)
override
;
void
contextMenuEvent
(
QContextMenuEvent
*
/*unused*/
)
override
;
void
mousePressEvent
(
QMouseEvent
*
/*unused*/
)
override
;
void
mouseMoveEvent
(
QMouseEvent
*
/*unused*/
)
override
;
void
mouseReleaseEvent
(
QMouseEvent
*
/*unused*/
)
override
;
void
wheelEvent
(
QWheelEvent
*
/*unused*/
)
override
;
void
keyPressEvent
(
QKeyEvent
*
/*unused*/
)
override
;
void
keyReleaseEvent
(
QKeyEvent
*
/*unused*/
)
override
;
void
enterEvent
(
QEvent
*
/*unused*/
)
override
;
void
leaveEvent
(
QEvent
*
/*unused*/
)
override
;
void
draw
();
void
checkGLError
(
const
QString
&
funName
);
...
...
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/MiniPlotQwt.h
View file @
5541a0db
...
...
@@ -35,7 +35,7 @@ public:
QString
curveLabel
);
QString
label
()
const
{
return
m_label
;
}
void
setYAxisLabelRotation
(
double
degrees
);
void
addPeakLabel
(
const
PeakMarker2D
*
);
void
addPeakLabel
(
const
PeakMarker2D
*
/*marker*/
);
void
clearPeakLabels
();
bool
hasCurve
()
const
;
void
store
();
...
...
@@ -57,13 +57,13 @@ public slots:
void
clearAll
();
signals:
void
showContextMenu
();
void
clickedAt
(
double
,
double
);
void
clickedAt
(
double
/*_t1*/
,
double
/*_t2*/
);
protected:
void
resizeEvent
(
QResizeEvent
*
e
)
override
;
void
contextMenuEvent
(
QContextMenuEvent
*
e
)
override
;
void
mousePressEvent
(
QMouseEvent
*
)
override
;
void
mouseReleaseEvent
(
QMouseEvent
*
)
override
;
void
mousePressEvent
(
QMouseEvent
*
/*unused*/
)
override
;
void
mouseReleaseEvent
(
QMouseEvent
*
/*unused*/
)
override
;
private:
QwtPlotCurve
*
m_curve
;
...
...
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/PanelsSurface.h
View file @
5541a0db
...
...
@@ -54,8 +54,8 @@ public:
const
Mantid
::
Kernel
::
V3D
&
axis
);
~
PanelsSurface
()
override
;
void
init
()
override
;
void
project
(
const
Mantid
::
Kernel
::
V3D
&
,
double
&
,
double
&
,
double
&
,
double
&
)
const
override
;
void
project
(
const
Mantid
::
Kernel
::
V3D
&
/*pos*/
,
double
&
/*u*/
,
double
&
/*v*/
,
double
&
/*uscale*/
,
double
&
/*vscale*/
)
const
override
;
protected:
boost
::
optional
<
std
::
pair
<
std
::
vector
<
size_t
>
,
Mantid
::
Kernel
::
V3D
>>
...
...
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/PeakOverlay.h
View file @
5541a0db
...
...
@@ -127,7 +127,7 @@ public:
~
PeakOverlay
()
override
{}
/// Override the drawing method
void
draw
(
QPainter
&
painter
)
const
override
;
void
removeShapes
(
const
QList
<
Shape2D
*>
&
)
override
;
void
removeShapes
(
const
QList
<
Shape2D
*>
&
/*unused*/
)
override
;
void
clear
()
override
;
/// Create the markers
...
...
@@ -135,7 +135,7 @@ public:
void
addMarker
(
PeakMarker2D
*
m
);
QList
<
PeakMarker2D
*>
getMarkersWithID
(
int
detID
)
const
;
int
getNumberPeaks
()
const
;
Mantid
::
Geometry
::
IPeak
&
getPeak
(
int
);
Mantid
::
Geometry
::
IPeak
&
getPeak
(
int
/*i*/
);
QList
<
PeakMarker2D
*>
getSelectedPeakMarkers
();
/// Return PeaksWorkspace associated with this overlay.
boost
::
shared_ptr
<
Mantid
::
API
::
IPeaksWorkspace
>
getPeaksWorkspace
()
{
...
...
@@ -150,7 +150,7 @@ public:
void
setPeakVisibility
(
double
xmin
,
double
xmax
,
QString
units
);
signals:
void
executeAlgorithm
(
Mantid
::
API
::
IAlgorithm_sptr
);
void
executeAlgorithm
(
Mantid
::
API
::
IAlgorithm_sptr
/*_t1*/
);
private:
/// A WorkspaceObserver handle implemented.
...
...
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/Projection3D.h
View file @
5541a0db
...
...
@@ -47,7 +47,7 @@ public:
void
componentSelected
(
size_t
componentIndex
)
override
;
void
getSelectedDetectors
(
std
::
vector
<
size_t
>
&
detIndices
)
override
;
void
getMaskedDetectors
(
std
::
vector
<
size_t
>
&
detIndices
)
const
override
;
void
resize
(
int
,
int
)
override
;
void
resize
(
int
/*unused*/
,
int
/*unused*/
)
override
;
QString
getInfoText
()
const
override
;
/// Load settings for the 3D projection from a project file
virtual
void
loadFromProject
(
const
std
::
string
&
lines
)
override
;
...
...
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/ProjectionSurface.h
View file @
5541a0db
...
...
@@ -94,7 +94,7 @@ public:
/// draw the surface onto a normal widget
virtual
void
drawSimple
(
QWidget
*
widget
)
const
;
/// called when the gl widget gets resized
virtual
void
resize
(
int
,
int
);
virtual
void
resize
(
int
/*unused*/
,
int
/*unused*/
);
/// redraw surface without recalulationg of colours, etc
virtual
void
updateView
(
bool
picking
=
true
);
/// full update and redraw of the surface
...
...
@@ -102,13 +102,13 @@ public:
/// returns the bounding rectangle in the real coordinates
virtual
RectF
getSurfaceBounds
()
const
{
return
m_viewRect
;
}
virtual
void
mousePressEvent
(
QMouseEvent
*
);
virtual
void
mouseMoveEvent
(
QMouseEvent
*
);
virtual
void
mouseReleaseEvent
(
QMouseEvent
*
);
virtual
void
wheelEvent
(
QWheelEvent
*
);
virtual
void
keyPressEvent
(
QKeyEvent
*
);
virtual
void
enterEvent
(
QEvent
*
);
virtual
void
leaveEvent
(
QEvent
*
);
virtual
void
mousePressEvent
(
QMouseEvent
*
/*e*/
);
virtual
void
mouseMoveEvent
(
QMouseEvent
*
/*e*/
);
virtual
void
mouseReleaseEvent
(
QMouseEvent
*
/*e*/
);
virtual
void
wheelEvent
(
QWheelEvent
*
/*e*/
);
virtual
void
keyPressEvent
(
QKeyEvent
*
/*e*/
);
virtual
void
enterEvent
(
QEvent
*
/*e*/
);
virtual
void
leaveEvent
(
QEvent
*
/*e*/
);
/// return true if any of the detectors have been selected
virtual
bool
hasSelection
()
const
;
...
...
@@ -264,8 +264,8 @@ public:
signals:
// detector selection
void
singleComponentTouched
(
size_t
);
void
singleComponentPicked
(
size_t
);
void
singleComponentTouched
(
size_t
/*_t1*/
);
void
singleComponentPicked
(
size_t
/*_t1*/
);
// shape manipulation
void
signalToStartCreatingShape2D
(
const
QString
&
type
,
...
...
@@ -284,16 +284,16 @@ signals:
// peaks
void
peaksWorkspaceAdded
();
void
peaksWorkspaceDeleted
();
void
alignPeaks
(
const
std
::
vector
<
Mantid
::
Kernel
::
V3D
>
&
,
const
Mantid
::
Geometry
::
IPeak
*
);
void
alignPeaks
(
const
std
::
vector
<
Mantid
::
Kernel
::
V3D
>
&
/*_t1*/
,
const
Mantid
::
Geometry
::
IPeak
*
/*_t2*/
);
void
comparePeaks
(
const
std
::
pair
<
std
::
vector
<
Mantid
::
Geometry
::
IPeak
*>
,
std
::
vector
<
Mantid
::
Geometry
::
IPeak
*>>
&
);
std
::
vector
<
Mantid
::
Geometry
::
IPeak
*>>
&
/*_t1*/
);
// other
void
redrawRequired
();
///< request redrawing of self
void
updateInfoText
();
///< request update of the info string at bottom of
/// InstrumentWindow
void
executeAlgorithm
(
Mantid
::
API
::
IAlgorithm_sptr
);
void
executeAlgorithm
(
Mantid
::
API
::
IAlgorithm_sptr
/*_t1*/
);
protected
slots
:
...
...
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/Shape2D.h
View file @
5541a0db
...
...
@@ -90,12 +90,12 @@ public:
/// Set new bounding rect.
virtual
void
setBoundingRect
(
const
RectF
&
rect
);
/// will the shape be selected if clicked at a point? By default return false.
virtual
bool
selectAt
(
const
QPointF
&
)
const
{
return
false
;
}
virtual
bool
selectAt
(
const
QPointF
&
/*unused*/
)
const
{
return
false
;
}
/// is a point inside the shape (closed line)? By default return false.
virtual
bool
contains
(
const
QPointF
&
)
const
{
return
false
;
}
virtual
bool
contains
(
const
QPointF
&
/*unused*/
)
const
{
return
false
;
}
/// is a point "masked" by the shape. Only filled regions of a shape mask a
/// point
virtual
bool
isMasked
(
const
QPointF
&
)
const
;
virtual
bool
isMasked
(
const
QPointF
&
/*p*/
)
const
;
/// Set border color.
virtual
void
setColor
(
const
QColor
&
color
)
{
m_color
=
color
;
}
/// Get border color.
...
...
@@ -165,10 +165,10 @@ protected:
virtual
size_t
getShapeNControlPoints
()
const
{
return
0
;
}
// returns position of a shape specific control point, 0 < i <
// getShapeNControlPoints()
virtual
QPointF
getShapeControlPoint
(
size_t
)
const
{
return
QPointF
();
}
virtual
QPointF
getShapeControlPoint
(
size_t
/*unused*/
)
const
{
return
QPointF
();
}
// sets position of a shape specific control point, 0 < i <
// getShapeNControlPoints()
virtual
void
setShapeControlPoint
(
size_t
,
const
QPointF
&
)
{}
virtual
void
setShapeControlPoint
(
size_t
/*unused*/
,
const
QPointF
&
/*unused*/
)
{}
// make sure the bounding box is correct
virtual
void
resetBoundingRect
()
{}
...
...
@@ -287,7 +287,7 @@ public:
protected:
void
drawShape
(
QPainter
&
painter
)
const
override
;
void
addToPath
(
QPainterPath
&
)
const
override
{}