Entropy Piano Tuner
1.1.3 (documentation not yet complete)
An open-source experimental software for piano tuning by entropy minimization
|
Implementation class for the GraphicsItem in Qt. More...
#include <graphicsitemforqt.h>
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... | |
GraphicsViewAdapter * | getGraphicsView () |
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 | |
GraphicsViewAdapter * | mGraphicsView |
Pointer to the parent GraphicsViewAdapter. More... | |
int | mKeyIndex |
RoleType | mRole |
The index of this item to identify it with a key. More... | |
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.
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.
void GraphicsItemForQt::setItem | ( | QGraphicsItem * | item | ) |
Set the associated QGraphicsItem pointer.
item | : Pointer to the QGraphicsItem |
Definition at line 73 of file graphicsitemforqt.cpp.
|
finaloverridevirtual |
Set or change the position of the graphical item.
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.
|
finaloverridevirtual |
Set or change the z-order of the graphical item.
z |
Reimplemented from GraphicsItem.
Definition at line 106 of file graphicsitemforqt.cpp.
|
private |
Pointer pointing to the QGraphicsItem.
Definition at line 49 of file graphicsitemforqt.h.