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


Signals | |
void | dropped (QDropEvent *) |
Emitted whenever an decodable item is dropped in the view. | |
void | dropped (KFileView *, QDropEvent *) |
Emitted whenever an decodable item is dropped in the view Note: The QDropEvent contains a KURLDrag object. | |
void | dropped (KFileView *, KURL::List &urls) |
Emitted whenever an decodable item is dropped in the view. | |
Public Member Functions | |
KFileDnDDetailView (QWidget *parent=0, const char *name=0) | |
virtual | ~KFileDnDDetailView () |
void | setDnDEnabled (bool) |
Set this to true 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 void | startDrag () |
Create dragobject encoding the current selection and starts the drag. | |
virtual QDragObject * | dragObject () const |
virtual bool | acceptDrag (QDropEvent *event) const |
Protected Attributes | |
QTimer | m_autoOpenTimer |
int | m_autoOpenTime |
bool | m_useAutoOpenTimer |
QListViewItem * | m_dropItem |
KURLDrag * | m_dragObject |
bool | m_dndEnabled |
Detailed Description
This is a fileview inherited from KFileDetailView. "Drag and drop" aware KFileDetailView.It adds "drag and drop" handling to the view suitable for a KFileDetailView. 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 40 of file kfilednddetailview.h.
Constructor & Destructor Documentation
|
Definition at line 36 of file kfilednddetailview.cpp. References autoOpenTime, KFileDetailView::setAutoUpdate(), setDnDEnabled(), and useAutoOpenTimer(). |
|
Definition at line 46 of file kfilednddetailview.cpp. |
Member Function Documentation
|
Reimplemented from KFileDetailView. Definition at line 179 of file kfilednddetailview.cpp. Referenced by contentsDragEnterEvent(), contentsDragMoveEvent(), and contentsDropEvent(). |
|
Reimplemented from KFileDetailView. Definition at line 81 of file kfilednddetailview.cpp. References acceptDrag(), kdDebug(), m_autoOpenTime, m_autoOpenTimer, and m_dropItem. |
|
Reimplemented from KFileDetailView. Definition at line 120 of file kfilednddetailview.cpp. References kdDebug(), m_autoOpenTimer, and m_dropItem. |
|
Reimplemented from KFileDetailView. Definition at line 97 of file kfilednddetailview.cpp. References acceptDrag(), kdDebug(), m_autoOpenTime, m_autoOpenTimer, and m_dropItem. |
|
Reimplemented from KFileDetailView. Definition at line 130 of file kfilednddetailview.cpp. References acceptDrag(), KURLDrag::decode(), dropped(), kdDebug(), m_autoOpenTimer, and m_dropItem. |
|
Definition at line 175 of file kfilednddetailview.cpp. |
|
Emitted whenever an decodable item is dropped in the view.
|
|
Emitted whenever an decodable item is dropped in the view Note: The QDropEvent contains a KURLDrag object.
|
|
Emitted whenever an decodable item is dropped in the view. Note: The QDropEvent contains a KURLDrag object. Referenced by contentsDropEvent(). |
|
Definition at line 72 of file kfilednddetailview.h. |
|
Definition at line 54 of file kfilednddetailview.h. |
|
Reimplemented from KFileDetailView. Definition at line 49 of file kfilednddetailview.cpp. References KConfigBase::readBoolEntry(), KFileDetailView::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 186 of file kfilednddetailview.cpp. References m_autoOpenTime, and useAutoOpenTimer(). |
|
Set this to true if Drag'n drop should be enabled or not, default is enabled.
Definition at line 202 of file kfilednddetailview.cpp. References m_dndEnabled, KListView::setAcceptDrops(), KListView::setDragEnabled(), and KListView::setDropVisualizer(). Referenced by KFileDnDDetailView(), and readConfig(). |
|
Called when the auto timer times out. Open the current folder. Definition at line 62 of file kfilednddetailview.cpp. References KFileViewSignaler::activate(), m_autoOpenTimer, and m_dropItem. Referenced by useAutoOpenTimer(). |
|
Create dragobject encoding the current selection and starts the drag.
Reimplemented from KListView. Definition at line 151 of file kfilednddetailview.cpp. References KFileDetailView::currentFileItem(), kdDebug(), m_dragObject, KURLDrag::newDrag(), KFileItem::pixmap(), and KFileDetailView::widget(). |
|
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 191 of file kfilednddetailview.cpp. References m_autoOpenTimer, m_dropItem, m_useAutoOpenTimer, and slotOpenFolder(). Referenced by KFileDnDDetailView(), and setAutoOpenTime(). |
|
Reimplemented from KFileDetailView. Definition at line 56 of file kfilednddetailview.cpp. References m_dndEnabled, KFileDetailView::writeConfig(), and KConfigBase::writeEntry(). |
Member Data Documentation
|
Definition at line 121 of file kfilednddetailview.h. Referenced by contentsDragEnterEvent(), contentsDragMoveEvent(), and setAutoOpenTime(). |
|
Definition at line 120 of file kfilednddetailview.h. Referenced by contentsDragEnterEvent(), contentsDragLeaveEvent(), contentsDragMoveEvent(), contentsDropEvent(), slotOpenFolder(), and useAutoOpenTimer(). |
|
Definition at line 125 of file kfilednddetailview.h. Referenced by setDnDEnabled(), and writeConfig(). |
|
Definition at line 124 of file kfilednddetailview.h. Referenced by startDrag(). |
|
Definition at line 123 of file kfilednddetailview.h. Referenced by contentsDragEnterEvent(), contentsDragLeaveEvent(), contentsDragMoveEvent(), contentsDropEvent(), slotOpenFolder(), and useAutoOpenTimer(). |
|
Definition at line 122 of file kfilednddetailview.h. Referenced by useAutoOpenTimer(). |
The documentation for this class was generated from the following files:
- buildtools/autotools/kfilednddetailview.h
- buildtools/autotools/kfilednddetailview.cpp