BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
MaskEditorHelper Class Reference

Description

Static class to provide MaskEditor with common settings (colors, gradients, etc)

Definition at line 27 of file MaskEditorHelper.h.

Public Types

enum  EViewTypes {
  IMASKVIEW = QGraphicsItem::UserType + 1 , RECTANGLEBASE , RECTANGLE , SIZEHANDLE ,
  POLYGON , POLYGONPOINT , VERTICALLINE , HORIZONTALLINE ,
  ELLIPSE , MASKALL , REGIONOFINTEREST , MASKCONTAINER ,
  MASKGRAPHICSPROXY
}
 

Static Public Member Functions

static QRectF getMarkerRectangle (const QPointF &pos)
 
static QBrush getMaskBrush (bool mask_value)
 
static QPen getMaskPen (bool mask_value)
 
static QBrush getSelectionMarkerBrush ()
 
static QPen getSelectionMarkerPen ()
 

Member Enumeration Documentation

◆ EViewTypes

Enumerator
IMASKVIEW 
RECTANGLEBASE 
RECTANGLE 
SIZEHANDLE 
POLYGON 
POLYGONPOINT 
VERTICALLINE 
HORIZONTALLINE 
ELLIPSE 
MASKALL 
REGIONOFINTEREST 
MASKCONTAINER 
MASKGRAPHICSPROXY 

Definition at line 29 of file MaskEditorHelper.h.

Member Function Documentation

◆ getMarkerRectangle()

QRectF MaskEditorHelper::getMarkerRectangle ( const QPointF &  pos)
static

Definition at line 48 of file MaskEditorHelper.cpp.

49 {
50  QRectF result(0, 0, 7, 7);
51  result.moveCenter(pos);
52  return result;
53 }

◆ getMaskBrush()

QBrush MaskEditorHelper::getMaskBrush ( bool  mask_value)
static

Definition at line 34 of file MaskEditorHelper.cpp.

35 {
36  if (!mask_value)
37  return Qt::NoBrush;
38  return QBrush(QColor(0, 0, 80)); // deep blue
39 }

Referenced by IShape2DView::paint(), VerticalLineView::paint(), HorizontalLineView::paint(), and RegionOfInterestView::paint().

◆ getMaskPen()

QPen MaskEditorHelper::getMaskPen ( bool  mask_value)
static

Definition at line 41 of file MaskEditorHelper.cpp.

42 {
43  if (mask_value)
44  return QPen(QColor(165, 80, 76)); // dark red
45  return QPen(QColor(0, 140, 70)); // dark green
46 }

Referenced by IShape2DView::paint(), VerticalLineView::paint(), HorizontalLineView::paint(), and PolygonView::paint().

◆ getSelectionMarkerBrush()

QBrush MaskEditorHelper::getSelectionMarkerBrush ( )
static

Definition at line 21 of file MaskEditorHelper.cpp.

22 {
23  QBrush result;
24  result.setStyle(Qt::SolidPattern);
25  result.setColor(QColor(226, 235, 244));
26  return result;
27 }

Referenced by PolygonPointView::paint(), and SizeHandleElement::paint().

◆ getSelectionMarkerPen()

QPen MaskEditorHelper::getSelectionMarkerPen ( )
static

Definition at line 29 of file MaskEditorHelper.cpp.

30 {
31  return QPen(QColor(99, 162, 217));
32 }

Referenced by PolygonPointView::paint(), and SizeHandleElement::paint().


The documentation for this class was generated from the following files: