A QLabel that manages a stack of context-tagged text messages.
More...
#include <label_stack.h>
|
| void | popText (int ctx) |
| | Remove the stack entry associated with ctx.
|
| |
|
| void | toggleTemporaryFlash (bool enable) |
| | Emitted when the temporary flash state changes.
|
| |
| void | mousePressedAt (const QPoint &global_pos, Qt::MouseButton button) |
| | Emitted when a mouse button is pressed on the label.
|
| |
|
| | LabelStack (QWidget *parent=0) |
| | Construct a LabelStack.
|
| |
| void | setTemporaryContext (const int ctx) |
| | Designate a context ID as the "temporary" context.
|
| |
| void | pushText (const QString &text, int ctx, const QString &tooltip=QString()) |
| | Push a text message onto the label stack.
|
| |
| void | setShrinkable (bool shrinkable=true) |
| | Control whether the label may shrink below its preferred width.
|
| |
|
| void | mousePressEvent (QMouseEvent *event) |
| | Forward mouse press position and button via mousePressedAt().
|
| |
| void | mouseReleaseEvent (QMouseEvent *event) |
| | Handle mouse button release (reserved for subclass use).
|
| |
| void | mouseDoubleClickEvent (QMouseEvent *event) |
| | Handle double-click events (reserved for subclass use).
|
| |
| void | mouseMoveEvent (QMouseEvent *event) |
| | Handle mouse move events (reserved for subclass use).
|
| |
| void | contextMenuEvent (QContextMenuEvent *event) |
| | Show a context menu for the label (reserved for subclass use).
|
| |
| void | paintEvent (QPaintEvent *event) |
| | Paint the label, applying elision if shrinkable and space is tight.
|
| |
A QLabel that manages a stack of context-tagged text messages.
◆ LabelStack()
| LabelStack::LabelStack |
( |
QWidget * |
parent = 0 | ) |
|
|
explicit |
◆ contextMenuEvent()
| void LabelStack::contextMenuEvent |
( |
QContextMenuEvent * |
event | ) |
|
|
protected |
Show a context menu for the label (reserved for subclass use).
- Parameters
-
| event | The context menu event. |
◆ mouseDoubleClickEvent()
| void LabelStack::mouseDoubleClickEvent |
( |
QMouseEvent * |
event | ) |
|
|
protected |
Handle double-click events (reserved for subclass use).
- Parameters
-
| event | The double-click event. |
◆ mouseMoveEvent()
| void LabelStack::mouseMoveEvent |
( |
QMouseEvent * |
event | ) |
|
|
protected |
Handle mouse move events (reserved for subclass use).
- Parameters
-
| event | The mouse move event. |
◆ mousePressedAt
| void LabelStack::mousePressedAt |
( |
const QPoint & |
global_pos, |
|
|
Qt::MouseButton |
button |
|
) |
| |
|
signal |
Emitted when a mouse button is pressed on the label.
- Parameters
-
| global_pos | The cursor position in global screen coordinates. |
| button | The mouse button that was pressed. |
◆ mousePressEvent()
| void LabelStack::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
protected |
Forward mouse press position and button via mousePressedAt().
- Parameters
-
| event | The mouse press event. |
◆ mouseReleaseEvent()
| void LabelStack::mouseReleaseEvent |
( |
QMouseEvent * |
event | ) |
|
|
protected |
Handle mouse button release (reserved for subclass use).
- Parameters
-
| event | The mouse release event. |
◆ paintEvent()
| void LabelStack::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
protected |
Paint the label, applying elision if shrinkable and space is tight.
- Parameters
-
◆ popText
| void LabelStack::popText |
( |
int |
ctx | ) |
|
|
slot |
Remove the stack entry associated with ctx.
- Parameters
-
| ctx | The context ID whose entry should be removed. |
◆ pushText()
| void LabelStack::pushText |
( |
const QString & |
text, |
|
|
int |
ctx, |
|
|
const QString & |
tooltip = QString() |
|
) |
| |
Push a text message onto the label stack.
- Parameters
-
| text | The message text to display. |
| ctx | The context ID that owns this message; used to pop it later. |
| tooltip | Optional tooltip string shown on hover; defaults to empty. |
◆ setShrinkable()
| void LabelStack::setShrinkable |
( |
bool |
shrinkable = true | ) |
|
Control whether the label may shrink below its preferred width.
- Parameters
-
| shrinkable | true to allow shrinking (default); false to enforce the full preferred width. |
◆ setTemporaryContext()
| void LabelStack::setTemporaryContext |
( |
const int |
ctx | ) |
|
Designate a context ID as the "temporary" context.
- Parameters
-
| ctx | The context ID to treat as temporary. |
◆ toggleTemporaryFlash
| void LabelStack::toggleTemporaryFlash |
( |
bool |
enable | ) |
|
|
signal |
Emitted when the temporary flash state changes.
- Parameters
-
| enable | true when a temporary message is active and flashing; false when it has expired and the label has reverted. |
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/widgets/label_stack.h
- /builds/wireshark/wireshark/ui/qt/widgets/label_stack.cpp