4 #include <QContextMenuEvent>
34 QMenu menu(NULL, NULL);
36 QAction *newMask = menu.addAction(
"New Mask Layer");
37 QAction *enbMask = menu.addAction(
"Enable Mask Layer(s)");
38 QAction *dsbMask = menu.addAction(
"Disable Mask Layer(s)");
39 QAction *delMask = menu.addAction(
"Delete Mask Layer(s)");
40 QAction *andMask = menu.addAction(
"AND Mask Layers");
41 QAction *orMask = menu.addAction(
"OR Mask Layers");
42 QAction *thrMask = menu.addAction(
"Threshold Mask...");
49 QAction *action = menu.exec(event->globalPos());
50 QModelIndexList selected = selectedIndexes();
53 if (action == newMask) {
59 }
else if (action == enbMask) {
61 }
else if (action == dsbMask) {
63 }
else if (action == delMask) {
65 }
else if (action == andMask) {
67 }
else if (action == orMask) {
69 }
else if (action == thrMask) {
void setMaskDialog(QxrdMaskDialog *dlg)
QxrdMaskDialog * m_Dialog
void andMasks(QModelIndexList sel)
QWeakPointer< QxrdDataProcessor > QxrdDataProcessorWPtr
void setMaskStack(QxrdMaskStackPtr stk)
QxrdMaskStackPtr m_MaskStack
QxrdDataProcessorWPtr m_Processor
QSharedPointer< QxrdDataProcessor > QxrdDataProcessorPtr
void contextMenuEvent(QContextMenuEvent *event)
void deleteMasks(QModelIndexList sel)
void orMasks(QModelIndexList sel)
QxrdMaskStackView(QWidget *parent=0)
void disableMasks(QModelIndexList sel)
void setProcessor(QxrdDataProcessorWPtr proc)
void enableMasks(QModelIndexList sel)