KDragWidgetDecoratorBase
#include <kdragwidgetdecorator.h>
Properties | |
bool | isDragEnabled |
Properties inherited from QObject | |
objectName | |
Protected Member Functions | |
QWidget * | decoratedWidget () const |
virtual QDrag * | dragObject () |
bool | eventFilter (QObject *watched, QEvent *event) override |
virtual void | startDrag () |
Protected Member Functions inherited from QObject | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const const |
int | receivers (const char *signal) const const |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
Detailed Description
A decorator which adds drag-support to widgets.
This is a decorator using an event filter to implement drag-support in widgets. You must override the virtual method dragObject() to specify the QDrag to be used.
Definition at line 30 of file kdragwidgetdecorator.h.
Property Documentation
◆ isDragEnabled
|
readwrite |
Definition at line 33 of file kdragwidgetdecorator.h.
Constructor & Destructor Documentation
◆ KDragWidgetDecoratorBase()
Default constructor.
Definition at line 23 of file kdragwidgetdecorator.cpp.
◆ ~KDragWidgetDecoratorBase()
|
overridedefault |
Destructs the decorator.
Member Function Documentation
◆ decoratedWidget()
|
protected |
- Returns
- the widget this decorator is attached to
Definition at line 68 of file kdragwidgetdecorator.cpp.
◆ dragObject()
|
protectedvirtual |
Reimplement this and return the QDrag object that should be used for the drag.
Remember to give it "decoratedWidget()" as parent.
Default implementation returns a null pointer, so that no drag is initiated.
Definition at line 73 of file kdragwidgetdecorator.cpp.
◆ eventFilter()
|
overrideprotectedvirtual |
Reimplemented to add drag-support.
Reimplemented from QObject.
Definition at line 43 of file kdragwidgetdecorator.cpp.
◆ isDragEnabled()
bool KDragWidgetDecoratorBase::isDragEnabled | ( | ) | const |
- Returns
- if drag support is enabled or not.
Definition at line 33 of file kdragwidgetdecorator.cpp.
◆ setDragEnabled()
void KDragWidgetDecoratorBase::setDragEnabled | ( | bool | enable | ) |
Enables/disables drag-support.
Default is enabled.
Definition at line 38 of file kdragwidgetdecorator.cpp.
◆ startDrag()
|
protectedvirtual |
Starts a drag (Copy by default) using dragObject()
Definition at line 78 of file kdragwidgetdecorator.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:43 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.