filemanager/src/inc/fmdrivemodel.cpp
changeset 30 6e96d2143d46
parent 29 b3155376f2b4
child 35 060d0b1ab845
equal deleted inserted replaced
29:b3155376f2b4 30:6e96d2143d46
    19 #include "fmfileiconprovider.h"
    19 #include "fmfileiconprovider.h"
    20 #include "fmutils.h"
    20 #include "fmutils.h"
    21 
    21 
    22 #include <QDir>
    22 #include <QDir>
    23 #include <QFileInfo>
    23 #include <QFileInfo>
       
    24 
       
    25 #include <hbglobal.h>
    24 
    26 
    25 FmDriveModel::FmDriveModel( QObject *parent, Options options,
    27 FmDriveModel::FmDriveModel( QObject *parent, Options options,
    26         FmDriveListProvider *driveListProvider ) :
    28         FmDriveListProvider *driveListProvider ) :
    27     QAbstractListModel( parent ), mOptions( options ), mDriveListProvider( driveListProvider )
    29     QAbstractListModel( parent ), mOptions( options ), mDriveListProvider( driveListProvider )
    28 {
    30 {
   106     if (orientation == Qt::Horizontal) {
   108     if (orientation == Qt::Horizontal) {
   107         if (role != Qt::DisplayRole)
   109         if (role != Qt::DisplayRole)
   108             return QVariant();
   110             return QVariant();
   109 
   111 
   110         switch (section) {
   112         switch (section) {
   111             case 0: return tr("Name");
   113             case 0: return hbTrId("Name");
   112             case 1: return tr("Size");
   114             case 1: return hbTrId("Size");
   113             case 2: return tr("Type");
   115             case 2: return hbTrId("Type");
   114             case 3: return tr("Date Modified");
   116             case 3: return hbTrId("Date Modified");
   115             default: return QVariant();
   117             default: return QVariant();
   116         }
   118         }
   117     }
   119     }
   118 
   120 
   119     return QAbstractItemModel::headerData( section, orientation, role );
   121     return QAbstractItemModel::headerData( section, orientation, role );