2019-10-09 20:15:53 +08:00
|
|
|
%Import QtWidgets/QtWidgetsmod.sip
|
|
|
|
|
|
|
|
%If (Qt_5_0_0 -)
|
|
|
|
|
|
|
|
namespace ads
|
|
|
|
{
|
|
|
|
|
2023-08-03 02:23:49 +08:00
|
|
|
class CTitleBarButton : QToolButton
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <DockAreaTitleBar.h>
|
|
|
|
%End
|
|
|
|
|
|
|
|
public:
|
|
|
|
CTitleBarButton(bool visible = true, QWidget* parent /TransferThis/ = Q_NULLPTR );
|
|
|
|
virtual void setVisible(bool);
|
|
|
|
void setShowInTitleBar(bool);
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
bool event(QEvent *ev);
|
|
|
|
};
|
|
|
|
|
2019-10-09 20:15:53 +08:00
|
|
|
class CDockAreaTitleBar : QFrame
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <DockAreaTitleBar.h>
|
|
|
|
%End
|
|
|
|
|
2020-02-22 05:47:09 +08:00
|
|
|
protected:
|
|
|
|
virtual void mousePressEvent(QMouseEvent* ev);
|
|
|
|
virtual void mouseReleaseEvent(QMouseEvent* ev);
|
|
|
|
virtual void mouseMoveEvent(QMouseEvent* ev);
|
|
|
|
virtual void mouseDoubleClickEvent(QMouseEvent *event);
|
|
|
|
virtual void contextMenuEvent(QContextMenuEvent *event);
|
|
|
|
|
2019-10-09 20:15:53 +08:00
|
|
|
public slots:
|
|
|
|
void markTabsMenuOutdated();
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
CDockAreaTitleBar(ads::CDockAreaWidget* parent /TransferThis/);
|
|
|
|
virtual ~CDockAreaTitleBar();
|
|
|
|
ads::CDockAreaTabBar* tabBar() const;
|
2023-08-03 02:23:49 +08:00
|
|
|
ads::CTitleBarButton* button(ads::TitleBarButton which) const;
|
2023-03-21 13:04:19 +08:00
|
|
|
ads::CElidingLabel* autoHideTitleLabel() const;
|
2020-02-22 05:47:09 +08:00
|
|
|
void updateDockWidgetActionsButtons();
|
2019-10-09 20:15:53 +08:00
|
|
|
virtual void setVisible(bool Visible);
|
2020-02-22 05:47:09 +08:00
|
|
|
void insertWidget(int index, QWidget *widget /Transfer/ );
|
|
|
|
int indexOf(QWidget *widget) const;
|
2023-03-21 13:04:19 +08:00
|
|
|
QString titleBarButtonToolTip(ads::TitleBarButton Button) const;
|
2023-08-03 02:23:49 +08:00
|
|
|
void setAreaFloating();
|
|
|
|
|
2019-10-09 20:15:53 +08:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void tabBarClicked(int index);
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
%End
|