Entropy Piano Tuner  1.1.3 (documentation not yet complete)
An open-source experimental software for piano tuning by entropy minimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
GraphicsItemForQt Class Reference

Implementation class for the GraphicsItem in Qt. More...

#include <graphicsitemforqt.h>

+ Inheritance diagram for GraphicsItemForQt:
+ Collaboration diagram for GraphicsItemForQt:

Public Member Functions

 GraphicsItemForQt (GraphicsViewAdapter *graphicsView, QGraphicsItem *item)
 Constructor, initializing the pointer mItem. More...
 
 ~GraphicsItemForQt ()
 Destructor, deletes the item and sets mItem to nullptr. More...
 
void setItem (QGraphicsItem *item)
 Set the associated QGraphicsItem pointer. More...
 
virtual void setPosition (double x, double y) overridefinal
 Set or change the position of the graphical item. More...
 
virtual void setZOrder (double z) overridefinal
 Set or change the z-order of the graphical item. More...
 
- Public Member Functions inherited from GraphicsItem
 GraphicsItem (GraphicsViewAdapter *graphicsView)
 Constructor. More...
 
virtual ~GraphicsItem ()
 Virtual Destructor. More...
 
void setKeyIndexAndItemRole (int index, RoleType role)
 Short function for setting the key index and the role. More...
 
void setKeyIndex (int index)
 Setter for mKeyIndex. More...
 
int getKeyIndex () const
 Getter for mKeyIndex. More...
 
void setItemRole (RoleType role)
 Setter function for mRole. More...
 
void addItemRole (RoleType role)
 Bitwise add of role and mRole. More...
 
RoleType getItemRole () const
 Getter for mRole. More...
 
GraphicsViewAdaptergetGraphicsView ()
 Getter for mGraphicsView. More...
 

Private Attributes

QGraphicsItem * mItem
 Pointer pointing to the QGraphicsItem. More...
 

Additional Inherited Members

- Public Types inherited from GraphicsItem
using RoleType = std::uint32_t
 Type of a user role that can be set in a GraphicsItem (bitwise flag). More...
 
- Protected Attributes inherited from GraphicsItem
GraphicsViewAdaptermGraphicsView
 Pointer to the parent GraphicsViewAdapter. More...
 
int mKeyIndex
 
RoleType mRole
 The index of this item to identify it with a key. More...
 

Detailed Description

Implementation class for the GraphicsItem in Qt.

This implementation class holds and manages a pointer pointing to the corresponding QGraphicsItem

Definition at line 37 of file graphicsitemforqt.h.

Constructor & Destructor Documentation

GraphicsItemForQt::GraphicsItemForQt ( GraphicsViewAdapter graphicsView,
QGraphicsItem *  item 
)

Constructor, initializing the pointer mItem.

Definition at line 37 of file graphicsitemforqt.cpp.

GraphicsItemForQt::~GraphicsItemForQt ( )

Destructor, deletes the item and sets mItem to nullptr.

Definition at line 54 of file graphicsitemforqt.cpp.

Member Function Documentation

void GraphicsItemForQt::setItem ( QGraphicsItem *  item)

Set the associated QGraphicsItem pointer.

Parameters
item: Pointer to the QGraphicsItem

Definition at line 73 of file graphicsitemforqt.cpp.

void GraphicsItemForQt::setPosition ( double  x,
double  y 
)
finaloverridevirtual

Set or change the position of the graphical item.

Parameters
x: Horizontal position varying from 0 to 1
y: Vertical position varying from 0 to 1

Implements GraphicsItem.

Definition at line 89 of file graphicsitemforqt.cpp.

void GraphicsItemForQt::setZOrder ( double  z)
finaloverridevirtual

Set or change the z-order of the graphical item.

Parameters
z

Reimplemented from GraphicsItem.

Definition at line 106 of file graphicsitemforqt.cpp.

Member Data Documentation

QGraphicsItem* GraphicsItemForQt::mItem
private

Pointer pointing to the QGraphicsItem.

Definition at line 49 of file graphicsitemforqt.h.


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