/* 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 #include "filestreewidget.h" #include "smmodelsingleton.h" #include "filestreemodel.h" FilesTreeWidget::FilesTreeWidget(QWidget *parent) : QWidget(parent){ //the view mView = new FilesTreeView; mModel = static_cast(SmModelSingleton::instance()->model("FilesModel")); mView->setModel(mModel); //layout QHBoxLayout *mainLayout = new QHBoxLayout; mainLayout->addWidget(mView); setLayout(mainLayout); } FilesTreeView::FilesTreeView(QWidget *parent) : QTreeView(parent) {}