KFileDnDIconView Class Reference
This is a fileview inherited from KFileIconView. Drag and drop" aware KFileIconView. More...
#include <kfiledndiconview.h>
Inheritance diagram for KFileDnDIconView:


Signals | |
void | dropped (QDropEvent *) |
Emitted whenever an decodable item is dropped in the view. | |
Public Member Functions | |
KFileDnDIconView (QWidget *parent=0, const char *name=0) | |
virtual | ~KFileDnDIconView () |
void | setDnDEnabled (bool) |
Set if Drag'n drop should be enabled or not, default is enabled. | |
bool | isDnDEnabled () const |
void | setAutoOpenTime (const int &time) |
Sets the auto open time, which means the time that will elapse before a directory is automatically opened after entered by DnD. | |
void | useAutoOpenTimer (bool on=true) |
Set this to true if you want the view to use it's auto open functionallity otherwhise set it to false. | |
bool | isAutoOpening () const |
virtual void | readConfig (KConfig *, const QString &group=QString::null) |
virtual void | writeConfig (KConfig *, const QString &group=QString::null) |
Protected Slots | |
void | slotOpenFolder () |
Called when the auto timer times out. | |
Protected Member Functions | |
virtual void | contentsDragEnterEvent (QDragEnterEvent *e) |
virtual void | contentsDragMoveEvent (QDragMoveEvent *e) |
virtual void | contentsDragLeaveEvent (QDragLeaveEvent *e) |
virtual void | contentsDropEvent (QDropEvent *e) |
virtual QDragObject * | dragObject () |
Creates a QDragObject containing all urls of the selected KFileItem of the view,. | |
virtual void | startDrag () |
Creates the drag item and starts the drag. | |
virtual bool | acceptDrag (QDropEvent *event) const |
Protected Attributes | |
QTimer | m_autoOpenTimer |
int | m_autoOpenTime |
bool | m_useAutoOpenTimer |
QIconViewItem * | m_dropItem |
bool | m_dndEnabled |
Detailed Description
This is a fileview inherited from KFileIconView. Drag and drop" aware KFileIconView.It adds "drag and drop" suitable for a KFileIconView No special setup is needed, just connect to the dropped signals and the view will take care of the rest.
- Author:
- Björn Sahlström
Definition at line 39 of file kfiledndiconview.h.
Constructor & Destructor Documentation
|
Definition at line 36 of file kfiledndiconview.cpp. References autoOpenTime, KFileIconView::setAutoUpdate(), setDnDEnabled(), and useAutoOpenTimer(). |
|
Definition at line 46 of file kfiledndiconview.cpp. |
Member Function Documentation
|
Reimplemented from KFileIconView. Definition at line 185 of file kfiledndiconview.cpp. Referenced by contentsDragEnterEvent(), contentsDragMoveEvent(), and contentsDropEvent(). |
|
Reimplemented from KFileIconView. Definition at line 81 of file kfiledndiconview.cpp. References acceptDrag(), m_autoOpenTime, m_autoOpenTimer, and m_dropItem. |
|
Reimplemented from KFileIconView. Definition at line 114 of file kfiledndiconview.cpp. References m_autoOpenTimer, and m_dropItem. |
|
Reimplemented from KFileIconView. Definition at line 94 of file kfiledndiconview.cpp. References acceptDrag(), m_autoOpenTime, m_autoOpenTimer, and m_dropItem. |
|
Reimplemented from KFileIconView. Definition at line 121 of file kfiledndiconview.cpp. References acceptDrag(), KURLDrag::decode(), dropped(), m_autoOpenTimer, and m_dropItem. |
|
Creates a QDragObject containing all urls of the selected KFileItem of the view,.
Reimplemented from KFileIconView. Definition at line 143 of file kfiledndiconview.cpp. References KFileIconView::currentFileItem(), KFileIconView::iconSize(), KURLDrag::newDrag(), KFileItem::pixmap(), and KFileIconView::widget(). Referenced by startDrag(). |
|
Emitted whenever an decodable item is dropped in the view. Note: The QDropEvent contains a KURLDrag object. Referenced by contentsDropEvent(). |
|
Definition at line 71 of file kfiledndiconview.h. |
|
Definition at line 53 of file kfiledndiconview.h. |
|
Reimplemented from KFileIconView. Definition at line 49 of file kfiledndiconview.cpp. References KConfigBase::readBoolEntry(), KFileIconView::readConfig(), and setDnDEnabled(). |
|
Sets the auto open time, which means the time that will elapse before a directory is automatically opened after entered by DnD. Only need to call this if you want to change the predefined time that is 750 ms. This also calls useAutoOpenTimer so no need to call this to. Definition at line 163 of file kfiledndiconview.cpp. References m_autoOpenTime, and useAutoOpenTimer(). |
|
Set if Drag'n drop should be enabled or not, default is enabled.
Definition at line 179 of file kfiledndiconview.cpp. References m_dndEnabled, and KFileIconView::setAcceptDrops(). Referenced by KFileDnDIconView(), and readConfig(). |
|
Called when the auto timer times out. Open the current folder. Definition at line 62 of file kfiledndiconview.cpp. References KFileViewSignaler::activate(), m_autoOpenTimer, and m_dropItem. Referenced by useAutoOpenTimer(). |
|
Creates the drag item and starts the drag.
Definition at line 137 of file kfiledndiconview.cpp. References dragObject(). |
|
Set this to true if you want the view to use it's auto open functionallity otherwhise set it to false. By default this is turned ON. Definition at line 168 of file kfiledndiconview.cpp. References m_autoOpenTimer, m_dropItem, m_useAutoOpenTimer, and slotOpenFolder(). Referenced by KFileDnDIconView(), and setAutoOpenTime(). |
|
Reimplemented from KFileIconView. Definition at line 56 of file kfiledndiconview.cpp. References m_dndEnabled, KFileIconView::writeConfig(), and KConfigBase::writeEntry(). |
Member Data Documentation
|
Definition at line 111 of file kfiledndiconview.h. Referenced by contentsDragEnterEvent(), contentsDragMoveEvent(), and setAutoOpenTime(). |
|
Definition at line 110 of file kfiledndiconview.h. Referenced by contentsDragEnterEvent(), contentsDragLeaveEvent(), contentsDragMoveEvent(), contentsDropEvent(), slotOpenFolder(), and useAutoOpenTimer(). |
|
Definition at line 114 of file kfiledndiconview.h. Referenced by setDnDEnabled(), and writeConfig(). |
|
Definition at line 113 of file kfiledndiconview.h. Referenced by contentsDragEnterEvent(), contentsDragLeaveEvent(), contentsDragMoveEvent(), contentsDropEvent(), slotOpenFolder(), and useAutoOpenTimer(). |
|
Definition at line 112 of file kfiledndiconview.h. Referenced by useAutoOpenTimer(). |
The documentation for this class was generated from the following files:
- buildtools/autotools/kfiledndiconview.h
- buildtools/autotools/kfiledndiconview.cpp