23class LIBDTKWIDGETSHARED_EXPORT
DTitlebar :
public QFrame,
public DTK_CORE_NAMESPACE::DObject
26 Q_PROPERTY(
bool blurBackground READ blurBackground WRITE setBlurBackground)
29 explicit DTitlebar(QWidget *parent = Q_NULLPTR);
33 void setMenu(QMenu *menu);
36 QWidget *customWidget()
const;
37 void setCustomWidget(QWidget *,
bool fixCenterPos =
false);
41 void addWidget(QWidget *w, Qt::Alignment alignment = Qt::Alignment());
42 void removeWidget(QWidget *w);
44 int buttonAreaWidth()
const;
45 bool separatorVisible()
const;
47 bool autoHideOnFullscreen()
const;
48 void setAutoHideOnFullscreen(
bool autohide);
50 virtual void setVisible(
bool visible) Q_DECL_OVERRIDE;
51 void setEmbedMode(
bool embed);
53 bool menuIsVisible()
const;
54 void setMenuVisible(
bool visible);
56 bool menuIsDisabled()
const;
57 void setMenuDisabled(
bool disabled);
59 bool quitMenuIsDisabled()
const;
60 void setQuitMenuDisabled(
bool disabled);
61 void setQuitMenuVisible(
bool visible);
63 bool switchThemeMenuIsVisible()
const;
64 void setSwitchThemeMenuVisible(
bool visible);
66 void setDisableFlags(Qt::WindowFlags flags);
67 Qt::WindowFlags disableFlags()
const;
69 void setSplitScreenEnabled(
bool enabled);
70 bool splitScreenIsEnabled()
const;
72 virtual QSize sizeHint()
const override;
73 virtual QSize minimumSizeHint()
const override;
75 bool blurBackground()
const;
76 void setFullScreenButtonVisible(
bool enabled);
83 void mousePressed(Qt::MouseButtons buttons);
84 void mouseMoving(Qt::MouseButton button);
86#ifdef DTK_TITLE_DRAG_WINDOW
87 void mousePosPressed(Qt::MouseButtons buttons, QPoint pos);
88 void mousePosMoving(Qt::MouseButton button, QPoint pos);
92 void setFixedHeight(
int h);
93 void setBackgroundTransparent(
bool transparent);
94 void setSeparatorVisible(
bool visible);
95 void setTitle(
const QString &title);
96 void setIcon(
const QIcon &icon);
98 void toggleWindowState();
100 void setBlurBackground(
bool blurBackground);
108 bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE;
109 bool event(QEvent *e)
override;
110 void showEvent(QShowEvent *event) Q_DECL_OVERRIDE;
111 void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
112 void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
113 void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
114 void mouseDoubleClickEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
115 void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
119 D_PRIVATE_SLOT(
void _q_toggleWindowState())
120 D_PRIVATE_SLOT(
void _q_showMinimized())
121 D_PRIVATE_SLOT(
void _q_onTopWindowMotifHintsChanged(quint32))
124 D_PRIVATE_SLOT(
void _q_addDefaultMenuItems())
125 D_PRIVATE_SLOT(
void _q_helpActionTriggered())
126 D_PRIVATE_SLOT(
void _q_feedbackActionTriggered())
127 D_PRIVATE_SLOT(
void _q_aboutActionTriggered())
128 D_PRIVATE_SLOT(
void _q_quitActionTriggered())
129 D_PRIVATE_SLOT(
void _q_switchThemeActionTriggered(QAction*))
130 D_PRIVATE_SLOT(
void _q_toolBarActionTriggered())