/*! \brief Displayed the currently selected file. */ void showFile() { if (gitView_->selectedIndexes().empty()) return; WModelIndex selected = *gitView_->selectedIndexes().begin(); sourceView_->setIndex(selected); }
/*! \brief Change the filter on the file view when the selected folder * changes. */ void folderChanged() { if (folderView_->selectedIndexes().empty()) return; WModelIndex selected = *folderView_->selectedIndexes().begin(); boost::any d = selected.data(UserRole); if (!d.empty()) { std::string folder = boost::any_cast<std::string>(d); // For simplicity, we assume here that the folder-id does not // contain special regexp characters, otherwise these need to be // escaped -- or use the \Q \E qutoing escape regular expression // syntax (and escape \E) fileFilterModel_->setFilterRegExp(folder); } }