DynExp
Highly flexible laboratory automation for dynamically changing experiments.
Util::MarkerGraphicsView::MarkerType Struct Reference

Data associated with one marker. More...

Public Types

using IDType = signed long long
 

Public Member Functions

constexpr MarkerType (QGraphicsPolygonItem *Marker, const QPoint &MarkerPos, bool IsUserDeletable=true, IDType ID=-1, const QPointF &ImagePos={}) noexcept
 Constructs a marker assigning the properties passed as arguments. Name will stay empty. More...
 
Getters
constexpr auto GetMarker () noexcept
 
constexpr const auto GetMarker () const noexcept
 
constexpr const auto & GetMarkerPos () const noexcept
 
constexpr bool IsUserDeletable () const noexcept
 
constexpr auto GetID () const noexcept
 
constexpr std::string_view GetName () const noexcept
 
constexpr const auto & GetImagePos () const noexcept
 
Setters
void SetName (std::string_view NewName)
 

Private Attributes

Non-const properties

Not const to ensure move-assignability

QGraphicsPolygonItem * Marker
 Qt polygon object to draw the marker onto the graphics view. More...
 
QPoint MarkerPos
 Position of the marker within the graphics view in pixels. More...
 
bool UserDeletable
 Determines whether the user can interact with this marker to delete it. More...
 
IDType ID
 ID of the marker to identify it amongst other markers in the same graphics view. More...
 
std::string Name
 Name of the marker to describe it. More...
 
QPointF ImagePos
 Position in nm (e.g. of a sample under a microscope) where the associated image the marker belongs to was recorded. More...
 

Detailed Description

Data associated with one marker.

Definition at line 390 of file QtUtil.h.

Member Typedef Documentation

◆ IDType

Definition at line 392 of file QtUtil.h.

Constructor & Destructor Documentation

◆ MarkerType()

constexpr Util::MarkerGraphicsView::MarkerType::MarkerType ( QGraphicsPolygonItem *  Marker,
const QPoint &  MarkerPos,
bool  IsUserDeletable = true,
IDType  ID = -1,
const QPointF &  ImagePos = {} 
)
inlineconstexprnoexcept

Constructs a marker assigning the properties passed as arguments. Name will stay empty.

Parameters
MarkerRefer to MarkerType::Marker.
MarkerPosRefer to MarkerType::MarkerPos.
IsUserDeletableRefer to MarkerType::UserDeletable.
IDRefer to MarkerType::ID.
ImagePosRefer to MarkerType::ImagePos.

Definition at line 402 of file QtUtil.h.

Member Function Documentation

◆ GetID()

constexpr auto Util::MarkerGraphicsView::MarkerType::GetID ( ) const
inlineconstexprnoexcept

Definition at line 412 of file QtUtil.h.

◆ GetImagePos()

constexpr const auto& Util::MarkerGraphicsView::MarkerType::GetImagePos ( ) const
inlineconstexprnoexcept

Definition at line 414 of file QtUtil.h.

◆ GetMarker() [1/2]

constexpr const auto Util::MarkerGraphicsView::MarkerType::GetMarker ( ) const
inlineconstexprnoexcept

Definition at line 409 of file QtUtil.h.

◆ GetMarker() [2/2]

constexpr auto Util::MarkerGraphicsView::MarkerType::GetMarker ( )
inlineconstexprnoexcept

Definition at line 408 of file QtUtil.h.

◆ GetMarkerPos()

constexpr const auto& Util::MarkerGraphicsView::MarkerType::GetMarkerPos ( ) const
inlineconstexprnoexcept

Definition at line 410 of file QtUtil.h.

◆ GetName()

constexpr std::string_view Util::MarkerGraphicsView::MarkerType::GetName ( ) const
inlineconstexprnoexcept

Definition at line 413 of file QtUtil.h.

◆ IsUserDeletable()

constexpr bool Util::MarkerGraphicsView::MarkerType::IsUserDeletable ( ) const
inlineconstexprnoexcept

Definition at line 411 of file QtUtil.h.

◆ SetName()

void Util::MarkerGraphicsView::MarkerType::SetName ( std::string_view  NewName)

Definition at line 291 of file QtUtil.cpp.

Member Data Documentation

◆ ID

IDType Util::MarkerGraphicsView::MarkerType::ID
private

ID of the marker to identify it amongst other markers in the same graphics view.

Definition at line 431 of file QtUtil.h.

◆ ImagePos

QPointF Util::MarkerGraphicsView::MarkerType::ImagePos
private

Position in nm (e.g. of a sample under a microscope) where the associated image the marker belongs to was recorded.

Definition at line 433 of file QtUtil.h.

◆ Marker

QGraphicsPolygonItem* Util::MarkerGraphicsView::MarkerType::Marker
private

Qt polygon object to draw the marker onto the graphics view.

Definition at line 428 of file QtUtil.h.

◆ MarkerPos

QPoint Util::MarkerGraphicsView::MarkerType::MarkerPos
private

Position of the marker within the graphics view in pixels.

Definition at line 429 of file QtUtil.h.

◆ Name

std::string Util::MarkerGraphicsView::MarkerType::Name
private

Name of the marker to describe it.

Definition at line 432 of file QtUtil.h.

◆ UserDeletable

bool Util::MarkerGraphicsView::MarkerType::UserDeletable
private

Determines whether the user can interact with this marker to delete it.

Definition at line 430 of file QtUtil.h.


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