2010-06-21 15:27:59 +02:00
|
|
|
#include "dirnavigationfactory.h"
|
|
|
|
|
#include "filesystemmodel.h"
|
|
|
|
|
|
|
|
|
|
#include <QTreeView>
|
|
|
|
|
#include <QDir>
|
|
|
|
|
|
|
|
|
|
#include <coreplugin/navigationwidget.h>
|
|
|
|
|
/**
|
|
|
|
|
\todo
|
|
|
|
|
*/
|
|
|
|
|
Core::NavigationView DirNavigationFactory::createWidget()
|
|
|
|
|
{
|
|
|
|
|
Core::NavigationView view;
|
|
|
|
|
|
2010-10-30 21:54:23 +02:00
|
|
|
// Create FileSystemModel and set the default path as home path
|
2010-06-21 15:27:59 +02:00
|
|
|
FileSystemModel* model = new FileSystemModel;
|
|
|
|
|
model->setRootPath(QDir::homePath());
|
|
|
|
|
|
|
|
|
|
// Create TreeView and set model
|
|
|
|
|
QTreeView* tree = new QTreeView;
|
|
|
|
|
tree->setModel(model);
|
|
|
|
|
|
|
|
|
|
view.widget = tree;
|
|
|
|
|
|
|
|
|
|
return view;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
\todo
|
|
|
|
|
*/
|
|
|
|
|
QString DirNavigationFactory::displayName()
|
|
|
|
|
{
|
|
|
|
|
return "Dir View";
|
|
|
|
|
}
|
|
|
|
|
|