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, KFileDnDIconView(), setDnDEnabled(), and useAutoOpenTimer(). Referenced by KFileDnDIconView(). |
|
Definition at line 46 of file kfiledndiconview.cpp. |
Member Function Documentation
|
Reimplemented from KFileIconView. Definition at line 185 of file kfiledndiconview.cpp. References acceptDrag(). Referenced by acceptDrag(), contentsDragEnterEvent(), contentsDragMoveEvent(), and contentsDropEvent(). |
|
Reimplemented from KFileIconView. Definition at line 81 of file kfiledndiconview.cpp. References acceptDrag(), contentsDragEnterEvent(), m_autoOpenTime, m_autoOpenTimer, m_dropItem, and m_useAutoOpenTimer. Referenced by contentsDragEnterEvent(). |
|
Reimplemented from KFileIconView. Definition at line 114 of file kfiledndiconview.cpp. References contentsDragLeaveEvent(), m_autoOpenTimer, m_dropItem, and m_useAutoOpenTimer. Referenced by contentsDragLeaveEvent(). |
|
Reimplemented from KFileIconView. Definition at line 94 of file kfiledndiconview.cpp. References acceptDrag(), contentsDragMoveEvent(), m_autoOpenTime, m_autoOpenTimer, m_dropItem, and m_useAutoOpenTimer. Referenced by contentsDragMoveEvent(). |
|
Reimplemented from KFileIconView. Definition at line 121 of file kfiledndiconview.cpp. References acceptDrag(), contentsDropEvent(), dropped(), m_autoOpenTimer, m_dropItem, and m_useAutoOpenTimer. Referenced by contentsDropEvent(). |
|
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(), 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. References m_useAutoOpenTimer. |
|
Definition at line 53 of file kfiledndiconview.h. References m_dndEnabled. |
|
Reimplemented from KFileIconView. Definition at line 49 of file kfiledndiconview.cpp. References KConfigBase::readBoolEntry(), readConfig(), and setDnDEnabled(). Referenced by readConfig(). |
|
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, setAutoOpenTime(), and useAutoOpenTimer(). Referenced by setAutoOpenTime(). |
|
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 setDnDEnabled(). Referenced by KFileDnDIconView(), readConfig(), and setDnDEnabled(). |
|
Called when the auto timer times out. Open the current folder. Definition at line 62 of file kfiledndiconview.cpp. References KFileViewSignaler::activate(), m_autoOpenTimer, m_dropItem, and m_useAutoOpenTimer. 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, slotOpenFolder(), and useAutoOpenTimer(). Referenced by KFileDnDIconView(), setAutoOpenTime(), and useAutoOpenTimer(). |
|
Reimplemented from KFileIconView. Definition at line 56 of file kfiledndiconview.cpp. References m_dndEnabled, writeConfig(), and KConfigBase::writeEntry(). Referenced by writeConfig(). |
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 isDnDEnabled(), 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 contentsDragEnterEvent(), contentsDragLeaveEvent(), contentsDragMoveEvent(), contentsDropEvent(), isAutoOpening(), slotOpenFolder(), and useAutoOpenTimer(). |
The documentation for this class was generated from the following files:
- buildtools/autotools/kfiledndiconview.h
- buildtools/autotools/kfiledndiconview.cpp