/** * Performs actions following the opening or closing of a project. * This slot is connected to the hasProject() signal emitted by the project * manager. * @param opened true if a project was opened, false if a project was closed */ void MainWindow::projectOpenedClosed(bool opened) { // Adjust the window title. setWindowTitle(opened); // Nothing else to to if a project was closed. if (!opened) return; // Restore the session. Session session(ProjectManager::project()->path()); session.load(); editCont_->loadSession(session); queryDock_->loadSession(session); try { // Show the project files dialogue if files need to be added to the // project. if (ProjectManager::codebase().needFiles()) projectFiles(); } catch (Core::Exception* e) { e->showMessage(); delete e; } }
void ProjectNewLocal::slotSetFiles(bool) { if ( checkInsert->isChecked() ) { KURL::List files = projectFiles(); progressBar->setTotalSteps(files.count() - 1); progressBar->setTextEnabled(true); for (uint i = 0; i < files.count(); i++) { if ( !fileList.contains(files[i])) { fileList.append(files[i]); QListViewItem *it = listView->addItem(files[i], KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL())); if (it) it->setSelected(true); progressBar->setValue(i); } } progressBar->setTotalSteps(1); progressBar->setValue(0); progressBar->setTextEnabled(false); listView->checkboxTree(); } }