filebrowser/ui/inc/fbdrivemodel.h
changeset 55 2d9cac8919d3
parent 53 819e59dfc032
child 56 392f7045e621
equal deleted inserted replaced
53:819e59dfc032 55:2d9cac8919d3
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef FBDRIVEMODELH_H_
       
    19 #define FBDRIVEMODELH_H_
       
    20 
       
    21 #include "fbdriveentry.h"
       
    22 
       
    23 #include <QAbstractListModel>
       
    24 #include <QVariant>
       
    25 
       
    26 // Forward declarations
       
    27 class EngineWrapper;
       
    28 class QModelIndex;
       
    29 class QFileIconProvider;
       
    30 class QObject;
       
    31 
       
    32 class FbDriveModel : public QAbstractListModel
       
    33 {
       
    34     Q_OBJECT
       
    35 
       
    36 public:
       
    37     explicit FbDriveModel(EngineWrapper *engineWrapper, QObject *parent = 0);
       
    38     virtual ~FbDriveModel();
       
    39 
       
    40     int rowCount(const QModelIndex &parent = QModelIndex()) const;
       
    41     QVariant data(const QModelIndex &index, int role) const;
       
    42     QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
       
    43 
       
    44     FbDriveEntry driveEntry(const QModelIndex &index) const;
       
    45     QString driveLetter( const QModelIndex &index ) const;
       
    46     QString mediaTypeString(const QModelIndex &index) const;
       
    47 
       
    48 private:
       
    49     EngineWrapper *mEngineWrapper;
       
    50     QFileIconProvider *mFileIconProvider;
       
    51 };
       
    52 
       
    53 
       
    54 
       
    55 #endif /* FBDRIVEMODELH_H_ */