2
// This file is part of the Marble Virtual Globe.
4
// This program is free software licensed under the GNU LGPL. You can
5
// find a copy of this license in LICENSE.txt in the top directory of
8
// Copyright 2007 Murad Tagirov <tmurad@gmail.com>
9
// Copyright 2009 Patrick Spendrin <ps_ml@gmx.de>
12
#ifndef MARBLE_FILEVIEWMODEL_H
13
#define MARBLE_FILEVIEWMODEL_H
15
#include <QtCore/QAbstractListModel>
16
#include <QtCore/QVariant>
18
#include "marble_export.h"
20
class QItemSelectionModel;
27
class MARBLE_EXPORT FileViewModel : public QAbstractListModel
32
explicit FileViewModel( QObject* parent = 0 );
35
virtual int rowCount( const QModelIndex& parent = QModelIndex() ) const;
36
virtual QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const;
37
virtual Qt::ItemFlags flags( const QModelIndex& index ) const;
38
virtual bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole );
40
void setFileManager( FileManager * fileManager );
41
QItemSelectionModel * selectionModel();
46
void append( int item );
47
void remove( int item );
50
Q_DISABLE_COPY( FileViewModel )
51
QItemSelectionModel *m_selectionModel;
52
FileManager *m_manager;