1
0
mirror of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git synced 2025-04-01 02:42:39 +08:00

formatting only

This commit is contained in:
Syarif Fakhri 2023-02-19 13:03:21 +08:00
parent 62af0e3f11
commit 80f5025b73
4 changed files with 546 additions and 598 deletions

View File

@ -16,7 +16,6 @@
** License along with this library; If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
//============================================================================
/// \file AutoHideSideBar.cpp
/// \author Syarif Fakhri
@ -24,7 +23,6 @@
/// \brief Implementation of CAutoHideSideBar class
//============================================================================
//============================================================================
// INCLUDES
//============================================================================
@ -55,15 +53,15 @@ struct AutoHideSideBarPrivate
/**
* Private data constructor
*/
AutoHideSideBarPrivate(CAutoHideSideBar* _public);
AutoHideSideBarPrivate(CAutoHideSideBar *_public);
CAutoHideSideBar* _this;
CDockContainerWidget* ContainerWidget;
CTabsWidget* TabsContainerWidget;
QBoxLayout* TabsLayout;
CAutoHideSideBar *_this;
CDockContainerWidget *ContainerWidget;
CTabsWidget *TabsContainerWidget;
QBoxLayout *TabsLayout;
Qt::Orientation Orientation;
SideBarLocation SideTabArea = SideBarLocation::SideBarLeft;
CAutoHideTab* PlaceholderTab;
CAutoHideTab *PlaceholderTab;
/**
* Convenience function to check if this is a horizontal side bar
@ -76,20 +74,19 @@ struct AutoHideSideBarPrivate
/**
* Called from viewport to forward event handling to this
*/
void handleViewportEvent(QEvent* e);
void handleViewportEvent(QEvent *e);
/**
* Convenience function to access first tab
*/
CAutoHideTab* firstTab() const {return _this->tab(0);}
CAutoHideTab *firstTab() const { return _this->tab(0); }
/**
* Convenience function to access last tab
*/
CAutoHideTab* lastTab() const {return _this->tab(_this->tabCount() - 1);}
CAutoHideTab *lastTab() const { return _this->tab(_this->tabCount() - 1); }
}; // struct AutoHideSideBarPrivate
/**
* This widget stores the tab buttons
*/
@ -98,7 +95,7 @@ class CTabsWidget : public QWidget
public:
using QWidget::QWidget;
using Super = QWidget;
AutoHideSideBarPrivate* EventHandler;
AutoHideSideBarPrivate *EventHandler;
/**
* Returns the size hint as minimum size hint
@ -111,25 +108,22 @@ public:
/**
* Forward event handling to EventHandler
*/
virtual bool event(QEvent* e) override
virtual bool event(QEvent *e) override
{
EventHandler->handleViewportEvent(e);
return Super::event(e);
}
};
//============================================================================
AutoHideSideBarPrivate::AutoHideSideBarPrivate(CAutoHideSideBar* _public) :
_this(_public),
AutoHideSideBarPrivate::AutoHideSideBarPrivate(CAutoHideSideBar *_public) : _this(_public),
PlaceholderTab(new CAutoHideTab(_this))
{
PlaceholderTab->hide();
}
//============================================================================
void AutoHideSideBarPrivate::handleViewportEvent(QEvent* e)
void AutoHideSideBarPrivate::handleViewportEvent(QEvent *e)
{
switch (e->type())
{
@ -143,7 +137,7 @@ void AutoHideSideBarPrivate::handleViewportEvent(QEvent* e)
case QEvent::Resize:
if (_this->tabCount())
{
auto ev = static_cast<QResizeEvent*>(e);
auto ev = static_cast<QResizeEvent *>(e);
auto Tab = _this->tabAt(0);
int Size = isHorizontal() ? ev->size().height() : ev->size().width();
int TabSize = isHorizontal() ? Tab->size().height() : Tab->size().width();
@ -166,16 +160,15 @@ void AutoHideSideBarPrivate::handleViewportEvent(QEvent* e)
}
}
//============================================================================
CAutoHideSideBar::CAutoHideSideBar(CDockContainerWidget* parent, SideBarLocation area) :
Super(parent),
CAutoHideSideBar::CAutoHideSideBar(CDockContainerWidget *parent, SideBarLocation area) : Super(parent),
d(new AutoHideSideBarPrivate(this))
{
d->SideTabArea = area;
d->ContainerWidget = parent;
d->Orientation = (area == SideBarLocation::SideBarBottom || area == SideBarLocation::SideBarTop)
? Qt::Horizontal : Qt::Vertical;
? Qt::Horizontal
: Qt::Vertical;
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
setFrameStyle(QFrame::NoFrame);
@ -188,7 +181,6 @@ CAutoHideSideBar::CAutoHideSideBar(CDockContainerWidget* parent, SideBarLocation
d->TabsContainerWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
d->TabsContainerWidget->setObjectName("sideTabsContainerWidget");
d->TabsLayout = new QBoxLayout(d->Orientation == Qt::Vertical ? QBoxLayout::TopToBottom : QBoxLayout::LeftToRight);
d->TabsLayout->setContentsMargins(0, 0, 0, 0);
d->TabsLayout->setSpacing(12);
@ -209,14 +201,13 @@ CAutoHideSideBar::CAutoHideSideBar(CDockContainerWidget* parent, SideBarLocation
hide();
}
//============================================================================
CAutoHideSideBar::~CAutoHideSideBar()
{
ADS_PRINT("~CSideTabBar()");
// The SideTabeBar is not the owner of the tabs and to prevent deletion
// we set the parent here to nullptr to remove it from the children
auto Tabs = findChildren<CAutoHideTab*>(QString(), Qt::FindDirectChildrenOnly);
auto Tabs = findChildren<CAutoHideTab *>(QString(), Qt::FindDirectChildrenOnly);
for (auto Tab : Tabs)
{
Tab->setParent(nullptr);
@ -224,9 +215,8 @@ CAutoHideSideBar::~CAutoHideSideBar()
delete d;
}
//============================================================================
void CAutoHideSideBar::insertTab(int Index, CAutoHideTab* SideTab)
void CAutoHideSideBar::insertTab(int Index, CAutoHideTab *SideTab)
{
SideTab->setSideBar(this);
SideTab->installEventFilter(this);
@ -243,9 +233,8 @@ void CAutoHideSideBar::insertTab(int Index, CAutoHideTab* SideTab)
show();
}
//============================================================================
CAutoHideDockContainer* CAutoHideSideBar::insertDockWidget(int Index, CDockWidget* DockWidget)
CAutoHideDockContainer *CAutoHideSideBar::insertDockWidget(int Index, CDockWidget *DockWidget)
{
auto AutoHideContainer = new CAutoHideDockContainer(DockWidget, d->SideTabArea, d->ContainerWidget);
DockWidget->dockManager()->dockFocusController()->clearDockWidgetFocus(DockWidget);
@ -255,9 +244,8 @@ CAutoHideDockContainer* CAutoHideSideBar::insertDockWidget(int Index, CDockWidge
return AutoHideContainer;
}
//============================================================================
void CAutoHideSideBar::removeAutoHideWidget(CAutoHideDockContainer* AutoHideWidget)
void CAutoHideSideBar::removeAutoHideWidget(CAutoHideDockContainer *AutoHideWidget)
{
AutoHideWidget->autoHideTab()->removeFromSideBar();
auto DockContainer = AutoHideWidget->dockContainer();
@ -269,7 +257,7 @@ void CAutoHideSideBar::removeAutoHideWidget(CAutoHideDockContainer* AutoHideWidg
}
//============================================================================
void CAutoHideSideBar::addAutoHideWidget(CAutoHideDockContainer* AutoHideWidget)
void CAutoHideSideBar::addAutoHideWidget(CAutoHideDockContainer *AutoHideWidget)
{
auto SideBar = AutoHideWidget->autoHideTab()->sideBar();
if (SideBar == this)
@ -287,9 +275,8 @@ void CAutoHideSideBar::addAutoHideWidget(CAutoHideDockContainer* AutoHideWidget)
insertTab(-1, AutoHideWidget->autoHideTab());
}
//============================================================================
void CAutoHideSideBar::removeTab(CAutoHideTab* SideTab)
void CAutoHideSideBar::removeTab(CAutoHideTab *SideTab)
{
SideTab->removeEventFilter(this);
d->TabsLayout->removeWidget(SideTab);
@ -299,7 +286,6 @@ void CAutoHideSideBar::removeTab(CAutoHideTab* SideTab)
}
}
//============================================================================
bool CAutoHideSideBar::eventFilter(QObject *watched, QEvent *event)
{
@ -309,7 +295,7 @@ bool CAutoHideSideBar::eventFilter(QObject *watched, QEvent *event)
}
// As soon as on tab is shown, we need to show the side tab bar
auto Tab = qobject_cast<CAutoHideTab*>(watched);
auto Tab = qobject_cast<CAutoHideTab *>(watched);
if (Tab)
{
show();
@ -323,30 +309,26 @@ Qt::Orientation CAutoHideSideBar::orientation() const
return d->Orientation;
}
//============================================================================
CAutoHideTab* CAutoHideSideBar::tabAt(int index) const
CAutoHideTab *CAutoHideSideBar::tabAt(int index) const
{
return qobject_cast<CAutoHideTab*>(d->TabsLayout->itemAt(index)->widget());
return qobject_cast<CAutoHideTab *>(d->TabsLayout->itemAt(index)->widget());
}
//============================================================================
int CAutoHideSideBar::tabCount() const
{
return d->TabsLayout->count() - 1;
}
//============================================================================
SideBarLocation CAutoHideSideBar::sideBarLocation() const
{
return d->SideTabArea;
}
//============================================================================
void CAutoHideSideBar::saveState(QXmlStreamWriter& s) const
void CAutoHideSideBar::saveState(QXmlStreamWriter &s) const
{
if (!tabCount())
{
@ -379,39 +361,34 @@ QSize CAutoHideSideBar::minimumSizeHint() const
return Size;
}
//===========================================================================
QSize CAutoHideSideBar::sizeHint() const
{
return d->TabsContainerWidget->sizeHint();
}
//===========================================================================
int CAutoHideSideBar::spacing() const
{
return d->TabsLayout->spacing();
}
//===========================================================================
void CAutoHideSideBar::setSpacing(int Spacing)
{
d->TabsLayout->setSpacing(Spacing);
}
//===========================================================================
CDockContainerWidget* CAutoHideSideBar::dockContainer() const
CDockContainerWidget *CAutoHideSideBar::dockContainer() const
{
return d->ContainerWidget;
}
//===========================================================================
void CAutoHideSideBar::onAutoHideTabMoved(const QPoint& GlobalPos)
void CAutoHideSideBar::onAutoHideTabMoved(const QPoint &GlobalPos)
{
auto MovingTab = qobject_cast<CAutoHideTab*>(sender());
auto MovingTab = qobject_cast<CAutoHideTab *>(sender());
if (!MovingTab)
{
return;
@ -427,11 +404,10 @@ void CAutoHideSideBar::onAutoHideTabMoved(const QPoint& GlobalPos)
d->TabsLayout->insertWidget(index, MovingTab);
}
//===========================================================================
void CAutoHideSideBar::onAutoHideTabMoving(const QPoint& GlobalPos)
void CAutoHideSideBar::onAutoHideTabMoving(const QPoint &GlobalPos)
{
auto MovingTab = qobject_cast<CAutoHideTab*>(sender());
auto MovingTab = qobject_cast<CAutoHideTab *>(sender());
if (!MovingTab)
{
return;
@ -463,10 +439,8 @@ void CAutoHideSideBar::onAutoHideTabMoving(const QPoint& GlobalPos)
// Find tab under mouse
for (int i = 0; i < tabCount(); ++i)
{
CAutoHideTab* DropTab = tab(i);
if (DropTab == d->PlaceholderTab || !DropTab->isVisibleTo(this)
|| !DropTab->geometry().contains(MousePos)
)
CAutoHideTab *DropTab = tab(i);
if (DropTab == d->PlaceholderTab || !DropTab->isVisibleTo(this) || !DropTab->geometry().contains(MousePos))
{
continue;
}
@ -491,15 +465,13 @@ void CAutoHideSideBar::onAutoHideTabMoving(const QPoint& GlobalPos)
}
}
//===========================================================================
CAutoHideTab* CAutoHideSideBar::tab(int Index) const
CAutoHideTab *CAutoHideSideBar::tab(int Index) const
{
if (Index >= tabCount() || Index < 0)
{
return nullptr;
}
return qobject_cast<CAutoHideTab*>(d->TabsLayout->itemAt(Index)->widget());
return qobject_cast<CAutoHideTab *>(d->TabsLayout->itemAt(Index)->widget());
}
} // namespace ads

View File

@ -18,7 +18,6 @@
** License along with this library; If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
//============================================================================
/// \file AutoHideSideBar.h
/// \author Syarif Fakhri
@ -62,15 +61,15 @@ class ADS_EXPORT CAutoHideSideBar : public QScrollArea
Q_PROPERTY(int spacing READ spacing WRITE setSpacing)
private:
AutoHideSideBarPrivate* d; ///< private data (pimpl)
AutoHideSideBarPrivate *d; ///< private data (pimpl)
friend struct AutoHideSideBarPrivate;
friend class DockWidgetSideTab;
friend DockContainerWidgetPrivate;
friend CDockContainerWidget;
private Q_SLOTS:
void onAutoHideTabMoved(const QPoint& GlobalPos);
void onAutoHideTabMoving(const QPoint& GlobalPos);
void onAutoHideTabMoved(const QPoint &GlobalPos);
void onAutoHideTabMoving(const QPoint &GlobalPos);
protected:
virtual bool eventFilter(QObject *watched, QEvent *event) override;
@ -78,13 +77,13 @@ protected:
/**
* Saves the state into the given stream
*/
void saveState(QXmlStreamWriter& Stream) const;
void saveState(QXmlStreamWriter &Stream) const;
/**
* Inserts the given dock widget tab at the given position.
* An Index value of -1 appends the side tab at the end.
*/
void insertTab(int Index, CAutoHideTab* SideTab);
void insertTab(int Index, CAutoHideTab *SideTab);
public:
using Super = QScrollArea;
@ -92,7 +91,7 @@ public:
/**
* Default Constructor
*/
CAutoHideSideBar(CDockContainerWidget* parent, SideBarLocation area);
CAutoHideSideBar(CDockContainerWidget *parent, SideBarLocation area);
/**
* Virtual Destructor
@ -102,26 +101,26 @@ public:
/**
* Removes the given DockWidgetSideTab from the tabbar
*/
void removeTab(CAutoHideTab* SideTab);
void removeTab(CAutoHideTab *SideTab);
/**
* Insert dock widget into the side bar.
* The function creates the auto hide dock container, inserts the
* auto hide tab
*/
CAutoHideDockContainer* insertDockWidget(int Index, CDockWidget* DockWidget);
CAutoHideDockContainer *insertDockWidget(int Index, CDockWidget *DockWidget);
/**
* Removes the auto hide widget from this side bar
*/
void removeAutoHideWidget(CAutoHideDockContainer* AutoHideWidget);
void removeAutoHideWidget(CAutoHideDockContainer *AutoHideWidget);
/**
* Adds the given AutoHideWidget to this sidebar.
* If the AutoHideWidget is in another sidebar, then it will be removed
* from this sidebar.
*/
void addAutoHideWidget(CAutoHideDockContainer* AutoHideWidget);
void addAutoHideWidget(CAutoHideDockContainer *AutoHideWidget);
/**
* Returns orientation of side tab.
@ -131,7 +130,7 @@ public:
/*
* get the side tab widget at position, returns nullptr if it's out of bounds
*/
CAutoHideTab* tabAt(int index) const;
CAutoHideTab *tabAt(int index) const;
/*
* Gets the count of the tab widgets
@ -171,12 +170,12 @@ public:
/**
* Returns the dock container that hosts this sideBar()
*/
CDockContainerWidget* dockContainer() const;
CDockContainerWidget *dockContainer() const;
/**
* Returns the tab with the given index
*/
CAutoHideTab* tab(int Index) const;
CAutoHideTab *tab(int Index) const;
};
} // namespace ads
//-----------------------------------------------------------------------------

View File

@ -16,7 +16,6 @@
** License along with this library; If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
//============================================================================
/// \file AutoHideTab.cpp
/// \author Syarif Fakhri
@ -46,9 +45,9 @@ namespace ads
*/
struct AutoHideTabPrivate
{
CAutoHideTab* _this;
CDockWidget* DockWidget = nullptr;
CAutoHideSideBar* SideBar = nullptr;
CAutoHideTab *_this;
CDockWidget *DockWidget = nullptr;
CAutoHideSideBar *SideBar = nullptr;
Qt::Orientation Orientation{Qt::Vertical};
QElapsedTimer TimeSinceHoverMousePress;
QPoint GlobalDragStartMousePosition;
@ -59,7 +58,7 @@ struct AutoHideTabPrivate
/**
* Private data constructor
*/
AutoHideTabPrivate(CAutoHideTab* _public);
AutoHideTabPrivate(CAutoHideTab *_public);
/**
* Update the orientation, visibility and spacing based on the area of
@ -70,7 +69,7 @@ struct AutoHideTabPrivate
/**
* Convenience function to ease dock container access
*/
CDockContainerWidget* dockContainer() const
CDockContainerWidget *dockContainer() const
{
return DockWidget ? DockWidget->dockContainer() : nullptr;
}
@ -78,7 +77,7 @@ struct AutoHideTabPrivate
/**
* Forward this event to the dock container
*/
void forwardEventToDockContainer(QEvent* event)
void forwardEventToDockContainer(QEvent *event)
{
auto DockContainer = dockContainer();
if (DockContainer)
@ -90,7 +89,7 @@ struct AutoHideTabPrivate
/**
* Saves the drag start position in global and local coordinates
*/
void saveDragStartMousePosition(const QPoint& GlobalPos)
void saveDragStartMousePosition(const QPoint &GlobalPos)
{
GlobalDragStartMousePosition = GlobalPos;
DragStartMousePosition = _this->mapFromGlobal(GlobalPos);
@ -107,18 +106,14 @@ struct AutoHideTabPrivate
/**
* Moves the tab depending on the position in the given mouse event
*/
void moveTab(QMouseEvent* ev);
void moveTab(QMouseEvent *ev);
}; // struct DockWidgetTabPrivate
//============================================================================
AutoHideTabPrivate::AutoHideTabPrivate(CAutoHideTab* _public) :
_this(_public)
AutoHideTabPrivate::AutoHideTabPrivate(CAutoHideTab *_public) : _this(_public)
{
}
//============================================================================
void AutoHideTabPrivate::updateOrientation()
{
@ -135,9 +130,8 @@ void AutoHideTabPrivate::updateOrientation()
}
}
//============================================================================
void AutoHideTabPrivate::moveTab(QMouseEvent* ev)
void AutoHideTabPrivate::moveTab(QMouseEvent *ev)
{
ev->accept();
QPoint Distance = internal::globalPositionOf(ev) - GlobalDragStartMousePosition;
@ -159,9 +153,8 @@ void AutoHideTabPrivate::moveTab(QMouseEvent* ev)
_this->raise();
}
//============================================================================
void CAutoHideTab::setSideBar(CAutoHideSideBar* SideTabBar)
void CAutoHideTab::setSideBar(CAutoHideSideBar *SideTabBar)
{
d->SideBar = SideTabBar;
if (d->SideBar)
@ -170,14 +163,12 @@ void CAutoHideTab::setSideBar(CAutoHideSideBar* SideTabBar)
}
}
//============================================================================
CAutoHideSideBar* CAutoHideTab::sideBar() const
CAutoHideSideBar *CAutoHideTab::sideBar() const
{
return d->SideBar;
}
//============================================================================
void CAutoHideTab::removeFromSideBar()
{
@ -191,15 +182,13 @@ void CAutoHideTab::removeFromSideBar()
}
//============================================================================
CAutoHideTab::CAutoHideTab(QWidget* parent) :
CPushButton(parent),
CAutoHideTab::CAutoHideTab(QWidget *parent) : CPushButton(parent),
d(new AutoHideTabPrivate(this))
{
setAttribute(Qt::WA_NoMousePropagation);
setFocusPolicy(Qt::NoFocus);
}
//============================================================================
CAutoHideTab::~CAutoHideTab()
{
@ -207,7 +196,6 @@ CAutoHideTab::~CAutoHideTab()
delete d;
}
//============================================================================
void CAutoHideTab::updateStyle()
{
@ -215,7 +203,6 @@ void CAutoHideTab::updateStyle()
update();
}
//============================================================================
SideBarLocation CAutoHideTab::sideBarLocation() const
{
@ -227,7 +214,6 @@ SideBarLocation CAutoHideTab::sideBarLocation() const
return SideBarLeft;
}
//============================================================================
void CAutoHideTab::setOrientation(Qt::Orientation Orientation)
{
@ -241,18 +227,17 @@ void CAutoHideTab::setOrientation(Qt::Orientation Orientation)
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
}
CPushButton::setButtonOrientation((Qt::Horizontal == Orientation)
? CPushButton::Horizontal : CPushButton::VerticalTopToBottom);
? CPushButton::Horizontal
: CPushButton::VerticalTopToBottom);
updateStyle();
}
//============================================================================
Qt::Orientation CAutoHideTab::orientation() const
{
return d->Orientation;
}
//============================================================================
bool CAutoHideTab::isActiveTab() const
{
@ -264,16 +249,14 @@ bool CAutoHideTab::isActiveTab() const
return false;
}
//============================================================================
CDockWidget* CAutoHideTab::dockWidget() const
CDockWidget *CAutoHideTab::dockWidget() const
{
return d->DockWidget;
}
//============================================================================
void CAutoHideTab::setDockWidget(CDockWidget* DockWidget)
void CAutoHideTab::setDockWidget(CDockWidget *DockWidget)
{
if (!DockWidget)
{
@ -285,9 +268,8 @@ void CAutoHideTab::setDockWidget(CDockWidget* DockWidget)
setToolTip(DockWidget->windowTitle());
}
//============================================================================
bool CAutoHideTab::event(QEvent* event)
bool CAutoHideTab::event(QEvent *event)
{
if (!CDockManager::testAutoHideConfigFlag(CDockManager::AutoHideShowOnMouseOver))
{
@ -323,9 +305,8 @@ bool CAutoHideTab::event(QEvent* event)
return Super::event(event);
}
//============================================================================
void CAutoHideTab::mousePressEvent(QMouseEvent* ev)
void CAutoHideTab::mousePressEvent(QMouseEvent *ev)
{
if (ev->button() == Qt::LeftButton)
{
@ -338,9 +319,8 @@ void CAutoHideTab::mousePressEvent(QMouseEvent* ev)
Super::mousePressEvent(ev);
}
//============================================================================
void CAutoHideTab::mouseMoveEvent(QMouseEvent* ev)
void CAutoHideTab::mouseMoveEvent(QMouseEvent *ev)
{
if (!(ev->buttons() & Qt::LeftButton) || d->isDraggingState(DraggingInactive))
{
@ -374,9 +354,8 @@ void CAutoHideTab::mouseMoveEvent(QMouseEvent* ev)
Super::mouseMoveEvent(ev);
}
//============================================================================
void CAutoHideTab::mouseReleaseEvent(QMouseEvent* ev)
void CAutoHideTab::mouseReleaseEvent(QMouseEvent *ev)
{
if (ev->button() == Qt::LeftButton)
{

View File

@ -18,7 +18,6 @@
** License along with this library; If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
//============================================================================
/// \file AutoHideTab.h
/// \author Syarif Fakhri
@ -56,7 +55,7 @@ class ADS_EXPORT CAutoHideTab : public CPushButton
Q_PROPERTY(bool iconOnly READ iconOnly)
private:
AutoHideTabPrivate* d; ///< private data (pimpl)
AutoHideTabPrivate *d; ///< private data (pimpl)
friend struct AutoHideTabPrivate;
friend class CDockWidget;
friend class CAutoHideDockContainer;
@ -68,11 +67,10 @@ private:
protected:
void setSideBar(CAutoHideSideBar *SideTabBar);
void removeFromSideBar();
bool event(QEvent* event) override;
void mousePressEvent(QMouseEvent* ev) override;
void mouseReleaseEvent(QMouseEvent* ev) override;
void mouseMoveEvent(QMouseEvent* ev) override;
bool event(QEvent *event) override;
void mousePressEvent(QMouseEvent *ev) override;
void mouseReleaseEvent(QMouseEvent *ev) override;
void mouseMoveEvent(QMouseEvent *ev) override;
public:
using Super = CPushButton;
@ -82,7 +80,7 @@ public:
* param[in] DockWidget The dock widget this title bar belongs to
* param[in] parent The parent widget of this title bar
*/
CAutoHideTab(QWidget* parent = nullptr);
CAutoHideTab(QWidget *parent = nullptr);
/**
* Virtual Destructor
@ -118,12 +116,12 @@ public:
/**
* returns the dock widget this belongs to
*/
CDockWidget* dockWidget() const;
CDockWidget *dockWidget() const;
/**
* Sets the dock widget that is controlled by this tab
*/
void setDockWidget(CDockWidget* DockWidget);
void setDockWidget(CDockWidget *DockWidget);
/**
* Returns true if the auto hide config flag AutoHideSideBarsIconOnly
@ -135,14 +133,14 @@ public:
* Returns the side bar that contains this tab or a nullptr if the tab is
* not in a side bar
*/
CAutoHideSideBar* sideBar() const;
CAutoHideSideBar *sideBar() const;
Q_SIGNALS:
void moved(const QPoint& GlobalPos);
void moving(const QPoint& GlobalPos);
void moved(const QPoint &GlobalPos);
void moving(const QPoint &GlobalPos);
}; // class AutoHideTab
}
// namespace ads
// namespace ads
//-----------------------------------------------------------------------------
#endif