game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
Loading...
Searching...
No Matches
DraggableToolbar Class Reference

#include <draggable_toolbar.h>

Inheritance diagram for DraggableToolbar:
Collaboration diagram for DraggableToolbar:

Public Member Functions

 DraggableToolbar (QWidget *parent=nullptr, ThemeManager *themeManager=nullptr)
DraggableToolbarSection * addSection (const QString &id, const QString &displayName=QString())
void addSpacer ()
void applyTheme ()
bool hasSpacerBefore (const QString &sectionId) const
void insertSpacerBefore (const QString &sectionId)
bool isLocked () const
void lockedChanged (bool locked)
void removeSpacerBefore (const QString &sectionId)
DraggableToolbarSection * section (const QString &id) const
QStringList sectionOrder () const
void sectionOrderChanged (const QStringList &newOrder)
void sectionResized (const QString &sectionId, int newWidth)
void setLocked (bool locked)
void setSectionOrder (const QStringList &order)

Protected Member Functions

void contextMenuEvent (QContextMenuEvent *event) override
void dragEnterEvent (QDragEnterEvent *event) override
void dragMoveEvent (QDragMoveEvent *event) override
void dropEvent (QDropEvent *event) override
void paintEvent (QPaintEvent *event) override

Friends

class DraggableToolbarSection

Detailed Description

Definition at line 32 of file draggable_toolbar.h.

Constructor & Destructor Documentation

◆ DraggableToolbar()

DraggableToolbar::DraggableToolbar ( QWidget * parent = nullptr,
ThemeManager * themeManager = nullptr )
explicit

Definition at line 28 of file draggable_toolbar.cpp.

References ThemeColors::border, and ThemeColors::panelBackground.

Member Function Documentation

◆ addSection()

DraggableToolbarSection * DraggableToolbar::addSection ( const QString & id,
const QString & displayName = QString() )

Definition at line 44 of file draggable_toolbar.cpp.

References DraggableToolbarSection, and section().

◆ addSpacer()

void DraggableToolbar::addSpacer ( )

Definition at line 136 of file draggable_toolbar.cpp.

◆ applyTheme()

void DraggableToolbar::applyTheme ( )

◆ contextMenuEvent()

◆ dragEnterEvent()

void DraggableToolbar::dragEnterEvent ( QDragEnterEvent * event)
overrideprotected

Definition at line 368 of file draggable_toolbar.cpp.

◆ dragMoveEvent()

void DraggableToolbar::dragMoveEvent ( QDragMoveEvent * event)
overrideprotected

Definition at line 378 of file draggable_toolbar.cpp.

◆ dropEvent()

void DraggableToolbar::dropEvent ( QDropEvent * event)
overrideprotected

Definition at line 388 of file draggable_toolbar.cpp.

References section(), sectionOrder(), and sectionOrderChanged().

◆ hasSpacerBefore()

bool DraggableToolbar::hasSpacerBefore ( const QString & sectionId) const

Definition at line 171 of file draggable_toolbar.cpp.

Referenced by contextMenuEvent().

◆ insertSpacerBefore()

void DraggableToolbar::insertSpacerBefore ( const QString & sectionId)

Definition at line 147 of file draggable_toolbar.cpp.

References sectionOrder(), and sectionOrderChanged().

Referenced by contextMenuEvent().

◆ isLocked()

bool DraggableToolbar::isLocked ( ) const
inline

Definition at line 66 of file draggable_toolbar.h.

◆ lockedChanged()

void DraggableToolbar::lockedChanged ( bool locked)

◆ paintEvent()

void DraggableToolbar::paintEvent ( QPaintEvent * event)
overrideprotected

Definition at line 408 of file draggable_toolbar.cpp.

References ThemeColors::accent.

◆ removeSpacerBefore()

void DraggableToolbar::removeSpacerBefore ( const QString & sectionId)

Definition at line 158 of file draggable_toolbar.cpp.

References sectionOrder(), and sectionOrderChanged().

Referenced by contextMenuEvent().

◆ section()

DraggableToolbarSection * DraggableToolbar::section ( const QString & id) const

◆ sectionOrder()

QStringList DraggableToolbar::sectionOrder ( ) const

◆ sectionOrderChanged()

void DraggableToolbar::sectionOrderChanged ( const QStringList & newOrder)

◆ sectionResized()

void DraggableToolbar::sectionResized ( const QString & sectionId,
int newWidth )

◆ setLocked()

void DraggableToolbar::setLocked ( bool locked)

Definition at line 176 of file draggable_toolbar.cpp.

References lockedChanged().

Referenced by contextMenuEvent().

◆ setSectionOrder()

void DraggableToolbar::setSectionOrder ( const QStringList & order)

Definition at line 75 of file draggable_toolbar.cpp.

References section().

◆ DraggableToolbarSection

friend class DraggableToolbarSection
friend

Definition at line 88 of file draggable_toolbar.h.

References DraggableToolbarSection, and section().

Referenced by addSection(), DraggableToolbarSection, and section().


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