QElectroTech 0.100.0-dev
|
#include <helpercell.h>
Signals | |
void | contextMenuTriggered (HelperCell *) |
void | doubleClicked (HelperCell *) |
Public Member Functions | |
HelperCell (QGraphicsItem *=nullptr) | |
~HelperCell () override | |
void | setGeometry (const QRectF &) override |
QSizeF | sizeHint (Qt::SizeHint, const QSizeF &=QSizeF()) const override |
QRectF | boundingRect () const override |
void | paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *=nullptr) override |
virtual void | setType (QET::TitleBlockColumnLength) |
virtual void | setActions (const QList< QAction * > &) |
virtual QList< QAction * > | actions () const |
virtual void | setLabel (const QString &text, bool=true) |
Public Attributes | |
QColor | background_color |
Background color when rendering this cell. | |
QColor | foreground_color |
Text color when rendering this cell. | |
QString | label |
Label displayed in this cell. | |
Qt::Orientation | orientation |
Orientation of this cell. | |
int | index |
Index of this cell. | |
Protected Member Functions | |
void | contextMenuEvent (QGraphicsSceneContextMenuEvent *) override |
void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *) override |
Private Member Functions | |
HelperCell (const HelperCell &) | |
Private Attributes | |
QList< QAction * > | actions_ |
List of actions displayed by the context menu. | |
This class implements a helper widget for cells that indicate the length of columns and rows.
HelperCell::HelperCell | ( | QGraphicsItem * | parent = nullptr | ) |
Constructor
parent | Parent QGraphicsItem |
|
override |
Destructor
|
private |
|
virtual |
|
override |
|
overrideprotected |
Handle context menu events.
event | Context menu event. |
|
signal |
|
signal |
|
overrideprotected |
Handle double click events.
|
override |
Handles the helper cell visual rendering
painter | QPainter to be used for the rendering |
option | Rendering options |
widget | QWidget being painted, if any |
|
virtual |
Set the list of actions displayed by the context menu of this helper cell.
|
override |
Ensure geometry changes are handled for both QGraphicsObject and QGraphicsLayoutItem.
g | New geometry |
|
virtual |
text | New label displayed by this helper cell |
set_as_tooltip | If true, the text is also used as tooltip. |
|
virtual |
type | new type of this helper cell – |
|
override |
which | Size hint to be modified |
constraint | New value for the size hint |
|
private |
List of actions displayed by the context menu.
QColor HelperCell::background_color |
Background color when rendering this cell.
QColor HelperCell::foreground_color |
Text color when rendering this cell.
int HelperCell::index |
Index of this cell.
QString HelperCell::label |
Label displayed in this cell.
Qt::Orientation HelperCell::orientation |
Orientation of this cell.