summaryrefslogtreecommitdiffstats
path: root/filestreewidget.cpp
blob: e8afe7c640c3b0066c58c2f45a7e3fdc6bec6617 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU General Public License
  as published by the Free Software Foundation; either version
  2 of the License, or (at your option) any later version.
*/

#include <QHBoxLayout>

#include "filestreewidget.h"
#include "smmodelsingleton.h"
#include "filestreemodel.h"

FilesTreeWidget::FilesTreeWidget(QWidget *parent) : QWidget(parent){
	//the view
	mView = new FilesTreeView;
	mModel = static_cast<FilesTreeModel*>(SmModelSingleton::instance()->model("FilesModel"));
	mView->setModel(mModel);

	//layout
	QHBoxLayout *mainLayout = new QHBoxLayout;
	mainLayout->addWidget(mView);
	setLayout(mainLayout);
}

FilesTreeView::FilesTreeView(QWidget *parent) : QTreeView(parent) {}