ACAV f0ba4b7c9529
Abstract Syntax Tree (AST) visualization tool for C, C++, and Objective-C
Loading...
Searching...
No Matches
acav::DockTitleBar Class Reference

Custom title bar for QDockWidget with fast focus indication. More...

#include <DockTitleBar.h>

Inheritance diagram for acav::DockTitleBar:
[legend]

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

Detailed Description

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.

Constructor & Destructor Documentation

◆ DockTitleBar()

acav::DockTitleBar::DockTitleBar ( const QString & title,
QWidget * parent = nullptr )
explicit

Definition at line 33 of file DockTitleBar.cpp.

Member Function Documentation

◆ isFocused()

bool acav::DockTitleBar::isFocused ( ) const
inline

Get the current focused state.

Definition at line 45 of file DockTitleBar.h.

◆ resizeEvent()

void acav::DockTitleBar::resizeEvent ( QResizeEvent * event)
overrideprotected

Definition at line 76 of file DockTitleBar.cpp.

◆ setFocused()

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().

◆ setSubtitle()

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().

◆ subtitle()

QString acav::DockTitleBar::subtitle ( ) const
inline

Get the current subtitle text (full, non-elided).

Definition at line 52 of file DockTitleBar.h.

Referenced by setSubtitle().


The documentation for this class was generated from the following files: