Zwrotomat/mainwindow.cpp
/**
 * @brief MainWindow::on_actionZ_Folderu_triggered
 * Action on loading files from given folder
 */
@brief MainWindow::on_actionZ_Folderu_triggered
Action on loading files from given folder
@brief MainWindow :: on_actionZ_Folderu_triggered Action on loading files from given folder
void MainWindow::on_actionZ_Folderu_triggered()
{
    this->m_currentComment = new MultiFileComment();
    qDeleteAll(this->m_Comments->begin(), this->m_Comments->end());
    this->m_Comments->clear();
    this->m_Comments = new QHash<QString, MultiFileComment*>();
    QDir dir = QFileDialog::getExistingDirectory(0, ("Select Project"), QDir::currentPath());
    this->m_selectedDir = dir;
    qDebug() << "Initilizing TreeView with " << dir;
    m_fileModel->setRootPath(dir.path());
    ui->treeFileExplorer->setModel(m_fileModel);
    ui->treeFileExplorer->setRootIndex(m_fileModel->index(dir.path()));
}
void MainWindow :: on_actionZ_Folderu_triggered ( ) { this -> m_currentComment = new MultiFileComment ( ) ; qDeleteAll ( this -> m_Comments -> begin ( ) , this -> m_Comments -> end ( ) ) ; this -> m_Comments -> clear ( ) ; this -> m_Comments = new QHash < QString , MultiFileComment * > ( ) ; QDir dir = QFileDialog :: getExistingDirectory ( 0 , ( " " ) , QDir :: currentPath ( ) ) ; this -> m_selectedDir = dir ; qDebug ( ) << " " << dir ; m_fileModel -> setRootPath ( dir . path ( ) ) ; ui -> treeFileExplorer -> setModel ( m_fileModel ) ; ui -> treeFileExplorer -> setRootIndex ( m_fileModel -> index ( dir . path ( ) ) ) ; }
@brief MainWindow::on_actionZ_Folderu_triggered
 Action on loading files from given folder
@brief MainWindow :: on_actionZ_Folderu_triggered Action on loading files from given folder
//clere QHash and dealocate occupied memory //set root path