-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs #6279. Can now visualise non-integrated peaks wokspaces.
- Loading branch information
1 parent
cf27410
commit b40403d
Showing
15 changed files
with
414 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayCross.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
#ifndef MANTID_SLICEVIEWER_PEAKOVERLAYCROSS_H_ | ||
#define MANTID_SLICEVIEWER_PEAKOVERLAYCROSS_H_ | ||
|
||
#include "DllOption.h" | ||
#include "MantidKernel/System.h" | ||
#include "MantidKernel/V3D.h" | ||
#include <q3iconview.h> | ||
#include <QtCore/QtCore> | ||
#include <QtGui/qwidget.h> | ||
#include <qwt_plot.h> | ||
#include <qpainter.h> | ||
#include <qcolor.h> | ||
#include "MantidQtSliceViewer/PeakOverlayView.h" | ||
|
||
|
||
namespace MantidQt | ||
{ | ||
namespace SliceViewer | ||
{ | ||
|
||
/** Widget representing a peak sphere on the plot. Used for representing spherically integrated peaks. | ||
@date 2012-08-22 | ||
Copyright © 2011 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory | ||
This file is part of Mantid. | ||
Mantid is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 3 of the License, or | ||
(at your option) any later version. | ||
Mantid is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
File change history is stored at: <https://github.com/mantidproject/mantid> | ||
Code Documentation is available at: <http://doxygen.mantidproject.org> | ||
*/ | ||
class EXPORT_OPT_MANTIDQT_SLICEVIEWER PeakOverlayCross : public QWidget, public PeakOverlayView | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
/// Constructor | ||
PeakOverlayCross(QwtPlot * plot, QWidget * parent, const Mantid::Kernel::V3D& origin, const double& maxZ, const double& minZ, const QColor& peakColour); | ||
/// Destructor | ||
virtual ~PeakOverlayCross(); | ||
/// Set the slice point at position. | ||
virtual void setSlicePoint(const double& point); | ||
/// Hide the view. | ||
virtual void hideView(); | ||
/// Show the view. | ||
virtual void showView(); | ||
/// Update the view. | ||
virtual void updateView(); | ||
/// Get the origin. md x, md y | ||
const Mantid::Kernel::V3D & getOrigin() const; | ||
/// Move the position of the peak, by using a different configuration of the existing origin indexes. | ||
void movePosition(PeakTransform_sptr peakTransform); | ||
|
||
private: | ||
|
||
//QRect drawHandle(QPainter & painter, QPointF coords, QColor brush); | ||
void paintEvent(QPaintEvent *event); | ||
|
||
QSize sizeHint() const; | ||
QSize size() const; | ||
int height() const; | ||
int width() const; | ||
|
||
/// QwtPlot containing this | ||
QwtPlot * m_plot; | ||
/// Original origin x=h, y=k, z=l | ||
const Mantid::Kernel::V3D m_originalOrigin; | ||
/// Origin md-x, md-y, and md-z | ||
Mantid::Kernel::V3D m_origin; | ||
/// Effective radius of the widget. This is so that the widget can be effectively brought in and out of focus as a result of slicing. | ||
const double m_effectiveRadius; | ||
/// normalisation value. | ||
double m_normalisation; | ||
/// Max opacity | ||
const double m_opacityMax; | ||
/// Min opacity | ||
const double m_opacityMin; | ||
/// Cross size percentage in y a fraction of the current screen height. | ||
const double m_crossViewFraction; | ||
/// Peak colour | ||
QColor m_peakColour; | ||
/// Cached opacity at the distance z from origin | ||
double m_opacityAtDistance; | ||
}; | ||
|
||
|
||
} // namespace SliceViewer | ||
} // namespace Mantid | ||
|
||
#endif /* MANTID_SLICEVIEWER_PEAKOVERLAYCROSS_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.