QElectroTech
0.70
|
#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. More... | |
QColor | foreground_color |
Text color when rendering this cell. More... | |
QString | label |
Label displayed in this cell. More... | |
Qt::Orientation | orientation |
Orientation of this cell. More... | |
int | index |
Index of this cell. More... | |
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. More... | |
This class implements a helper widget for cells that indicate the length of columns and rows.
Definition at line 27 of file helpercell.h.
HelperCell::HelperCell | ( | QGraphicsItem * | parent = nullptr | ) |
|
override |
Destructor
Definition at line 40 of file helpercell.cpp.
|
private |
|
virtual |
Definition at line 117 of file helpercell.cpp.
References actions_.
Referenced by setActions().
|
override |
Definition at line 67 of file helpercell.cpp.
|
overrideprotected |
Handle context menu events.
event | Context menu event. |
Definition at line 136 of file helpercell.cpp.
References actions_, and contextMenuTriggered().
|
signal |
Referenced by contextMenuEvent().
|
signal |
Referenced by mouseDoubleClickEvent().
|
overrideprotected |
Handle double click events.
Definition at line 150 of file helpercell.cpp.
References doubleClicked().
|
override |
Handles the helper cell visual rendering
painter | QPainter to be used for the rendering |
option | Rendering options |
widget | QWidget being painted, if any |
Definition at line 77 of file helpercell.cpp.
References background_color, foreground_color, and label.
Referenced by SplittedHelperCell::paint().
|
virtual |
Set the list of actions displayed by the context menu of this helper cell.
Definition at line 110 of file helpercell.cpp.
|
override |
Ensure geometry changes are handled for both QGraphicsObject and QGraphicsLayoutItem.
g | New geometry |
Definition at line 48 of file helpercell.cpp.
|
virtual |
text | New label displayed by this helper cell |
set_as_tooltip | If true, the text is also used as tooltip. |
Definition at line 125 of file helpercell.cpp.
References label.
|
virtual |
type | new type of this helper cell – |
Definition at line 94 of file helpercell.cpp.
References QET::Absolute, background_color, foreground_color, QET::RelativeToRemainingLength, and QET::RelativeToTotalLength.
|
override |
which | Size hint to be modified |
constraint | New value for the size hint |
Definition at line 59 of file helpercell.cpp.
|
private |
List of actions displayed by the context menu.
Definition at line 66 of file helpercell.h.
Referenced by actions(), contextMenuEvent(), and setActions().
QColor HelperCell::background_color |
Background color when rendering this cell.
Definition at line 40 of file helpercell.h.
Referenced by SplittedHelperCell::paint(), paint(), and setType().
QColor HelperCell::foreground_color |
Text color when rendering this cell.
Definition at line 41 of file helpercell.h.
Referenced by SplittedHelperCell::paint(), paint(), and setType().
int HelperCell::index |
Index of this cell.
Definition at line 44 of file helpercell.h.
QString HelperCell::label |
Label displayed in this cell.
Definition at line 42 of file helpercell.h.
Referenced by SplittedHelperCell::paint(), paint(), and setLabel().
Qt::Orientation HelperCell::orientation |
Orientation of this cell.
Definition at line 43 of file helpercell.h.