29#include <QResizeEvent>
37class DockTitleBar :
public QFrame {
39 explicit DockTitleBar(
const QString &title, QWidget *parent =
nullptr);
52 QString
subtitle()
const {
return fullSubtitle_; }
55 void resizeEvent(QResizeEvent *event)
override;
58 void updateAppearance();
59 void updateElidedSubtitle();
61 QLabel *titleLabel_ =
nullptr;
62 QLabel *subtitleLabel_ =
nullptr;
63 QString fullSubtitle_;
64 bool focused_ =
false;
void setFocused(bool focused)
Set the focused state. Uses QPalette for fast updates.
void setSubtitle(const QString &subtitle)
Set subtitle text (e.g., file path) displayed below the title.
bool isFocused() const
Get the current focused state.
QString subtitle() const
Get the current subtitle text (full, non-elided).