2
* Copyright (C) 2007 Ivan Cukic <ivan.cukic(at)kde.org>
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2,
6
* or (at your option) any later version, as published by the Free
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details
14
* You should have received a copy of the GNU General Public
15
* License along with this program; if not, write to the
16
* Free Software Foundation, Inc.,
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
#ifndef LANCELOTPARTS_MODELS_PARTSMERGEDMODEL_H
21
#define LANCELOTPARTS_MODELS_PARTSMERGEDMODEL_H
23
#include "../models/BaseMergedModel.h"
24
#include <kfileitem.h>
28
class PartsMergedModel: public BaseMergedModel {
34
L_Override bool hasModelContextActions(int index) const;
35
L_Override void setModelContextActions(int index, Lancelot::PopupMenu * menu);
36
L_Override void modelContextActivate(int index, QAction * context);
37
L_Override void setModelDropActions(int index,
38
Qt::DropActions & actions, Qt::DropAction & defaultAction);
39
L_Override void modelDataDropped(int index, Qt::DropAction action);
41
L_Override bool dataDropAvailable(int where, const QMimeData * mimeData);
42
L_Override void dataDropped(int where, const QMimeData * mimeData);
44
bool append(const QMimeData * mimeData);
45
bool append(const QString & mimeData);
46
bool append(const QString & path, const KFileItem & fileItem);
48
void remove(int index);
50
QString serializedData() const;
52
bool load(const QString & data);
53
bool loadFromFile(const QString & url);
54
bool loadFromList(const QStringList & list);
55
bool loadDirectory(const QString & url);
57
QList < Lancelot::ActionListModel * > m_models;
61
void removeModelRequested(int index);
66
#endif // LANCELOTPARTS_MODELS_PARTSMERGEDMODEL_H