/* ====================================================================
 * Copyright (c) 2008  Martin Hauner
 *                     http://subcommander.tigris.org
 *
 * Subcommander is licensed as described in the file doc/COPYING, which
 * you should have received as part of this distribution.
 * ====================================================================
 */

// sc
#include "WcViewIndex.h"
#include "WcViewItemModel.h"


WcViewIndex::WcViewIndex( const QModelIndex& index )
: _idx(index)
{
}

bool WcViewIndex::dir() const
{
  return _idx.data(WcViewItemModel::DirRole).asBool();
}

sc::String WcViewIndex::name() const
{
  return _idx.data(WcViewItemModel::NameRole).value<sc::String>();
}
