graph_analysis
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Friends | List of all members
graph_analysis::gui::FilterItem Class Reference

graphical custom regexp filter representation class; specific to FilterManager widget in the layers tab More...

#include <FilterItem.hpp>

Inheritance diagram for graph_analysis::gui::FilterItem:
Inheritance graph
[legend]
Collaboration diagram for graph_analysis::gui::FilterItem:
Collaboration graph
[legend]

Public Types

typedef unsigned int filter_size_t
 datatype for denoting the height (in points) of a graphical filter item More...
 
typedef unsigned int filter_index_t
 datatype for the filters index counter More...
 

Public Member Functions

 FilterItem (FilterManager *manager, filter_index_t index, const std::string &filter=std::string())
 constructor More...
 
 ~FilterItem ()
 destructor More...
 
QRectF boundingRect () const
 retrieves the bounding rectangular box around the area occupied by the node in the scene More...
 
QPainterPath shape () const
 retrieves the path of the bounding rectangular box around the area occupied by the node in the scene More...
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *)
 qt node painting method - here the node components get placed in the scene More...
 
void setIndex (filter_index_t index)
 setter method for the filter index More...
 
filter_index_t getIndex (void)
 getter method for the filter index More...
 
void updatePos (void)
 refreshes position in the scene of this filter item based on its filter index More...
 
QString getLabel (void) const
 getter method for retrieving the text regex of this filter item More...
 
void setLabel (QString label)
 setter method for updating the text regex of this filter item More...
 
void syncToolTips (void)
 synchronizes the toolTip-s of this filter item and of its corresponding checkbox in the filters box with the current text regex of this filter item More...
 
bool isActivated () const
 check if filter is activated More...
 
QString getRegexp () const
 

Static Public Attributes

static const filter_size_t sHeight = 30
 constant height (in points) of a graphical filter item More...
 
static const qreal sDisplacementWeight = 0.169
 constant displacement procentage (degree up to which two filter items need to overlap in the scene such that one of them gets pushed away) More...
 
static const qreal sDisplacementThreshold = FilterItem::sDisplacementWeight * (qreal)FilterItem::sHeight
 constant displacement threshold (relative distance up to which overlapping items are away from each other before one of them gets pushed away) More...
 

Protected Member Functions

void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event)
 qt mouse double-click callback More...
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *event)
 qt mouse move callback More...
 
void mousePressEvent (QGraphicsSceneMouseEvent *event)
 qt mouse press callback More...
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
 qt mouse release callback More...
 
void hoverEnterEvent (QGraphicsSceneHoverEvent *event)
 qt hovering ENTER callback More...
 
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event)
 qt hovering LEAVE callback More...
 
QVariant itemChange (GraphicsItemChange change, const QVariant &value)
 qt item change callback More...
 
void setActivation (bool activation)
 

Friends

class FilterManager
 

Detailed Description

graphical custom regexp filter representation class; specific to FilterManager widget in the layers tab

holds a graphical regex text item in the scene of all vertically disposed regex filters; it is subject to snap-to-grid and vertical-movement-only behaviours

Member Typedef Documentation

◆ filter_index_t

datatype for the filters index counter

◆ filter_size_t

datatype for denoting the height (in points) of a graphical filter item

Constructor & Destructor Documentation

◆ FilterItem()

graph_analysis::gui::FilterItem::FilterItem ( FilterManager *  manager,
filter_index_t  index,
const std::string &  filter = std::string() 
)

constructor

◆ ~FilterItem()

graph_analysis::gui::FilterItem::~FilterItem ( )
inline

destructor

Member Function Documentation

◆ boundingRect()

QRectF graph_analysis::gui::FilterItem::boundingRect ( ) const

retrieves the bounding rectangular box around the area occupied by the node in the scene

◆ getIndex()

filter_index_t graph_analysis::gui::FilterItem::getIndex ( void  )
inline

getter method for the filter index

◆ getLabel()

QString graph_analysis::gui::FilterItem::getLabel ( void  ) const

getter method for retrieving the text regex of this filter item

◆ getRegexp()

QString graph_analysis::gui::FilterItem::getRegexp ( ) const
inline

◆ hoverEnterEvent()

void graph_analysis::gui::FilterItem::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
protected

qt hovering ENTER callback

◆ hoverLeaveEvent()

void graph_analysis::gui::FilterItem::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
protected

qt hovering LEAVE callback

◆ isActivated()

bool graph_analysis::gui::FilterItem::isActivated ( ) const
inline

check if filter is activated

◆ itemChange()

QVariant graph_analysis::gui::FilterItem::itemChange ( GraphicsItemChange  change,
const QVariant &  value 
)
protected

qt item change callback

◆ mouseDoubleClickEvent()

void graph_analysis::gui::FilterItem::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
protected

qt mouse double-click callback

◆ mouseMoveEvent()

void graph_analysis::gui::FilterItem::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
protected

qt mouse move callback

◆ mousePressEvent()

void graph_analysis::gui::FilterItem::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
protected

qt mouse press callback

◆ mouseReleaseEvent()

void graph_analysis::gui::FilterItem::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
protected

qt mouse release callback

◆ paint()

void graph_analysis::gui::FilterItem::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *   
)

qt node painting method - here the node components get placed in the scene

◆ setActivation()

void graph_analysis::gui::FilterItem::setActivation ( bool  activation)
inlineprotected

◆ setIndex()

void graph_analysis::gui::FilterItem::setIndex ( filter_index_t  index)
inline

setter method for the filter index

◆ setLabel()

void graph_analysis::gui::FilterItem::setLabel ( QString  label)

setter method for updating the text regex of this filter item

◆ shape()

QPainterPath graph_analysis::gui::FilterItem::shape ( ) const

retrieves the path of the bounding rectangular box around the area occupied by the node in the scene

◆ syncToolTips()

void graph_analysis::gui::FilterItem::syncToolTips ( void  )

synchronizes the toolTip-s of this filter item and of its corresponding checkbox in the filters box with the current text regex of this filter item

◆ updatePos()

void graph_analysis::gui::FilterItem::updatePos ( void  )

refreshes position in the scene of this filter item based on its filter index

Friends And Related Function Documentation

◆ FilterManager

friend class FilterManager
friend

Member Data Documentation

◆ sDisplacementThreshold

const qreal graph_analysis::gui::FilterItem::sDisplacementThreshold = FilterItem::sDisplacementWeight * (qreal)FilterItem::sHeight
static

constant displacement threshold (relative distance up to which overlapping items are away from each other before one of them gets pushed away)

◆ sDisplacementWeight

const qreal graph_analysis::gui::FilterItem::sDisplacementWeight = 0.169
static

constant displacement procentage (degree up to which two filter items need to overlap in the scene such that one of them gets pushed away)

◆ sHeight

const FilterItem::filter_size_t graph_analysis::gui::FilterItem::sHeight = 30
static

constant height (in points) of a graphical filter item


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