some changes on the filemonitor signals
This commit is contained in:
@@ -1,20 +1,22 @@
|
||||
#include "GridItemView.hpp"
|
||||
#include <iostream>
|
||||
|
||||
GridItemView::GridItemView(QWidget* parent)
|
||||
: QFrame(parent),
|
||||
fileController(std::make_shared<FileController>( )) {
|
||||
GridItemView::GridItemView(QWidget *parent)
|
||||
: QFrame(parent), fileController(std::make_shared<FileController>()) {
|
||||
|
||||
QGridLayout* mainLayout = new QGridLayout( );
|
||||
QGridLayout *mainLayout = new QGridLayout();
|
||||
|
||||
connect(fileController.get( ), &FileController::newPathEntered, this, [this, mainLayout](const std::unordered_map<std::filesystem::path, std::filesystem::file_time_type> paths) {
|
||||
std::cout << "path.first" << std::endl;
|
||||
|
||||
for (auto path : paths) {
|
||||
mainLayout->addWidget(new GridItem(path.first, this));
|
||||
}
|
||||
});
|
||||
connect(fileController.get(), &FileController::pathChanged, this,
|
||||
[this,
|
||||
mainLayout](const std::unordered_map<std::filesystem::path,
|
||||
std::filesystem::file_time_type>
|
||||
paths) {
|
||||
std::cout << "path.first" << std::endl;
|
||||
|
||||
for (auto path : paths) {
|
||||
mainLayout->addWidget(new GridItem(path.first, this));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
GridItemView::~GridItemView( ) { }
|
||||
GridItemView::~GridItemView() {}
|
||||
|
||||
Reference in New Issue
Block a user