|
ACAV f0ba4b7c9529
Abstract Syntax Tree (AST) visualization tool for C, C++, and Objective-C
|
Custom title bar for QDockWidget with fast focus indication. More...
#include <DockTitleBar.h>
Public Member Functions | |
| DockTitleBar (const QString &title, QWidget *parent=nullptr) | |
| void | setFocused (bool focused) |
| Set the focused state. Uses QPalette for fast updates. | |
| bool | isFocused () const |
| Get the current focused state. | |
| void | setSubtitle (const QString &subtitle) |
| Set subtitle text (e.g., file path) displayed below the title. | |
| QString | subtitle () const |
| Get the current subtitle text (full, non-elided). | |
Protected Member Functions | |
| void | resizeEvent (QResizeEvent *event) override |
Custom title bar for QDockWidget with fast focus indication.
Uses QPalette for color changes instead of setStyleSheet(), avoiding expensive style recalculation on focus changes.
Definition at line 37 of file DockTitleBar.h.
|
explicit |
Definition at line 33 of file DockTitleBar.cpp.
|
inline |
Get the current focused state.
Definition at line 45 of file DockTitleBar.h.
|
overrideprotected |
Definition at line 76 of file DockTitleBar.cpp.
| void acav::DockTitleBar::setFocused | ( | bool | focused | ) |
Set the focused state. Uses QPalette for fast updates.
Definition at line 58 of file DockTitleBar.cpp.
References setFocused().
Referenced by setFocused().
| void acav::DockTitleBar::setSubtitle | ( | const QString & | subtitle | ) |
Set subtitle text (e.g., file path) displayed below the title.
Long paths are elided in the middle; full path shown in tooltip.
Definition at line 66 of file DockTitleBar.cpp.
References setSubtitle(), and subtitle().
Referenced by setSubtitle().
|
inline |
Get the current subtitle text (full, non-elided).
Definition at line 52 of file DockTitleBar.h.
Referenced by setSubtitle().