00001 /* 00002 * Copyright (C) 2009, Edmundo Albuquerque de Souza e Silva. 00003 * 00004 * This file may be distributed under the terms of the Q Public License 00005 * as defined by Trolltech AS of Norway and appearing in the file 00006 * LICENSE.QPL included in the packaging of this file. 00007 * 00008 * THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING 00009 * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00010 * PURPOSE. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, 00011 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING 00012 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 00013 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 00014 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 00015 * 00016 */ 00017 00018 #ifndef __DRAGDROPLISTVIEW_H__ 00019 #define __DRAGDROPLISTVIEW_H__ 00020 00021 #include <qlistview.h> 00022 00023 #include "FileWindow.h" 00024 #include "RioQt.h" 00025 00026 class DragData; 00027 00028 class DragDropListView : public QListView 00029 { 00030 Q_OBJECT 00031 00032 protected: 00033 RioQt *rioQt; 00034 FileWindow *fileWindow; 00035 00036 void contentsDropEvent( QDropEvent * ); 00037 00038 QStringList *getSelectedFileNames( void ); 00039 00040 void startDrag( void ); 00041 00042 public: 00043 DragDropListView( QWidget *, RioQt *, FileWindow * ); 00044 00045 QPtrList<FileItem> getSelectedFileItems( void ); 00046 00047 FileWindow *getFileWindow( void ); 00048 00049 void appendCopy( RioCopy * ); 00050 void removeCopy( RioCopy * ); 00051 }; 00052 00053 #endif 00054 00055