Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
ResizablePanel Class Reference

#include <resizable_panel.h>

Inheritance diagram for ResizablePanel:
[legend]
Collaboration diagram for ResizablePanel:
[legend]

Signals

void dragStarted (ResizablePanel *panel)
void dropRequested (ResizablePanel *dragged, ResizablePanel *target, bool insertBefore)

Public Member Functions

 ResizablePanel (const QString &typeId, AbstractAnalyticsPanelWidget *analyticsPanel, QWidget *parent=nullptr)
void setSelected (bool selected)
void setHeightFromSaved (int h)
int getCurrentHeight () const
QSize sizeHint () const override
QSize minimumSizeHint () const override
QString getTypeId () const

Public Attributes

AbstractAnalyticsPanelWidget * panel

Protected Member Functions

bool eventFilter (QObject *obj, QEvent *event) override
void dragEnterEvent (QDragEnterEvent *event) override
void dragMoveEvent (QDragMoveEvent *event) override
void dragLeaveEvent (QDragLeaveEvent *event) override
void dropEvent (QDropEvent *event) override
void resizeEvent (QResizeEvent *event) override

Private Member Functions

int getMinimumAllowedHeight () const
void updateSizeConstraints ()
void startDrag ()
void performAutoScroll ()
void showDropIndicator (double y)
void hideDropIndicator ()

Private Attributes

QString typeId
QFrame * frame
QFrame * selectionOverlay
QFrame * dropIndicator
QPushButton * dragButton
QWidget * resizeHandle
int currentHeight
bool isResizing = false
bool isDraggingPanel = false
double resizeStartY = 0
int resizeStartHeight = 0
QPoint dragStartPos
QPoint lastDragPos
QTimer * autoScrollTimer

Constructor & Destructor Documentation

◆ ResizablePanel()

ResizablePanel::ResizablePanel ( const QString & typeId,
AbstractAnalyticsPanelWidget * analyticsPanel,
QWidget * parent = nullptr )
explicit
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ dragEnterEvent()

void ResizablePanel::dragEnterEvent ( QDragEnterEvent * event)
overrideprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dragLeaveEvent()

void ResizablePanel::dragLeaveEvent ( QDragLeaveEvent * event)
overrideprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dragMoveEvent()

void ResizablePanel::dragMoveEvent ( QDragMoveEvent * event)
overrideprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dragStarted

void ResizablePanel::dragStarted ( ResizablePanel * panel)
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dropEvent()

void ResizablePanel::dropEvent ( QDropEvent * event)
overrideprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dropRequested

void ResizablePanel::dropRequested ( ResizablePanel * dragged,
ResizablePanel * target,
bool insertBefore )
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ eventFilter()

bool ResizablePanel::eventFilter ( QObject * obj,
QEvent * event )
overrideprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCurrentHeight()

int ResizablePanel::getCurrentHeight ( ) const

◆ getMinimumAllowedHeight()

int ResizablePanel::getMinimumAllowedHeight ( ) const
private
Here is the caller graph for this function:

◆ getTypeId()

QString ResizablePanel::getTypeId ( ) const
inline

◆ hideDropIndicator()

void ResizablePanel::hideDropIndicator ( )
private
Here is the caller graph for this function:

◆ minimumSizeHint()

QSize ResizablePanel::minimumSizeHint ( ) const
override
Here is the call graph for this function:

◆ performAutoScroll()

void ResizablePanel::performAutoScroll ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resizeEvent()

void ResizablePanel::resizeEvent ( QResizeEvent * event)
overrideprotected
Here is the caller graph for this function:

◆ setHeightFromSaved()

void ResizablePanel::setHeightFromSaved ( int h)
Here is the call graph for this function:

◆ setSelected()

void ResizablePanel::setSelected ( bool selected)
Here is the caller graph for this function:

◆ showDropIndicator()

void ResizablePanel::showDropIndicator ( double y)
private
Here is the caller graph for this function:

◆ sizeHint()

QSize ResizablePanel::sizeHint ( ) const
override

◆ startDrag()

void ResizablePanel::startDrag ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSizeConstraints()

void ResizablePanel::updateSizeConstraints ( )
private
Here is the caller graph for this function:

Member Data Documentation

◆ autoScrollTimer

QTimer* ResizablePanel::autoScrollTimer
private

◆ currentHeight

int ResizablePanel::currentHeight
private

◆ dragButton

QPushButton* ResizablePanel::dragButton
private

◆ dragStartPos

QPoint ResizablePanel::dragStartPos
private

◆ dropIndicator

QFrame* ResizablePanel::dropIndicator
private

◆ frame

QFrame* ResizablePanel::frame
private

◆ isDraggingPanel

bool ResizablePanel::isDraggingPanel = false
private

◆ isResizing

bool ResizablePanel::isResizing = false
private

◆ lastDragPos

QPoint ResizablePanel::lastDragPos
private

◆ panel

AbstractAnalyticsPanelWidget* ResizablePanel::panel

◆ resizeHandle

QWidget* ResizablePanel::resizeHandle
private

◆ resizeStartHeight

int ResizablePanel::resizeStartHeight = 0
private

◆ resizeStartY

double ResizablePanel::resizeStartY = 0
private

◆ selectionOverlay

QFrame* ResizablePanel::selectionOverlay
private

◆ typeId

QString ResizablePanel::typeId
private

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