HAL
hal::DockBar Class Reference

Contains and handles DockButtons. More...

#include <dock_bar.h>

Inheritance diagram for hal::DockBar:
Inheritance graph
Collaboration diagram for hal::DockBar:
Collaboration graph

Public Slots

void handleDragStart ()
 
void handleDragEnd ()
 

Signals

void stopAnimations ()
 

Public Member Functions

 DockBar (Qt::Orientation orientation, button_orientation b_orientation, QWidget *parent=nullptr)
 
void mouseMoveEvent (QMouseEvent *event) override
 
void dragEnterEvent (QDragEnterEvent *event) override
 
void dragMoveEvent (QDragMoveEvent *event) override
 
void dragLeaveEvent (QDragLeaveEvent *event) override
 
void dropEvent (QDropEvent *event) override
 
bool eventFilter (QObject *watched, QEvent *event) override
 
QSize sizeHint () const override
 
QSize minimumSizeHint () const override
 
void setAnchor (ContentAnchor *anchor)
 
void setAutohide (bool autohide)
 
bool unused ()
 
int count ()
 
int index (ContentWidget *widget)
 
void rearrangeButtons ()
 
void collapseButtons ()
 
void addButton (ContentWidget *widget, int index)
 
bool removeButton (ContentWidget *widget)
 
bool removeButton (int index)
 
void detachButton (ContentWidget *widget)
 
void reattachButton (ContentWidget *widget)
 
void checkButton (ContentWidget *widget)
 
void uncheckButton (ContentWidget *widget)
 
ContentWidgetwidgetAt (int index)
 
ContentWidgetnextAvailableWidget (int index)
 
void clear ()
 
- Public Member Functions inherited from QFrame
 QFrame (QWidget *parent, Qt::WindowFlags f)
 
virtual ~QFrame ()
 
int frameStyle () const const
 
void setFrameStyle (int style)
 
int frameWidth () const const
 
QFrame::Shape frameShape () const const
 
void setFrameShape (QFrame::Shape)
 
QFrame::Shadow frameShadow () const const
 
void setFrameShadow (QFrame::Shadow)
 
int lineWidth () const const
 
void setLineWidth (int)
 
int midLineWidth () const const
 
void setMidLineWidth (int)
 
QRect frameRect () const const
 
void setFrameRect (const QRect &)
 
- Public Member Functions inherited from QWidget
 QWidget (QWidget *parent, Qt::WindowFlags f)
 
virtual ~QWidget ()
 
WId winId () const const
 
WId effectiveWinId () const const
 
QStylestyle () const const
 
void setStyle (QStyle *style)
 
bool isTopLevel () const const
 
bool isWindow () const const
 
bool isModal () const const
 
Qt::WindowModality windowModality () const const
 
void setWindowModality (Qt::WindowModality windowModality)
 
bool isEnabled () const const
 
bool isEnabledTo (const QWidget *ancestor) const const
 
bool isEnabledToTLW () const const
 
void setEnabled (bool)
 
void setDisabled (bool disable)
 
void setWindowModified (bool)
 
QRect frameGeometry () const const
 
const QRectgeometry () const const
 
QRect normalGeometry () const const
 
int x () const const
 
int y () const const
 
QPoint pos () const const
 
QSize frameSize () const const
 
QSize size () const const
 
int width () const const
 
int height () const const
 
QRect rect () const const
 
QRect childrenRect () const const
 
QRegion childrenRegion () const const
 
QSize minimumSize () const const
 
QSize maximumSize () const const
 
int minimumWidth () const const
 
int minimumHeight () const const
 
int maximumWidth () const const
 
int maximumHeight () const const
 
void setMinimumSize (const QSize &)
 
void setMinimumSize (int minw, int minh)
 
void setMaximumSize (const QSize &)
 
void setMaximumSize (int maxw, int maxh)
 
void setMinimumWidth (int minw)
 
void setMinimumHeight (int minh)
 
void setMaximumWidth (int maxw)
 
void setMaximumHeight (int maxh)
 
void setupUi (QWidget *widget)
 
QSize sizeIncrement () const const
 
void setSizeIncrement (const QSize &)
 
void setSizeIncrement (int w, int h)
 
QSize baseSize () const const
 
void setBaseSize (const QSize &)
 
void setBaseSize (int basew, int baseh)
 
void setFixedSize (const QSize &s)
 
void setFixedSize (int w, int h)
 
void setFixedWidth (int w)
 
void setFixedHeight (int h)
 
QPoint mapToGlobal (const QPoint &pos) const const
 
QPoint mapFromGlobal (const QPoint &pos) const const
 
QPoint mapToParent (const QPoint &pos) const const
 
QPoint mapFromParent (const QPoint &pos) const const
 
QPoint mapTo (const QWidget *parent, const QPoint &pos) const const
 
QPoint mapFrom (const QWidget *parent, const QPoint &pos) const const
 
QWidgetwindow () const const
 
QWidgetnativeParentWidget () const const
 
QWidgettopLevelWidget () const const
 
const QPalettepalette () const const
 
void setPalette (const QPalette &)
 
void setBackgroundRole (QPalette::ColorRole role)
 
QPalette::ColorRole backgroundRole () const const
 
void setForegroundRole (QPalette::ColorRole role)
 
QPalette::ColorRole foregroundRole () const const
 
const QFontfont () const const
 
void setFont (const QFont &)
 
QFontMetrics fontMetrics () const const
 
QFontInfo fontInfo () const const
 
QCursor cursor () const const
 
void setCursor (const QCursor &)
 
void unsetCursor ()
 
void setMouseTracking (bool enable)
 
bool hasMouseTracking () const const
 
bool underMouse () const const
 
void setTabletTracking (bool enable)
 
bool hasTabletTracking () const const
 
void setMask (const QBitmap &bitmap)
 
void setMask (const QRegion &region)
 
QRegion mask () const const
 
void clearMask ()
 
void render (QPaintDevice *target, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags)
 
void render (QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags)
 
QPixmap grab (const QRect &rectangle)
 
QGraphicsEffectgraphicsEffect () const const
 
void setGraphicsEffect (QGraphicsEffect *effect)
 
void grabGesture (Qt::GestureType gesture, Qt::GestureFlags flags)
 
void ungrabGesture (Qt::GestureType gesture)
 
void setWindowTitle (const QString &)
 
void setStyleSheet (const QString &styleSheet)
 
QString styleSheet () const const
 
QString windowTitle () const const
 
void setWindowIcon (const QIcon &icon)
 
QIcon windowIcon () const const
 
void setWindowIconText (const QString &)
 
QString windowIconText () const const
 
void setWindowRole (const QString &role)
 
QString windowRole () const const
 
void setWindowFilePath (const QString &filePath)
 
QString windowFilePath () const const
 
void setWindowOpacity (qreal level)
 
qreal windowOpacity () const const
 
bool isWindowModified () const const
 
void setToolTip (const QString &)
 
QString toolTip () const const
 
void setToolTipDuration (int msec)
 
int toolTipDuration () const const
 
void setStatusTip (const QString &)
 
QString statusTip () const const
 
void setWhatsThis (const QString &)
 
QString whatsThis () const const
 
QString accessibleName () const const
 
void setAccessibleName (const QString &name)
 
QString accessibleDescription () const const
 
void setAccessibleDescription (const QString &description)
 
void setLayoutDirection (Qt::LayoutDirection direction)
 
Qt::LayoutDirection layoutDirection () const const
 
void unsetLayoutDirection ()
 
void setLocale (const QLocale &locale)
 
QLocale locale () const const
 
void unsetLocale ()
 
void setFocus ()
 
bool isActiveWindow () const const
 
void activateWindow ()
 
void clearFocus ()
 
void setFocus (Qt::FocusReason reason)
 
Qt::FocusPolicy focusPolicy () const const
 
void setFocusPolicy (Qt::FocusPolicy policy)
 
bool hasFocus () const const
 
void setFocusProxy (QWidget *w)
 
QWidgetfocusProxy () const const
 
Qt::ContextMenuPolicy contextMenuPolicy () const const
 
void setContextMenuPolicy (Qt::ContextMenuPolicy policy)
 
void grabMouse ()
 
void grabMouse (const QCursor &cursor)
 
void releaseMouse ()
 
void grabKeyboard ()
 
void releaseKeyboard ()
 
int grabShortcut (const QKeySequence &key, Qt::ShortcutContext context)
 
void releaseShortcut (int id)
 
void setShortcutEnabled (int id, bool enable)
 
void setShortcutAutoRepeat (int id, bool enable)
 
bool updatesEnabled () const const
 
void setUpdatesEnabled (bool enable)
 
QGraphicsProxyWidgetgraphicsProxyWidget () const const
 
void update ()
 
void repaint ()
 
void update (int x, int y, int w, int h)
 
void update (const QRect &rect)
 
void update (const QRegion &rgn)
 
void repaint (int x, int y, int w, int h)
 
void repaint (const QRect &rect)
 
void repaint (const QRegion &rgn)
 
virtual void setVisible (bool visible)
 
void setHidden (bool hidden)
 
void show ()
 
void hide ()
 
void showMinimized ()
 
void showMaximized ()
 
void showFullScreen ()
 
void showNormal ()
 
bool close ()
 
void raise ()
 
void lower ()
 
void stackUnder (QWidget *w)
 
void move (int x, int y)
 
void move (const QPoint &)
 
void resize (int w, int h)
 
void resize (const QSize &)
 
void setGeometry (int x, int y, int w, int h)
 
void setGeometry (const QRect &)
 
QByteArray saveGeometry () const const
 
bool restoreGeometry (const QByteArray &geometry)
 
void adjustSize ()
 
bool isVisible () const const
 
bool isVisibleTo (const QWidget *ancestor) const const
 
bool isHidden () const const
 
bool isMinimized () const const
 
bool isMaximized () const const
 
bool isFullScreen () const const
 
Qt::WindowStates windowState () const const
 
void setWindowState (Qt::WindowStates windowState)
 
QSizePolicy sizePolicy () const const
 
void setSizePolicy (QSizePolicy)
 
void setSizePolicy (QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical)
 
virtual int heightForWidth (int w) const const
 
virtual bool hasHeightForWidth () const const
 
QRegion visibleRegion () const const
 
void setContentsMargins (int left, int top, int right, int bottom)
 
void setContentsMargins (const QMargins &margins)
 
void getContentsMargins (int *left, int *top, int *right, int *bottom) const const
 
QMargins contentsMargins () const const
 
QRect contentsRect () const const
 
QLayoutlayout () const const
 
void setLayout (QLayout *layout)
 
void updateGeometry ()
 
void setParent (QWidget *parent)
 
void setParent (QWidget *parent, Qt::WindowFlags f)
 
void scroll (int dx, int dy)
 
void scroll (int dx, int dy, const QRect &r)
 
QWidgetfocusWidget () const const
 
QWidgetnextInFocusChain () const const
 
QWidgetpreviousInFocusChain () const const
 
bool acceptDrops () const const
 
void setAcceptDrops (bool on)
 
void addAction (QAction *action)
 
void addActions (QList< QAction * > actions)
 
void insertActions (QAction *before, QList< QAction * > actions)
 
void insertAction (QAction *before, QAction *action)
 
void removeAction (QAction *action)
 
QList< QAction * > actions () const const
 
QWidgetparentWidget () const const
 
void setWindowFlags (Qt::WindowFlags type)
 
Qt::WindowFlags windowFlags () const const
 
void setWindowFlag (Qt::WindowType flag, bool on)
 
void overrideWindowFlags (Qt::WindowFlags flags)
 
Qt::WindowType windowType () const const
 
QWidgetchildAt (int x, int y) const const
 
QWidgetchildAt (const QPoint &p) const const
 
void setAttribute (Qt::WidgetAttribute attribute, bool on)
 
bool testAttribute (Qt::WidgetAttribute attribute) const const
 
virtual QPaintEnginepaintEngine () const const override
 
void ensurePolished () const const
 
bool isAncestorOf (const QWidget *child) const const
 
bool hasEditFocus () const const
 
void setEditFocus (bool enable)
 
bool autoFillBackground () const const
 
void setAutoFillBackground (bool enabled)
 
QBackingStorebackingStore () const const
 
QWindowwindowHandle () const const
 
QScreenscreen () const const
 
void windowTitleChanged (const QString &title)
 
void windowIconChanged (const QIcon &icon)
 
void windowIconTextChanged (const QString &iconText)
 
void customContextMenuRequested (const QPoint &pos)
 
virtual QVariant inputMethodQuery (Qt::InputMethodQuery query) const const
 
Qt::InputMethodHints inputMethodHints () const const
 
void setInputMethodHints (Qt::InputMethodHints hints)
 
 QWIDGETSIZE_MAX QWIDGETSIZE_MAX
 
- Public Member Functions inherited from QObject
virtual const QMetaObjectmetaObject () const const
 
 QObject (QObject *parent)
 
virtual ~QObject ()
 
QString objectName () const const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
bool signalsBlocked () const const
 
bool blockSignals (bool block)
 
QThreadthread () const const
 
void moveToThread (QThread *targetThread)
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
void killTimer (int id)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
const QObjectListchildren () const const
 
void setParent (QObject *parent)
 
void installEventFilter (QObject *filterObj)
 
void removeEventFilter (QObject *obj)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectTree ()
 
void dumpObjectInfo ()
 
void dumpObjectTree () const const
 
void dumpObjectInfo () const const
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const const
 
QList< QByteArraydynamicPropertyNames () const const
 
void destroyed (QObject *obj)
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
bool inherits (const char *className) const const
 
void deleteLater ()
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
 Q_CLASSINFO (Name, Value)
 
 Q_INTERFACES (...)
 
 Q_PROPERTY (...)
 
 Q_ENUMS (...)
 
 Q_FLAGS (...)
 
 Q_ENUM (...)
 
 Q_FLAG (...)
 
 Q_ENUM_NS (...)
 
 Q_FLAG_NS (...)
 
 Q_OBJECT Q_OBJECT
 
 Q_GADGET Q_GADGET
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SLOTS Q_SLOTS
 
 Q_SLOT Q_SLOT
 
 Q_EMIT Q_EMIT
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
- Public Member Functions inherited from QPaintDevice
virtual ~QPaintDevice ()
 
bool paintingActive () const const
 
int width () const const
 
int height () const const
 
int widthMM () const const
 
int heightMM () const const
 
int logicalDpiX () const const
 
int logicalDpiY () const const
 
int physicalDpiX () const const
 
int physicalDpiY () const const
 
int devicePixelRatio () const const
 
qreal devicePixelRatioF () const const
 
int colorCount () const const
 
int depth () const const
 

Additional Inherited Members

- Public Types inherited from QFrame
enum  Shape
 
enum  Shadow
 
enum  StyleMask
 
- Public Types inherited from QWidget
enum  RenderFlag
 
- Public Types inherited from QPaintDevice
enum  PaintDeviceMetric
 
- Static Public Member Functions inherited from QWidget
void setTabOrder (QWidget *first, QWidget *second)
 
QWidgetmouseGrabber ()
 
QWidgetkeyboardGrabber ()
 
QWidgetfind (WId id)
 
QWidgetcreateWindowContainer (QWindow *window, QWidget *parent, Qt::WindowFlags flags)
 
- Static Public Member Functions inherited from QObject
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
- Public Attributes inherited from QFrame
 NoFrame
 
 Box
 
 Panel
 
 WinPanel
 
 HLine
 
 VLine
 
 StyledPanel
 
 Plain
 
 Raised
 
 Sunken
 
 Shadow_Mask
 
 Shape_Mask
 
- Public Attributes inherited from QWidget
typedef RenderFlags
 
 DrawWindowBackground
 
 DrawChildren
 
 IgnoreMask
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Public Attributes inherited from QPaintDevice
 PdmWidth
 
 PdmHeight
 
 PdmWidthMM
 
 PdmHeightMM
 
 PdmNumColors
 
 PdmDepth
 
 PdmDpiX
 
 PdmDpiY
 
 PdmPhysicalDpiX
 
 PdmPhysicalDpiY
 
 PdmDevicePixelRatio
 
 PdmDevicePixelRatioScaled
 
- Protected Member Functions inherited from QFrame
virtual bool event (QEvent *e) override
 
virtual void paintEvent (QPaintEvent *) override
 
virtual void changeEvent (QEvent *ev) override
 
void initStyleOption (QStyleOptionFrame *option) const const
 
- Protected Member Functions inherited from QWidget
virtual void mousePressEvent (QMouseEvent *event)
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event)
 
virtual void wheelEvent (QWheelEvent *event)
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void keyReleaseEvent (QKeyEvent *event)
 
virtual void focusInEvent (QFocusEvent *event)
 
virtual void focusOutEvent (QFocusEvent *event)
 
virtual void enterEvent (QEvent *event)
 
virtual void leaveEvent (QEvent *event)
 
virtual void moveEvent (QMoveEvent *event)
 
virtual void resizeEvent (QResizeEvent *event)
 
virtual void closeEvent (QCloseEvent *event)
 
virtual void contextMenuEvent (QContextMenuEvent *event)
 
virtual void tabletEvent (QTabletEvent *event)
 
virtual void actionEvent (QActionEvent *event)
 
virtual void showEvent (QShowEvent *event)
 
virtual void hideEvent (QHideEvent *event)
 
virtual bool nativeEvent (const QByteArray &eventType, void *message, long *result)
 
virtual int metric (QPaintDevice::PaintDeviceMetric m) const const override
 
virtual void initPainter (QPainter *painter) const const override
 
virtual void inputMethodEvent (QInputMethodEvent *event)
 
void updateMicroFocus ()
 
void create (WId window, bool initializeWindow, bool destroyOldWindow)
 
void destroy (bool destroyWindow, bool destroySubWindows)
 
virtual bool focusNextPrevChild (bool next)
 
bool focusNextChild ()
 
bool focusPreviousChild ()
 
- Protected Member Functions inherited from QObject
QObjectsender () const const
 
int senderSignalIndex () const const
 
int receivers (const char *signal) const const
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
virtual void timerEvent (QTimerEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
- Protected Member Functions inherited from QPaintDevice
 QPaintDevice ()
 
- Properties inherited from QFrame
 frameShape
 
 frameShadow
 
 lineWidth
 
 midLineWidth
 
 frameWidth
 
 frameRect
 
- Properties inherited from QWidget
 modal
 
 windowModality
 
 enabled
 
 geometry
 
 frameGeometry
 
 normalGeometry
 
 x
 
 y
 
 pos
 
 frameSize
 
 size
 
 width
 
 height
 
 rect
 
 childrenRect
 
 childrenRegion
 
 sizePolicy
 
 minimumSize
 
 maximumSize
 
 minimumWidth
 
 minimumHeight
 
 maximumWidth
 
 maximumHeight
 
 sizeIncrement
 
 baseSize
 
 palette
 
 font
 
 cursor
 
 mouseTracking
 
 tabletTracking
 
 isActiveWindow
 
 focusPolicy
 
 focus
 
 contextMenuPolicy
 
 updatesEnabled
 
 visible
 
 minimized
 
 maximized
 
 fullScreen
 
 sizeHint
 
 minimumSizeHint
 
 acceptDrops
 
 windowTitle
 
 windowIcon
 
 windowIconText
 
 windowOpacity
 
 windowModified
 
 toolTip
 
 toolTipDuration
 
 statusTip
 
 whatsThis
 
 accessibleName
 
 accessibleDescription
 
 layoutDirection
 
 windowFlags
 
 autoFillBackground
 
 styleSheet
 
 locale
 
 windowFilePath
 
 inputMethodHints
 
- Properties inherited from QObject
 objectName
 

Detailed Description

Contains and handles DockButtons.

This class is used by the splitter anchor to store and handle DockButtons. It manages information including, but not limited to, the start/end of a drag action and the arrangement of the buttons.

Definition at line 47 of file dock_bar.h.

Constructor & Destructor Documentation

◆ DockBar()

hal::DockBar::DockBar ( Qt::Orientation  orientation,
button_orientation  b_orientation,
QWidget parent = nullptr 
)

The dockbar's constructor.

Parameters
orientation- The orientation of the dockbar. It is either vertical or horizontal.
b_orientation- The orientation of the dockbar's buttons. It splits the vertical option into vertical_up and vertical_down.
parent- The dockbar's parent.

Definition at line 28 of file dock_bar.cpp.

References QWidget::setAcceptDrops().

Member Function Documentation

◆ addButton()

void hal::DockBar::addButton ( ContentWidget widget,
int  index 
)

Adds a new button for the content widget at the given position to the dockbar.

Parameters
widget- The content widget for which a button is created and then connected.
index- The index to add the button.

Definition at line 343 of file dock_bar.cpp.

References QWidget::height, hal::horizontal, index(), rearrangeButtons(), QWidget::setParent(), hal::DockButton::setRelativeHeight(), QWidget::show(), hal::DockButton::show(), QWidget::updateGeometry(), and QWidget::width.

Referenced by hal::TabWidget::add(), and hal::SplitterAnchor::add().

◆ checkButton()

void hal::DockBar::checkButton ( ContentWidget widget)

Checks the corresponding dockbutton of the given content widget.

Parameters
widget- The content widget for which the corresponding dockbutton is checked.

Definition at line 429 of file dock_bar.cpp.

Referenced by hal::TabWidget::close(), hal::TabWidget::open(), and hal::SplitterAnchor::open().

◆ clear()

void hal::DockBar::clear ( )

Removes all buttons from the dockbear. The corresponding content widgets are not deleted but hidden.

Definition at line 496 of file dock_bar.cpp.

References rearrangeButtons(), and QWidget::update().

Referenced by hal::SplitterAnchor::clear().

◆ collapseButtons()

void hal::DockBar::collapseButtons ( )

Used when dragging a dockbutton within the dockbar. It animates the dockbuttons so that the dragged button can be moved between them.

Definition at line 317 of file dock_bar.cpp.

References QObject::connect(), QAbstractAnimation::DeleteWhenStopped, hal::horizontal, QVariantAnimation::setDuration(), QVariantAnimation::setEndValue(), QVariantAnimation::setStartValue(), QAbstractAnimation::start(), and stopAnimations().

Referenced by dragLeaveEvent(), and mouseMoveEvent().

◆ count()

◆ detachButton()

void hal::DockBar::detachButton ( ContentWidget widget)

Hides the corresponding button for the given widget when a detach action is performed.

Parameters
widget- The widget that was detached.

Definition at line 396 of file dock_bar.cpp.

References QWidget::hide(), rearrangeButtons(), and unused().

Referenced by hal::TabWidget::detach(), and hal::SplitterAnchor::detach().

◆ dragEnterEvent()

void hal::DockBar::dragEnterEvent ( QDragEnterEvent event)
overridevirtual

Overwritten QWidget function to handle drag actions. It is called when a drag action enters the dockbar.

Parameters
event- The QDragEnterEvent.

Reimplemented from QWidget.

Definition at line 68 of file dock_bar.cpp.

References QFrame::event().

◆ dragLeaveEvent()

void hal::DockBar::dragLeaveEvent ( QDragLeaveEvent event)
overridevirtual

Overwritten QWidget function to handle drag actions. It is called when a drag action leaves the dockbar.

Parameters
event- The QDragLeaveEvent.

Reimplemented from QWidget.

Definition at line 160 of file dock_bar.cpp.

References collapseButtons(), and QFrame::event().

◆ dragMoveEvent()

void hal::DockBar::dragMoveEvent ( QDragMoveEvent event)
overridevirtual

Overwritten QWidget function to handle drag actions. It is callen when drag mime data is moved within the dockbar. It primarily manages the moving animation of the dockbuttons.

Parameters
event- The QDragMoveEvent.

Reimplemented from QWidget.

Definition at line 80 of file dock_bar.cpp.

References QList::append(), hal::horizontal, QVariantAnimation::setDuration(), QVariantAnimation::setEndValue(), QVariantAnimation::setStartValue(), and QAbstractAnimation::start().

◆ dropEvent()

void hal::DockBar::dropEvent ( QDropEvent event)
overridevirtual

Overwritten QWidget function to handle drag actions. It is called when drag mime data is dropped within the dockbar. It removes the mime data (in this case a content widget) from its old splitter anchor and adds it to the dockbar's own splitter anchor.

Parameters
event- The QDropEvent.

Reimplemented from QWidget.

Definition at line 166 of file dock_bar.cpp.

References hal::ContentAnchor::add(), count(), QFrame::event(), index(), hal::ContentWidget::remove(), and hal::DockMimeData::widget().

◆ eventFilter()

bool hal::DockBar::eventFilter ( QObject watched,
QEvent event 
)
overridevirtual

Overwritten QObject function to handle the drag system. It is installed on a dockbutton to catch its MousePressEvent so that the drag start position and dragbutton can be set.

Parameters
watched- The dockbutton that sent the event.
event- The event that was emitted by the watched dockbutton.
Returns
- True if the event must not be propagated any further. False (mostly the default) otherwise.

Reimplemented from QObject.

Definition at line 194 of file dock_bar.cpp.

References QMouseEvent::buttons(), QFrame::event(), QMouseEvent::globalPos(), Qt::LeftButton, QWidget::mapFromGlobal(), and QEvent::MouseButtonPress.

◆ handleDragEnd

void hal::DockBar::handleDragEnd ( )
slot

Hides the dockbar when it contains no dockbuttons and the autohide property is set. It is connected to the dragEnd signal of the content relay.

Definition at line 520 of file dock_bar.cpp.

References QWidget::hide(), and unused().

Referenced by hal::SplitterAnchor::SplitterAnchor().

◆ handleDragStart

void hal::DockBar::handleDragStart ( )
slot

Shows the dockbar in case it was hidden. It is connected to the dragStart signal of the content drag relay.

Definition at line 515 of file dock_bar.cpp.

References QWidget::show().

Referenced by hal::SplitterAnchor::SplitterAnchor().

◆ index()

int hal::DockBar::index ( ContentWidget widget)

Get the index of the correspondig dockbutton in the dockbar.

Parameters
widget- The widget
Returns
The index of the widget. Returns -1 if the widget has no corresponding button.

Definition at line 284 of file dock_bar.cpp.

Referenced by addButton(), hal::TabWidget::detach(), dropEvent(), nextAvailableWidget(), hal::TabWidget::open(), hal::TabWidget::reattach(), hal::SplitterAnchor::reattach(), hal::TabWidget::remove(), removeButton(), and widgetAt().

◆ minimumSizeHint()

QSize hal::DockBar::minimumSizeHint ( ) const
overridevirtual

Overwritten QWidget function to get the dockbar's preferred size. It is calculated using the dockbuttons it contains.

Returns
The minimum size the dockbar prefers.

Reimplemented from QWidget.

Definition at line 231 of file dock_bar.cpp.

References QWidget::height, Qt::Horizontal, and QWidget::width.

◆ mouseMoveEvent()

void hal::DockBar::mouseMoveEvent ( QMouseEvent event)
overridevirtual

◆ nextAvailableWidget()

ContentWidget * hal::DockBar::nextAvailableWidget ( int  index)

Get the next available widget starting at the index. A widget is available when it belongs to the corresponding splitter anchor and is not detached. When the index is < 0 or within the boundaries the search is conducted from "left to right" (index 0 -> number of bottoms). If the index is greater than the number of buttons the search is conducted from the opposite direction.

Parameters
index- The startindex of the search.
Returns
The found content widget. If no available widget is found a nullpointer is returned.

Definition at line 460 of file dock_bar.cpp.

References index().

Referenced by hal::TabWidget::handleNoCurrentWidget().

◆ rearrangeButtons()

void hal::DockBar::rearrangeButtons ( )

Calculates new button positions and moves them based on their orientation and available status.

Definition at line 296 of file dock_bar.cpp.

References hal::horizontal.

Referenced by addButton(), clear(), detachButton(), mouseMoveEvent(), reattachButton(), and removeButton().

◆ reattachButton()

void hal::DockBar::reattachButton ( ContentWidget widget)

Shows the corresponding button for the given widget when a reattach action is performed.

Parameters
widget- The widget that is reattached.

Definition at line 414 of file dock_bar.cpp.

References rearrangeButtons(), and QWidget::show().

Referenced by hal::TabWidget::reattach(), and hal::SplitterAnchor::reattach().

◆ removeButton() [1/2]

bool hal::DockBar::removeButton ( ContentWidget widget)

Removes the corresponding button for the given conten widget.

Parameters
widget- The content widget to remove the corresponding button.
Returns
True when a button for the widget is found and sucessfully removed. False otherwise.

Definition at line 359 of file dock_bar.cpp.

References QWidget::hide(), rearrangeButtons(), unused(), and QWidget::updateGeometry().

Referenced by hal::TabWidget::remove(), and hal::SplitterAnchor::remove().

◆ removeButton() [2/2]

bool hal::DockBar::removeButton ( int  index)

Removes a button at the given index.

Parameters
index- The index at which a button should be removed.
Returns
True when the button is sucessfully removed. False when the index is out of bounds.

Definition at line 379 of file dock_bar.cpp.

References QWidget::close(), QWidget::hide(), hal::DockButton::hide(), index(), rearrangeButtons(), unused(), and QWidget::updateGeometry().

◆ setAnchor()

void hal::DockBar::setAnchor ( ContentAnchor anchor)

Sets the dockbar's correspondig content anchor. Used by the managing classes SplitterAnchor and TabWidget.

Parameters
anchor

Definition at line 253 of file dock_bar.cpp.

Referenced by hal::SplitterAnchor::SplitterAnchor(), and hal::TabWidget::TabWidget().

◆ setAutohide()

void hal::DockBar::setAutohide ( bool  autohide)

Sets the autohide property of the dockbar. If it is set to true the dockbar hides itself when it contains zero dockbuttons. It still appears when the drag action of a dockbutton from anywhere is started.

Parameters
autohide- The boolean to set the autohide property.

Definition at line 258 of file dock_bar.cpp.

Referenced by hal::TabWidget::TabWidget().

◆ sizeHint()

QSize hal::DockBar::sizeHint ( ) const
overridevirtual

Overwritten QWidget function to get the dockbar's preferred size. It is calculated using the dockbuttons it contains.

Returns
The preferred size.

Reimplemented from QFrame.

Definition at line 208 of file dock_bar.cpp.

References QWidget::height, Qt::Horizontal, and QWidget::width.

◆ stopAnimations

void hal::DockBar::stopAnimations ( )
signal

Q_SIGNAL that can be emitted to interrupt the collapse animation.

Referenced by collapseButtons(), and mouseMoveEvent().

◆ uncheckButton()

void hal::DockBar::uncheckButton ( ContentWidget widget)

Unchecks the corresponding bockbutton of the given content widget.

Parameters
widget- The content widget for which the corresponding dockbutton is unchecked.

Definition at line 441 of file dock_bar.cpp.

Referenced by hal::SplitterAnchor::close(), and hal::TabWidget::open().

◆ unused()

bool hal::DockBar::unused ( )

Get the used status of the dockbar. Returns true if the dockbar is unused, meaning all buttons are hidden (For example when all widget belonging to the corresponding content anchor-and therefore to the dockbar- are detached).

Returns
The used status.

Definition at line 263 of file dock_bar.cpp.

Referenced by detachButton(), handleDragEnd(), hal::TabWidget::handleDragEnd(), and removeButton().

◆ widgetAt()

ContentWidget * hal::DockBar::widgetAt ( int  index)

Get the content widget at a given index.

Parameters
index- The index for the content widget.
Returns
The content widget at the index. If the index is out of bounds a nullpointer is returned.

Definition at line 453 of file dock_bar.cpp.

References index().

Referenced by hal::TabWidget::clear().


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