NodeListView::NodeListView(const QString &path) : BaseWindow("qrc:/qml/NodeListView.qml"), viewPath(path), fileAction(FileActionsController::getInstance()), model(new NodeListModel(this)) { this->context->setContextProperty("nodeListModel", this->model); this->context->setContextProperty("viewPath", this->viewPath); connect(this->view, SIGNAL(openFolder(int)), this, SLOT(openFolder(int))); connect(this->view, SIGNAL(openFile(int)), this, SLOT(openFile(int))); connect(this->view, SIGNAL(renameNode(int, QString)), this, SLOT(renameNode(int, QString))); connect(this->view, SIGNAL(deleteNode(int)), this, SLOT(deleteNode(int))); connect(this->view, SIGNAL(publishFile(int, bool)), this, SLOT(publishFile(int, bool))); connect(this->view, SIGNAL(copyPublicLink(int)), this, SLOT(copyPublicLink(int))); connect(this->view, SIGNAL(menuCreateFolder(QString)), this, SLOT(menuCreateFolder(QString))); connect(this->view, SIGNAL(menuRefresh()), this, SLOT(refreshView())); connect(this->view, SIGNAL(menuAbout()), this, SLOT(menuAbout())); connect(this->fileAction, SIGNAL(actionFinished()), this, SLOT(refreshView())); connect(this->fileAction, SIGNAL(actionFinishedWithError(QString)), this, SLOT(showError(QString))); }
void loop() // run over and over again { menuRefresh(); menuNav(); }