QXRD
0.11.16
|
#include <qxrdroicoordinateslistmodel.h>
Public Types | |
enum | { NumCol, SumCol, AverageCol, MinimumCol, MaximumCol, NPixelsCol, BackgroundCol, XGradientCol, YGradientCol, TypeCol, CenterXCol, CenterYCol, WidthCol, HeightCol, Width2Col, Height2Col, ColCount } |
Public Slots | |
void | onROIChanged () |
void | onROIsChanged () |
Public Member Functions | |
QxrdROICoordinatesListModel (QcepSettingsSaverWPtr saver, QxrdExperimentWPtr exp) | |
virtual | ~QxrdROICoordinatesListModel () |
void | readSettings (QSettings *settings, QString section) |
void | writeSettings (QSettings *settings, QString section) |
int | rowCount (const QModelIndex &parent) const |
int | columnCount (const QModelIndex &parent) const |
QVariant | data (const QModelIndex &index, int role) const |
QVariant | headerData (int section, Qt::Orientation orientation, int role) const |
Qt::ItemFlags | flags (const QModelIndex &index) const |
bool | setData (const QModelIndex &index, const QVariant &value, int role) |
void | append (QxrdROICoordinatesPtr coords) |
void | removeROI (int row) |
void | moveROIDown (int row) |
void | moveROIUp (int row) |
void | editROI (int row) |
void | moveROICenter (int row, double x, double y) |
QxrdROICoordinatesPtr | roi (int row) const |
void | setRoi (int row, QxrdROICoordinatesPtr c) |
int | roiCount () const |
void | recalculate (QcepImageDataBasePtr img, QcepMaskDataPtr mask) |
void | visualizeBackground (int n, QcepImageDataBasePtr img, QcepMaskDataPtr mask) |
void | visualizePeak (int n, QcepImageDataBasePtr img, QcepMaskDataPtr mask) |
Static Public Member Functions | |
static QScriptValue | toScriptValue (QScriptEngine *engine, const QxrdROICoordinatesListModelPtr &coords) |
static void | fromScriptValue (const QScriptValue &obj, QxrdROICoordinatesListModelPtr &coords) |
Private Member Functions | |
QxrdROICoordinatesPtr | newROI (int roiType) |
Private Attributes | |
QcepSettingsSaverWPtr | m_Saver |
QMutex | m_Mutex |
QxrdExperimentWPtr | m_Experiment |
QVector< QxrdROICoordinatesPtr > | m_ROICoordinates |
Definition at line 15 of file qxrdroicoordinateslistmodel.h.
anonymous enum |
Enumerator | |
---|---|
NumCol | |
SumCol | |
AverageCol | |
MinimumCol | |
MaximumCol | |
NPixelsCol | |
BackgroundCol | |
XGradientCol | |
YGradientCol | |
TypeCol | |
CenterXCol | |
CenterYCol | |
WidthCol | |
HeightCol | |
Width2Col | |
Height2Col | |
ColCount |
Definition at line 58 of file qxrdroicoordinateslistmodel.h.
QxrdROICoordinatesListModel::QxrdROICoordinatesListModel | ( | QcepSettingsSaverWPtr | saver, |
QxrdExperimentWPtr | exp | ||
) |
Definition at line 6 of file qxrdroicoordinateslistmodel.cpp.
|
virtual |
Definition at line 14 of file qxrdroicoordinateslistmodel.cpp.
void QxrdROICoordinatesListModel::append | ( | QxrdROICoordinatesPtr | coords | ) |
Definition at line 270 of file qxrdroicoordinateslistmodel.cpp.
References m_ROICoordinates, onROIChanged(), and QxrdROICoordinates::roiChanged().
int QxrdROICoordinatesListModel::columnCount | ( | const QModelIndex & | parent | ) | const |
Definition at line 96 of file qxrdroicoordinateslistmodel.cpp.
References ColCount.
Referenced by onROIChanged(), and onROIsChanged().
QVariant QxrdROICoordinatesListModel::data | ( | const QModelIndex & | index, |
int | role | ||
) | const |
Definition at line 101 of file qxrdroicoordinateslistmodel.cpp.
References AverageCol, BackgroundCol, CenterXCol, CenterYCol, Height2Col, HeightCol, MaximumCol, MinimumCol, NPixelsCol, NumCol, roi(), SumCol, TypeCol, Width2Col, WidthCol, XGradientCol, and YGradientCol.
void QxrdROICoordinatesListModel::editROI | ( | int | row | ) |
Definition at line 325 of file qxrdroicoordinateslistmodel.cpp.
Qt::ItemFlags QxrdROICoordinatesListModel::flags | ( | const QModelIndex & | index | ) | const |
Definition at line 194 of file qxrdroicoordinateslistmodel.cpp.
References CenterXCol, CenterYCol, Height2Col, HeightCol, TypeCol, Width2Col, and WidthCol.
|
static |
Definition at line 73 of file qxrdroicoordinateslistmodel.cpp.
QVariant QxrdROICoordinatesListModel::headerData | ( | int | section, |
Qt::Orientation | orientation, | ||
int | role | ||
) | const |
Definition at line 149 of file qxrdroicoordinateslistmodel.cpp.
References AverageCol, BackgroundCol, CenterXCol, CenterYCol, Height2Col, HeightCol, MaximumCol, MinimumCol, NPixelsCol, NumCol, SumCol, TypeCol, Width2Col, WidthCol, XGradientCol, and YGradientCol.
void QxrdROICoordinatesListModel::moveROICenter | ( | int | row, |
double | x, | ||
double | y | ||
) |
Definition at line 343 of file qxrdroicoordinateslistmodel.cpp.
References ColCount, and roi().
void QxrdROICoordinatesListModel::moveROIDown | ( | int | row | ) |
Definition at line 291 of file qxrdroicoordinateslistmodel.cpp.
References m_ROICoordinates.
void QxrdROICoordinatesListModel::moveROIUp | ( | int | row | ) |
Definition at line 308 of file qxrdroicoordinateslistmodel.cpp.
References m_ROICoordinates.
|
private |
Definition at line 265 of file qxrdroicoordinateslistmodel.cpp.
References m_Experiment, and m_Saver.
Referenced by readSettings().
|
slot |
Definition at line 354 of file qxrdroicoordinateslistmodel.cpp.
References columnCount(), and m_ROICoordinates.
Referenced by append(), and readSettings().
|
slot |
Definition at line 375 of file qxrdroicoordinateslistmodel.cpp.
References columnCount(), and rowCount().
void QxrdROICoordinatesListModel::readSettings | ( | QSettings * | settings, |
QString | section | ||
) |
Definition at line 18 of file qxrdroicoordinateslistmodel.cpp.
References m_Mutex, m_ROICoordinates, newROI(), onROIChanged(), roi(), and QxrdROICoordinates::roiChanged().
void QxrdROICoordinatesListModel::recalculate | ( | QcepImageDataBasePtr | img, |
QcepMaskDataPtr | mask | ||
) |
Definition at line 380 of file qxrdroicoordinateslistmodel.cpp.
References m_ROICoordinates, NPixelsCol, and SumCol.
void QxrdROICoordinatesListModel::removeROI | ( | int | row | ) |
Definition at line 282 of file qxrdroicoordinateslistmodel.cpp.
References m_ROICoordinates.
QxrdROICoordinatesPtr QxrdROICoordinatesListModel::roi | ( | int | row | ) | const |
Definition at line 329 of file qxrdroicoordinateslistmodel.cpp.
References m_ROICoordinates.
Referenced by data(), moveROICenter(), readSettings(), setData(), and writeSettings().
int QxrdROICoordinatesListModel::roiCount | ( | ) | const |
Definition at line 86 of file qxrdroicoordinateslistmodel.cpp.
References m_ROICoordinates.
int QxrdROICoordinatesListModel::rowCount | ( | const QModelIndex & | parent | ) | const |
Definition at line 91 of file qxrdroicoordinateslistmodel.cpp.
References m_ROICoordinates.
Referenced by onROIsChanged().
bool QxrdROICoordinatesListModel::setData | ( | const QModelIndex & | index, |
const QVariant & | value, | ||
int | role | ||
) |
Definition at line 212 of file qxrdroicoordinateslistmodel.cpp.
References AverageCol, BackgroundCol, CenterXCol, CenterYCol, Height2Col, HeightCol, MaximumCol, MinimumCol, NPixelsCol, roi(), setRoi(), SumCol, TypeCol, Width2Col, WidthCol, XGradientCol, and YGradientCol.
void QxrdROICoordinatesListModel::setRoi | ( | int | row, |
QxrdROICoordinatesPtr | c | ||
) |
Definition at line 334 of file qxrdroicoordinateslistmodel.cpp.
References ColCount, and m_ROICoordinates.
Referenced by setData().
|
static |
Definition at line 68 of file qxrdroicoordinateslistmodel.cpp.
void QxrdROICoordinatesListModel::visualizeBackground | ( | int | n, |
QcepImageDataBasePtr | img, | ||
QcepMaskDataPtr | mask | ||
) |
Definition at line 393 of file qxrdroicoordinateslistmodel.cpp.
References m_ROICoordinates.
void QxrdROICoordinatesListModel::visualizePeak | ( | int | n, |
QcepImageDataBasePtr | img, | ||
QcepMaskDataPtr | mask | ||
) |
Definition at line 402 of file qxrdroicoordinateslistmodel.cpp.
References m_ROICoordinates.
void QxrdROICoordinatesListModel::writeSettings | ( | QSettings * | settings, |
QString | section | ||
) |
Definition at line 49 of file qxrdroicoordinateslistmodel.cpp.
References m_Mutex, m_ROICoordinates, and roi().
|
private |
Definition at line 90 of file qxrdroicoordinateslistmodel.h.
Referenced by newROI().
|
private |
Definition at line 89 of file qxrdroicoordinateslistmodel.h.
Referenced by readSettings(), and writeSettings().
|
private |
Definition at line 91 of file qxrdroicoordinateslistmodel.h.
Referenced by append(), moveROIDown(), moveROIUp(), onROIChanged(), readSettings(), recalculate(), removeROI(), roi(), roiCount(), rowCount(), setRoi(), visualizeBackground(), visualizePeak(), and writeSettings().
|
private |
Definition at line 88 of file qxrdroicoordinateslistmodel.h.
Referenced by newROI().