digikam
albumdragdrop.h
Go to the documentation of this file.00001 /* ============================================================ 00002 * 00003 * This file is a part of digiKam project 00004 * http://www.digikam.org 00005 * 00006 * Date : 2009-04-16 00007 * Description : Qt Model for Albums - drag and drop handling 00008 * 00009 * Copyright (C) 2009 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de> 00010 * 00011 * This program is free software; you can redistribute it 00012 * and/or modify it under the terms of the GNU General 00013 * Public License as published by the Free Software Foundation; 00014 * either version 2, or (at your option) 00015 * any later version. 00016 * 00017 * This program is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * ============================================================ */ 00023 00024 #ifndef ALBUMDRAGDROP_H 00025 #define ALBUMDRAGDROP_H 00026 00027 // Local includes 00028 00029 #include "albummodeldragdrophandler.h" 00030 #include "albummodel.h" 00031 00032 namespace Digikam 00033 { 00034 00035 class AlbumDragDropHandler : public AlbumModelDragDropHandler 00036 { 00037 Q_OBJECT 00038 00039 public: 00040 00041 AlbumDragDropHandler(AlbumModel *model); 00042 00043 AlbumModel *model() const { return static_cast<AlbumModel*>(m_model); } 00044 00045 virtual bool dropEvent(QAbstractItemView *view, QDropEvent *e, const QModelIndex& droppedOn); 00046 virtual Qt::DropAction accepts(const QMimeData *data, const QModelIndex& dropIndex); 00047 virtual QStringList mimeTypes() const; 00048 virtual QMimeData *createMimeData(const QList<Album*> &); 00049 }; 00050 00051 } // namespace Digikam 00052 00053 #endif /* ALBUMDRAGDROP_H */
KDE 4.4 API Reference